diff --git a/src/MyWebLog/Handlers/Post.fs b/src/MyWebLog/Handlers/Post.fs
index 99e19c6..9c29517 100644
--- a/src/MyWebLog/Handlers/Post.fs
+++ b/src/MyWebLog/Handlers/Post.fs
@@ -336,8 +336,10 @@ let save : HttpHandler = fun next ctx -> task {
let post =
match model.setPublished with
| true ->
- let dt = DateTime (model.pubOverride.Value.ToUniversalTime().Ticks, DateTimeKind.Utc)
- printf $"**** DateKind = {dt.Kind}"
+ let dt =
+ TimeZoneInfo.ConvertTimeToUtc
+ (DateTime (model.pubOverride.Value.Ticks, DateTimeKind.Unspecified),
+ TimeZoneInfo.FindSystemTimeZoneById webLog.timeZone)
match model.setUpdated with
| true ->
{ post with
diff --git a/src/MyWebLog/appsettings.json b/src/MyWebLog/appsettings.json
index 49f8a42..c27ae56 100644
--- a/src/MyWebLog/appsettings.json
+++ b/src/MyWebLog/appsettings.json
@@ -3,7 +3,7 @@
"hostname": "data02.bitbadger.solutions",
"database": "myWebLog_dev"
},
- "Generator": "myWebLog 2.0-alpha29",
+ "Generator": "myWebLog 2.0-alpha30",
"Logging": {
"LogLevel": {
"MyWebLog.Handlers": "Debug"
diff --git a/src/MyWebLog/themes/admin/post-edit.liquid b/src/MyWebLog/themes/admin/post-edit.liquid
index 2760ee4..2f7a11b 100644
--- a/src/MyWebLog/themes/admin/post-edit.liquid
+++ b/src/MyWebLog/themes/admin/post-edit.liquid
@@ -55,8 +55,7 @@
- {%- assign has_media = model.metaNames | where: "episode_media_file" | size -%}
- {%- unless has_media == 0 %}
+ {%- unless model.meta_names contains "episode_media_file" %}
Add Podcast Episode Fields
diff --git a/src/MyWebLog/themes/awftw/index.liquid b/src/MyWebLog/themes/awftw/index.liquid
index 21e3118..3dd1b1a 100644
--- a/src/MyWebLog/themes/awftw/index.liquid
+++ b/src/MyWebLog/themes/awftw/index.liquid
@@ -1,29 +1,20 @@
+{%- assign ot_books = "ZPSOFpd27EeFQvrTZE296Q|VERPK2rYN0G44bo7LjBSRw|fA6zV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uE-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 series_details = "FP7IiNghSEeZLBW21kkAgw,Advent Readings,2019/advent-readings.html|aK4djQBz_UCObjyPq5At_A,Twisted Scripture,2017/twisted-scripture.html|ca1OWFTvMU2H-lHpjsm5MQ,The “3:16”s of the New Testament,2007/the-316s-of-the-new-testament.html" | split: "|" -%}
- {% if is_category or is_tag %}
+ {%- if is_category or is_tag %}
{{ page_title }}
-
- {% endif %}
+ {%- if is_category %}
+ {%- assign cat = categories | where: "slug", slug | first -%}
+ {%- if cat.description %}
{{ cat.description.value }} {% endif -%}
+ {%- endif %}
+ {%- endif %}
{% for post in model.posts %}
@@ -67,116 +58,101 @@
Series
-
Advent Readings
-
-
- About the Series
- •
- Read All
- (-{% comment %} TODO: count
- #{catCount('series/advent-readings')})
- {% endcomment %})
-
-
-
Twisted Scripture
-
-
- About the Series
- •
- Read All
- (-{% comment %} TODO: count
- #{catCount('series/twisted-scripture')})
- {% endcomment %})
-
-
-
The “3:16s” of the New Testament
-
-
- About the Series
- •
- Read All
- (-{% comment %} TODO: count
- #{catCount('series/the-3-16-s-of-the-new-testament')})
- {% endcomment %})
-
+ {%- for series in series_details %}
+ {% assign parts = series | split: "," %}
+ {% assign cat = categories | where: "id", parts[0] | first %}
+
{{ cat.name }}
+
+
+ About the Series
+ •
+ Read All ({{ cat.post_count }})
+
+ {% unless forloop.last %}{% endunless %}
+ {% endfor %}
- {% comment %}
- TODO: group categories by Old Testament / New Testament / Topics
- (may work better once the categories are loaded and we can hard-code IDs
- {% endcomment %}
Books
Each devotion is categorized under the books of the Bible which are referenced within it.
Old Testament
-
+ {%- assign cat_id = ot_books | first -%}
+ {%- assign cat = categories | where: "id", cat_id | first -%}
+
See All
- (-{% comment %} TODO: count
- #{catCount('old-testament')})
- {% endcomment %})
+ ({{ cat.post_count }})
+ {%- assign first_time = true -%}
{% for cat_id in ot_books -%}
- {%- assign cat = categories | where: "id", cat_id | first -%}
-
- {% if cat.post_count == 0 -%}
- {{ cat.name }}
- (0)
- {%- else -%}
-
- {{ cat.name }}
- ({{ cat.post_count }})
- {%- endif %}
-
+ {%- if first_time -%}
+ {%- assign first_time = false -%}
+ {%- else %}
+ {%- assign cat = categories | where: "id", cat_id | first -%}
+
+ {% if cat.post_count == 0 -%}
+
+ {{ cat.name }}
+ (0)
+ {%- else -%}
+
+ {{ cat.name }}
+ ({{ cat.post_count }})
+ {%- endif %}
+
+ {%- endif %}
{%- endfor %}
New Testament
-
+ {%- assign cat_id = nt_books | first -%}
+ {%- assign cat = categories | where: "id", cat_id | first -%}
+
See All
- (-{% comment %} TODO: count
- #{catCount('new-testament')})
- {% endcomment %})
+ ({{ cat.post_count }})
- {% for cat_id in nt_books -%}
- {%- assign cat = categories | where: "id", cat_id | first -%}
-
- {% if cat.post_count == 0 %}
- {{ cat.name }}
- (0)
- {% else %}
-
- {{ cat.name }}
- ({{ cat.post_count }})
- {% endif %}
-
+ {%- assign first_time = true -%}
+ {%- for cat_id in nt_books -%}
+ {%- if first_time -%}
+ {%- assign first_time = false -%}
+ {%- else %}
+ {%- assign cat = categories | where: "id", cat_id | first -%}
+
+ {% if cat.post_count == 0 -%}
+
+ {{ cat.name }}
+ (0)
+ {%- else -%}
+
+ {{ cat.name }}
+ ({{ cat.post_count }})
+ {%- endif %}
+
+ {% endif %}
{% endfor %}
- {% comment %}
- - var topics = cats.filter(excludeBooks).filter(cat => !cat.slug.startsWith('series')).sort((a, b) => a.name.localeCompare(b.name))
- {% endcomment %}
Topics
- {% for cat_id in topics %}
- {%- assign cat = categories | where: "id", cat_id | first -%}
-
-
- {{ cat.name }}
- ({{ cat.post_count }})
-
+ {%- for cat in categories -%}
+ {%- unless ot_books contains cat.id or nt_books contains cat.id or series_ids contains cat.id -%}
+
+ {%- for it in cat.parent_names %} {% endfor -%}
+
+ {{ cat.name }}
+ ({{ cat.post_count }})
+
+ {% endunless %}
{% endfor %}
diff --git a/src/MyWebLog/themes/awftw/single-post.liquid b/src/MyWebLog/themes/awftw/single-post.liquid
index a5b99f1..b4c452d 100644
--- a/src/MyWebLog/themes/awftw/single-post.liquid
+++ b/src/MyWebLog/themes/awftw/single-post.liquid
@@ -1,8 +1,11 @@
+{%- 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|su8Qq5KUwEyoDmssUQ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8iUa_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 -%}
{{ post.title }}
- {% assign media = post.meta | value: "episode_media_file" %}
+ {% assign media = post.metadata | value: "episode_media_file" %}
{%- unless media == "-- episode_media_file not found --" %}
{% endcomment %}
- {%- if post_ot_book_count > 0 or post_nt_book_count > 0 %}
+ {%- 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 %}
Scripture
- {%- if post_ot_book_count > 0 %}
+ {%- if has_ot %}
- {%- assign cat_id = post_ot_books | first -%}
+ {%- assign cat_id = ot_books | first -%}
{%- assign cat = categories | where: "id", cat_id | first -%}
-
-
- {{ cat.name }}
-
+
+
+ {{ cat.name }}
+
- {%- assign skipped_one = false -%}
- {%- for cat_id in post_ot_books %}
- {%- if skipped_one %}
+ {%- 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 %}
-
+
-
+
{{ cat.name }}
-
- {%- else -%}
- {%- assign skipped_on = true -%}
+
{%- endif %}
{%- endfor %}
{%- endif %}
- {%- if post_nt_book_count > 0 %}
+ {%- if has_nt %}
- {%- assign cat_id = post_nt_books | first -%}
+ {%- assign cat_id = nt_books | first -%}
{%- assign cat = categories | where: "id", cat_id | first -%}
-
-
- {{ cat.name }}
-
+
+
+ {{ cat.name }}
+
- {%- assign skipped_one = false -%}
- {%- for cat_id in post_nt_books %}
- {%- if skipped_one %}
+ {%- 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 %}
-
+
-
+
{{ cat.name }}
-
- {%- else -%}
- {%- assign skipped_on = true -%}
+
{%- endif %}
{%- endfor %}
@@ -112,18 +127,42 @@
{%- endif %}
{%- endif %}
- {%- if post_topic_count > 0 %}
+ {%- 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 %}
+
+ {%- 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 %}
Topics
- {%- for cat_id in post_topics %}
- {%- assign cat = categories | where: "id", cat_id | first -%}
-
-
+ {%- 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 -%}
+
- {{ cat.name }}
-
-
+
+ {{ cat.name }}
+
+
+ {% endunless %}
{%- endfor %}
@@ -135,11 +174,9 @@
diff --git a/src/MyWebLog/wwwroot/themes/awftw/style.css b/src/MyWebLog/wwwroot/themes/awftw/style.css
index 2018d6f..16ea553 100644
--- a/src/MyWebLog/wwwroot/themes/awftw/style.css
+++ b/src/MyWebLog/wwwroot/themes/awftw/style.css
@@ -108,7 +108,7 @@ h1, h2, h3, h4, p, ul {
max-width: 1400px;
margin: auto;
}
-@media all and (max-width:78rem) {
+@media all and (max-width:81rem) {
.container {
flex-direction: column;
align-items: center;
@@ -124,7 +124,7 @@ h1, h2, h3, h4, p, ul {
}
.sidebar {
min-width: 10rem;
- max-width: 18rem;
+ max-width: 20rem;
font-size: 1rem;
display: flex;
flex-direction: column;
@@ -134,7 +134,7 @@ h1, h2, h3, h4, p, ul {
padding: 0 .4rem;
}
}
-@media all and (max-width:78rem) {
+@media all and (max-width:81rem) {
.sidebar {
width: 100%;
max-width: 60rem;
@@ -168,7 +168,7 @@ h1, h2, h3, h4, p, ul {
.post-sidebar {
margin-top: 4rem;
}
-@media all and (max-width:78rem) {
+@media all and (max-width:81rem) {
.post-sidebar {
margin-top: 0;
}
@@ -191,12 +191,19 @@ blockquote {
display: flow-root;
font-size: 1.2rem;
}
+blockquote p:last-of-type {
+ margin-bottom: 0;
+}
+blockquote p:nth-last-of-type(2) {
+ margin-bottom: .5rem;
+}
+blockquote.standard p:nth-last-of-type(2) {
+ margin-bottom: inherit;
+}
blockquote.standard {
margin: 1rem 2rem 1rem 1rem;
border-left: solid 3px var(--accent-color);
-}
-blockquote p.cite {
- margin-bottom: 0;
+ font-family: inherit;
}
blockquote cite {
display: block;
@@ -210,6 +217,9 @@ blockquote cite {
top: 5px;
margin: 0 -11px -11px -12px;
}
+blockquote cite::before {
+ content: "— ";
+}
.ref {
color: red;
}
@@ -223,11 +233,19 @@ blockquote sup {
.u {
text-decoration: underline;
}
-blockquote.standard footer cite {
- font-style: normal;
+blockquote.standard footer {
+ padding-top: 1rem;
}
-blockquote.standard footer cite::before {
- content: ", ";
+blockquote.standard footer cite {
+ font-style: italic;
+ background: unset;
+ display: inline;
+ text-align: left;
+ height: unset;
+ background: unset;
+ position: unset;
+ top: unset;
+ margin: inherit;
}
cite {
font-size: 1rem;
@@ -288,13 +306,13 @@ h1 {
color: var(--title-text-color);
}
.item-meta {
- margin: -.4rem;
margin-bottom: 1.2rem;
font-size: 1rem;
text-align: center;
}
.date-posted {
padding: 0 1rem;
+ text-align: center;
}
.text-center {
text-align: center;