diff --git a/content/media/css/custom.css b/content/media/css/custom.css index 70ce993..209148d 100644 --- a/content/media/css/custom.css +++ b/content/media/css/custom.css @@ -1,3 +1,9 @@ +/* + * override some tufte options + */ +html { + font-size: 13px; +} /* * override some w3.css options @@ -7,6 +13,16 @@ width: 80%; } +.w3-sidebar { + font-size: 1.2rem; + width: 350px; + right: 0; + display: block; + top: 0; + bottom: 0; + overflow-y: scroll; +} + ul.posts > li { padding-left: 1.5em; text-indent: -1em; diff --git a/layout/base.j2 b/layout/base.j2 index 2ce82b6..f612556 100644 --- a/layout/base.j2 +++ b/layout/base.j2 @@ -49,28 +49,28 @@ {% block css %} - + {% endblock css %} {% block endhead %}{% endblock endhead %} - +
-
- +
+ {% set hierarchy = node.rwalk()|list %} {% for yeargrp in hierarchy[-1].walk_resources_sorted_by_time()|groupby("meta.created.year")|reverse %}
- +
{% for monthgrp in yeargrp.list|groupby("meta.created.month")|reverse %} - + {% for item in monthgrp.list %}
{{ item.meta.title }} diff --git a/layout/blog.j2 b/layout/blog.j2 index abb6b13..c16931c 100644 --- a/layout/blog.j2 +++ b/layout/blog.j2 @@ -1,4 +1,4 @@ -{% from "macros.j2" import render with context %} +{% from "macros.j2" import slug %} {% extends "base.j2" %} {% block main -%} @@ -6,7 +6,7 @@ {% mark post -%}
-

{{ resource.meta.title }}

+

{{ resource.meta.title }}

Posted: {{ resource.meta.created.strftime('%B %e, %Y') }} at {{ resource.meta.time }}

diff --git a/layout/macros.j2 b/layout/macros.j2 index 50f27e0..579fda4 100644 --- a/layout/macros.j2 +++ b/layout/macros.j2 @@ -1,3 +1,8 @@ +{% macro slug(res) %} +{{ res.meta.id if res.meta.id else res.slug }}{% endmacro %} + +{# endmacro not on new line to prevent white space at end of macro #} + {% macro render_excerpt(res, class=None) %} {% refer to res.relative_path as post %}