diff options
author | Franck Cuny <franck@fcuny.net> | 2024-09-23 08:10:12 -0700 |
---|---|---|
committer | Franck Cuny <franck@fcuny.net> | 2024-09-23 08:10:12 -0700 |
commit | 1ad845315772be21782d0a1a5948e57ed88f791f (patch) | |
tree | bc11e212a0a5815529f9fcb0bca56089590fcfa7 /templates | |
parent | ignore the cache (diff) | |
download | fcuny.net-1ad845315772be21782d0a1a5948e57ed88f791f.tar.gz |
get rid of the TOC and simplify the CSS
Diffstat (limited to '')
-rw-r--r-- | templates/base.html | 11 | ||||
-rw-r--r-- | templates/note.html | 77 | ||||
-rw-r--r-- | templates/orphan.html | 7 | ||||
-rw-r--r-- | templates/page.html | 13 |
4 files changed, 16 insertions, 92 deletions
diff --git a/templates/base.html b/templates/base.html index b903da3..add20f0 100644 --- a/templates/base.html +++ b/templates/base.html @@ -16,8 +16,9 @@ </head> <body> - <div class="container"> - <nav class="menu"> + + <main> + <nav class="main-nav"> <ul> <li><a href="/">Home</a></li> <li><a href="/blog">Blog</a></li> @@ -27,10 +28,8 @@ </ul> </nav> - <div class="content"> - {% block content %}{% endblock content %} - </div> - </div> + {% block content %}{% endblock content %} + </main> </body> </html> diff --git a/templates/note.html b/templates/note.html index ccd21a6..7eee854 100644 --- a/templates/note.html +++ b/templates/note.html @@ -1,79 +1,12 @@ {% extends "base.html" %} + {% block title %}{{ page.title }} - {{ config.title }}{% endblock title %} -{% block content -%} -<div class="note-container"> - <main role="main" class="note-content"> - <h1>{{ page.title }}</h1> +{% block content -%} +<h1>{{ page.title }}</h1> - {% if page.toc %} - <div class="toc-container mobile-toc"> - <div class="toc-header" id="mobile-toc-toggle"> - <span class="toc-arrow">▸</span> Table of Contents - </div> - <div id="mobile-toc" class="toc"> - <ul> - {% for h1 in page.toc %} - <li> - <a href="{{ h1.permalink | safe }}">{{ h1.title }}</a> - {% if h1.children %} - <ul> - {% for h2 in h1.children %} - <li> - <a href="{{ h2.permalink | safe }}">{{ h2.title }}</a> - </li> - {% endfor %} - </ul> - {% endif %} - </li> - {% endfor %} - </ul> - </div> - </div> - {% endif %} - - {{ page.content | safe }} - - <p class="date">{{ page.date | date(format="%B %d, %Y") }}</p> - </main> - - {% if page.toc %} - <aside class="toc-container desktop-toc"> - <div class="toc-header">Table of Contents</div> - <div class="toc"> - <ul> - {% for h1 in page.toc %} - <li> - <a href="{{ h1.permalink | safe }}">{{ h1.title }}</a> - {% if h1.children %} - <ul> - {% for h2 in h1.children %} - <li> - <a href="{{ h2.permalink | safe }}">{{ h2.title }}</a> - </li> - {% endfor %} - </ul> - {% endif %} - </li> - {% endfor %} - </ul> - </div> - </aside> - {% endif %} -</div> +{{ page.content | safe }} -<script> - document.getElementById('mobile-toc-toggle').addEventListener('click', function() { - var toc = document.getElementById('mobile-toc'); - var arrow = this.querySelector('.toc-arrow'); - if (toc.style.display === 'none' || toc.style.display === '') { - toc.style.display = 'block'; - arrow.innerHTML = '▾'; // Down-pointing triangle - } else { - toc.style.display = 'none'; - arrow.innerHTML = '▸'; // Right-pointing triangle - } - }); -</script> +<p class="date">{{ page.date | date(format="%B %d, %Y") }}</p> {%- endblock content %} diff --git a/templates/orphan.html b/templates/orphan.html index 020c8a6..db8634a 100644 --- a/templates/orphan.html +++ b/templates/orphan.html @@ -3,9 +3,8 @@ {% block title %}{{ page.title }} - {{ config.title }}{% endblock title %} {% block content -%} -<main> - <h1>{{- page.title -}}</h1> +<h1>{{- page.title -}}</h1> + +{{ page.content | safe -}} - {{ page.content | safe -}} -</main> {%- endblock content -%} diff --git a/templates/page.html b/templates/page.html index 53a7be3..ab19904 100644 --- a/templates/page.html +++ b/templates/page.html @@ -3,17 +3,10 @@ {% block title %}{{ page.title }} - {{ config.title }}{% endblock title %} {% block content -%} -<main> - <h1>{{ page.title }}</h1> +<h1>{{ page.title }}</h1> - {{ page.content | safe -}} +{{ page.content | safe -}} - <p class="date"> - <time datetime="{{ page.date | date(format="%+") }}"> - {{- page.date | date(format="%B %m, %Y") -}} - </time> - </p> - -</main> +<p class="date">{{ page.date | date(format="%B %d, %Y") }}</p> {%- endblock content %} |