myWebLog/src/MyWebLog/themes/awftw/single-post.liquid
Daniel J. Summers 2394f03b3b - Fix a few issues with podcast feed generation
- Tweak styles for devotional theme
- Fix bug with page cache building
2022-06-04 20:49:14 -04:00

176 lines
8.4 KiB
Plaintext

{%- assign ot_books = "ZPSOFpd27EeFQvrTZE296Q|VERPK2rYN0G44bo7LjBSRw|fA6zV4ON002oMPoVUZs17Q|vLsJo3GL1ECOQbSIEMUaig|WZ933xSw6kmo7644X9mmXw|68f2_zVlekaaIZD_BX0sZg|WffJH3t68kuVUyNZXYSFYw|xNlTF35s_UulA7S-NTgcAA|0y4PDhOc7kiw9hp0RwaJCg|59ysY5363EaVCG_g7fUH5A|aBlyuIzm206LTKx-uYIGnA|YoQKqdkrbUivAeUf3DISow|WOAq8A9bB0a8TKmYAB7IdA|TsxpRv1lrUiNNeGGfIx6XA|rJkq5d_MyUGPgACkMm0iTw|F_X9vUdpAUy957_qSejcnw|5jvC66CtG06zRlkKuP1naw|su8Qq5KUwEyoDmssUQhjHQ|FtVxmNkn_EavFJY3jqodfA|oToPYf8OQkCBsB6J65j3SA|rKzSJptZjU6YAOy6nIhfbw|K2lHyseO6UWdHftwLswhgg|rpThtWd1HUuSeyHLIs7gpw|CD8jYdoi0kGyXTbsD6F0aA|ttObDyRHnUudsSNUsdQ8BA|fi4ORg0B90C-DeQGTrOaMA|6AW2cZfbAkWX5HT4XEGjig|Pf6Gllf9gU-IF9xDcmWd0g|7cDaYscN6kmKsgwuiwPt9Q|WG_j96GOH0KzGORwKL8YVA|p7wi1sNiGUWhUa1tqRhS8Q|CgIcCoHtpUiCshdHe8wMoA|V1PTu4Xoq0eUnniYIb8Mkw|1h1LTN1XyU-qWIPHVY398A|t34QuaRN6kOWizvKNPtdSg|Tw5oe-kzfkiqCc6_4AVskQ|At7RBOfiN0aWMKln0Dkreg|JiUy9RgUZUOrjeMdBpln9g|hc7roSimX0mukJPTe6clWA|kTbX-fYdFk6TJ8Tikec-AQ" | split: "|" -%}
{%- assign nt_books = "Ksr4Dto97Um5NxhLpoRk5A|w-4_O87lYE-9_nrIXOuIHw|oJ_dgZir80mv2hat1rK4Qg|9QCQnNlevES8cYwHZWzrJw|DbkcRuTlnUyPXPPQso3L6g|CJZtcewtvUKqJH-rIUoR6g|xMRsXDsvDUiylTlFq6Tv-w|RmItBW75JUG7Iish-KRw1g|lKSYua82uE-YeMAzxqfrMg|Bopzxr31bkWJrFqO6o1oxg|KhiJGiHzvkiHXvkk9fEUOg|vFCY7egZskyaH-0jwDdQTQ|uxYuSzlDzU-AYGK-uo3RTg|VANy1bANREmh2DLujlaKGQ|CyO7saVd8kWHwzs3MaLe5w|71tayZrmnk6E8E-z8IWeIw|5H2xaOfutEyeZ755pY0mmA|uPHRl846Xk-SG-HEmITW-w|DF4Ub1Vqg0GSBIGWYJgCGw|-LfywKHkMEqRb1WVNSkcxg|AgO2o_kbG0GVTNVNT0233A|R6oXNiKgIkqjGhp-42inxg|WI1S5jo5-kOb5bgoNSb8Hg|MVsyPrQ8iUa_M6DJ4IR0CQ|6iDQYEk4yUa6B_-z49KYHA|MznlCejhZUqq_rxf4xrmwg|kG4B-4Pt6ECSxm14f3FWiA|T9GJpphYiUGYVgw7lmkmDA" | split: "|" -%}
{%- assign series_ids = "fpgE1kmfr0-xNBMbxUWxMA|FP7IiNghSEeZLBW21kkAgw|ca1OWFTvMU2H-lHpjsm5MQ|aK4djQBz_UCObjyPq5At_A" | split: "|" -%}
{%- assign post = model.posts | first -%}
<div class="content">
<article class="item">
<h1 class="item-heading">{{ post.title }}</h1>
{%- if logged_on %}<p class="item-meta"><a href="{{ post | edit_post_link }}">Edit Post</a></p>{% endif %}
{% assign media = post.metadata | value: "episode_media_file" %}
{%- unless media == "-- episode_media_file not found --" %}
<aside class="podcast">
<p class="text-center"><strong>Listen While<br>You Read</strong></p>
<audio controls onplaying="awftw.countPlay('{{ media }}')">
<source src="https://files.bitbadger.solutions/devotions/{{ media }}">
</audio>
<p class="text-center">
<a class="dl" href="https://pdcst.click/c/awftw/files.bitbadger.solutions/devotions/{{ media }}" download>
<i class="fa fa-download" title="Download Audio"></i>
</a>
</p>
</aside>
{%- endunless %}
{{ post.text }}
</article>
<nav aria-label="pagination">
<div class="nav-previous">
{% if model.newer_link %}
<span class="post-nav">Previous Post</span><br>
<a class="post-nav-title" href="{{ model.newer_link.value | relative_link }}">{{ model.newer_name.value }}</a>
{% endif %}
</div>
<div class="nav-next">
{% if model.older_link %}
<span class="post-nav">Next Post</span> <br>
<a class="post-nav-title" href="{{ model.older_link.value | relative_link }}">{{ model.older_name.value }}</a>
{% endif %}
</div>
</nav>
</div>
<div class="sidebar post-sidebar">
<div class="item">
<h4 class="item-heading">Date</h4>
<div class="date-posted">
<i class="fa fa-calendar" title="Date" aria-hidden="true"></i>
{{ post.published_on | date: "dddd, MMMM d, yyyy" }}
</div>
</div>
{%- assign has_ot = false -%}
{%- for ot_id in ot_books -%}
{%- if post.category_ids contains ot_id %}{% assign has_ot = true %}{% endif -%}
{%- endfor -%}
{%- assign has_nt = false -%}
{%- for nt_id in nt_books -%}
{%- if post.category_ids contains nt_id %}{% assign has_nt = true %}{% endif -%}
{%- endfor -%}
{%- if has_ot or has_nt %}
<div class="item">
<h4 class="item-heading">Scripture</h4>
{%- if has_ot %}
<ul>
<li>
{%- assign cat_id = ot_books | first -%}
{%- assign cat = categories | where: "id", cat_id | first -%}
<i class="fa fa-book" title="Book" aria-hidden="true"></i>
<a href="{{ cat | category_link }}"
{%- if cat.description %} title="{{ cat.description.value | escape_once }}"{% endif %}>
{{ cat.name }}
</a>
<ul>
{%- assign first_time = true -%}
{%- for cat_id in ot_books %}
{%- if first_time %}
{%- assign first_time = false -%}
{%- elsif post.category_ids contains cat_id %}
{% assign cat = categories | where: "id", cat_id | first %}
<li>
<i class="fa fa-book" title="Book" aria-hidden="true"></i>
<a href="{{ cat | category_link }}"
{%- if cat.description %} title="{{ cat.description.value | escape_once }}"{% endif %}>
{{ cat.name }}
</a>
</li>
{%- endif %}
{%- endfor %}
</ul>
</li>
</ul>
{%- endif %}
{%- if has_nt %}
<ul>
<li>
{%- assign cat_id = nt_books | first -%}
{%- assign cat = categories | where: "id", cat_id | first -%}
<i class="fa fa-book" title="Book" aria-hidden="true"></i>
<a href="{{ cat | category_link }}"
{%- if cat.description %} title="{{ cat.description.value | escape_once }}"{% endif %}>
{{ cat.name }}
</a>
<ul>
{%- assign first_time = true -%}
{%- for cat_id in nt_books %}
{%- if first_time %}
{%- assign first_time = false -%}
{%- elsif post.category_ids contains cat_id %}
{% assign cat = categories | where: "id", cat_id | first %}
<li>
<i class="fa fa-book" title="Book" aria-hidden="true"></i>
<a href="{{ cat | category_link }}"
{%- if cat.description %} title="{{ cat.description.value | escape_once }}"{% endif %}>
{{ cat.name }}
</a>
</li>
{%- endif %}
{%- endfor %}
</ul>
</li>
</ul>
{%- endif %}
</div>
{%- endif %}
{%- assign in_series = false -%}
{%- for series_id in series_ids %}
{%- if post.category_ids contains series_id -%}
{%- assign in_series = true -%}
{%- assign series_cat = categories | where: "id", series_id | first -%}
{%- endif -%}
{%- endfor -%}
{%- if in_series %}
<div class="item text-center">
<h4 class="item-heading">Series</h4>
<a href="{{ series_cat | category_link }}"
{% if series_cat.description %} title="{{ series_cat.description.value | escape_once }}"{% endif %}>
{{ series_cat.name }}
</a>
</div>
{%- endif %}
{%- assign has_topics = false -%}
{% for cat_id in post.category_ids -%}
{%- unless ot_books contains cat_id or nt_books contains cat_id or series_ids contains cat_id -%}
{% assign has_topics = true -%}
{%- endunless -%}
{% endfor %}
{%- if has_topics %}
<div class="item">
<h4 class="item-heading">Topics</h4>
<ul>
{%- for cat_id in post.category_ids %}
{% unless ot_books contains cat_id or nt_books contains cat_id or series_ids contains cat_id %}
{%- assign cat = categories | where: "id", cat_id | first -%}
<li>
<i class="fa fa-folder-open-o" title="Category" aria-hidden="true"></i>
<a href="{{ cat | category_link }}" rel="tag" title="Categorized under {{ cat.name | escape }}">
{{ cat.name }}
</a>
</li>
{% endunless %}
{%- endfor %}
</ul>
</div>
{%- endif %}
{%- assign tag_count = post.tags | size -%}
{%- if tag_count > 0 %}
<div class="item">
<h4 class="item-heading">Tags</h4>
<ul>
{%- for tag in post.tags %}
<li>
<a href="{{ tag | tag_link }}" title="Tagged &ldquo;{{ tag }}&rdquo;">
<i class="fa fa-tag" aria-hidden="true"></i> {{ tag }}
</a>
{%- endfor %}
</ul>
</div>
{%- endif %}
</div>