bitbadger.solutions-blog-theme/theme/index.liquid

57 lines
2.0 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 }}"
id="{{ post.title | strip_html | downcase | replace: " ", "-" | replace: ":", "" }}"
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>
Categorized under
{% for cat_id in post.category_ids -%}
{%- assign cat = categories | where: "Id", cat_id | first -%}
<a href="{{ cat | category_link }}" title="Categorized under {{ cat.name | strip_html | escape }}"
rel="tag">{{ cat.name }}</a>{% unless forloop.last %}, {% endunless %}
{%- endfor %}
</small><br>
{%- endif %}
{%- assign tag_count = post.tags | size -%}
{%- if tag_count > 0 %}
<small>
Tagged
{% for tag in post.tags -%}
<a href="{{ tag | tag_link }}" title="Tagged &ldquo;{{ tag | escape }}&rdquo;"
rel="tag">{{ tag }}</a>{% unless forloop.last %}, {% endunless %}
{%- endfor %}
</small><br>
{%- endif %}
{%- if logged_on %}<small><a hx-boost="false" 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>