Skip to content

Commit bf45411

Browse files
committed
feat: 添加ht-m01s
1 parent e42b7ff commit bf45411

3 files changed

Lines changed: 63 additions & 58 deletions

File tree

assets/image/ht_m01s.jpg

579 KB
Loading

index.md

Lines changed: 53 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,11 @@
66

77
<script>
88
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'},
1011
{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'},
1113
{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'}
1314
];
1415

1516
const cubecell_list = [
@@ -159,7 +160,7 @@
159160

160161
//append的内容将显示在product_class.p名称的上方,并作为一行的开始
161162
/*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"){
163164
$("#"+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>');
164165
}
165166
/*cubecell*/
@@ -253,24 +254,25 @@
253254
}
254255
//给lora gateway添加属性
255256
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);
266268

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+
}
274276
function convertToArray(nodes) {
275277
let array = null;
276278
try {
@@ -283,46 +285,46 @@
283285
}
284286
return array;
285287
}
286-
appendAttr();
288+
appendAttr();
287289

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>`;
290292

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");
295298

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");
298301

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");
301304

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");
304307

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+
308311

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");
311314

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");
314317

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");
317320

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)");
327323

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+
});
328330
</script>

zh_CN/README.md

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,11 @@
66

77
<script>
88
var 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双通道LoRa网关'},
1011
{a:"https://heltec.org/project/ht-m01", img:"https://resource.heltec.cn/img/docs/ht_m01.jpg", p:"HT-M01通信验证LoRa网关"},
11-
{a:"https://heltec.org/project/ht-m02", img:"https://resource.heltec.cn/img/docs/ht_m02.jpg", p:"HT-M02边缘计算LoRa网关"},
12-
{a:'https://heltec.org/project/ht-m00', img:'https://resource.heltec.cn/img/docs/ht_m00.jpg', p:'HT-M00双通道LoRa网关'}
12+
{a:'https://heltec.org/project/ht-m01s', img: '../assets/image/ht_m01s.jpg', p: 'HT-M01S室内LoRa网关'},
13+
{a:"https://heltec.org/project/ht-m02", img:"https://resource.heltec.cn/img/docs/ht_m02.jpg", p:"HT-M02边缘计算LoRa网关"}
1314
];
1415

1516
var cubecell_list = [
@@ -161,7 +162,7 @@
161162
for (var i=0; i<product_class[class_num].length; i++ ) {
162163
//append的内容将显示在product_class.p名称的上方,并作为一行的开始
163164
/*lora gateway*/
164-
if(product_class[class_num][i].p === "HT-M01通信验证LoRa网关"){
165+
if(product_class[class_num][i].p === "HT-M00双通道LoRa网关"){
165166
$("#"+product_class_name[class_num]).append('<br><p> <a href="#/zh_CN/products/lora/lora_gateway/heltec_lora_gateway_list"> <strong>LoRa 网关</strong> </a> </p>');
166167
}
167168
/*cubecell*/
@@ -259,9 +260,10 @@
259260
//给lora gateway添加属性
260261
function appendAttr(e) {
261262
const gatewayId = [
262-
'htm-01',
263-
'htm-02',
264-
'htm-00'
263+
'htm-00',
264+
'htm-01',
265+
'htm-01s',
266+
'htm-02'
265267
];
266268
let
267269
nodeName = '',
@@ -296,6 +298,7 @@
296298
$("#gateway div#htm-01 .mask a").attr("href", "https://heltec-automation.readthedocs.io/zh_CN/latest/gateway/ht-m01/index.html");
297299
$("#gateway div#htm-02 .mask a").attr("href", "https://heltec-automation.readthedocs.io/zh_CN/latest/gateway/ht-m02_4g/index.html");
298300
$("#gateway div#htm-00 .mask a").attr("href", "https://heltec-automation.readthedocs.io/zh_CN/latest/gateway/ht-m00/index.html");
301+
$("#gateway div#htm-01s .mask a").attr("href", "https://heltec-automation.readthedocs.io/zh_CN/latest/gateway/ht-m01/index.html");
299302

300303
$("#cubecell div.item a:lt("+cubecell_list.length+")").append(mask_html);//lt后面括号内的数字代表该类中需要添加掩盖页的数量
301304
$("#cubecell .mask a").attr("href", "https://heltec-automation.readthedocs.io/zh_CN/latest/cubecell/quick_start.html");

0 commit comments

Comments
 (0)