Permalink
Browse files

style: autohide toc 自动隐藏目录区

Hide table of contents automatically
if there is no heading (h1-h6) in article.

如果正文中没使用 HTML 标题,
则自动隐藏目录区。
  • Loading branch information...
MOxFIVE committed Dec 12, 2015
1 parent bcc29f8 commit b7da6666ff1861d42e023c31b4daab32832cbb27
Showing with 11 additions and 1 deletion.
  1. +10 −0 layout/_partial/toc.ejs
  2. +1 −1 source/css/_partial/mobile.styl
View
@@ -33,4 +33,14 @@
document.getElementById("switch-area").style.display="block";
}
}
</script>
<script src="http://7.url.cn/edu/jslib/comb/require-2.1.6,jquery-1.9.1.min.js"></script>
<script>
if ($(".toc").length < 1) {
$("#toc").css("display","none");
$("#tocButton").css("display","none");
$(".switch-btn").css("display","block");
$(".switch-area").css("display","block");
}
</script>
@@ -320,7 +320,7 @@
/*多说 UA*/
.ua {
display: none;
display: none !important;
}
#header .social li:nth-child(5n) {

0 comments on commit b7da666

Please sign in to comment.