File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -100,12 +100,13 @@ <h1 data-toc-skip>{{ page.title }}</h1>
100100 {% if site.toc and page.toc %}
101101 < div id ="toc-wrap " class ="topbar-down pr-4 ">
102102 < h3 data-toc-skip class ="pl-3 pt-2 ">
103- {{ site.data.label.panel.toc }}
103+ {{- site.data.label.panel.toc - }}
104104 </ h3 >
105105 < nav id ="toc " data-toggle ="toc "> </ nav >
106106 </ div >
107107 < link rel ="stylesheet " href ="{{ site.baseurl }}/assets/lib/bootstrap-toc-1.0.1/bootstrap-toc.min.css " />
108108 < script src ="{{ site.baseurl }}/assets/lib/bootstrap-toc-1.0.1/bootstrap-toc.min.js "> </ script >
109+ < script src ="{{ site.baseurl }}/assets/js/dist/toc.min.js "> </ script >
109110 {% endif %}
110111</ div > <!-- #post-panel -->
111112
Original file line number Diff line number Diff line change 1+ /*
2+ * Hide the empty ToC in posts.
3+ *
4+ * © 2019 Cotes Chung
5+ * MIT Licensed
6+ */
7+
8+ $ ( function ( ) {
9+ // Hide ToC title if there is no head
10+ if ( $ ( "#toc-wrap>nav#toc>ul>li" ) . length == 0 ) {
11+ $ ( "#toc-wrap>h3" ) . addClass ( "hidden" ) ;
12+ }
13+ } ) ;
Original file line number Diff line number Diff line change 1+ $ ( function ( ) { if ( $ ( "#toc-wrap>nav#toc>ul>li" ) . length == 0 ) { $ ( "#toc-wrap>h3" ) . addClass ( "hidden" ) } } ) ;
You can’t perform that action at this time.
0 commit comments