2018-12-25 16:04:58 +08:00
<!doctype html>
< html lang = "en" >
2019-06-27 20:56:54 +08:00
2018-12-25 16:04:58 +08:00
< head >
< meta charset = "utf-8" >
< meta http-equiv = "X-UA-Compatible" content = "IE=edge" >
< meta name = "viewport" content = "width=device-width, initial-scale=1, minimum-scale=1.0, shrink-to-fit=no" >
2019-06-27 20:56:54 +08:00
< meta name = "description"
content = "M5Stack Documentations - Modular Rapid Product Development Toolkit, based on ESP32. ESP32 is a series of low cost, low power system on a chip microcontrollers with integrated Wi-Fi and dual-mode Bluetooth." >
2018-12-25 16:04:58 +08:00
< meta name = "google-site-verification" content = "_EWJaM8G6xwMtEqemO4yN8WqSU2CaKVi3jTj0gLg48E" >
< title > M5Stack - A series of modular stackable development devices</ title >
< link rel = "icon" href = "assets/img/favicon.ico" >
2019-07-26 19:55:25 +08:00
< link rel = "stylesheet" href = "assets/css/loading.css" >
< script >
var _LoadingHtml = '<div id="loading"><div class="loading-flex"><div class="demo3"></div><div class="demo3"></div><div class="demo3"></div><div class="demo3"></div><div class="demo3"></div><div class="demo3"></div><div class="demo3"></div><div class="demo3"></div></div></div>' ;
document . write ( _LoadingHtml );
//监听加载状态改变
document . onreadystatechange = completeLoading ;
//加载状态为complete时移除loading效果
function completeLoading () {
if ( document . readyState == "complete" ) {
var loadingMask = document . getElementById ( 'loading' );
loadingMask . parentNode . removeChild ( loadingMask );
}
}
</ Script >
2018-12-25 16:04:58 +08:00
<!-- Stylesheets -->
< link rel = "stylesheet" href = "https://unpkg.com/docsify-themeable/dist/css/theme-simple.css" title = "Simple" >
2019-06-18 21:16:27 +08:00
2019-07-18 19:23:22 +08:00
2019-06-13 18:06:23 +08:00
< link rel = "stylesheet" href = "https://cdn.staticfile.org/twitter-bootstrap/4.1.0/css/bootstrap.min.css" >
2019-06-27 20:56:54 +08:00
2019-07-18 19:23:22 +08:00
< link rel = "stylesheet" href = "assets/css/main.css" >
2019-06-13 18:06:23 +08:00
< script src = "https://cdn.staticfile.org/jquery/3.2.1/jquery.min.js" ></ script >
2019-06-27 20:56:54 +08:00
2019-06-13 18:06:23 +08:00
< script src = "https://cdn.staticfile.org/popper.js/1.12.5/umd/popper.min.js" ></ script >
2019-06-27 20:56:54 +08:00
2019-06-13 18:06:23 +08:00
< script src = "https://cdn.staticfile.org/twitter-bootstrap/4.1.0/js/bootstrap.min.js" ></ script >
2019-06-27 20:56:54 +08:00
2018-12-25 16:04:58 +08:00
</ head >
< body >
2019-07-18 19:23:22 +08:00
< div class = "btn-toggle" ></ div >
< div class = "d-flex a flex-column flex-md-row align-items-center p-3 px-md-4 mb-3 bg-white border-bottom shadow-sm" >
2019-07-22 21:11:52 +08:00
< h5 class = "my-0 mr-md-auto font-weight-normal" >< a href = "https://m5stack.com/" >< img src = "//cdn.shopify.com/s/files/1/0056/7689/2250/files/LOGO_40x.jpg?v=1563273356" style = "margin-right:10px;margin-top:-5px" ></ a > M5Stack Docs</ h5 >
2019-07-18 19:23:22 +08:00
< nav class = "my-2 my-md-0 mr-md-3" >
< a id = "product" class = "p-2 text-dark" href = "#" > Product</ a >
< a class = "p-2 text-dark dropdown-toggle" data-toggle = "dropdown" > API</ a >
< div class = "dropdown-menu" >
< a id = "arduino" class = "dropdown-item" href = "#/en/api" > Arduino API</ a >
< a class = "dropdown-item" href = "https://github.com/m5stack/UIFlow-Code/wiki" > MicroPython API</ a >
</ div >
< a id = "cases" class = "p-2 text-dark" href = "#/en/case" > M5Stack Cases</ a >
< a id = "related" class = "p-2 text-dark" href = "#/en/related_documents" > Related Documents</ a >
< a id = "faq" class = "p-2 text-dark" href = "#/en/faq" style = "margin-right: 70px;" > FAQ</ a >
</ nav >
< a id = "language" class = "btn btn-primary" style = "color:#fff" onclick = "language()" > 中文</ a >
</ div >
2018-12-25 16:04:58 +08:00
< div id = "app" > loading...</ div >
2019-07-22 21:11:52 +08:00
< div >< img src = "https://m5stack.oss-cn-shenzhen.aliyuncs.com/image/back_top.png" class = "back_top" onclick = "(function(){$('html, body').animate({scrollTop: 0}, 500);})()" ></ div >
2018-12-25 16:04:58 +08:00
< script >
window . $docsify = {
// GENERAL
// -----------------------------------------------------------------
2019-06-27 20:56:54 +08:00
name : 'M5Stack docs' ,
2019-07-18 19:23:22 +08:00
// repo: 'https://github.com/m5stack/m5-docs',
2019-06-27 20:56:54 +08:00
homepage : 'index.md' ,
2019-07-18 19:23:22 +08:00
// loadNavbar: 'navbar.md',
2018-12-25 16:04:58 +08:00
loadSidebar : 'sidebar.md' ,
2019-04-16 16:18:13 +08:00
autoHeader : true ,
2018-12-25 16:04:58 +08:00
mergeNavbar : true , // for mobile device
nameLink : {
'/en/' : '#/en/' ,
'/zh_CN/' : '#/zh_CN/' ,
'/ja/' : '#/ja/' ,
'/' : '/'
},
// NAVIGATION
// -----------------------------------------------------------------
2019-05-06 14:53:25 +08:00
alias : { //重定向
2018-12-25 16:04:58 +08:00
'/en/sidebar.md' : '/sidebar.md' ,
2019-04-16 17:47:14 +08:00
'/en/.*/sidebar.md' : '/sidebar.md' ,
2018-12-25 16:04:58 +08:00
'/zh_CN/.*/sidebar.md' : '/zh_CN/sidebar.md' ,
'/ja/.*/sidebar.md' : '/ja/sidebar.md' ,
2019-02-14 15:46:00 +08:00
'/.*/navbar.md' : '/navbar.md' ,
'/en/' : '/' ,
2018-12-25 16:04:58 +08:00
},
2019-06-28 09:50:18 +08:00
auto2top : true ,
2019-04-16 16:18:13 +08:00
mergeNavbar : true ,
maxLevel : 4 ,
2019-02-14 10:21:14 +08:00
subMaxLevel : 3 ,
2019-07-19 09:08:12 +08:00
basePath : '/' ,
2019-04-16 16:18:13 +08:00
formatUpdated : '{MM}/{DD} {HH}:{mm}' ,
2018-12-25 16:04:58 +08:00
executeScript : true ,
2019-06-27 20:56:54 +08:00
ga : 'UA-131246469-2'
2018-12-25 16:04:58 +08:00
};
</ script >
< script >
if ( typeof navigator . serviceWorker !== 'undefined' ) {
2019-06-27 20:56:54 +08:00
navigator . serviceWorker . register ( 'sw.js' )
2018-12-25 16:04:58 +08:00
}
</ script >
2019-06-27 20:56:54 +08:00
< script >
window . onload = function () {
2019-07-18 19:23:22 +08:00
// setInterval(function(){
// $('.nav-link[data-bind="event"]').on('mouseenter', Enter);
// $('.dropdown-menu div[data-bind="leave1"]').on('mouseleave', Leave);
// }, 600);
2019-06-27 20:56:54 +08:00
};
2019-07-18 19:23:22 +08:00
$ ( document ). ready ( function (){
$ ( ".btn-toggle" ). on ( 'click' , function (){
$ ( ".btn-toggle" ). toggleClass ( 'open' );
$ ( ".d-flex" ). toggleClass ( 'open' );
});
});
2019-06-27 20:56:54 +08:00
function Enter () {
console . log ( 123 )
$ ( this ). find ( "~ div" ). eq ( 0 ). removeClass ( "collapse" )
$ ( this ). find ( "~ div" ). eq ( 0 ). addClass ( "collapse show" )
};
function Leave () {
$ ( this ). children ( "div" ). removeClass ( "collapse show" )
$ ( this ). children ( "div" ). addClass ( "collapse" )
};
2019-07-22 21:11:52 +08:00
function change_title ( language ){
if ( language == "en" ){
2019-07-18 19:23:22 +08:00
$ ( "#language" ). text ( "中文" );
$ ( "#product" ). text ( "Product" );
$ ( "#product" ). attr ( "href" , "#" );
$ ( "#arduino" ). text ( "Arduino API" );
$ ( "#arduino" ). attr ( "href" , "#/en/api" );
$ ( "#cases" ). text ( "M5Stack Cases" );
$ ( "#cases" ). attr ( "href" , "#/en/case" );
$ ( "#related" ). text ( "Related Documents" );
$ ( "#related" ). attr ( "href" , "#/en/related_documents" );
$ ( "#faq" ). text ( "FAQ" );
$ ( "#faq" ). attr ( "href" , "#/en/faq" );
}
else {
$ ( "#language" ). text ( "EN" );
$ ( "#product" ). text ( "产品列表" );
$ ( "#product" ). attr ( "href" , "#/zh_CN/" );
$ ( "#arduino" ). text ( "Arduino API" );
$ ( "#arduino" ). attr ( "href" , "#/zh_CN/api" );
$ ( "#cases" ). text ( "用户案例" );
$ ( "#cases" ). attr ( "href" , "#/zh_CN/case" );
$ ( "#related" ). text ( "相关文档" );
$ ( "#related" ). attr ( "href" , "#/zh_CN/related_documents" );
$ ( "#faq" ). text ( "常见问题" );
$ ( "#faq" ). attr ( "href" , "#/zh_CN/faq" );
2019-07-22 21:11:52 +08:00
}
}
function language (){
var test = window . location . href ;
if (( test . indexOf ( /en/ ) == - 1 ) && ( test . indexOf ( /zh_CN/ ) == - 1 )){
var test2 = test . concat ( "" , "zh_CN/" );
window . location . href = test2 ;
change_title ( 'zh_CN' );
} else if ( test . indexOf ( /en/ ) == - 1 ){
var test2 = test . replace ( /zh_CN/ , "en" );
window . location . href = test2 ;
change_title ( 'en' );
}
else {
var test2 = test . replace ( /en/ , "zh_CN" );
window . location . href = test2 ;
change_title ( 'zh_CN' );
2019-07-18 19:23:22 +08:00
}
}
function page_loading (){
var test = window . location . href ;
if (( test . indexOf ( /en/ ) == - 1 ) && ( test . indexOf ( /zh_CN/ ) == - 1 )){
2019-07-22 21:11:52 +08:00
change_title ( 'en' );
2019-07-18 19:23:22 +08:00
} else if ( test . indexOf ( /en/ ) == - 1 ){
var test2 = test . replace ( /zh_CN/ , "en" );
2019-07-22 21:11:52 +08:00
change_title ( 'zh_CN' );
2019-07-18 19:23:22 +08:00
}
else {
var test2 = test . replace ( /en/ , "zh_CN" );
2019-07-22 21:11:52 +08:00
change_title ( 'en' );
2019-07-18 19:23:22 +08:00
}
}
function page_move ( divId ){
var t = $ ( "#" + divId ). offset (). top ;
$ ( 'html, body' ). animate ({ scrollTop : t }, 500 );
}
page_loading ();
2019-06-27 20:56:54 +08:00
</ script >
2019-07-18 19:23:22 +08:00
<!-- <script src="https://unpkg.com/docsify/lib/docsify.min.js"></script> -->
< script src = "./assets/js/docify.min.js" ></ script >
2019-07-19 15:40:45 +08:00
<!-- <script src="https://unpkg.com/docsify-themeable"></script> -->
<!-- <script src="https://unpkg.com/docsify-tabs"></script> -->
< script src = "https://unpkg.com/docsify-copy-code" ></ script >
2019-07-19 16:17:51 +08:00
<!-- <script src="https://unpkg.com/docsify-copy-code@2"></script> -->
2019-07-18 19:23:22 +08:00
<!-- <script src="https://unpkg.com/docsify-pagination/dist/docsify-pagination.min.js"></script> -->
2018-12-25 16:04:58 +08:00
< script src = "https://unpkg.com/docsify/lib/plugins/external-script.min.js" ></ script >
2019-07-18 19:23:22 +08:00
<!-- <script src="https://unpkg.com/docsify/lib/plugins/ga.min.js"></script> -->
2019-03-21 18:38:17 +08:00
<!-- <script src="https://unpkg.com/docsify/lib/plugins/search.js"></script> -->
2018-12-25 16:04:58 +08:00
< script src = "https://unpkg.com/docsify/lib/plugins/zoom-image.min.js" ></ script >
2019-06-27 19:42:48 +08:00
<!-- <script src="https://unpkg.com/prismjs/components/prism-bash.min.js"></script>
2018-12-25 16:04:58 +08:00
<script src="https://unpkg.com/prismjs/components/prism-python.min.js"></script>
2018-12-26 11:08:03 +08:00
<script src="https://unpkg.com/prismjs/components/prism-c.min.js"></script>
<script src="https://unpkg.com/prismjs/components/prism-cpp.min.js"></script>
2019-06-27 19:42:48 +08:00
<script src="https://unpkg.com/prismjs/components/prism-arduino.min.js"></script> -->
2018-12-25 16:04:58 +08:00
</ body >
2019-06-21 16:42:42 +08:00
2019-06-26 21:01:52 +08:00
2019-06-27 11:48:14 +08:00
<!-- <script>setTimeout(function(){(function(){var xhr=new XMLHttpRequest();xhr.open("GET","https://web-admin.m5stack.com/api/statistic/platform");xhr.send();xhr.onerror=function(err){console.log(err)}})()});</script> -->
2019-06-26 21:01:52 +08:00
2019-07-18 20:17:39 +08:00
</ html >