aboutsummaryrefslogtreecommitdiff
path: root/_layouts/chapter.html
diff options
context:
space:
mode:
authorHeather Miller <heather.miller@epfl.ch>2017-01-03 15:28:36 +0100
committerHeather Miller <heather.miller@epfl.ch>2017-01-03 15:28:36 +0100
commit6800c5b6f744d1e56228cf74096cafe04e94489e (patch)
tree03014ab0e76503b5575a1f5c2d5421ec89891040 /_layouts/chapter.html
parent29ef063fdcfffd887313c7bc0e1e51d515d40e64 (diff)
Facelifting, con't
Diffstat (limited to '_layouts/chapter.html')
-rw-r--r--_layouts/chapter.html38
1 files changed, 36 insertions, 2 deletions
diff --git a/_layouts/chapter.html b/_layouts/chapter.html
index ff9b350..3380a52 100644
--- a/_layouts/chapter.html
+++ b/_layouts/chapter.html
@@ -2,7 +2,7 @@
<html lang="en">
{% include head.html %}
-<body>
+<body data-spy="scroll" data-target="#toc">
<div class="topbar">
<div class="logo-wrap">
<!-- <div class="circle-logo"></div> -->
@@ -25,6 +25,7 @@
<div class="category">{{ page.tag }}</div>
<h1 class="page-title">{{ page.title }}</h1>
<div class="subtitle">{{ page.subtitle }}
+ <div class="author">By {{ page.by }}</div>
{% if minutes <= 5 %}
<!-- do nothing -->
{% else %}
@@ -43,7 +44,6 @@
<div class="col-sm-2"></div>
<div class="col-sm-6">
<div class="footer-links">
- <div class="typo"><a href="https://github.com/heathermiller/wwwheathermiller/blob/master/{{ page.path }}">Typo? Suggest a fix.</a></div>
{% for category in site.categories %}
{% assign catg_name = category.first %}
{% if catg_name == page.category %}
@@ -72,6 +72,40 @@
<div class="col-sm-4"></div>
</div>
</div>
+
+ <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>
+
</body>
</html>