diff options
Diffstat (limited to '_layouts/default.html')
| -rw-r--r-- | _layouts/default.html | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/_layouts/default.html b/_layouts/default.html index d8a0846..c4152a6 100644 --- a/_layouts/default.html +++ b/_layouts/default.html @@ -32,4 +32,37 @@ </div> </body> +<script> + + $( ".toc-hide" ).click(function() { + // $( this ).toggleClass( "gray-bg" ); + $(".toc-contents").toggleClass( "lighter" ); + + if ($(this).text() == 'Hide') { + $(this).text("Show"); + } else { + $(this).text("Hide"); + } + // toggle visibility of contents, and expand button + $(".nav").toggle(); + $(".toc-expand").toggle(); + }); + + $( ".toc-expand" ).click(function() { + // $( this ).toggleClass( "gray-bg" ); + + if ($(this).text() == 'Expand') { + $(this).text("Compact"); + $(".nav").css('display', 'block'); + } else { + $(this).text("Expand"); + $(".nav .nav").css('display', 'none'); + } + }); + + // get current year and put it in span + var currYear = new Date().getFullYear() + $(".current-year").text(currYear); +</script> + </html> |
