Skip to content

Commit 0175baa

Browse files
committed
build: add touch key
1 parent 390dc81 commit 0175baa

4 files changed

Lines changed: 47 additions & 70 deletions

File tree

assets/css/main.css

Lines changed: 16 additions & 66 deletions
Original file line numberDiff line numberDiff line change
@@ -1039,75 +1039,35 @@ mark {
10391039
background-color: rgb(15, 194, 215);
10401040
}
10411041

1042-
/* .anchor-box a:first-child {
1043-
border-top-right-radius: 5px;
1044-
background-color: rgb(15, 194, 237) ;
1045-
}
1046-
1047-
.anchor-box a {
1048-
background-color: rgb(15, 194, 237) ;
1049-
} */
1050-
10511042
.anchor-box a:nth-child(8) {
10521043
/* border-bottom-right-radius: 5px; */
10531044
background-color: rgb(15, 194, 237) ;
10541045
}
10551046
.anchor-box a:nth-child(9) {
1056-
border-bottom-right-radius: 5px;
10571047
background-color: rgb(15, 194, 255) ;
10581048
}
1059-
1060-
#gateway strong:hover {
1061-
background-color: rgba(15, 194, 237,0.3);
1062-
}
1063-
1064-
#cubecell strong:hover {
1065-
background-color: rgba(15, 194, 237,0.3);
1066-
}
1067-
1068-
#esp32_lora strong:hover {
1069-
background-color: rgba(15, 194, 237,0.3);
1070-
}
1071-
1072-
#stm32_lora strong:hover {
1073-
background-color: rgba(15, 194, 237,0.3);
1074-
}
1075-
1076-
#esp32_arduino strong:hover {
1077-
background-color: rgba(15, 194, 237,0.3);
1078-
}
1079-
1080-
#esp8266_arduino strong:hover {
1081-
background-color: rgba(15, 194, 237,0.3);
1082-
}
1083-
1084-
#oled strong:hover {
1085-
background-color: rgba(15, 194, 237,0.3);
1049+
.anchor-box a:nth-child(10) {
1050+
border-bottom-right-radius: 5px;
1051+
background-color: hsla(195, 91%, 50%, 0.842);
10861052
}
10871053

1054+
#gateway strong:hover,
1055+
#cubecell strong:hover,
1056+
#esp32_lora strong:hover,
1057+
#stm32_lora strong:hover,
1058+
#esp32_arduino strong:hover,
1059+
#esp8266_arduino strong:hover,
1060+
#oled strong:hover,
10881061
#e_ink strong:hover {
10891062
background-color: rgba(15, 194, 237,0.3);
10901063
}
1091-
/* #accessories strong:hover {
1092-
background-color: rgba(15, 194, 237,0.3);
1093-
} */
1094-
1095-
/* .anchor-active{
1096-
background-color: rgb(15, 93, 237) !important;
1097-
box-shadow: 0 10px 30px 0 rgba(51,51,51,.5) !important;
1098-
-moz-box-shadow: 0 10px 30px 0 rgba(51,51,51,.5) !important;
1099-
-webkit-box-shadow: 0 10px 30px 0 rgba(51,51,51,.5) !important;
1100-
} */
1101-
1102-
/* .anchor-quiet {
1103-
background-color: rgb(15, 93, 237) !important;
1104-
box-shadow: 0 10px 30px 0 rgba(51,51,51,.5) !important;
1105-
-moz-box-shadow: 0 10px 30px 0 rgba(51,51,51,.5) !important;
1106-
-webkit-box-shadow: 0 10px 30px 0 rgba(51,51,51,.5) !important;
1107-
} */
1108-
1109-
11101064

1065+
#touch_key
1066+
.item>a
1067+
img {
1068+
/* width: 220px;
1069+
height: 97px; */
1070+
}
11111071

11121072
@media screen and (max-width: 1450px) {
11131073
.anchor-box {
@@ -1137,14 +1097,4 @@ mark {
11371097
flex-direction:column;
11381098
z-index: 9999;
11391099
}
1140-
1141-
/* .anchor-active {
1142-
float: left;
1143-
transform: translateX(-600px) !important;
1144-
}
1145-
1146-
.anchor-quiet {
1147-
float: left;
1148-
transform: translateX(-600px) !important;
1149-
} */
11501100
}

index.html

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -338,6 +338,8 @@ <h5 class="my-0 mr-md-auto font-weight-normal">
338338
}
339339
else if(anchor_name === "ACCESSORIES") {
340340
$(".anchor-box").append(Part_A+Part_B);
341+
} else if (anchor_name === "TOUCH_KEY") {
342+
$('.anchor-box').append(Part_A + Part_B);
341343
}
342344
}
343345
function anchor_search(purchase_link="none",quickstart_link="none"){

index.md

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -141,9 +141,13 @@
141141
//HT-M01 to RPI Special converter
142142
{a:'https://heltec.cn/product/m01-converter/', img:'http://resource.heltec.cn/img/docs/accessories/M01_To_RPI.jpg',p:'HT-M01 to RPI Special converter'}
143143
];
144+
145+
const touchKeyList = [
146+
{a: 'https://heltec.org/project/touch-button/', img: 'http://resource.heltec.cn/img/docs/touch_key_1.jpg', p: 'Touch Key'}
147+
]
144148
// var product = [core,module,unit,base,application,accessory,aluminium];
145-
var product_class = [gateway_list,cubecell_list,esp32_lora_list,stm32_lora_list,esp32_arduino_list,esp8266_arduino_list,oled_list,e_ink_list,accessories_list];
146-
var product_class_name = ["gateway","cubecell","esp32_lora","stm32_lora","esp32_arduino","esp8266_arduino","oled","e_ink","accessories"];
149+
var product_class = [gateway_list,cubecell_list,esp32_lora_list,stm32_lora_list,esp32_arduino_list,esp8266_arduino_list,oled_list,e_ink_list,accessories_list, touchKeyList];
150+
var product_class_name = ["gateway","cubecell","esp32_lora","stm32_lora","esp32_arduino","esp8266_arduino","oled","e_ink","accessories", 'touch_key'];
147151

148152
for (var i=0; i<product_class_name.length; i++){
149153
$(".product_page").append("<div></div>");
@@ -236,6 +240,10 @@
236240
if(product_class[class_num][i].a === 'https://heltec.cn/product/solar-charging-panel/' ){
237241
$("#"+product_class_name[class_num]).append('<br><p><strong>Accessories</strong></p>');
238242
}
243+
//touch key
244+
if(product_class[class_num][i].a === 'https://heltec.org/project/touch-button/' ){
245+
$("#"+product_class_name[class_num]).append('<br><p><strong>Touch Key</strong></p>');
246+
}
239247

240248
$("#"+product_class_name[class_num]).append("<div class='item'><a><img><p class='item-title'></p><br></a></div> ");
241249
$("#"+product_class_name[class_num]+" .item:last-child a").attr("href", product_class[class_num][i].a);//允许图片链接
@@ -309,6 +317,9 @@
309317

310318
$("#accessories div.item a:lt("+accessories_list.length+")").append(mask_html);
311319
$("#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)');
312323

313324
anchor_search();
314325
scrollFunc();

zh_CN/README.md

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -144,9 +144,13 @@
144144
{a:'https://heltec.org/product/m01-converter/', img:'http://resource.heltec.cn/img/docs/accessories/M01_To_RPI.jpg',p:'HT-M01 to RPI Special converter'},
145145
];
146146

147+
const touchKeyList = [
148+
{a: 'https://heltec.org/project/touch-button/', img: 'http://resource.heltec.cn/img/docs/touch_key_1.jpg', p: 'Touch Key'}
149+
]
150+
147151
// var product = [core,module,unit,base,application,accessory,aluminium];
148-
var product_class = [gateway_list,cubecell_list,esp32_lora_list,stm32_lora_list,esp32_arduino_list,esp8266_arduino_list,oled_list,e_ink_list, accessories_list];
149-
var product_class_name = ["gateway","cubecell","esp32_lora","stm32_lora","esp32_arduino","esp8266_arduino","oled","e_ink", "accessories"];
152+
var product_class = [gateway_list,cubecell_list,esp32_lora_list,stm32_lora_list,esp32_arduino_list,esp8266_arduino_list,oled_list,e_ink_list, accessories_list, touchKeyList];
153+
var product_class_name = ["gateway","cubecell","esp32_lora","stm32_lora","esp32_arduino","esp8266_arduino","oled","e_ink", "accessories", 'touch_key'];
150154

151155
for (var i=0; i<product_class_name.length; i++){
152156
$(".product_page").append("<div></div>");
@@ -238,6 +242,13 @@
238242
if(product_class[class_num][i].a === 'https://heltec.org/product/solar-charging-panel/' ){
239243
$("#"+product_class_name[class_num]).append('<br><p><strong>Accessories</strong></p>');
240244
}
245+
246+
//touch key
247+
if(product_class[class_num][i].a === 'https://heltec.org/project/touch-button/' ){
248+
$("#"+product_class_name[class_num]).append('<br><p><strong>Touch Key</strong></p>');
249+
}
250+
251+
241252
$("#"+product_class_name[class_num]).append("<div class='item'><a><img><p class='item-title'></p><br></a></div> ");//<br>不能少
242253
$("#"+product_class_name[class_num]+" .item:last-child a").attr("href", product_class[class_num][i].a);//允许图片链接
243254
$("#"+product_class_name[class_num]+" .item:last-child img").attr("src", product_class[class_num][i].img);//产品的图片
@@ -308,6 +319,9 @@
308319

309320
$("#accessories div.item a:lt("+accessories_list.length+")").append(mask_html);//lt后面括号内的数字代表该类中需要添加掩盖页的数量
310321
$("#accessories .mask a").attr("href", "javascript:void(0)");
322+
323+
$(`#touch_key div.item a:lt(${touchKeyList.length})`).append(mask_html);
324+
$('#touch_key .mask a').attr('href', 'javascript:void(0)');
311325

312326
anchor_search();
313327
scrollFunc();

0 commit comments

Comments
 (0)