diff --git a/docs/assets/css/main.css b/docs/assets/css/main.css index 2e543819..a8232992 100755 --- a/docs/assets/css/main.css +++ b/docs/assets/css/main.css @@ -101,6 +101,52 @@ img { color: hsl(211, 100%, 50%); } + + +body[data-page="index.md"] .search { + display: inline-block; + +} + +body[data-page="index.md"] .anchor-box { + display: none !important; +} + +body[data-page="index.md"] #pc_anchor { + display: block; +} + +body[data-page="en/faq.md"] .search { + display: inline-block +} + + +body[data-page="zh_CN/README.md"] .search { + display: inline-block; +} + +body[data-page="zh_CN/README.md"] .anchor-box { + display: none !important; +} + +body[data-page="zh_CN/README.md"] #pc_anchor { + display: block; +} + +body[data-page="zh_CN/faq.md"] .search { + display: inline-block +} + + +body[data-page="index.md"] .markdown-section { + margin-top: 25px +} + +body[data-page="zh_CN/README.md"] .markdown-section { + margin-top: 25px +} + + body[data-page="en/quick_start/m5stickc/m5stickc_quick_start.md"] article.markdown-section { max-width: 100%; } @@ -135,7 +181,7 @@ body[data-page="zh_CN/quick_start/m5stickv/m5stickv_quick_start.md"] article.mar text-decoration: none } -.row a:hover { +.row a:hover { color: white; text-decoration: none } @@ -154,7 +200,8 @@ body[data-page="zh_CN/quick_start/m5stickv/m5stickv_quick_start.md"] article.mar cursor: pointer; transition: box-shadow .3s; text-decoration: none; - background-color: white + background-color: white ; + box-shadow: 1px 1px 20px 0px #f7f7f7a1; } .related_links { @@ -425,37 +472,15 @@ div.card-img-overlay:hover { } -body[data-page="index.md"] .search { - display: inline-block -} - -body[data-page="en/faq.md"] .search { - display: inline-block -} - - -body[data-page="zh_CN/README.md"] .search { - display: inline-block -} - -body[data-page="zh_CN/faq.md"] .search { - display: inline-block -} - - -body[data-page="index.md"] .markdown-section { - margin-top: 25px -} - -body[data-page="zh_CN/README.md"] .markdown-section { - margin-top: 25px -} - @media screen and (max-width:768px) { .dropdown { display: block } + #pc_anchor { + display: none !important; + } + #mb_header { display: block; } @@ -464,7 +489,6 @@ body[data-page="zh_CN/README.md"] .markdown-section { display: none; } - .markdown-section { max-width: 100%; margin-top: 0px; @@ -1187,4 +1211,26 @@ table tr:nth-child(odd) { .box-card .el-tag { margin-top: 5px; cursor: pointer; +} + +#pc_anchor { + position: fixed; + top: 50%; + left: 30px; + transform: translateY(-50%); + z-index: 50; + border-radius: 10px; + overflow: hidden; + box-shadow: 0px 1px 20px 1px #e6e6e6; + display: none; + +} + +#pc_anchor .el-submenu .el-menu-item { + min-width: 195px; + +} + +#pc_anchor .el-menu { + border: none; } \ No newline at end of file diff --git a/docs/assets/js/custom.js b/docs/assets/js/custom.js index 74d2a606..c40a67a5 100644 --- a/docs/assets/js/custom.js +++ b/docs/assets/js/custom.js @@ -36,7 +36,8 @@ var header = new Vue({ anchor: [], platform:{}, activeIndex: '1', - pdf_notify: '' + pdf_notify: '', + home_anchor: [] }, methods: { loading(str) { @@ -50,6 +51,12 @@ var header = new Vue({ }, done() { this.loading_target.close(); + }, + handleOpen(key, keyPath) { + console.log(key, keyPath); + }, + handleClose(key, keyPath) { + console.log(key, keyPath); } }, mounted(){ @@ -201,8 +208,42 @@ function anchor_create(anchor_name,anchor_id){ function anchor_search(purchase_link="none",quickstart_link="none"){ var page_url = window.location.href; if((page_url.slice(-4) == "/en/")||(page_url.slice(-7)== "/zh_CN/")||(page_url.slice(-3)== "/#/")){ - $("#search_note").eq(0).after("
"); - var anchor_list= $(".product_page > div:gt(1)"); + $(".product_page > div").eq(0).before(""); + var anchor_list= $(".product_page > div"); + header.home_anchor = [ + { + "name" : "core", + "expand" : ["module","base"] + }, + { + "name" : "atom", + "expand" : ["atom-base"] + }, + { + "name" : "stick", + "expand" : ["hat"] + }, + { + "name" : "face", + "expand" : [] + }, + { + "name" : "unit", + "expand" : ["unit","mini-unit"] + }, + { + "name" : "application", + "expand" : [] + }, + { + "name" : "accessory", + "expand" : [] + }, + { + "name" : "aluminium", + "expand" : [] + } + ] } else{ $("h2").eq(0).before(""); diff --git a/docs/index.html b/docs/index.html index e9f490aa..5f30802f 100755 --- a/docs/index.html +++ b/docs/index.html @@ -1,5 +1,290 @@ -
M5Stack Docs
+ M5Stack Docs
+