2022-06-23 00:35:12 +00:00
|
|
|
{%- if is_category or is_tag %}
|
2024-03-27 00:13:28 +00:00
|
|
|
<h1 class=index-title>{{ page_title }}</h1>
|
|
|
|
{%- if subtitle %}<h4 class=text-muted>{{ subtitle }}</h4>{% endif -%}
|
2022-07-22 14:33:11 +00:00
|
|
|
{% endif %}
|
2022-07-29 00:36:02 +00:00
|
|
|
{%- assign post_count = model.posts | size -%}
|
|
|
|
{%- if post_count > 0 %}
|
|
|
|
<section class="container mt-3" aria-label="The posts for the page">
|
|
|
|
{%- for post in model.posts %}
|
|
|
|
<article>
|
|
|
|
<h1>
|
|
|
|
<a href="{{ post | relative_link }}" title="Permanent link to "{{ post.title | escape }}"">
|
|
|
|
{{ post.title }}
|
|
|
|
</a>
|
|
|
|
</h1>
|
|
|
|
<p>
|
2024-03-27 00:13:28 +00:00
|
|
|
Published on {{ post.published_on | date: "MMMM d, yyyy" }}
|
|
|
|
at {{ post.published_on | date: "h:mmtt" | downcase }}
|
|
|
|
by {{ model.authors | value: post.author_id }}
|
2022-07-29 00:36:02 +00:00
|
|
|
{{ post.text }}
|
|
|
|
{%- assign category_count = post.category_ids | size -%}
|
|
|
|
{%- assign tag_count = post.tags | size -%}
|
|
|
|
{% if category_count > 0 or tag_count > 0 %}
|
|
|
|
<footer>
|
|
|
|
<p>
|
2024-03-27 00:13:28 +00:00
|
|
|
{%- if category_count > 0 -%}
|
|
|
|
Categorized under:
|
|
|
|
{% for cat in post.category_ids -%}
|
|
|
|
{%- assign this_cat = categories | where: "Id", cat | first -%}
|
|
|
|
{{ this_cat.name }}{% unless forloop.last %}, {% endunless %}
|
|
|
|
{%- assign cat_names = this_cat.name | concat: cat_names -%}
|
|
|
|
{%- endfor -%}
|
|
|
|
{%- assign cat_names = "" -%}
|
|
|
|
<br>
|
|
|
|
{% endif -%}
|
|
|
|
{%- if tag_count > 0 %}
|
|
|
|
Tagged: {{ post.tags | join: ", " }}
|
|
|
|
{% endif -%}
|
2022-07-29 00:36:02 +00:00
|
|
|
</footer>
|
|
|
|
{% endif %}
|
|
|
|
<hr>
|
|
|
|
</article>
|
|
|
|
{% endfor %}
|
|
|
|
</section>
|
2024-03-27 00:13:28 +00:00
|
|
|
<nav aria-label=pagination>
|
2022-07-29 00:36:02 +00:00
|
|
|
<ul class="pagination justify-content-evenly mt-2">
|
2024-03-27 00:13:28 +00:00
|
|
|
{% if model.newer_link -%}
|
|
|
|
<li class=page-item><a class=page-link href="{{ model.newer_link.value }}">« Newer Posts</a>
|
|
|
|
{% endif %}
|
|
|
|
{% if model.older_link -%}
|
|
|
|
<li class=page-item><a class=page-link href="{{ model.older_link.value }}">Older Posts »</a>
|
|
|
|
{%- endif -%}
|
2022-07-29 00:36:02 +00:00
|
|
|
</ul>
|
|
|
|
</nav>
|
|
|
|
{%- else %}
|
2024-03-27 00:13:28 +00:00
|
|
|
<article><p class="text-center mt-3">No posts found</article>
|
2022-07-29 00:36:02 +00:00
|
|
|
{%- endif %}
|