Version 2.1 (#41)
- Add full chapter support (#6) - Add built-in redirect functionality (#39) - Support building Docker containers for release (#38) - Support canonical domain configuration (#37) - Add unit tests for domain/models and integration tests for all three data stores - Convert SQLite storage to use JSON documents, similar to PostgreSQL - Convert admin templates to Giraffe View Engine (from Liquid) - Add .NET 8 support
This commit was merged in pull request #41.
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
{%- if is_category or is_tag %}
|
||||
<h1 class="index-title">{{ page_title }}</h1>
|
||||
{%- if subtitle %}<h4 class="text-muted">{{ subtitle }}</h4>{% endif -%}
|
||||
<h1 class=index-title>{{ page_title }}</h1>
|
||||
{%- if subtitle %}<h4 class=text-muted>{{ subtitle }}</h4>{% endif -%}
|
||||
{% endif %}
|
||||
{%- assign post_count = model.posts | size -%}
|
||||
{%- if post_count > 0 %}
|
||||
@@ -13,48 +13,44 @@
|
||||
</a>
|
||||
</h1>
|
||||
<p>
|
||||
Published on {{ post.published_on | date: "MMMM d, yyyy" }}
|
||||
at {{ post.published_on | date: "h:mmtt" | downcase }}
|
||||
by {{ model.authors | value: post.author_id }}
|
||||
</p>
|
||||
Published on {{ post.published_on | date: "MMMM d, yyyy" }}
|
||||
at {{ post.published_on | date: "h:mmtt" | downcase }}
|
||||
by {{ model.authors | value: post.author_id }}
|
||||
{{ 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>
|
||||
{%- 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 -%}
|
||||
</p>
|
||||
{%- 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 -%}
|
||||
</footer>
|
||||
{% endif %}
|
||||
<hr>
|
||||
</article>
|
||||
{% endfor %}
|
||||
</section>
|
||||
<nav aria-label="pagination">
|
||||
<nav aria-label=pagination>
|
||||
<ul class="pagination justify-content-evenly mt-2">
|
||||
{% if model.newer_link -%}
|
||||
<li class="page-item"><a class="page-link" href="{{ model.newer_link.value }}">« Newer Posts</a></li>
|
||||
{% endif %}
|
||||
{% if model.older_link -%}
|
||||
<li class="page-item"><a class="page-link" href="{{ model.older_link.value }}">Older Posts »</a></li>
|
||||
{%- endif -%}
|
||||
{% 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 -%}
|
||||
</ul>
|
||||
</nav>
|
||||
{%- else %}
|
||||
<article>
|
||||
<p class="text-center mt-3">No posts found</p>
|
||||
</article>
|
||||
<article><p class="text-center mt-3">No posts found</article>
|
||||
{%- endif %}
|
||||
|
||||
@@ -1,62 +1,55 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width">
|
||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/css/bootstrap.min.css"
|
||||
integrity="sha384-1BmE4kWBq78iYhFldvKuhfTAU6auU8tT94WrHftjDbrCEXSU1oBoqyl2QvZ6jIW3" crossorigin="anonymous">
|
||||
<title>{{ page_title | strip_html }}{% if page_title %} « {% endif %}{{ web_log.name | strip_html }}</title>
|
||||
{% page_head -%}
|
||||
</head>
|
||||
<body>
|
||||
<header>
|
||||
<nav class="navbar navbar-light bg-light navbar-expand-md justify-content-start px-2">
|
||||
<div class="container-fluid">
|
||||
<a class="navbar-brand" href="{{ "" | relative_link }}">{{ web_log.name }}</a>
|
||||
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarText"
|
||||
aria-controls="navbarText" aria-expanded="false" aria-label="Toggle navigation">
|
||||
<span class="navbar-toggler-icon"></span>
|
||||
</button>
|
||||
<div class="collapse navbar-collapse" id="navbarText">
|
||||
{% if web_log.subtitle -%}
|
||||
<span class="navbar-text">{{ web_log.subtitle.value }}</span>
|
||||
{%- endif %}
|
||||
<ul class="navbar-nav">
|
||||
{% unless web_log.default_page == "posts" %}{{ "page/1" | nav_link: "Posts" }}{% endunless %}
|
||||
{% if page_list -%}
|
||||
{% for pg in page_list %}{{ pg.permalink | nav_link: pg.title }}{% endfor %}
|
||||
{%- endif %}
|
||||
</ul>
|
||||
{% user_links %}
|
||||
</div>
|
||||
<html lang=en>
|
||||
<meta charset=utf-8>
|
||||
<meta name=viewport content="width=device-width">
|
||||
<link rel=stylesheet href=https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/css/bootstrap.min.css
|
||||
integrity=sha384-1BmE4kWBq78iYhFldvKuhfTAU6auU8tT94WrHftjDbrCEXSU1oBoqyl2QvZ6jIW3 crossorigin=anonymous>
|
||||
<title>{{ page_title | strip_html }}{% if page_title %} « {% endif %}{{ web_log.name | strip_html }}</title>
|
||||
{% page_head -%}
|
||||
<header>
|
||||
<nav class="navbar navbar-light bg-light navbar-expand-md justify-content-start px-2">
|
||||
<div class=container-fluid>
|
||||
<a class=navbar-brand href="{{ "" | relative_link }}">{{ web_log.name }}</a>
|
||||
<button class=navbar-toggler type=button data-bs-toggle=collapse data-bs-target=#navbarText
|
||||
aria-controls=navbarText aria-expanded=false aria-label="Toggle navigation">
|
||||
<span class=navbar-toggler-icon></span>
|
||||
</button>
|
||||
<div class="collapse navbar-collapse" id=navbarText>
|
||||
{% if web_log.subtitle -%}
|
||||
<span class=navbar-text>{{ web_log.subtitle.value }}</span>
|
||||
{%- endif %}
|
||||
<ul class=navbar-nav>
|
||||
{% unless web_log.default_page == "posts" %}{{ "page/1" | nav_link: "Posts" }}{% endunless %}
|
||||
{% if page_list -%}
|
||||
{% for pg in page_list %}{{ pg.permalink | nav_link: pg.title }}{% endfor %}
|
||||
{%- endif %}
|
||||
</ul>
|
||||
{% user_links %}
|
||||
</div>
|
||||
</nav>
|
||||
</header>
|
||||
<main class="mx-3">
|
||||
{% if messages %}
|
||||
<div class="messages">
|
||||
{% for msg in messages %}
|
||||
<div role="alert" class="alert alert-{{ msg.level }} alert-dismissible fade show">
|
||||
{{ msg.message }}
|
||||
<button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="Close"></button>
|
||||
{% if msg.detail %}
|
||||
<hr>
|
||||
<p>{{ msg.detail.value }}</p>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% endif %}
|
||||
{{ content }}
|
||||
</main>
|
||||
<footer>
|
||||
<hr>
|
||||
<div class="container-fluid text-end">
|
||||
<img src="{{ "themes/admin/logo-dark.png" | relative_link }}" alt="myWebLog" width="120" height="34">
|
||||
</div>
|
||||
</footer>
|
||||
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/js/bootstrap.bundle.min.js"
|
||||
integrity="sha384-ka7Sk0Gln4gmtz2MlQnikT1wXgYsOg+OMhuP+IlRH9sENBO0LRn5q+8nbTov4+1p"
|
||||
crossorigin="anonymous"></script>
|
||||
</body>
|
||||
</nav>
|
||||
</header>
|
||||
<main class=mx-3>
|
||||
{% if messages %}
|
||||
<div class=messages>
|
||||
{% for msg in messages %}
|
||||
<div role=alert class="alert alert-{{ msg.level }} alert-dismissible fade show">
|
||||
{{ msg.message }}
|
||||
<button type=button class=btn-close data-bs-dismiss=alert aria-label=Close></button>
|
||||
{% if msg.detail %}<hr><p>{{ msg.detail.value }}{% endif %}
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% endif %}
|
||||
{{ content }}
|
||||
</main>
|
||||
<footer>
|
||||
<hr>
|
||||
<div class="container-fluid text-end">
|
||||
<img src="{{ "themes/admin/logo-dark.png" | relative_link }}" alt=myWebLog width=120 height=34>
|
||||
</div>
|
||||
</footer>
|
||||
<script src=https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/js/bootstrap.bundle.min.js
|
||||
integrity=sha384-ka7Sk0Gln4gmtz2MlQnikT1wXgYsOg+OMhuP+IlRH9sENBO0LRn5q+8nbTov4+1p
|
||||
crossorigin=anonymous></script>
|
||||
</html>
|
||||
|
||||
@@ -1,4 +1,2 @@
|
||||
<h2 class="py-3">{{ page.title }}</h2>
|
||||
<article class="container">
|
||||
{{ page.text }}
|
||||
</article>
|
||||
<h2 class=py-3>{{ page.title }}</h2>
|
||||
<article class="container">{{ page.text }}</article>
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
{% endif %}
|
||||
by {{ model.authors | value: post.author_id }}
|
||||
{%- if is_editor or is_author and user_id == post.author_id %}
|
||||
• <a hx-boost="false" href="{{ post | edit_post_link }}">Edit Post</a>
|
||||
• <a hx-boost=false href="{{ post | edit_post_link }}">Edit Post</a>
|
||||
{%- endif %}
|
||||
</h4>
|
||||
<div>
|
||||
@@ -21,7 +21,7 @@
|
||||
Categorized under
|
||||
{% for cat_id in post.category_ids -%}
|
||||
{% assign cat = categories | where: "Id", cat_id | first %}
|
||||
<span class="text-nowrap">
|
||||
<span class=text-nowrap>
|
||||
<a href="{{ cat | category_link }}" title="Categorized under “{{ cat.name | escape }}”">
|
||||
{{ cat.name }}
|
||||
</a>
|
||||
@@ -35,7 +35,7 @@
|
||||
<h4 class="item-meta text-muted">
|
||||
Tagged
|
||||
{% for tag in post.tags %}
|
||||
<span class="text-nowrap">
|
||||
<span class=text-nowrap>
|
||||
<a href="{{ tag | tag_link }}" title="Posts tagged “{{ tag | escape }}”" rel="tag">{{ tag }}</a>
|
||||
</span>
|
||||
{% unless forloop.last %} • {% endunless %}
|
||||
@@ -44,20 +44,18 @@
|
||||
{%- endif %}
|
||||
</article>
|
||||
<div>
|
||||
<nav aria-label="pagination">
|
||||
<nav aria-label=pagination>
|
||||
<ul class="pagination justify-content-evenly mt-5">
|
||||
{% if model.newer_link -%}
|
||||
<li class="page-item">
|
||||
<a class="page-link" href="{{ model.newer_link.value | relative_link }}">{{ model.newer_name.value }}</a>
|
||||
<span class="text-muted">« Previous Post</span>
|
||||
</li>
|
||||
{% endif %}
|
||||
{% if model.older_link -%}
|
||||
<li class="page-item text-end">
|
||||
<a class="page-link" href="{{ model.older_link.value | relative_link }}">{{ model.older_name.value }}</a>
|
||||
<span class="text-muted">Next Post »</span>
|
||||
</li>
|
||||
{%- endif -%}
|
||||
{% if model.newer_link -%}
|
||||
<li class=page-item>
|
||||
<a class=page-link href="{{ model.newer_link.value | relative_link }}">{{ model.newer_name.value }}</a>
|
||||
<span class=text-muted>« Previous Post</span>
|
||||
{% endif %}
|
||||
{% if model.older_link -%}
|
||||
<li class="page-item text-end">
|
||||
<a class=page-link href="{{ model.older_link.value | relative_link }}">{{ model.older_name.value }}</a>
|
||||
<span class=text-muted>Next Post »</span>
|
||||
{%- endif -%}
|
||||
</ul>
|
||||
</nav>
|
||||
</div>
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
myWebLog Default Theme
|
||||
2.0.0
|
||||
2.1.0
|
||||
Reference in New Issue
Block a user