Daniel J. Summers cbf87f5b49 Support directory installations
- Add web log to HttpContext on first retrieval per req
- Add several DotLiquid filters
- Use int for page numbers
- Update all themes to use rel/abs link and other filters
2022-05-21 22:55:13 -04:00

58 lines
1.9 KiB
Plaintext

{% if is_category or is_tag %}
<h1>{{ page_title }}</h1>
{%- if subtitle %}
<p>{{ subtitle }}</p>
{%- endif %}
{% endif %}
{%- for post in model.posts %}
<article class="auto">
<div>
<h1 class="home-title">
<small class="home-lead">{{ post.published_on | date: "dddd, MMMM d, yyyy" }}</small><br>
&nbsp;
<a href="{{ post | relative_link }}"
title="Permanent Link to &quot;{{ post.title | strip_html | escape }}&quot;">
{{ post.title }}
</a>
</h1>
</div>
<div class="entry-content">{{ post.text }}</div>
{%- assign cat_count = post.category_ids | size -%}
{%- if cat_count > 0 %}
<small class="category-list">
Categorized under
{%- for cat_id in post.category_ids %}
{%- assign cat = categories | where: "id", cat_id | first -%}
<span>
<a href="{{ cat | category_link }}"
title="Categorized under {{ cat.name | strip_html | escape }}" rel="tag">{{ cat.name }}</a></span>
{%- endfor %}
</small><br>
{%- endif %}
{%- assign tag_count = post.tags | size -%}
{%- if tag_count > 0 %}
<small class="category-list">
Tagged
{%- for tag in post.tags %}
<span>
<a href="{{ tag | tag_link }}" title="Tagged &ldquo;{{ tag | escape }}&rdquo;" rel="tag">{{ tag }}</a>
</span>
{%- endfor %}
</small><br>
{%- endif %}
{%- if logged_on %}<small><a href="{{ post | edit_post_link }}">Edit Post</a></small>{% endif %}
</article>
{%- endfor %}
<div class="bottom-nav" role="navigation">
<div class="nav-previous">
{% if model.newer_link -%}
<a href="{{ model.newer_link.value }}">&laquo; Newer Posts</a>
{% endif %}
</div>
<div class="nav-next">
{% if model.older_link -%}
<a href="{{ model.older_link.value }}">Older Posts &raquo;</a>
{% endif %}
</div>
</div>