diff --git a/sass/style.scss b/sass/style.scss index 7cd369a..1fad6ec 100644 --- a/sass/style.scss +++ b/sass/style.scss @@ -16,6 +16,8 @@ $col-offwhite: darken($col-white, 25); box-sizing: border-box; } +html { scroll-behavior: smooth } + body { display: flex; flex-direction: column; @@ -152,6 +154,12 @@ body>main { padding: 1.5rem; } } + + section.toc { + ul { + padding-left: 1rem; + } + } } body>footer { diff --git a/templates/macros.html b/templates/macros.html index 25ead89..a43d112 100644 --- a/templates/macros.html +++ b/templates/macros.html @@ -23,3 +23,18 @@ {% endfor %} {% endmacro %} + +{% macro toc() %} + +{% endmacro %} diff --git a/templates/project.html b/templates/project.html index b510331..c995e14 100644 --- a/templates/project.html +++ b/templates/project.html @@ -5,6 +5,16 @@

{{ page.title }}

{{ page.description }} +
+ {% if page.toc %} +
+ {{ macros::toc() }} +
+ {% endif %} +
+ meta +
+
{{ page.content | safe }}