This commit is contained in:
vany5921
2020-07-24 18:13:00 +08:00
6 changed files with 57 additions and 58 deletions
+1 -1
View File
File diff suppressed because one or more lines are too long
+28 -39
View File
@@ -222,10 +222,10 @@ body[data-page="zh_CN/quick_start/m5stickc/m5stickc_quick_start.md"] article.mar
}
.item-title {
white-space: nowrap;
text-align: center;
margin-top: 10px;
margin-bottom: 10px
white-space: nowrap;
text-align: center;
margin-top: 0px !important;
margin-bottom: 28px !important;
}
.item a {
@@ -295,24 +295,20 @@ body[data-page="zh_CN/quick_start/m5stickc/m5stickc_quick_start.md"] article.mar
text-align: center
}
.item a:hover .mask {
opacity: 1
.product_page .item:hover{
transform: scale(1.3);
transition: all .3s ease;
z-index: 30;
box-shadow: 0 0 10px #6ab2ff
}
.product_page .item:hover .quickstart_btn{
display: block;
}
.mask-btn1 {
position: relative;
top: 30px;
left: 30px;
border: none;
width: 90px;
background-color: #007bffc7;
color: white;
}
.mask-btn2 {
position: relative;
top: 67px;
left: 30px;
border: none;
width: 90px;
background-color: #007bffc7;
@@ -330,9 +326,6 @@ body[data-page="zh_CN/quick_start/m5stickc/m5stickc_quick_start.md"] article.mar
z-index: 9999
}
.item:hover {
box-shadow: 0 0 10px #6ab2ff
}
.item .mask_sku {
@@ -538,24 +531,6 @@ body[data-page="zh_CN/README.md"] .markdown-section {
transform: translateX(-50%);
}
.mask {
display: none;
width: 130px;
height: 186px
}
.mask-btn1 {
position: relative;
top: 50px;
left: 23px;
}
.mask-btn2 {
position: relative;
top: 75px;
left: 23px;
}
.video_size {
width: 100%
}
@@ -1112,7 +1087,8 @@ table tr:nth-child(odd) {
background: #007bffc7;
border: solid 1px #e9f7f6;
border-radius:5px;
text-align: center;
text-align: center;
z-index: 40;
}
#tag_title::after {
@@ -1180,4 +1156,17 @@ table tr:nth-child(odd) {
#product_result img {
width: 100%;
}
.quickstart_btn {
position: absolute;
border: none;
color: white;
left: 30px;
bottom: 38px;
transform: scale(1);
font-size: 9px;
display: none;
}
+19 -3
View File
@@ -431,15 +431,31 @@ function onEnter(event){
$('#search_cover').show(200);
window.zoom_image.stopScroll();
Input.animate({width:300});
// $(".search_point").show(240);
var count = 0;
for(let key in window.localStorage){
var current_url = window.location.href;
if(((current_url.indexOf("/en/") != -1)&&(key.indexOf("/en/") != -1))){
count++;
if(count > 5){
break;
}
}else if(((current_url.indexOf("/zh_CN/") != -1)&&(key.indexOf("/zh_CN/") != -1))){
count++;
if(count > 5){
break;
}
}else{
localStorage.clear();
set_search_keyword();
break;
}
}
});
Input.focusout(function (){
Input.animate({width:240});
// $('#search_cover').hide(200);
$(".item").css("z-index","0");
setTimeout(function(){
// $(".search_point").hide(140);
},160);
});
+1 -1
View File
@@ -40,7 +40,7 @@ $('#product_result').append(clone_obj);}}
if(textEnter.length>0){get_search_keyword(onEnter_content);}else{window.search_cover.contant_result=[{name:'',url:'',contant:search_cover.search_note}];$('#product_result')[0].textContent=search_cover.search_note;}}
function onEnter(event){timer=setTimeout(function(){var onEnter_content=event.target.value.toLowerCase();select_search_page(onEnter_content);clearTimeout(timer);timer=null;},250);}
function select_search_page(onEnter_content){link=window.location.href;if(((link.slice(-4)=="/en/")||(link.slice(-7)=="/zh_CN/"))||((link.indexOf(/en/)==-1)&&(link.indexOf(/zh_CN/)==-1))){product_search(onEnter_content);}else if(link.slice(-4)=="/faq"){faq_search(onEnter_content);}else{detail_search(onEnter_content);}}
var Input=$('form input');Input.focusin(function(){$('#search_cover').show(200);window.zoom_image.stopScroll();Input.animate({width:300});});Input.focusout(function(){Input.animate({width:240});$(".item").css("z-index","0");setTimeout(function(){},160);});function select(event){var s=event.textContent.toLowerCase();$("#thetarget").removeClass("show");$(".btn-group-vertical button").addClass("btn-light");$(event).removeClass("btn-light");$(event).addClass("btn-primary");page_move(s);}
var Input=$('form input');Input.focusin(function(){$('#search_cover').show(200);window.zoom_image.stopScroll();Input.animate({width:300});var count=0;for(let key in window.localStorage){var current_url=window.location.href;if(((current_url.indexOf("/en/")!=-1)&&(key.indexOf("/en/")!=-1))){count++;if(count>5){break;}}else if(((current_url.indexOf("/zh_CN/")!=-1)&&(key.indexOf("/zh_CN/")!=-1))){count++;if(count>5){break;}}else{localStorage.clear();set_search_keyword();break;}}});Input.focusout(function(){Input.animate({width:240});$(".item").css("z-index","0");setTimeout(function(){},160);});function select(event){var s=event.textContent.toLowerCase();$("#thetarget").removeClass("show");$(".btn-group-vertical button").addClass("btn-light");$(event).removeClass("btn-light");$(event).addClass("btn-primary");page_move(s);}
$(document).ready(function(){});function change_title(language){if(language=="en"){header.platform={UIFlow:"#/en/uiflow/uiflow_home_page",Arduino:"#/en/arduino/arduino_home_page",MicroPython:"https://github.com/m5stack/UIFlow-Code",FreeRTOS:"#/en/quick_start/m5stickc/m5stickc_quick_start_with_AWS-FreeRTOS_Windows"}
header.case_link="#/en/case";header.faq_link="#/en/faq";header.i2c_table="I2C Address Table";header.comparison_table="Product Comparison";header.homepage_title="Product List";header.product_list_title="Product";header.language_list_title="Language";header.platform_list_title="Platform|API";header.faq_title="FAQ";header.case_title="Cases";header.pdf_notify="Creating PDF.....";search_cover.search_note="No relevant information was found, please enter product keywords and search again.";search_cover.current_page_title="Current Page";search_cover.related_page_title="Related Page";}
if(language=="zh_CN"){header.platform={UIFlow:"#/zh_CN/uiflow/uiflow_home_page",Arduino:"#/zh_CN/arduino/arduino_home_page",MicroPython:"https://github.com/m5stack/UIFlow-Code",FreeRTOS:"#/zh_CN/quick_start/m5stickc/m5stickc_quick_start_with_AWS-FreeRTOS_Windows"}
+4 -7
View File
@@ -256,9 +256,7 @@
"CORNER":"Aluminium"
};
const search_logo = `<svg style="position: absolute; width:100%;text-align:center;margin-top: 50px;"xmlns="http://www.w3.org/2000/svg" width="45" height="45" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" role="img" viewBox="0 0 24 24" focusable="false"><circle cx="10.5" cy="10.5" r="7.5"></circle><path d="M21 21l-5.2-5.2"></path></svg>`
const mask_btn = `<a href="#" style="color:white;text-decoration:none" target='view_window'><button type="button" class="btn-sm btn-primary mask-btn1">QuickStart</button></a><button type="button" class="btn-sm btn-primary mask-btn2">Document</button>`
const mask_btn = `<a href="#" class="quickstart_btn" target='view_window'><button type="button" class="mask-btn1">QuickStart</button></a>`
for (var class_num=0; class_num<product_class.length; class_num++ ){
for (var i=0; i<product_class[class_num].length; i++ ) {
@@ -270,12 +268,11 @@
$("#"+product_class_name[class_num]+" .item:last-child img").attr("src", product_class[class_num][i].img);
$("#"+product_class_name[class_num]+" .item:last-child p").text(product_class[class_num][i].p);
$("#"+product_class_name[class_num]+" .item:last-child p").attr("data-kw", product_class[class_num][i].kw);
$("#"+product_class_name[class_num]+" .item:last-child a").append(`<div class="mask"><p class="mask_sku">${product_class[class_num][i].sku}</p></div>`);
$("#"+product_class_name[class_num]+" .item:last-child a").append(`<div class="mask"><p class="mask_sku"></p></div>`);
if(typeof(product_class[class_num][i].qs) != "undefined"){
$("#"+product_class_name[class_num]+" .item:last-child a .mask").append(mask_btn);
$("#"+product_class_name[class_num]+" .item:last-child a .mask a").attr("href", product_class[class_num][i].qs);
$("#"+product_class_name[class_num]+" .item:last-child").append(mask_btn);
$("#"+product_class_name[class_num]+" .item:last-child .quickstart_btn").attr("href", product_class[class_num][i].qs);
}else{
$("#"+product_class_name[class_num]+" .item:last-child a .mask").append(search_logo);
}
}
}
+4 -7
View File
@@ -252,9 +252,7 @@
"CORNER":"Aluminium"
};
const search_logo = `<svg style="position: absolute; width:100%;text-align:center;margin-top: 50px;"xmlns="http://www.w3.org/2000/svg" width="45" height="45" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" role="img" viewBox="0 0 24 24" focusable="false"><circle cx="10.5" cy="10.5" r="7.5"></circle><path d="M21 21l-5.2-5.2"></path></svg>`
const mask_btn = `<a href="#" style="color:white;text-decoration:none" target='view_window'><button type="button" class="btn-sm btn-primary mask-btn1">快速上手</button></a><button type="button" class="btn-sm btn-primary mask-btn2">产品文档</button>`
const mask_btn = `<a href="#" class="quickstart_btn" target='view_window'><button type="button" class="mask-btn1">快速上手</button></a>`
for (var class_num=0; class_num<product_class.length; class_num++ ){
for (var i=0; i<product_class[class_num].length; i++ ) {
@@ -266,12 +264,11 @@
$("#"+product_class_name[class_num]+" .item:last-child img").attr("src", product_class[class_num][i].img);
$("#"+product_class_name[class_num]+" .item:last-child p").text(product_class[class_num][i].p);
$("#"+product_class_name[class_num]+" .item:last-child p").attr("data-kw", product_class[class_num][i].kw);
$("#"+product_class_name[class_num]+" .item:last-child a").append(`<div class="mask"><p class="mask_sku">${product_class[class_num][i].sku}</p></div>`);
$("#"+product_class_name[class_num]+" .item:last-child a").append(`<div class="mask"><p class="mask_sku"></p></div>`);
if(typeof(product_class[class_num][i].qs) != "undefined"){
$("#"+product_class_name[class_num]+" .item:last-child a .mask").append(mask_btn);
$("#"+product_class_name[class_num]+" .item:last-child a .mask a").attr("href", product_class[class_num][i].qs);
$("#"+product_class_name[class_num]+" .item:last-child").append(mask_btn);
$("#"+product_class_name[class_num]+" .item:last-child .quickstart_btn").attr("href", product_class[class_num][i].qs);
}else{
$("#"+product_class_name[class_num]+" .item:last-child a .mask").append(search_logo);
}
}
}