aboutsummaryrefslogtreecommitdiff
path: root/_layouts/default.html
diff options
context:
space:
mode:
authorHeather Miller <heather.miller@epfl.ch>2017-01-03 18:27:06 +0100
committerGitHub <noreply@github.com>2017-01-03 18:27:06 +0100
commitbc9bae33c2d29d56c60ae8851063bc3145d41eef (patch)
tree1e423e12e589909157bc1e5d271b0cf7cf047fb1 /_layouts/default.html
parent8428c40f79060169e85bdf740a9432b933a47160 (diff)
parent21cddf809d02a674f1fac59ccc5dfb3adac3bab2 (diff)
Merge pull request #24 from heathermiller/facelift
Facelift
Diffstat (limited to '_layouts/default.html')
-rw-r--r--_layouts/default.html33
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>