diff options
| author | Jieiku | 2022-05-30 22:47:37 -0700 |
|---|---|---|
| committer | Jieiku | 2022-05-30 22:47:37 -0700 |
| commit | d8cd3b9988f9021ea1b285db3231048acb7b74f4 (patch) | |
| tree | 885c1654858ca980ad5a8061cbe621dc4acfa82b /templates | |
| parent | 9d3c60b05febe570e0facada8927feb26859f128 (diff) | |
| download | abridge-d8cd3b9988f9021ea1b285db3231048acb7b74f4.tar.gz abridge-d8cd3b9988f9021ea1b285db3231048acb7b74f4.tar.bz2 abridge-d8cd3b9988f9021ea1b285db3231048acb7b74f4.zip | |
Add Font Files and cachebust
Diffstat (limited to 'templates')
| -rw-r--r-- | templates/base.html | 10 | ||||
| -rw-r--r-- | templates/macros/macros.html | 20 |
2 files changed, 29 insertions, 1 deletions
diff --git a/templates/base.html b/templates/base.html index d148811..e811e33 100644 --- a/templates/base.html +++ b/templates/base.html @@ -126,6 +126,16 @@ {% endif %} {% endif %} + {% if config.extra.fonts_load %} + {% for i in config.extra.fonts %} + {% if 'http' in i.url %} + <link rel="preload" href="{{ i.url | safe }}" as="style"> + {% else %} + <link rel="preload" href="{{ get_url(path=i.url, trailing_slash=false, cachebust=true) }}" as="style"> + {% endif %} + {% endfor %} + {% endif %} + {% if config.build_search_index %} <script defer type="text/javascript" src="{{ get_url(path="search_index.en.js", trailing_slash=false, cachebust=true) | safe }}"></script> <script defer type="text/javascript" src="{{ get_url(path="search.min.js", trailing_slash=false, cachebust=true) | safe }}"></script> diff --git a/templates/macros/macros.html b/templates/macros/macros.html index bfaaaae..f343828 100644 --- a/templates/macros/macros.html +++ b/templates/macros/macros.html @@ -1,10 +1,28 @@ {% macro title(page) %} <h1><a href="{{ page.permalink | safe }}">{{ page.title }}</a></h1> -<span>{{ page.date | date(format="%B %d, %Y") }}{% if page.taxonomies.categories %} [{% for cat in page.taxonomies.categories %}<a href="{{ get_taxonomy_url(kind="categories", name=cat) | safe }}">{{ cat }}</a>{% endfor %}]{% endif %}</span> +<span>{{ page.date | date(format="%B %d, %Y") }} + +{% if page.taxonomies.authors and config.taxonomies %} by + {% for author in page.taxonomies.authors %} + {% if author_flag %} and {% endif %} + <a href="{{ get_taxonomy_url(kind='authors', name=author) | safe }}">{{ author }}</a> + {% set_global author_flag = true %} + {% endfor %} +{% elif config.extra.author and config.extra.author_show %} + by {{ config.extra.author }} +{% endif %} + +{% if page.taxonomies.categories %} [{% for cat in page.taxonomies.categories %}<a href="{{ get_taxonomy_url(kind="categories", name=cat) | safe }}">{{ cat }}</a>{% endfor %}]{% endif %}</span> {% if page.taxonomies.tags %} <span>{% for tag in page.taxonomies.tags %} #<a href="{{ get_taxonomy_url(kind="tags", name=tag) | safe }}">{{ tag }}</a> {% endfor %}</span> {% endif %} + +{% if config.extra.readtime | default(value=true) %} + - {{ page.reading_time }} min +{% endif %} {% endmacro title %} + + {% macro footer(page) %} <h3><a href="#">Back to top</a></h3> {% endmacro footer %} |
