File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 5757 All< span class ="my-badge "> {{ allPatterns | size }}</ span >
5858 </ a >
5959 {% for category in site.data.categories %}
60- < a href ="javascript:; " class ="sidebar-list-item cat-button " category ="{{ category.name }} ">
60+ < a href ="javascript:; " class ="sidebar-list-item cat-button " category ="{{ category.name }} "
61+ <!-- add tooltip only if we have something to display -->
62+ {% if category.description %}
63+ data-toggle ="tooltip " data-placement ="left " title ="{{ category.description }} "
64+ {% endif %} <!-- /tooltip, close the a tag now --> >
6165 {{ category.name }} < span class ="my-badge ">
6266 {% assign counter=0 %}
6367 {% for page in allPatterns %}
8084 All< span class ="my-badge "> {{ allPatterns | size }}</ span >
8185 </ a >
8286 {% for tag in site.data.tags %}
83- < a href ="javascript:; " class ="sidebar-list-item tag-button " tag ="{{ tag.name }} ">
87+ < a href ="javascript:; " class ="sidebar-list-item tag-button " tag ="{{ tag.name }} "
88+ <!-- add tooltip only if we have something to display -->
89+ {% if tag.description %}
90+ data-toggle ="tooltip " data-placement ="left " title ="{{ tag.description }} "
91+ {% endif %} <!-- /tooltip, close the a tag now --> >
8492 {{ tag.name }} < span class ="my-badge ">
8593 {% assign counter=0 %}
8694 {% for page in allPatterns %}
Original file line number Diff line number Diff line change @@ -437,3 +437,7 @@ hr.dashed {
437437.float-right {
438438 float : right ;
439439}
440+
441+ .tooltip {
442+ font-weight : 500 ;
443+ }
Original file line number Diff line number Diff line change @@ -2,6 +2,7 @@ $(document).ready(function() {
22 categoryAndTagDisplay ( ) ;
33 generateContent ( ) ;
44 backToTop ( ) ;
5+ initBootstrapTooltips ( ) ;
56} ) ;
67
78function fixFooterInit ( ) {
@@ -68,7 +69,6 @@ function backToTop() {
6869 } ) ;
6970}
7071
71-
7272function generateContent ( ) {
7373
7474 // console.log($('#markdown-toc').html());
@@ -86,3 +86,8 @@ function generateContent() {
8686 }
8787 console . log ( "myAffix!!!" ) ;
8888}
89+
90+ function initBootstrapTooltips ( ) {
91+ // Select all elements with data-toggle="tooltips" in the document
92+ $ ( '[data-toggle="tooltip"]' ) . tooltip ( ) ;
93+ }
You can’t perform that action at this time.
0 commit comments