diff options
| author | Heather Miller <heather.miller@epfl.ch> | 2017-01-03 18:27:06 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2017-01-03 18:27:06 +0100 |
| commit | bc9bae33c2d29d56c60ae8851063bc3145d41eef (patch) | |
| tree | 1e423e12e589909157bc1e5d271b0cf7cf047fb1 /_layouts/default.html | |
| parent | 8428c40f79060169e85bdf740a9432b933a47160 (diff) | |
| parent | 21cddf809d02a674f1fac59ccc5dfb3adac3bab2 (diff) | |
Merge pull request #24 from heathermiller/facelift
Facelift
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> |
