mirror of
https://github.com/m5stack/m5-docs.git
synced 2026-05-20 10:23:01 -07:00
Merge branch 'master' of https://github.com/m5stack/m5-docs
This commit is contained in:
Vendored
+1
-3
File diff suppressed because one or more lines are too long
@@ -442,7 +442,7 @@ div.card-img-overlay:hover {
|
||||
.search {
|
||||
display: none;
|
||||
position: fixed;
|
||||
z-index: 2000;
|
||||
z-index: 1999;
|
||||
top: 22px;
|
||||
left: 260px;
|
||||
padding: 0 20px
|
||||
@@ -679,7 +679,6 @@ body[data-page="zh_CN/README.md"] .markdown-section {
|
||||
|
||||
.search {
|
||||
position: fixed;
|
||||
z-index: 10001;
|
||||
top: 15px;
|
||||
left: 50%;
|
||||
transform: translateX(-50%);
|
||||
@@ -1271,4 +1270,8 @@ table tr:nth-child(odd) {
|
||||
|
||||
.el-icon-loading{
|
||||
font-size:88px
|
||||
}
|
||||
}
|
||||
|
||||
[v-cloak] {
|
||||
display: none;
|
||||
}
|
||||
+105
-32
@@ -56,7 +56,81 @@ var header = new Vue({
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
var zoom_image = new Vue({
|
||||
el: '#zoom_image',
|
||||
data: {
|
||||
url: '',
|
||||
srcList: [],
|
||||
show: false,
|
||||
index:0,
|
||||
rotate:0,
|
||||
width:580,
|
||||
scale:1
|
||||
},
|
||||
methods: {
|
||||
stopScroll(){
|
||||
var mo=function(e){e.preventDefault();};
|
||||
document.body.style.overflow='hidden';
|
||||
document.addEventListener("touchmove",mo,false);//禁止页面滑动
|
||||
},
|
||||
canScroll(){
|
||||
var mo=function(e){e.preventDefault();};
|
||||
document.body.style.overflow='';//出现滚动条
|
||||
document.removeEventListener("touchmove",mo,false);
|
||||
},
|
||||
close(){
|
||||
this.show = false;
|
||||
this.index = 0;
|
||||
this.rotate = 0;
|
||||
this.width = 550;
|
||||
this.scale = 1;
|
||||
this.canScroll();
|
||||
},
|
||||
next() {
|
||||
if(this.index>=this.srcList.length){
|
||||
this.index = 0;
|
||||
}else{
|
||||
this.index++;
|
||||
}
|
||||
this.url = this.srcList[this.index]
|
||||
},
|
||||
prev() {
|
||||
if(this.index<=0){
|
||||
this.index = this.srcList.length-1;
|
||||
}else{
|
||||
this.index--;
|
||||
}
|
||||
this.url = this.srcList[this.index]
|
||||
},
|
||||
left() {
|
||||
this.rotate = this.rotate - 90;
|
||||
},
|
||||
right() {
|
||||
this.rotate = this.rotate + 90;
|
||||
},
|
||||
zoom_in() {
|
||||
this.width = this.width + 50
|
||||
},
|
||||
zoom_out() {
|
||||
this.width = this.width - 50
|
||||
},
|
||||
full() {
|
||||
this.width = this.width = 800
|
||||
},
|
||||
rollImg() {
|
||||
if(event.wheelDelta > 0){
|
||||
this.scale = this.scale + 0.05;
|
||||
}else{
|
||||
this.scale = this.scale - 0.05;
|
||||
}
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
img_style : function(){
|
||||
return `transition:all 0.2s ease 0s;transform: scale(${this.scale}) rotate(${this.rotate}deg); margin-left: 0px; margin-top: 0px; max-height: 100%; max-width: 100%; width:${this.width}px;`
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
function anchor_create(anchor_name,anchor_id){
|
||||
@@ -79,16 +153,18 @@ function anchor_create(anchor_name,anchor_id){
|
||||
$(".anchor-box").append(Part_A+"<img src="+icon_list[anchor_name]+">"+Part_B);
|
||||
if (anchor_name == "EASYLOADER"){
|
||||
if(("#example_video").length >0)
|
||||
$("#play-btn").on("click",function(ev){
|
||||
ev.stopPropagation();
|
||||
$(".easyloader-mask").toggleClass('video_play');
|
||||
$("#example_video")[0].play();
|
||||
})
|
||||
$("#example_video").on("click",function(ev){
|
||||
ev.preventDefault();
|
||||
$(".easyloader-mask").toggleClass('video_play');
|
||||
$("#example_video")[0].pause();
|
||||
})
|
||||
setTimeout(function(){
|
||||
$("#play-btn").on("click",function(ev){
|
||||
ev.stopPropagation();
|
||||
$(".easyloader-mask").toggleClass('video_play');
|
||||
$("#example_video")[0].play();
|
||||
})
|
||||
$("#example_video").on("click",function(ev){
|
||||
ev.preventDefault();
|
||||
$(".easyloader-mask").toggleClass('video_play');
|
||||
$("#example_video")[0].pause();
|
||||
})
|
||||
},200)
|
||||
}
|
||||
}else if((page_url.indexOf(/uiflow/) != -1)||(page_url.indexOf(/arduino/) != -1)||(page_url.indexOf(/quick_start/) != -1)||(page_url.indexOf(/related_documents/) != -1)){
|
||||
$(".anchor-box").append(Part_A+quickstart_icon+'<span style="line-height: 35px;" title=\''+anchor_name+'\'>'+anchor_name+'</span></a>');
|
||||
@@ -292,10 +368,7 @@ function faq_search(onEnter_content){
|
||||
}
|
||||
|
||||
$(document).ready(function() {
|
||||
// $(".btn-toggle").on('click', function() {
|
||||
// $(".btn-toggle").toggleClass('open');
|
||||
// $(".d-flex").toggleClass('open');
|
||||
// });
|
||||
|
||||
});
|
||||
|
||||
function change_title(language) {
|
||||
@@ -406,8 +479,23 @@ function isSupportWebp() {
|
||||
if (document.createElement('canvas').toDataURL('image/webp', 0.5).indexOf('data:image/webp') === 0){
|
||||
return true;
|
||||
}
|
||||
use_jpg();
|
||||
use_jpg();
|
||||
}
|
||||
|
||||
function img_zoom() {
|
||||
$('#main img').on('click',function(){
|
||||
window.zoom_image.url = this.src;
|
||||
window.zoom_image.srcList.push(this.src);
|
||||
for(var i=0 ; i<$('#main img').length;i++){
|
||||
if(window.zoom_image.srcList.indexOf($('#main img')[i].src) == -1){
|
||||
window.zoom_image.srcList.push($('#main img')[i].src);
|
||||
}
|
||||
}
|
||||
window.zoom_image.show = true;
|
||||
window.zoom_image.stopScroll();
|
||||
})
|
||||
}
|
||||
|
||||
function page_move(divId) {
|
||||
var t = $("#" + divId).offset().top;
|
||||
$('html, body').animate({
|
||||
@@ -461,19 +549,4 @@ function creat_pdf() {
|
||||
$(".easyloader-box").removeAttr("style");
|
||||
}
|
||||
|
||||
$(document).on("keypress", "form", function(event) { return event.keyCode != 13;});
|
||||
|
||||
|
||||
function zoom_image() {
|
||||
$('img').on('click',function(){
|
||||
var picSrc = $(this).attr('src')
|
||||
console.log(picSrc)
|
||||
// $('.pic02 img').attr('src',picSrc)
|
||||
// $('.pic02').show()
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
// $('img').on('click',function(){
|
||||
// $('.pic02').hide()
|
||||
// })
|
||||
$(document).on("keypress", "form", function(event) { return event.keyCode != 13;});
|
||||
Vendored
+10
-6
File diff suppressed because one or more lines are too long
@@ -465,6 +465,7 @@
|
||||
// barE2.style.display = "none";
|
||||
window.header.done();
|
||||
isSupportWebp();
|
||||
img_zoom();
|
||||
}, 200);
|
||||
}
|
||||
}
|
||||
|
||||
Vendored
+1
-1
@@ -38,7 +38,7 @@ function theme(color){return("<style>:root{--theme-color: "+color+";}</style>")}
|
||||
var barEl;var timeId;function init(){}
|
||||
function progressbar(ref){var loaded=ref.loaded;var total=ref.total;var step=ref.step;var num;!barEl&&init();if(step){num=parseInt(barEl.style.width||0,10)+step;num=num>80?80:num;}else{num=Math.floor(loaded/total*100);}
|
||||
if(num==Infinity){}else{}
|
||||
if(num>=95){clearTimeout(timeId);timeId=setTimeout(function(_){window.header.done();isSupportWebp();},200);}}
|
||||
if(num>=95){clearTimeout(timeId);timeId=setTimeout(function(_){window.header.done();isSupportWebp();img_zoom();},200);}}
|
||||
var cache={};function get(url,hasBar,headers){if(hasBar===void 0)hasBar=false;if(headers===void 0)headers={};var xhr=new XMLHttpRequest();var on=function(){xhr.addEventListener.apply(xhr,arguments);};var cached$$1=cache[url];if(cached$$1){return{then:function(cb){return cb(cached$$1.content,cached$$1.opt);},abort:noop}}
|
||||
xhr.open('GET',url);for(var i in headers){if(hasOwn.call(headers,i)){xhr.setRequestHeader(i,headers[i]);}}
|
||||
xhr.send();return{then:function(success,error){if(error===void 0)error=noop;if(hasBar){var id=setInterval(function(_){return progressbar({step:Math.floor(Math.random()*5+1)});},500);on('progress',progressbar);on('loadend',function(evt){progressbar(evt);clearInterval(id);});}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# ATOM Lite
|
||||
|
||||
<el-tag effect="plain">SKU:C008</e-tag>
|
||||
<el-tag effect="plain">SKU:C008</el-tag>
|
||||
|
||||
<div class="product_pic"><img src="assets/img/product_pics/core/minicore/atom/atom_lite_01.webp"><img src="assets/img/product_pics/core/minicore/atom/atom_lite_02.webp"></div>
|
||||
|
||||
|
||||
+1
-1
File diff suppressed because one or more lines are too long
+64
-32
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user