|
6 | 6 |
|
7 | 7 | <script> |
8 | 8 | const gateway_list = [ |
9 | | - //Core |
| 9 | + //LoRa Gateway |
| 10 | + {a:'https://heltec.org/project/ht-m00', img:'https://resource.heltec.cn/img/docs/ht_m00.jpg', p:'HT-M00 Dual Channel LoRa Gateway'}, |
10 | 11 | {a:"https://heltec.cn/project/ht-m01", img:"https://resource.heltec.cn/img/docs/ht_m01.jpg", p:"HT-M01 PicoCell LoRa Gateway"}, |
| 12 | + {a:'https://heltec.org/project/ht-m01s', img: './assets/image/ht_m01s.jpg', p: 'HT-M01S Indoor LoRa Gateway'}, |
11 | 13 | {a:"https://heltec.cn/project/ht-m02", img:"https://resource.heltec.cn/img/docs/ht_m02.jpg", p:"HT-M02 Edge LoRa Gateway"}, |
12 | | - {a:'https://heltec.org/project/ht-m00', img:'https://resource.heltec.cn/img/docs/ht_m00.jpg', p:'HT-M00 Dual Channel LoRa Gateway'} |
13 | 14 | ]; |
14 | 15 |
|
15 | 16 | const cubecell_list = [ |
|
159 | 160 |
|
160 | 161 | //append的内容将显示在product_class.p名称的上方,并作为一行的开始 |
161 | 162 | /*lora gateway*/ |
162 | | - if(product_class[class_num][i].p === "HT-M01 PicoCell LoRa Gateway"){ |
| 163 | + if(product_class[class_num][i].p === "HT-M00 Dual Channel LoRa Gateway"){ |
163 | 164 | $("#"+product_class_name[class_num]).append('<br><p> <a href="#/en/products/lora/lora_gateway/heltec_lora_gateway_list"> <strong>LoRa Gateway</strong> </a> </p>'); |
164 | 165 | } |
165 | 166 | /*cubecell*/ |
|
253 | 254 | } |
254 | 255 | //给lora gateway添加属性 |
255 | 256 | function appendAttr(e) { |
256 | | - const gatewayId = [ |
257 | | - 'htm-01', |
258 | | - 'htm-02', |
259 | | - 'htm-00' |
260 | | - ]; |
261 | | - let |
262 | | - nodeName = '', |
263 | | - index = 0, |
264 | | - htm_01 = document.querySelector('#gateway'), |
265 | | - nodes = convertToArray(htm_01.childNodes); |
| 257 | + const gatewayId = [ |
| 258 | + 'htm-00', |
| 259 | + 'htm-01', |
| 260 | + 'htm-01s', |
| 261 | + 'htm-02' |
| 262 | + ]; |
| 263 | + let |
| 264 | + nodeName = '', |
| 265 | + index = 0, |
| 266 | + htm_01 = document.querySelector('#gateway'), |
| 267 | + nodes = convertToArray(htm_01.childNodes); |
266 | 268 |
|
267 | | - nodes.forEach( node => { |
268 | | - if (node.nodeName.toLocaleLowerCase() === 'div') { |
269 | | - node.setAttribute('id', gatewayId[index]) |
270 | | - index++; |
271 | | - } |
272 | | - }); |
273 | | - } |
| 269 | + nodes.forEach( node => { |
| 270 | + if (node.nodeName.toLocaleLowerCase() === 'div') { |
| 271 | + node.setAttribute('id', gatewayId[index]) |
| 272 | + index++; |
| 273 | + } |
| 274 | + }); |
| 275 | + } |
274 | 276 | function convertToArray(nodes) { |
275 | 277 | let array = null; |
276 | 278 | try { |
|
283 | 285 | } |
284 | 286 | return array; |
285 | 287 | } |
286 | | - appendAttr(); |
| 288 | + appendAttr(); |
287 | 289 |
|
288 | | - $(document).ready(function(){ |
289 | | - const mask_html = `<div class="mask"><a href="#" style="color:white;text-decoration:none" ><button type="button" class="btn-sm btn-primary mask-btn1">Docs Pages</button></a><button type="button" class="btn-sm btn-primary mask-btn2">Product Info</button></div>`; |
| 290 | + $(document).ready(function(){ |
| 291 | + const mask_html = `<div class="mask"><a href="#" style="color:white;text-decoration:none" ><button type="button" class="btn-sm btn-primary mask-btn1">Docs Pages</button></a><button type="button" class="btn-sm btn-primary mask-btn2">Product Info</button></div>`; |
290 | 292 |
|
291 | | - $("#gateway div.item a:lt(" + gateway_list.length +")").append(mask_html); |
292 | | - $("#gateway div#htm-01 .mask a").attr("href", "https://heltec-automation-docs.readthedocs.io/en/latest/gateway/ht-m01/index.html"); |
293 | | - $("#gateway div#htm-02 .mask a").attr("href", "https://heltec-automation-docs.readthedocs.io/en/latest/gateway/ht-m02_4g/index.html"); |
294 | | - $("#gateway div#htm-00 .mask a").attr("href", "https://heltec-automation-docs.readthedocs.io/en/latest/gateway/ht-m00/index.html"); |
| 293 | + $("#gateway div.item a:lt(" + gateway_list.length +")").append(mask_html); |
| 294 | + $("#gateway div#htm-01 .mask a").attr("href", "https://heltec-automation-docs.readthedocs.io/en/latest/gateway/ht-m01/index.html"); |
| 295 | + $("#gateway div#htm-02 .mask a").attr("href", "https://heltec-automation-docs.readthedocs.io/en/latest/gateway/ht-m02_4g/index.html"); |
| 296 | + $("#gateway div#htm-00 .mask a").attr("href", "https://heltec-automation-docs.readthedocs.io/en/latest/gateway/ht-m00/index.html"); |
| 297 | + $("#gateway div#htm-01s .mask a").attr("href", "https://heltec-automation-docs.readthedocs.io/en/latest/gateway/ht-m01/index.html"); |
295 | 298 |
|
296 | | - $("#cubecell div.item a:lt("+cubecell_list.length+")").append(mask_html); |
297 | | - $("#cubecell .mask a").attr("href", "https://heltec-automation-docs.readthedocs.io/en/latest/cubecell/quick_start.html"); |
| 299 | + $("#cubecell div.item a:lt("+cubecell_list.length+")").append(mask_html); |
| 300 | + $("#cubecell .mask a").attr("href", "https://heltec-automation-docs.readthedocs.io/en/latest/cubecell/quick_start.html"); |
298 | 301 |
|
299 | | - $("#esp32_lora div.item a:lt("+esp32_lora_list.length+")").append(mask_html); |
300 | | - $("#esp32_lora .mask a").attr("href", "https://heltec-automation-docs.readthedocs.io/en/latest/esp32+arduino/quick_start.html"); |
| 302 | + $("#esp32_lora div.item a:lt("+esp32_lora_list.length+")").append(mask_html); |
| 303 | + $("#esp32_lora .mask a").attr("href", "https://heltec-automation-docs.readthedocs.io/en/latest/esp32+arduino/quick_start.html"); |
301 | 304 |
|
302 | | - $("#stm32_lora div.item a:lt("+stm32_lora_list.length+")").append(mask_html); |
303 | | - $("#stm32_lora .mask a").attr("href", "https://heltec-automation-docs.readthedocs.io/en/latest/stm32/quick_start.html"); |
| 305 | + $("#stm32_lora div.item a:lt("+stm32_lora_list.length+")").append(mask_html); |
| 306 | + $("#stm32_lora .mask a").attr("href", "https://heltec-automation-docs.readthedocs.io/en/latest/stm32/quick_start.html"); |
304 | 307 |
|
305 | | - $("#esp32_arduino div.item a:lt("+esp32_arduino_list.length+")").append(mask_html); |
306 | | - $("#esp32_arduino .mask a").attr("href", "https://heltec-automation-docs.readthedocs.io/en/latest/esp32+arduino/quick_start.html"); |
307 | | - |
| 308 | + $("#esp32_arduino div.item a:lt("+esp32_arduino_list.length+")").append(mask_html); |
| 309 | + $("#esp32_arduino .mask a").attr("href", "https://heltec-automation-docs.readthedocs.io/en/latest/esp32+arduino/quick_start.html"); |
| 310 | + |
308 | 311 |
|
309 | | - $("#esp8266_arduino div.item a:lt("+esp8266_arduino_list.length+")").append(mask_html); |
310 | | - $("#esp8266_arduino .mask a").attr("href", "https://heltec-automation-docs.readthedocs.io/en/latest/esp8266+arduino/quick_start.html"); |
| 312 | + $("#esp8266_arduino div.item a:lt("+esp8266_arduino_list.length+")").append(mask_html); |
| 313 | + $("#esp8266_arduino .mask a").attr("href", "https://heltec-automation-docs.readthedocs.io/en/latest/esp8266+arduino/quick_start.html"); |
311 | 314 |
|
312 | | - $("#oled div.item a:lt("+oled_list.length+")").append(mask_html); |
313 | | - $("#oled .mask a").attr("href", "https://docs.heltec.cn/#/en/products/display/oled/heltec_oled_display_list"); |
| 315 | + $("#oled div.item a:lt("+oled_list.length+")").append(mask_html); |
| 316 | + $("#oled .mask a").attr("href", "https://docs.heltec.cn/#/en/products/display/oled/heltec_oled_display_list"); |
314 | 317 |
|
315 | | - $("#e_ink div.item a:lt("+e_ink_list.length+")").append(mask_html); |
316 | | - $("#e_ink .mask a").attr("href", "https://docs.heltec.cn/#/en/products/display/eink/heltec_eink_display_list"); |
| 318 | + $("#e_ink div.item a:lt("+e_ink_list.length+")").append(mask_html); |
| 319 | + $("#e_ink .mask a").attr("href", "https://docs.heltec.cn/#/en/products/display/eink/heltec_eink_display_list"); |
317 | 320 |
|
318 | | - $("#accessories div.item a:lt("+accessories_list.length+")").append(mask_html); |
319 | | - $("#accessories .mask a").attr("href", "javascript:void(0)"); |
320 | | - |
321 | | - $(`#touch_key div.item a:lt(${touchKeyList.length})`).append(mask_html); |
322 | | - $('#touch_key .mask a').attr('href', 'javascript:void(0)'); |
323 | | - |
324 | | - anchor_search(); |
325 | | - scrollFunc(); |
326 | | - }); |
| 321 | + $("#accessories div.item a:lt("+accessories_list.length+")").append(mask_html); |
| 322 | + $("#accessories .mask a").attr("href", "javascript:void(0)"); |
327 | 323 |
|
| 324 | + $(`#touch_key div.item a:lt(${touchKeyList.length})`).append(mask_html); |
| 325 | + $('#touch_key .mask a').attr('href', 'javascript:void(0)'); |
| 326 | + |
| 327 | + anchor_search(); |
| 328 | + scrollFunc(); |
| 329 | + }); |
328 | 330 | </script> |
0 commit comments