Update admin/default templates

This commit is contained in:
Daniel J. Summers 2024-01-19 21:24:55 -05:00
parent 9da9a94947
commit da5918b154
36 changed files with 914 additions and 1092 deletions

View File

@ -83,13 +83,13 @@ type NavLinkFilter() =
let extraPath = ctx.WebLog.ExtraPath let extraPath = ctx.WebLog.ExtraPath
let path = if extraPath = "" then "" else $"{extraPath[1..]}/" let path = if extraPath = "" then "" else $"{extraPath[1..]}/"
seq { seq {
"<li class=\"nav-item\"><a class=\"nav-link" "<li class=nav-item><a class=\"nav-link"
if (string ctx.Environments[0].["current_page"]).StartsWith $"{path}{url}" then " active" if (string ctx.Environments[0].["current_page"]).StartsWith $"{path}{url}" then " active"
"\" href=\"" "\" href=\""
ctx.WebLog.RelativeUrl(Permalink url) ctx.WebLog.RelativeUrl(Permalink url)
"\">" "\">"
text text
"</a></li>" "</a>"
} }
|> String.concat "" |> String.concat ""
@ -111,23 +111,23 @@ type PageHeadTag() =
let getBool name = let getBool name =
defaultArg (context.Environments[0].[name] |> Option.ofObj |> Option.map Convert.ToBoolean) false defaultArg (context.Environments[0].[name] |> Option.ofObj |> Option.map Convert.ToBoolean) false
result.WriteLine $"""<meta name="generator" content="{context.Environments[0].["generator"]}">""" result.WriteLine $"""<meta name=generator content="{context.Environments[0].["generator"]}">"""
// Theme assets // Theme assets
if assetExists "style.css" webLog then if assetExists "style.css" webLog then
result.WriteLine $"""{s}<link rel="stylesheet" href="{ThemeAssetFilter.ThemeAsset(context, "style.css")}">""" result.WriteLine $"""{s}<link rel=stylesheet href="{ThemeAssetFilter.ThemeAsset(context, "style.css")}">"""
if assetExists "favicon.ico" webLog then if assetExists "favicon.ico" webLog then
result.WriteLine $"""{s}<link rel="icon" href="{ThemeAssetFilter.ThemeAsset(context, "favicon.ico")}">""" result.WriteLine $"""{s}<link rel=icon href="{ThemeAssetFilter.ThemeAsset(context, "favicon.ico")}">"""
// RSS feeds and canonical URLs // RSS feeds and canonical URLs
let feedLink title url = let feedLink title url =
let escTitle = HttpUtility.HtmlAttributeEncode title let escTitle = HttpUtility.HtmlAttributeEncode title
let relUrl = webLog.RelativeUrl(Permalink url) let relUrl = webLog.RelativeUrl(Permalink url)
$"""{s}<link rel="alternate" type="application/rss+xml" title="{escTitle}" href="{relUrl}">""" $"""{s}<link rel=alternate type="application/rss+xml" title="{escTitle}" href="{relUrl}">"""
if webLog.Rss.IsFeedEnabled && getBool "is_home" then if webLog.Rss.IsFeedEnabled && getBool "is_home" then
result.WriteLine(feedLink webLog.Name webLog.Rss.FeedName) result.WriteLine(feedLink webLog.Name webLog.Rss.FeedName)
result.WriteLine $"""{s}<link rel="canonical" href="{webLog.AbsoluteUrl Permalink.Empty}">""" result.WriteLine $"""{s}<link rel=canonical href="{webLog.AbsoluteUrl Permalink.Empty}">"""
if webLog.Rss.IsCategoryEnabled && getBool "is_category_home" then if webLog.Rss.IsCategoryEnabled && getBool "is_category_home" then
let slug = context.Environments[0].["slug"] :?> string let slug = context.Environments[0].["slug"] :?> string
@ -140,12 +140,12 @@ type PageHeadTag() =
if getBool "is_post" then if getBool "is_post" then
let post = context.Environments[0].["model"] :?> PostDisplay let post = context.Environments[0].["model"] :?> PostDisplay
let url = webLog.AbsoluteUrl (Permalink post.Posts[0].Permalink) let url = webLog.AbsoluteUrl (Permalink post.Posts[0].Permalink)
result.WriteLine $"""{s}<link rel="canonical" href="{url}">""" result.WriteLine $"""{s}<link rel=canonical href="{url}">"""
if getBool "is_page" then if getBool "is_page" then
let page = context.Environments[0].["page"] :?> DisplayPage let page = context.Environments[0].["page"] :?> DisplayPage
let url = webLog.AbsoluteUrl (Permalink page.Permalink) let url = webLog.AbsoluteUrl (Permalink page.Permalink)
result.WriteLine $"""{s}<link rel="canonical" href="{url}">""" result.WriteLine $"""{s}<link rel=canonical href="{url}">"""
/// Create various items in the page header based on the state of the page being generated /// Create various items in the page header based on the state of the page being generated
@ -191,10 +191,10 @@ type UserLinksTag() =
"""<ul class="navbar-nav flex-grow-1 justify-content-end">""" """<ul class="navbar-nav flex-grow-1 justify-content-end">"""
match Convert.ToBoolean context.Environments[0].["is_logged_on"] with match Convert.ToBoolean context.Environments[0].["is_logged_on"] with
| true -> | true ->
$"""<li class="nav-item"><a class="nav-link" href="{link "admin/dashboard"}">Dashboard</a></li>""" $"""<li class=nav-item><a class=nav-link href="{link "admin/dashboard"}">Dashboard</a>"""
$"""<li class="nav-item"><a class="nav-link" href="{link "user/log-off"}">Log Off</a></li>""" $"""<li class=nav-item><a class=nav-link href="{link "user/log-off"}">Log Off</a>"""
| false -> | false ->
$"""<li class="nav-item"><a class="nav-link" href="{link "user/log-on"}">Log On</a></li>""" $"""<li class=nav-item><a class=nav-link href="{link "user/log-on"}">Log On</a>"""
"</ul>" "</ul>"
} }
|> Seq.iter result.WriteLine |> Seq.iter result.WriteLine

View File

@ -1,32 +1,32 @@
<div class="form-floating pb-3"> <div class="form-floating pb-3">
<input type="text" name="Title" id="title" class="form-control" placeholder="Title" autofocus required <input type=text name=Title id=title class=form-control placeholder=Title autofocus required
value="{{ model.title }}"> value="{{ model.title }}">
<label for="title">Title</label> <label for=title>Title</label>
</div> </div>
<div class="form-floating pb-3"> <div class="form-floating pb-3">
<input type="text" name="Permalink" id="permalink" class="form-control" placeholder="Permalink" required <input type=text name=Permalink id=permalink class=form-control placeholder=Permalink required
value="{{ model.permalink }}"> value="{{ model.permalink }}">
<label for="permalink">Permalink</label> <label for=permalink>Permalink</label>
{%- unless model.is_new %} {%- unless model.is_new %}
{%- assign entity_url_base = "admin/" | append: entity | append: "/" | append: entity_id -%} {%- assign entity_url_base = "admin/" | append: entity | append: "/" | append: entity_id -%}
<span class="form-text"> <span class=form-text>
<a href="{{ entity_url_base | append: "/permalinks" | relative_link }}">Manage Permalinks</a> <a href="{{ entity_url_base | append: "/permalinks" | relative_link }}">Manage Permalinks</a>
<span class="text-muted"> &bull; </span> <span class=text-muted> &bull; </span>
<a href="{{ entity_url_base | append: "/revisions" | relative_link }}">Manage Revisions</a> <a href="{{ entity_url_base | append: "/revisions" | relative_link }}">Manage Revisions</a>
</span> </span>
{%- endunless -%} {%- endunless -%}
</div> </div>
<div class="mb-2"> <div class=mb-2>
<label for="text">Text</label> &nbsp; &nbsp; <label for=text>Text</label> &nbsp; &nbsp;
<div class="btn-group btn-group-sm" role="group" aria-label="Text format button group"> <div class="btn-group btn-group-sm" role=group aria-label="Text format button group">
<input type="radio" name="Source" id="source_html" class="btn-check" value="HTML" <input type=radio name=Source id=source_html class=btn-check value=HTML
{%- if model.source == "HTML" %} checked="checked"{% endif %}> {%- if model.source == "HTML" %} checked{% endif %}>
<label class="btn btn-sm btn-outline-secondary" for="source_html">HTML</label> <label class="btn btn-sm btn-outline-secondary" for=source_html>HTML</label>
<input type="radio" name="Source" id="source_md" class="btn-check" value="Markdown" <input type=radio name=Source id=source_md class=btn-check value=Markdown
{%- if model.source == "Markdown" %} checked="checked"{% endif %}> {%- if model.source == "Markdown" %} checked{% endif %}>
<label class="btn btn-sm btn-outline-secondary" for="source_md">Markdown</label> <label class="btn btn-sm btn-outline-secondary" for=source_md>Markdown</label>
</div> </div>
</div> </div>
<div class="pb-3"> <div class=pb-3>
<textarea name="Text" id="text" class="form-control" rows="20">{{ model.text }}</textarea> <textarea name=Text id=text class=form-control rows=20>{{ model.text }}</textarea>
</div> </div>

View File

@ -1,14 +1,14 @@
<header> <header>
<nav class="navbar navbar-dark bg-dark navbar-expand-md justify-content-start px-2 position-fixed top-0 w-100"> <nav class="navbar navbar-dark bg-dark navbar-expand-md justify-content-start px-2 position-fixed top-0 w-100">
<div class="container-fluid"> <div class=container-fluid>
<a class="navbar-brand" href="{{ "" | relative_link }}" hx-boost="false">{{ web_log.name }}</a> <a class=navbar-brand href="{{ "" | relative_link }}" hx-boost=false>{{ web_log.name }}</a>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarText" <button class=navbar-toggler type=button data-bs-toggle=collapse data-bs-target=#navbarText
aria-controls="navbarText" aria-expanded="false" aria-label="Toggle navigation"> aria-controls=navbarText aria-expanded=false aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span> <span class=navbar-toggler-icon></span>
</button> </button>
<div class="collapse navbar-collapse" id="navbarText"> <div class="collapse navbar-collapse" id=navbarText>
{%- if is_logged_on %} {%- if is_logged_on %}
<ul class="navbar-nav"> <ul class=navbar-nav>
{{ "admin/dashboard" | nav_link: "Dashboard" }} {{ "admin/dashboard" | nav_link: "Dashboard" }}
{%- if is_author %} {%- if is_author %}
{{ "admin/pages" | nav_link: "Pages" }} {{ "admin/pages" | nav_link: "Pages" }}
@ -27,22 +27,17 @@
<ul class="navbar-nav flex-grow-1 justify-content-end"> <ul class="navbar-nav flex-grow-1 justify-content-end">
{%- if is_logged_on %} {%- if is_logged_on %}
{{ "admin/my-info" | nav_link: "My Info" }} {{ "admin/my-info" | nav_link: "My Info" }}
<li class="nav-item"> <li class=nav-item>
<a class="nav-link" href="https://bitbadger.solutions/open-source/myweblog/#how-to-use-myweblog" <a class=nav-link href=https://bitbadger.solutions/open-source/myweblog/#how-to-use-myweblog target=_blank>
target="_blank">
Docs Docs
</a> </a>
</li> <li class=nav-item>
<li class="nav-item"> <a class=nav-link href="{{ "user/log-off" | relative_link }}" hx-boost=false>Log Off</a>
<a class="nav-link" href="{{ "user/log-off" | relative_link }}" hx-boost="false">Log Off</a>
</li>
{%- else -%} {%- else -%}
<li class="nav-item"> <li class=nav-item>
<a class="nav-link" href="https://bitbadger.solutions/open-source/myweblog/#how-to-use-myweblog" <a class=nav-link href=https://bitbadger.solutions/open-source/myweblog/#how-to-use-myweblog target=_blank>
target="_blank">
Docs Docs
</a> </a>
</li>
{{ "user/log-on" | nav_link: "Log On" }} {{ "user/log-on" | nav_link: "Log On" }}
{%- endif %} {%- endif %}
</ul> </ul>
@ -50,16 +45,16 @@
</div> </div>
</nav> </nav>
</header> </header>
<div id="toastHost" class="position-fixed top-0 w-100" aria-live="polite" aria-atomic="true"> <div id=toastHost class="position-fixed top-0 w-100" aria-live=polite aria-atomic=true>
<div id="toasts" class="toast-container position-absolute p-3 mt-5 top-0 end-0"> <div id=toasts class="toast-container position-absolute p-3 mt-5 top-0 end-0">
{% for msg in messages %} {% for msg in messages %}
<div class="toast" role="alert" aria-live="assertive" aria-atomic="true" <div class=toast role=alert aria-live=assertive aria-atomic=true
{%- unless msg.level == "success" %} data-bs-autohide="false"{% endunless %}> {%- unless msg.level == "success" %} data-bs-autohide="false"{% endunless %}>
<div class="toast-header bg-{{ msg.level }}{% unless msg.level == "warning" %} text-white{% endunless %}"> <div class="toast-header bg-{{ msg.level }}{% unless msg.level == "warning" %} text-white{% endunless %}">
<strong class="me-auto text-uppercase"> <strong class="me-auto text-uppercase">
{% if msg.level == "danger" %}error{% else %}{{ msg.level}}{% endif %} {% if msg.level == "danger" %}error{% else %}{{ msg.level}}{% endif %}
</strong> </strong>
<button type="button" class="btn-close" data-bs-dismiss="toast" aria-label="Close"></button> <button type=button class=btn-close data-bs-dismiss=toast aria-label=Close></button>
</div> </div>
<div class="toast-body bg-{{ msg.level }} bg-opacity-25"> <div class="toast-body bg-{{ msg.level }} bg-opacity-25">
{{ msg.message }} {{ msg.message }}
@ -73,13 +68,13 @@
</div> </div>
</div> </div>
<main class="mx-3 mt-3"> <main class="mx-3 mt-3">
<div class="load-overlay p-5" id="loadOverlay"><h1 class="p-3">Loading&hellip;</h1></div> <div class="load-overlay p-5" id=loadOverlay><h1 class=p-3>Loading&hellip;</h1></div>
{{ content }} {{ content }}
</main> </main>
<footer class="position-fixed bottom-0 w-100"> <footer class="position-fixed bottom-0 w-100">
<div class="text-end text-white me-2"> <div class="text-end text-white me-2">
{%- assign version = generator | split: " " -%} {%- assign version = generator | split: " " -%}
<small class="me-1 align-baseline">v{{ version[1] }}</small> <small class="me-1 align-baseline">v{{ version[1] }}</small>
<img src="{{ "themes/admin/logo-light.png" | relative_link }}" alt="myWebLog" width="120" height="34"> <img src="{{ "themes/admin/logo-light.png" | relative_link }}" alt=myWebLog width=120 height=34>
</div> </div>
</footer> </footer>

View File

@ -1,9 +1,8 @@
<h2 class="my-3">{{ page_title }}</h2> <h2 class=my-3>{{ page_title }}</h2>
<article> <article>
<fieldset class="container mb-3 pb-0"> <fieldset class="container mb-3 pb-0">
<legend>Themes</legend> <legend>Themes</legend>
<a href="{{ "admin/theme/new" | relative_link }}" class="btn btn-primary btn-sm mb-3" <a href="{{ "admin/theme/new" | relative_link }}" class="btn btn-primary btn-sm mb-3" hx-target=#theme_new>
hx-target="#theme_new">
Upload a New Theme Upload a New Theme
</a> </a>
<div class="container g-0"> <div class="container g-0">
@ -21,39 +20,37 @@
{%- assign cache_base_url = "admin/cache/" -%} {%- assign cache_base_url = "admin/cache/" -%}
<legend>Caches</legend> <legend>Caches</legend>
<div class="row pb-2"> <div class="row pb-2">
<div class="col"> <div class=col>
<p> <p>
myWebLog uses a few caches to ensure that it serves pages as fast as possible. myWebLog uses a few caches to ensure that it serves pages as fast as possible.
(<a href="https://bitbadger.solutions/open-source/myweblog/advanced.html#cache-management" (<a href=https://bitbadger.solutions/open-source/myweblog/advanced.html#cache-management
target="_blank">more information</a>) target=_blank>more information</a>)
</p>
</div> </div>
</div> </div>
<div class="row"> <div class=row>
<div class="col-12 col-lg-6 pb-3"> <div class="col-12 col-lg-6 pb-3">
<div class="card"> <div class=card>
<header class="card-header text-white bg-secondary">Web Logs</header> <header class="card-header text-white bg-secondary">Web Logs</header>
<div class="card-body pb-0"> <div class="card-body pb-0">
<h6 class="card-subtitle text-muted pb-3"> <h6 class="card-subtitle text-muted pb-3">
These caches include the page list and categories for each web log These caches include the page list and categories for each web log
</h6> </h6>
{%- assign web_log_base_url = cache_base_url | append: "web-log/" -%} {%- assign web_log_base_url = cache_base_url | append: "web-log/" -%}
<form method="post" class="container g-0" hx-boost="false" hx-target="body" <form method=post class="container g-0" hx-boost=false hx-target=body hx-swap="innerHTML show:window:top">
hx-swap="innerHTML show:window:top"> <input type=hidden name="{{ csrf.form_field_name }}" value="{{ csrf.request_token }}">
<input type="hidden" name="{{ csrf.form_field_name }}" value="{{ csrf.request_token }}"> <button type=submit class="btn btn-sm btn-primary mb-2"
<button type="submit" class="btn btn-sm btn-primary mb-2"
hx-post="{{ web_log_base_url | append: "all/refresh" | relative_link }}"> hx-post="{{ web_log_base_url | append: "all/refresh" | relative_link }}">
Refresh All Refresh All
</button> </button>
<div class="row mwl-table-heading"> <div class="row mwl-table-heading">
<div class="col">Web Log</div> <div class=col>Web Log</div>
</div> </div>
{%- for web_log in web_logs %} {%- for web_log in web_logs %}
<div class="row mwl-table-detail"> <div class="row mwl-table-detail">
<div class="col"> <div class=col>
{{ web_log[1] }}<br> {{ web_log[1] }}<br>
<small> <small>
<span class="text-muted">{{ web_log[2] }}</span><br> <span class=text-muted>{{ web_log[2] }}</span><br>
{%- assign refresh_url = web_log_base_url | append: web_log[0] | append: "/refresh" | relative_link -%} {%- assign refresh_url = web_log_base_url | append: web_log[0] | append: "/refresh" | relative_link -%}
<a href="{{ refresh_url }}" hx-post="{{ refresh_url }}">Refresh</a> <a href="{{ refresh_url }}" hx-post="{{ refresh_url }}">Refresh</a>
</small> </small>
@ -65,7 +62,7 @@
</div> </div>
</div> </div>
<div class="col-12 col-lg-6 pb-3"> <div class="col-12 col-lg-6 pb-3">
<div class="card"> <div class=card>
<header class="card-header text-white bg-secondary">Themes</header> <header class="card-header text-white bg-secondary">Themes</header>
<div class="card-body pb-0"> <div class="card-body pb-0">
<h6 class="card-subtitle text-muted pb-3"> <h6 class="card-subtitle text-muted pb-3">
@ -73,29 +70,28 @@
templates will still refresh its asset cache templates will still refresh its asset cache
</h6> </h6>
{%- assign theme_base_url = cache_base_url | append: "theme/" -%} {%- assign theme_base_url = cache_base_url | append: "theme/" -%}
<form method="post" class="container g-0" hx-boost="false" hx-target="body" <form method=post class="container g-0" hx-boost=false hx-target=body hx-swap="innerHTML show:window:top">
hx-swap="innerHTML show:window:top"> <input type=hidden name="{{ csrf.form_field_name }}" value="{{ csrf.request_token }}">
<input type="hidden" name="{{ csrf.form_field_name }}" value="{{ csrf.request_token }}"> <button type=submit class="btn btn-sm btn-primary mb-2"
<button type="submit" class="btn btn-sm btn-primary mb-2"
hx-post="{{ theme_base_url | append: "all/refresh" | relative_link }}"> hx-post="{{ theme_base_url | append: "all/refresh" | relative_link }}">
Refresh All Refresh All
</button> </button>
<div class="row mwl-table-heading"> <div class="row mwl-table-heading">
<div class="col-8">Theme</div> <div class=col-8>Theme</div>
<div class="col-4">Cached</div> <div class=col-4>Cached</div>
</div> </div>
{%- for theme in cached_themes %} {%- for theme in cached_themes %}
{% unless theme[0] == "admin" %} {% unless theme[0] == "admin" %}
<div class="row mwl-table-detail"> <div class="row mwl-table-detail">
<div class="col-8"> <div class=col-8>
{{ theme[1] }}<br> {{ theme[1] }}<br>
<small> <small>
<span class="text-muted">{{ theme[0] }} &bull; </span> <span class=text-muted>{{ theme[0] }} &bull; </span>
{%- assign refresh_url = theme_base_url | append: theme[0] | append: "/refresh" | relative_link -%} {%- assign refresh_url = theme_base_url | append: theme[0] | append: "/refresh" | relative_link -%}
<a href="{{ refresh_url }}" hx-post="{{ refresh_url }}">Refresh</a> <a href="{{ refresh_url }}" hx-post="{{ refresh_url }}">Refresh</a>
</small> </small>
</div> </div>
<div class="col-4">{{ theme[2] }}</div> <div class=col-4>{{ theme[2] }}</div>
</div> </div>
{% endunless %} {% endunless %}
{%- endfor %} {%- endfor %}

View File

@ -1,52 +1,50 @@
<div class="col-12"> <div class=col-12>
<h5 class="my-3">{{ page_title }}</h5> <h5 class=my-3>{{ page_title }}</h5>
<form hx-post="{{ "admin/category/save" | relative_link }}" method="post" class="container" <form hx-post="{{ "admin/category/save" | relative_link }}" method=post class=container hx-target=#catList
hx-target="#catList" hx-swap="outerHTML show:window:top"> hx-swap="outerHTML show:window:top">
<input type="hidden" name="{{ csrf.form_field_name }}" value="{{ csrf.request_token }}"> <input type=hidden name="{{ csrf.form_field_name }}" value="{{ csrf.request_token }}">
<input type="hidden" name="CategoryId" value="{{ model.category_id }}"> <input type=hidden name=CategoryId value="{{ model.category_id }}">
<div class="row"> <div class=row>
<div class="col-12 col-sm-6 col-lg-4 col-xxl-3 offset-xxl-1 mb-3"> <div class="col-12 col-sm-6 col-lg-4 col-xxl-3 offset-xxl-1 mb-3">
<div class="form-floating"> <div class=form-floating>
<input type="text" name="Name" id="name" class="form-control" placeholder="Name" autofocus required <input type=text name=Name id=name class=form-control placeholder=Name autofocus required
value="{{ model.name | escape }}"> value="{{ model.name | escape }}">
<label for="name">Name</label> <label for=name>Name</label>
</div> </div>
</div> </div>
<div class="col-12 col-sm-6 col-lg-4 col-xxl-3 mb-3"> <div class="col-12 col-sm-6 col-lg-4 col-xxl-3 mb-3">
<div class="form-floating"> <div class=form-floating>
<input type="text" name="Slug" id="slug" class="form-control" placeholder="Slug" required <input type=text name=Slug id=slug class=form-control placeholder=Slug required
value="{{ model.slug | escape }}"> value="{{ model.slug | escape }}">
<label for="slug">Slug</label> <label for=slug>Slug</label>
</div> </div>
</div> </div>
<div class="col-12 col-lg-4 col-xxl-3 offset-xxl-1 mb-3"> <div class="col-12 col-lg-4 col-xxl-3 offset-xxl-1 mb-3">
<div class="form-floating"> <div class=form-floating>
<select name="ParentId" id="parentId" class="form-control"> <select name=ParentId id=parentId class=form-control>
<option value=""{% if model.parent_id == "" %} selected="selected"{% endif %}> <option value=""{% if model.parent_id == "" %} selected{% endif %}>&ndash; None &ndash;</option>
&ndash; None &ndash;
</option>
{% for cat in categories -%} {% for cat in categories -%}
{%- unless cat.id == model.category_id %} {%- unless cat.id == model.category_id %}
<option value="{{ cat.id }}"{% if model.parent_id == cat.id %} selected="selected"{% endif %}> <option value="{{ cat.id }}"{% if model.parent_id == cat.id %} selected{% endif %}>
{% for it in cat.parent_names %} &nbsp; &raquo; {% endfor %}{{ cat.name }} {% for it in cat.parent_names %} &nbsp; &raquo; {% endfor %}{{ cat.name }}
</option> </option>
{% endunless -%} {% endunless -%}
{%- endfor %} {%- endfor %}
</select> </select>
<label for="parentId">Parent Category</label> <label for=parentId>Parent Category</label>
</div> </div>
</div> </div>
<div class="col-12 col-xl-10 offset-xl-1 mb-3"> <div class="col-12 col-xl-10 offset-xl-1 mb-3">
<div class="form-floating"> <div class=form-floating>
<input name="Description" id="description" class="form-control" <input name=Description id=description class=form-control
placeholder="A short description of this category" value="{{ model.description | escape }}"> placeholder="A short description of this category" value="{{ model.description | escape }}">
<label for="description">Description</label> <label for=description>Description</label>
</div> </div>
</div> </div>
</div> </div>
<div class="row mb-3"> <div class="row mb-3">
<div class="col text-center"> <div class="col text-center">
<button type="submit" class="btn btn-sm btn-primary">Save Changes</button> <button type=submit class="btn btn-sm btn-primary">Save Changes</button>
<a href="{{ "admin/categories/bare" | relative_link }}" class="btn btn-sm btn-secondary ms-3">Cancel</a> <a href="{{ "admin/categories/bare" | relative_link }}" class="btn btn-sm btn-secondary ms-3">Cancel</a>
</div> </div>
</div> </div>

View File

@ -1,55 +1,55 @@
<div id="catList" class="container"> <div id=catList class=container>
<div class="row"> <div class=row>
<div class="col"> <div class=col>
{%- assign cat_count = categories | size -%} {%- assign cat_count = categories | size -%}
{% if cat_count > 0 %} {% if cat_count > 0 %}
{%- assign cat_col = "col-12 col-md-6 col-xl-5 col-xxl-4" -%} {%- assign cat_col = "col-12 col-md-6 col-xl-5 col-xxl-4" -%}
{%- assign desc_col = "col-12 col-md-6 col-xl-7 col-xxl-8" -%} {%- assign desc_col = "col-12 col-md-6 col-xl-7 col-xxl-8" -%}
<div class="container"> <div class=container>
<div class="row mwl-table-heading"> <div class="row mwl-table-heading">
<div class="{{ cat_col }}">Category<span class="d-md-none">; Description</span></div> <div class="{{ cat_col }}">Category<span class=d-md-none>; Description</span></div>
<div class="{{ desc_col }} d-none d-md-inline-block">Description</div> <div class="{{ desc_col }} d-none d-md-inline-block">Description</div>
</div> </div>
</div> </div>
<form method="post" class="container" hx-target="#catList" hx-swap="outerHTML show:window:top"> <form method=post class=container hx-target=#catList hx-swap="outerHTML show:window:top">
<input type="hidden" name="{{ csrf.form_field_name }}" value="{{ csrf.request_token }}"> <input type=hidden name="{{ csrf.form_field_name }}" value="{{ csrf.request_token }}">
<div class="row mwl-table-detail" id="cat_new"></div> <div class="row mwl-table-detail" id="cat_new"></div>
{% for cat in categories -%} {% for cat in categories -%}
<div class="row mwl-table-detail" id="cat_{{ cat.id }}"> <div class="row mwl-table-detail" id="cat_{{ cat.id }}">
<div class="{{ cat_col }} no-wrap"> <div class="{{ cat_col }} no-wrap">
{%- if cat.parent_names %} {%- if cat.parent_names %}
<small class="text-muted">{% for name in cat.parent_names %}{{ name }} &rang; {% endfor %}</small> <small class=text-muted>{% for name in cat.parent_names %}{{ name }} &rang; {% endfor %}</small>
{%- endif %} {%- endif %}
{{ cat.name }}<br> {{ cat.name }}<br>
<small> <small>
{%- assign cat_url_base = "admin/category/" | append: cat.id -%} {%- assign cat_url_base = "admin/category/" | append: cat.id -%}
{%- if cat.post_count > 0 %} {%- if cat.post_count > 0 %}
<a href="{{ cat | category_link }}" target="_blank"> <a href="{{ cat | category_link }}" target=_blank>
View {{ cat.post_count }} Post{% unless cat.post_count == 1 %}s{% endunless -%} View {{ cat.post_count }} Post{% unless cat.post_count == 1 %}s{% endunless -%}
</a> </a>
<span class="text-muted"> &bull; </span> <span class=text-muted> &bull; </span>
{%- endif %} {%- endif %}
<a href="{{ cat_url_base | append: "/edit" | relative_link }}" hx-target="#cat_{{ cat.id }}" <a href="{{ cat_url_base | append: "/edit" | relative_link }}" hx-target="#cat_{{ cat.id }}"
hx-swap="innerHTML show:#cat_{{ cat.id }}:top"> hx-swap="innerHTML show:#cat_{{ cat.id }}:top">
Edit Edit
</a> </a>
<span class="text-muted"> &bull; </span> <span class=text-muted> &bull; </span>
{%- assign cat_del_link = cat_url_base | append: "/delete" | relative_link -%} {%- assign cat_del_link = cat_url_base | append: "/delete" | relative_link -%}
<a href="{{ cat_del_link }}" hx-post="{{ cat_del_link }}" class="text-danger" <a href="{{ cat_del_link }}" hx-post="{{ cat_del_link }}" class=text-danger
hx-confirm="Are you sure you want to delete the category &ldquo;{{ cat.name }}&rdquo;? This action cannot be undone."> hx-confirm="Are you sure you want to delete the category &ldquo;{{ cat.name }}&rdquo;? This action cannot be undone.">
Delete Delete
</a> </a>
</small> </small>
</div> </div>
<div class="{{ desc_col }}"> <div class="{{ desc_col }}">
{%- if cat.description %}{{ cat.description.value }}{% else %}<em class="text-muted">none</em>{% endif %} {%- if cat.description %}{{ cat.description.value }}{% else %}<em class=text-muted>none</em>{% endif %}
</div> </div>
</div> </div>
{%- endfor %} {%- endfor %}
</form> </form>
{%- else -%} {%- else -%}
<div id="cat_new"> <div id=cat_new>
<p class="text-muted fst-italic text-center">This web log has no categores defined</p> <p class="text-muted fst-italic text-center">This web log has no categories defined</p>
</div> </div>
{%- endif %} {%- endif %}
</div> </div>

View File

@ -1,7 +1,7 @@
<h2 class="my-3">{{ page_title }}</h2> <h2 class=my-3>{{ page_title }}</h2>
<article> <article>
<a href="{{ "admin/category/new/edit" | relative_link }}" class="btn btn-primary btn-sm mb-3" <a href="{{ "admin/category/new/edit" | relative_link }}" class="btn btn-primary btn-sm mb-3"
hx-target="#cat_new"> hx-target=#cat_new>
Add a New Category Add a New Category
</a> </a>
{{ category_list }} {{ category_list }}

View File

@ -1,18 +1,12 @@
<h2 class="my-3">{{ page_title }}</h2> <h2 class=my-3>{{ page_title }}</h2>
<article> <article>
<form action="{{ "admin/settings/rss/save" | relative_link }}" method="post"> <form action="{{ "admin/settings/rss/save" | relative_link }}" method=post>
<input <input type=hidden name="{{ csrf.form_field_name }}" value="{{ csrf.request_token }}">
type="hidden" <input type=hidden name=Id value="{{ model.id }}">
name="{{ csrf.form_field_name }}"
value="{{ csrf.request_token }}">
<input
type="hidden"
name="Id"
value="{{ model.id }}">
{%- assign typ = model.source_type -%} {%- assign typ = model.source_type -%}
<div class="container"> <div class=container>
<div class="row pb-3"> <div class="row pb-3">
<div class="col"> <div class=col>
<a href="{{ "admin/settings#rss-settings" | relative_link }}">&laquo; Back to Settings</a> <a href="{{ "admin/settings#rss-settings" | relative_link }}">&laquo; Back to Settings</a>
</div> </div>
</div> </div>
@ -20,32 +14,22 @@
<div class="col-12 col-lg-6"> <div class="col-12 col-lg-6">
<fieldset class="container pb-0"> <fieldset class="container pb-0">
<legend>Identification</legend> <legend>Identification</legend>
<div class="row"> <div class=row>
<div class="col"> <div class=col>
<div class="form-floating"> <div class=form-floating>
<input <input type=text name=Path id=path class=form-control placeholder="Relative Feed Path"
type="text"
name="Path"
id="path"
class="form-control"
placeholder="Relative Feed Path"
value="{{ model.path }}"> value="{{ model.path }}">
<label for="path">Relative Feed Path</label> <label for=path>Relative Feed Path</label>
<span class="form-text fst-italic">Appended to {{ web_log.url_base }}/</span> <span class="form-text fst-italic">Appended to {{ web_log.url_base }}/</span>
</div> </div>
</div> </div>
</div> </div>
<div class="row"> <div class=row>
<div class="col py-3 d-flex align-self-center justify-content-center"> <div class="col py-3 d-flex align-self-center justify-content-center">
<div class="form-check form-switch"> <div class="form-check form-switch">
<input <input type=checkbox name=IsPodcast id=isPodcast class=form-check-input value=true
type="checkbox" {%- if model.is_podcast %} checked {% endif %}onclick="Admin.checkPodcast()">
name="IsPodcast" <label for=isPodcast class=form-check-label>This Is a Podcast Feed</label>
id="isPodcast"
class="form-check-input"
value="true"
{%- if model.is_podcast %}checked="checked"{% endif %}onclick="Admin.checkPodcast()">
<label for="isPodcast" class="form-check-label">This Is a Podcast Feed</label>
</div> </div>
</div> </div>
</div> </div>
@ -57,27 +41,19 @@
<div class="row d-flex align-items-center"> <div class="row d-flex align-items-center">
<div class="col-1 d-flex justify-content-end pb-3"> <div class="col-1 d-flex justify-content-end pb-3">
<div class="form-check form-check-inline me-0"> <div class="form-check form-check-inline me-0">
<input <input type=radio name=SourceType id=sourceTypeCat class=form-check-input value=category
type="radio" {%- unless typ == "tag" %} checked {% endunless -%}onclick="Admin.customFeedBy('category')">
name="SourceType" <label for=sourceTypeCat class="form-check-label d-none">Category</label>
id="sourceTypeCat"
class="form-check-input"
value="category"
{%- unless typ == "tag" %}checked="checked"{% endunless -%}onclick="Admin.customFeedBy('category')">
<label for="sourceTypeCat" class="form-check-label d-none">Category</label>
</div> </div>
</div> </div>
<div class="col-11 pb-3"> <div class="col-11 pb-3">
<div class="form-floating"> <div class=form-floating>
<select <select name=SourceValue id=sourceValueCat class=form-control required
name="SourceValue" {%- if typ == "tag" %} disabled{% endif %}>
id="sourceValueCat"
class="form-control"
required
{%- if typ == "tag" %}disabled="disabled"{% endif %}>
<option value="">&ndash; Select Category &ndash;</option> <option value="">&ndash; Select Category &ndash;</option>
{% for cat in categories -%} {% for cat in categories -%}
<option value="{{ cat.id }}"{%- if typ != "tag" and model.source_value == cat.id %}selected="selected"{% endif -%}> <option value="{{ cat.id }}"
{%- if typ != "tag" and model.source_value == cat.id %}selected{% endif -%}>
{% for it in cat.parent_names %} {% for it in cat.parent_names %}
{{ it }} &rang; {{ it }} &rang;
{% endfor %} {% endfor %}
@ -85,31 +61,22 @@
</option> </option>
{%- endfor %} {%- endfor %}
</select> </select>
<label for="sourceValueCat">Category</label> <label for=sourceValueCat>Category</label>
</div> </div>
</div> </div>
<div class="col-1 d-flex justify-content-end pb-3"> <div class="col-1 d-flex justify-content-end pb-3">
<div class="form-check form-check-inline me-0"> <div class="form-check form-check-inline me-0">
<input <input type=radio name=SourceType id=sourceTypeTag class=form-check-input value=tag
type="radio" {%- if typ == "tag" %} checked {% endif %}onclick="Admin.customFeedBy('tag')">
name="SourceType"
id="sourceTypeTag"
class="form-check-input"
value="tag"
{%- if typ == "tag" %}checked="checked"{% endif %}onclick="Admin.customFeedBy('tag')">
<label for="sourceTypeTag" class="form-check-label d-none">Tag</label> <label for="sourceTypeTag" class="form-check-label d-none">Tag</label>
</div> </div>
</div> </div>
<div class="col-11 pb-3"> <div class="col-11 pb-3">
<div class="form-floating"> <div class=form-floating>
<input <input type=text name=SourceValue id=sourceValueTag class=form-control placeholder=Tag
type="text" {%- unless typ == "tag" %} disabled {% endunless %}required
name="SourceValue" {%- if typ == "tag" %} value="{{ model.source_value }}"{% endif %}>
id="sourceValueTag" <label for=sourceValueTag>Tag</label>
class="form-control"
placeholder="Tag"
{%- unless typ == "tag" %}disabled="disabled"{% endunless %}required{%- if typ == "tag" %}value="{{ model.source_value }}"{% endif %}>
<label for="sourceValueTag">Tag</label>
</div> </div>
</div> </div>
</div> </div>
@ -117,254 +84,164 @@
</div> </div>
</div> </div>
<div class="row pb-3"> <div class="row pb-3">
<div class="col"> <div class=col>
<fieldset <fieldset class=container id=podcastFields{% unless model.is_podcast %} disabled=disabled{% endunless %}>
class="container"
id="podcastFields"
{% unless model.is_podcast %}disabled="disabled"{% endunless %}>
<legend>Podcast Settings</legend> <legend>Podcast Settings</legend>
<div class="row"> <div class=row>
<div class="col-12 col-md-5 col-lg-4 offset-lg-1 pb-3"> <div class="col-12 col-md-5 col-lg-4 offset-lg-1 pb-3">
<div class="form-floating"> <div class=form-floating>
<input <input type=text name=Title id=title class=form-control placeholder=Title required
type="text"
name="Title"
id="title"
class="form-control"
placeholder="Title"
required
value="{{ model.title }}"> value="{{ model.title }}">
<label for="title">Title</label> <label for=title>Title</label>
</div> </div>
</div> </div>
<div class="col-12 col-md-4 col-lg-4 pb-3"> <div class="col-12 col-md-4 col-lg-4 pb-3">
<div class="form-floating"> <div class=form-floating>
<input <input type=text name=Subtitle id=subtitle class=form-control placeholder=Subtitle
type="text"
name="Subtitle"
id="subtitle"
class="form-control"
placeholder="Subtitle"
value="{{ model.subtitle }}"> value="{{ model.subtitle }}">
<label for="subtitle">Podcast Subtitle</label> <label for=subtitle>Podcast Subtitle</label>
</div> </div>
</div> </div>
<div class="col-12 col-md-3 col-lg-2 pb-3"> <div class="col-12 col-md-3 col-lg-2 pb-3">
<div class="form-floating"> <div class=form-floating>
<input <input type=number name=ItemsInFeed id=itemsInFeed class=form-control placeholder=Items required
type="number"
name="ItemsInFeed"
id="itemsInFeed"
class="form-control"
placeholder="Items"
required
value="{{ model.items_in_feed }}"> value="{{ model.items_in_feed }}">
<label for="itemsInFeed"># Episodes</label> <label for=itemsInFeed># Episodes</label>
</div> </div>
</div> </div>
</div> </div>
<div class="row"> <div class=row>
<div class="col-12 col-md-5 col-lg-4 offset-lg-1 pb-3"> <div class="col-12 col-md-5 col-lg-4 offset-lg-1 pb-3">
<div class="form-floating"> <div class=form-floating>
<input <input type=text name=AppleCategory id=appleCategory class=form-control placeholder="iTunes Category"
type="text" required value="{{ model.apple_category }}">
name="AppleCategory" <label for=appleCategory>iTunes Category</label>
id="appleCategory"
class="form-control"
placeholder="iTunes Category"
required
value="{{ model.apple_category }}">
<label for="appleCategory">iTunes Category</label>
<span class="form-text fst-italic"> <span class="form-text fst-italic">
<a <a href="https://www.thepodcasthost.com/planning/itunes-podcast-categories/" target=_blank
href="https://www.thepodcasthost.com/planning/itunes-podcast-categories/" rel=noopener>
target="_blank"
rel="noopener">
iTunes Category / Subcategory List iTunes Category / Subcategory List
</a> </a>
</span> </span>
</div> </div>
</div> </div>
<div class="col-12 col-md-4 pb-3"> <div class="col-12 col-md-4 pb-3">
<div class="form-floating"> <div class=form-floating>
<input <input type=text name=AppleSubcategory id=appleSubcategory class=form-control
type="text" placeholder="iTunes Subcategory" value="{{ model.apple_subcategory }}">
name="AppleSubcategory" <label for=appleSubcategory>iTunes Subcategory</label>
id="appleSubcategory"
class="form-control"
placeholder="iTunes Subcategory"
value="{{ model.apple_subcategory }}">
<label for="appleSubcategory">iTunes Subcategory</label>
</div> </div>
</div> </div>
<div class="col-12 col-md-3 col-lg-2 pb-3"> <div class="col-12 col-md-3 col-lg-2 pb-3">
<div class="form-floating"> <div class=form-floating>
<select <select name=Explicit id=explicit class=form-control required>
name="Explicit" <option value="yes"{% if model.explicit == "yes" %} selected{% endif %}>Yes</option>
id="explicit" <option value="no"{% if model.explicit == "no" %} selected{% endif %}>No</option>
class="form-control" <option value="clean"{% if model.explicit == "clean" %} selected{% endif %}>Clean</option>
required>
<option value="yes" {% if model.explicit == "yes" %}selected="selected"{% endif %}>Yes</option>
<option value="no" {% if model.explicit == "no" %}selected="selected"{% endif %}>No</option>
<option value="clean" {% if model.explicit == "clean" %}selected="selected"{% endif %}>
Clean
</option>
</select> </select>
<label for="explicit">Explicit Rating</label> <label for=explicit>Explicit Rating</label>
</div> </div>
</div> </div>
</div> </div>
<div class="row"> <div class=row>
<div class="col-12 col-md-6 col-lg-4 offset-xxl-1 pb-3"> <div class="col-12 col-md-6 col-lg-4 offset-xxl-1 pb-3">
<div class="form-floating"> <div class=form-floating>
<input <input type=text name=DisplayedAuthor id=displayedAuthor class=form-control placeholder=Author
type="text" required value="{{ model.displayed_author }}">
name="DisplayedAuthor" <label for=displayedAuthor>Displayed Author</label>
id="displayedAuthor"
class="form-control"
placeholder="Author"
required
value="{{ model.displayed_author }}">
<label for="displayedAuthor">Displayed Author</label>
</div> </div>
</div> </div>
<div class="col-12 col-md-6 col-lg-4 pb-3"> <div class="col-12 col-md-6 col-lg-4 pb-3">
<div class="form-floating"> <div class=form-floating>
<input <input type=email name=Email id=email class=form-control placeholder=Email required
type="email"
name="Email"
id="email"
class="form-control"
placeholder="Email"
required
value="{{ model.email }}"> value="{{ model.email }}">
<label for="email">Author E-mail</label> <label for=email>Author E-mail</label>
<span class="form-text fst-italic">For iTunes, must match registered e-mail</span> <span class="form-text fst-italic">For iTunes, must match registered e-mail</span>
</div> </div>
</div> </div>
<div class="col-12 col-sm-5 col-md-4 col-lg-4 col-xl-3 offset-xl-1 col-xxl-2 offset-xxl-0"> <div class="col-12 col-sm-5 col-md-4 col-lg-4 col-xl-3 offset-xl-1 col-xxl-2 offset-xxl-0">
<div class="form-floating"> <div class=form-floating>
<input <input type=text name=DefaultMediaType id=defaultMediaType class=form-control
type="text" placeholder="Media Type" value="{{ model.default_media_type }}">
name="DefaultMediaType" <label for=defaultMediaType>Default Media Type</label>
id="defaultMediaType"
class="form-control"
placeholder="Media Type"
value="{{ model.default_media_type }}">
<label for="defaultMediaType">Default Media Type</label>
<span class="form-text fst-italic">Optional; blank for no default</span> <span class="form-text fst-italic">Optional; blank for no default</span>
</div> </div>
</div> </div>
<div class="col-12 col-sm-7 col-md-8 col-lg-10 offset-lg-1"> <div class="col-12 col-sm-7 col-md-8 col-lg-10 offset-lg-1">
<div class="form-floating"> <div class=form-floating>
<input <input type=text name=ImageUrl id=imageUrl class=form-control placeholder="Image URL" required
type="text"
name="ImageUrl"
id="imageUrl"
class="form-control"
placeholder="Image URL"
required
value="{{ model.image_url }}"> value="{{ model.image_url }}">
<label for="imageUrl">Image URL</label> <label for=imageUrl>Image URL</label>
<span class="form-text fst-italic">Relative URL will be appended to {{ web_log.url_base }}/</span> <span class="form-text fst-italic">Relative URL will be appended to {{ web_log.url_base }}/</span>
</div> </div>
</div> </div>
</div> </div>
<div class="row pb-3"> <div class="row pb-3">
<div class="col-12 col-lg-10 offset-lg-1"> <div class="col-12 col-lg-10 offset-lg-1">
<div class="form-floating"> <div class=form-floating>
<input <input type=text name=Summary id=summary class=form-control placeholder=Summary required
type="text"
name="Summary"
id="summary"
class="form-control"
placeholder="Summary"
required
value="{{ model.summary }}"> value="{{ model.summary }}">
<label for="summary">Summary</label> <label for=summary>Summary</label>
<span class="form-text fst-italic">Displayed in podcast directories</span> <span class="form-text fst-italic">Displayed in podcast directories</span>
</div> </div>
</div> </div>
</div> </div>
<div class="row pb-3"> <div class="row pb-3">
<div class="col-12 col-lg-10 offset-lg-1"> <div class="col-12 col-lg-10 offset-lg-1">
<div class="form-floating"> <div class=form-floating>
<input <input type=text name=MediaBaseUrl id=mediaBaseUrl class=form-control placeholder="Media Base URL"
type="text"
name="MediaBaseUrl"
id="mediaBaseUrl"
class="form-control"
placeholder="Media Base URL"
value="{{ model.media_base_url }}"> value="{{ model.media_base_url }}">
<label for="mediaBaseUrl">Media Base URL</label> <label for=mediaBaseUrl>Media Base URL</label>
<span class="form-text fst-italic">Optional; prepended to episode media file if present</span> <span class="form-text fst-italic">Optional; prepended to episode media file if present</span>
</div> </div>
</div> </div>
</div> </div>
<div class="row"> <div class=row>
<div class="col-12 col-lg-5 offset-lg-1 pb-3"> <div class="col-12 col-lg-5 offset-lg-1 pb-3">
<div class="form-floating"> <div class=form-floating>
<input <input type=text name=FundingUrl id=fundingUrl class=form-control placeholder="Funding URL"
type="text"
name="FundingUrl"
id="fundingUrl"
class="form-control"
placeholder="Funding URL"
value="{{ model.funding_url }}"> value="{{ model.funding_url }}">
<label for="fundingUrl">Funding URL</label> <label for=fundingUrl>Funding URL</label>
<span class="form-text fst-italic"> <span class="form-text fst-italic">
Optional; URL describing donation options for this podcast, relative URL supported Optional; URL describing donation options for this podcast, relative URL supported
</span> </span>
</div> </div>
</div> </div>
<div class="col-12 col-lg-5 pb-3"> <div class="col-12 col-lg-5 pb-3">
<div class="form-floating"> <div class=form-floating>
<input <input type=text name=FundingText id=fundingText class=form-control maxlength=128
type="text" placeholder="Funding Text" value="{{ model.funding_text }}">
name="FundingText" <label for=fundingText>Funding Text</label>
id="fundingText"
class="form-control"
maxlength="128"
placeholder="Funding Text"
value="{{ model.funding_text }}">
<label for="fundingText">Funding Text</label>
<span class="form-text fst-italic">Optional; text for the funding link</span> <span class="form-text fst-italic">Optional; text for the funding link</span>
</div> </div>
</div> </div>
</div> </div>
<div class="row pb-3"> <div class="row pb-3">
<div class="col-8 col-lg-5 offset-lg-1 pb-3"> <div class="col-8 col-lg-5 offset-lg-1 pb-3">
<div class="form-floating"> <div class=form-floating>
<input <input type=text name=PodcastGuid id=guid class=form-control placeholder=GUID
type="text"
name="PodcastGuid"
id="guid"
class="form-control"
placeholder="GUID"
value="{{ model.podcast_guid }}"> value="{{ model.podcast_guid }}">
<label for="guid">Podcast GUID</label> <label for=guid>Podcast GUID</label>
<span class="form-text fst-italic"> <span class="form-text fst-italic">
Optional; v5 UUID uniquely identifying this podcast; once entered, do not change this value Optional; v5 UUID uniquely identifying this podcast; once entered, do not change this value
(<a href="https://github.com/Podcastindex-org/podcast-namespace/blob/main/docs/1.0.md#guid" target="_blank">documentation</a>) (<a href=https://github.com/Podcastindex-org/podcast-namespace/blob/main/docs/1.0.md#guid
target=_blank rel=noopener>documentation</a>)
</span> </span>
</div> </div>
</div> </div>
<div class="col-4 col-lg-3 offset-lg-2 pb-3"> <div class="col-4 col-lg-3 offset-lg-2 pb-3">
<div class="form-floating"> <div class=form-floating>
<select <select name=Medium id=medium class=form-control>
name="Medium"
id="medium"
class="form-control">
{% for med in medium_values -%} {% for med in medium_values -%}
<option value="{{ med[0] }}"{% if model.medium == med[0] %} selected{% endif %}> <option value="{{ med[0] }}"{% if model.medium == med[0] %} selected{% endif %}>
{{ med[1] }} {{ med[1] }}
</option> </option>
{%- endfor %} {%- endfor %}
</select> </select>
<label for="medium">Medium</label> <label for=medium>Medium</label>
<span class="form-text fst-italic"> <span class="form-text fst-italic">
Optional; medium of the podcast content Optional; medium of the podcast content
(<a href="https://github.com/Podcastindex-org/podcast-namespace/blob/main/docs/1.0.md#medium" target="_blank">documentation</a>) (<a href=https://github.com/Podcastindex-org/podcast-namespace/blob/main/docs/1.0.md#medium
target=_blank rel=noopener>documentation</a>)
</span> </span>
</div> </div>
</div> </div>
@ -374,7 +251,7 @@
</div> </div>
<div class="row pb-3"> <div class="row pb-3">
<div class="col text-center"> <div class="col text-center">
<button type="submit" class="btn btn-primary">Save Changes</button> <button type=submit class="btn btn-primary">Save Changes</button>
</div> </div>
</div> </div>
</div> </div>

View File

@ -1,10 +1,10 @@
<h2 class="my-3">{{ web_log.name }} &bull; Dashboard</h2> <h2 class=my-3>{{ web_log.name }} &bull; Dashboard</h2>
<article class="container"> <article class=container>
<div class="row"> <div class=row>
<section class="col-lg-5 offset-lg-1 col-xl-4 offset-xl-2 pb-3"> <section class="col-lg-5 offset-lg-1 col-xl-4 offset-xl-2 pb-3">
<div class="card"> <div class=card>
<header class="card-header text-white bg-primary">Posts</header> <header class="card-header text-white bg-primary">Posts</header>
<div class="card-body"> <div class=card-body>
<h6 class="card-subtitle text-muted pb-3"> <h6 class="card-subtitle text-muted pb-3">
Published <span class="badge rounded-pill bg-secondary">{{ model.posts }}</span> Published <span class="badge rounded-pill bg-secondary">{{ model.posts }}</span>
&nbsp; Drafts <span class="badge rounded-pill bg-secondary">{{ model.drafts }}</span> &nbsp; Drafts <span class="badge rounded-pill bg-secondary">{{ model.drafts }}</span>
@ -17,9 +17,9 @@
</div> </div>
</section> </section>
<section class="col-lg-5 col-xl-4 pb-3"> <section class="col-lg-5 col-xl-4 pb-3">
<div class="card"> <div class=card>
<header class="card-header text-white bg-primary">Pages</header> <header class="card-header text-white bg-primary">Pages</header>
<div class="card-body"> <div class=card-body>
<h6 class="card-subtitle text-muted pb-3"> <h6 class="card-subtitle text-muted pb-3">
All <span class="badge rounded-pill bg-secondary">{{ model.pages }}</span> All <span class="badge rounded-pill bg-secondary">{{ model.pages }}</span>
&nbsp; Shown in Page List <span class="badge rounded-pill bg-secondary">{{ model.listed_pages }}</span> &nbsp; Shown in Page List <span class="badge rounded-pill bg-secondary">{{ model.listed_pages }}</span>
@ -32,11 +32,11 @@
</div> </div>
</section> </section>
</div> </div>
<div class="row"> <div class=row>
<section class="col-lg-5 offset-lg-1 col-xl-4 offset-xl-2 pb-3"> <section class="col-lg-5 offset-lg-1 col-xl-4 offset-xl-2 pb-3">
<div class="card"> <div class=card>
<header class="card-header text-white bg-secondary">Categories</header> <header class="card-header text-white bg-secondary">Categories</header>
<div class="card-body"> <div class=card-body>
<h6 class="card-subtitle text-muted pb-3"> <h6 class="card-subtitle text-muted pb-3">
All <span class="badge rounded-pill bg-secondary">{{ model.categories }}</span> All <span class="badge rounded-pill bg-secondary">{{ model.categories }}</span>
&nbsp; Top Level <span class="badge rounded-pill bg-secondary">{{ model.top_level_categories }}</span> &nbsp; Top Level <span class="badge rounded-pill bg-secondary">{{ model.top_level_categories }}</span>

View File

@ -1,5 +1,5 @@
<!DOCTYPE html> <!DOCTYPE html>
<html lang="en"> <html lang=en>
<head><title></title></head> <title></title>
<body>{{ content }}</body> {{ content }}
</html> </html>

View File

@ -1,9 +1,5 @@
<!DOCTYPE html> <!DOCTYPE html>
<html lang="en"> <html lang=en>
<head>
<title>{{ page_title | strip_html }} &laquo; Admin &laquo; {{ web_log.name | strip_html }}</title> <title>{{ page_title | strip_html }} &laquo; Admin &laquo; {{ web_log.name | strip_html }}</title>
</head>
<body>
{% include_template "_layout" %} {% include_template "_layout" %}
</body>
</html> </html>

View File

@ -1,18 +1,16 @@
<!DOCTYPE html> <!DOCTYPE html>
<html lang="en"> <html lang=en>
<head> <meta name=viewport content="width=device-width, initial-scale=1">
<meta name="viewport" content="width=device-width, initial-scale=1"> <meta name=generator content="{{ generator }}">
<meta name="generator" content="{{ generator }}">
<title>{{ page_title | strip_html }} &laquo; Admin &laquo; {{ web_log.name | strip_html }}</title> <title>{{ page_title | strip_html }} &laquo; Admin &laquo; {{ web_log.name | strip_html }}</title>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/css/bootstrap.min.css" <link rel=stylesheet href=https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/css/bootstrap.min.css
integrity="sha384-1BmE4kWBq78iYhFldvKuhfTAU6auU8tT94WrHftjDbrCEXSU1oBoqyl2QvZ6jIW3" crossorigin="anonymous"> integrity=sha384-1BmE4kWBq78iYhFldvKuhfTAU6auU8tT94WrHftjDbrCEXSU1oBoqyl2QvZ6jIW3 crossorigin=anonymous>
<link rel="stylesheet" href="{{ "themes/admin/admin.css" | relative_link }}"> <link rel=stylesheet href="{{ "themes/admin/admin.css" | relative_link }}">
</head> <body hx-boost=true hx-indicator=#loadOverlay>
<body hx-boost="true" hx-indicator="#loadOverlay">
{% include_template "_layout" %} {% include_template "_layout" %}
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/js/bootstrap.bundle.min.js" <script src=https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/js/bootstrap.bundle.min.js
integrity="sha384-ka7Sk0Gln4gmtz2MlQnikT1wXgYsOg+OMhuP+IlRH9sENBO0LRn5q+8nbTov4+1p" integrity=sha384-ka7Sk0Gln4gmtz2MlQnikT1wXgYsOg+OMhuP+IlRH9sENBO0LRn5q+8nbTov4+1p
crossorigin="anonymous"></script> crossorigin=anonymous></script>
{{ htmx_script }} {{ htmx_script }}
<script src="{{ "themes/admin/admin.js" | relative_link }}"></script> <script src="{{ "themes/admin/admin.js" | relative_link }}"></script>
</body> </body>

View File

@ -1,28 +1,28 @@
<h2 class="my-3">Log On to {{ web_log.name }}</h2> <h2 class=my-3>Log On to {{ web_log.name }}</h2>
<article class="py-3"> <article class=py-3>
<form action="{{ "user/log-on" | relative_link }}" method="post" hx-push-url="true"> <form action="{{ "user/log-on" | relative_link }}" method=post hx-push-url=true>
<input type="hidden" name="{{ csrf.form_field_name }}" value="{{ csrf.request_token }}"> <input type=hidden name="{{ csrf.form_field_name }}" value="{{ csrf.request_token }}">
{% if model.return_to %} {% if model.return_to %}
<input type="hidden" name="ReturnTo" value="{{ model.return_to.value }}"> <input type=hidden name=ReturnTo value="{{ model.return_to.value }}">
{% endif %} {% endif %}
<div class="container"> <div class=container>
<div class="row"> <div class=row>
<div class="col-12 col-md-6 col-lg-4 offset-lg-2 pb-3"> <div class="col-12 col-md-6 col-lg-4 offset-lg-2 pb-3">
<div class="form-floating"> <div class=form-floating>
<input type="email" id="email" name="EmailAddress" class="form-control" autofocus required> <input type=email id=email name=EmailAddress class=form-control autofocus required>
<label for="email">E-mail Address</label> <label for=email>E-mail Address</label>
</div> </div>
</div> </div>
<div class="col-12 col-md-6 col-lg-4 pb-3"> <div class="col-12 col-md-6 col-lg-4 pb-3">
<div class="form-floating"> <div class=form-floating>
<input type="password" id="password" name="Password" class="form-control" required> <input type=password id=password name=Password class=form-control required>
<label for="password">Password</label> <label for=password>Password</label>
</div> </div>
</div> </div>
</div> </div>
<div class="row pb-3"> <div class="row pb-3">
<div class="col text-center"> <div class="col text-center">
<button type="submit" class="btn btn-primary">Log On</button> <button type=submit class="btn btn-primary">Log On</button>
</div> </div>
</div> </div>
</div> </div>

View File

@ -1,75 +1,72 @@
<h2 class="my-3">{{ page_title }}</h2> <h2 class=my-3>{{ page_title }}</h2>
<article> <article>
<form action="{{ "admin/my-info" | relative_link }}" method="post"> <form action="{{ "admin/my-info" | relative_link }}" method=post>
<input type="hidden" name="{{ csrf.form_field_name }}" value="{{ csrf.request_token }}"> <input type=hidden name="{{ csrf.form_field_name }}" value="{{ csrf.request_token }}">
<div class="d-flex flex-row flex-wrap justify-content-around"> <div class="d-flex flex-row flex-wrap justify-content-around">
<div class="text-center mb-3 lh-sm"> <div class="text-center mb-3 lh-sm">
<strong class="text-decoration-underline">Access Level</strong><br>{{ access_level }} <strong class=text-decoration-underline>Access Level</strong><br>{{ access_level }}
</div> </div>
<div class="text-center mb-3 lh-sm"> <div class="text-center mb-3 lh-sm">
<strong class="text-decoration-underline">Created</strong><br>{{ created_on | date: "MMMM d, yyyy" }} <strong class=text-decoration-underline>Created</strong><br>{{ created_on | date: "MMMM d, yyyy" }}
</div> </div>
<div class="text-center mb-3 lh-sm"> <div class="text-center mb-3 lh-sm">
<strong class="text-decoration-underline">Last Log On</strong><br> <strong class=text-decoration-underline>Last Log On</strong><br>
{{ last_seen_on | date: "MMMM d, yyyy" }} at {{ last_seen_on | date: "h:mmtt" | downcase }} {{ last_seen_on | date: "MMMM d, yyyy" }} at {{ last_seen_on | date: "h:mmtt" | downcase }}
</div> </div>
</div> </div>
<div class="container"> <div class=container>
<div class="row"><div class="col"><hr class="mt-0"></div></div> <div class=row><div class=col><hr class=mt-0></div></div>
<div class="row mb-3"> <div class="row mb-3">
<div class="col-12 col-md-6 col-lg-4 pb-3"> <div class="col-12 col-md-6 col-lg-4 pb-3">
<div class="form-floating"> <div class=form-floating>
<input type="text" name="FirstName" id="firstName" class="form-control" autofocus required <input type=text name=FirstName id=firstName class=form-control autofocus required placeholder=First
placeholder="First" value="{{ model.first_name }}"> value="{{ model.first_name }}">
<label for="firstName">First Name</label> <label for=firstName>First Name</label>
</div> </div>
</div> </div>
<div class="col-12 col-md-6 col-lg-4 pb-3"> <div class="col-12 col-md-6 col-lg-4 pb-3">
<div class="form-floating"> <div class=form-floating>
<input type="text" name="LastName" id="lastName" class="form-control" required <input type=text name=LastName id=lastName class=form-control required placeholder="Last"
placeholder="Last" value="{{ model.last_name }}"> value="{{ model.last_name }}">
<label for="lastName">Last Name</label> <label for=lastName>Last Name</label>
</div> </div>
</div> </div>
<div class="col-12 col-md-6 col-lg-4 pb-3"> <div class="col-12 col-md-6 col-lg-4 pb-3">
<div class="form-floating"> <div class=form-floating>
<input type="text" name="PreferredName" id="preferredName" class="form-control" required <input type=text name=PreferredName id=preferredName class=form-control required placeholder="Preferred"
placeholder="Preferred" value="{{ model.preferred_name }}"> value="{{ model.preferred_name }}">
<label for="preferredName">Preferred Name</label> <label for=preferredName>Preferred Name</label>
</div> </div>
</div> </div>
</div> </div>
<div class="row mb-3"> <div class="row mb-3">
<div class="col"> <div class=col>
<fieldset class="p-2"> <fieldset class=p-2>
<legend class="ps-1">Change Password</legend> <legend class=ps-1>Change Password</legend>
<div class="row"> <div class=row>
<div class="col"> <div class=col><p class=form-text>Optional; leave blank to keep your current password</div>
<p class="form-text">Optional; leave blank to keep your current password</p>
</div> </div>
</div> <div class=row>
<div class="row">
<div class="col-12 col-md-6 pb-3"> <div class="col-12 col-md-6 pb-3">
<div class="form-floating"> <div class=form-floating>
<input type="password" name="NewPassword" id="newPassword" class="form-control" <input type=password name=NewPassword id=newPassword class=form-control placeholder=Password>
placeholder="Password"> <label for=newPassword>New Password</label>
<label for="newPassword">New Password</label>
</div> </div>
</div> </div>
<div class="col-12 col-md-6 pb-3"> <div class="col-12 col-md-6 pb-3">
<div class="form-floating"> <div class=form-floating>
<input type="password" name="NewPasswordConfirm" id="newPasswordConfirm" class="form-control" <input type=password name=NewPasswordConfirm id=newPasswordConfirm class=form-control
placeholder="Confirm"> placeholder=Confirm>
<label for="newPasswordConfirm">Confirm New Password</label> <label for=newPasswordConfirm>Confirm New Password</label>
</div> </div>
</div> </div>
</div> </div>
</fieldset> </fieldset>
</div> </div>
</div> </div>
<div class="row"> <div class=row>
<div class="col text-center mb-3"> <div class="col text-center mb-3">
<button type="submit" class="btn btn-primary">Save Changes</button> <button type=submit class="btn btn-primary">Save Changes</button>
</div> </div>
</div> </div>
</div> </div>

View File

@ -1,75 +1,75 @@
<h2 class="my-3">{{ page_title }}</h2> <h2 class=my-3>{{ page_title }}</h2>
<article> <article>
<form action="{{ "admin/page/save" | relative_link }}" method="post" hx-push-url="true"> <form action="{{ "admin/page/save" | relative_link }}" method="post" hx-push-url="true">
<input type="hidden" name="{{ csrf.form_field_name }}" value="{{ csrf.request_token }}"> <input type=hidden name="{{ csrf.form_field_name }}" value="{{ csrf.request_token }}">
<input type="hidden" name="PageId" value="{{ model.page_id }}"> <input type=hidden name=PageId value="{{ model.page_id }}">
<div class="container"> <div class=container>
<div class="row mb-3"> <div class="row mb-3">
<div class="col-9"> <div class=col-9>
{%- assign entity = "page" -%} {%- assign entity = "page" -%}
{%- assign entity_id = model.page_id -%} {%- assign entity_id = model.page_id -%}
{% include_template "_edit-common" %} {% include_template "_edit-common" %}
</div> </div>
<div class="col-3"> <div class=col-3>
<div class="form-floating pb-3"> <div class="form-floating pb-3">
<select name="Template" id="template" class="form-control"> <select name=Template id=template class=form-control>
{% for tmpl in templates -%} {% for tmpl in templates -%}
<option value="{{ tmpl[0] }}"{% if model.template == tmpl[0] %} selected="selected"{% endif %}> <option value="{{ tmpl[0] }}"{% if model.template == tmpl[0] %} selected{% endif %}>
{{ tmpl[1] }} {{ tmpl[1] }}
</option> </option>
{%- endfor %} {%- endfor %}
</select> </select>
<label for="template">Page Template</label> <label for=template>Page Template</label>
</div> </div>
<div class="form-check form-switch"> <div class="form-check form-switch">
<input type="checkbox" name="IsShownInPageList" id="showList" class="form-check-input" value="true" <input type=checkbox name=IsShownInPageList id=showList class=form-check-input value=true
{%- if model.is_shown_in_page_list %} checked="checked"{% endif %}> {%- if model.is_shown_in_page_list %} checked{% endif %}>
<label for="showList" class="form-check-label">Show in Page List</label> <label for=showList class=form-check-label>Show in Page List</label>
</div> </div>
</div> </div>
</div> </div>
<div class="row mb-3"> <div class="row mb-3">
<div class="col"> <div class=col>
<button type="submit" class="btn btn-primary">Save Changes</button> <button type=submit class="btn btn-primary">Save Changes</button>
</div> </div>
</div> </div>
<div class="row mb-3"> <div class="row mb-3">
<div class="col"> <div class=col>
<fieldset> <fieldset>
<legend> <legend>
Metadata Metadata
<button type="button" class="btn btn-sm btn-secondary" data-bs-toggle="collapse" <button type=button class="btn btn-sm btn-secondary" data-bs-toggle=collapse
data-bs-target="#metaItemContainer"> data-bs-target=#metaItemContainer>
show show
</button> </button>
</legend> </legend>
<div id="metaItemContainer" class="collapse"> <div id=metaItemContainer class=collapse>
<div id="metaItems" class="container"> <div id=metaItems class=container>
{%- for meta in metadata %} {%- for meta in metadata %}
<div id="meta_{{ meta[0] }}" class="row mb-3"> <div id="meta_{{ meta[0] }}" class="row mb-3">
<div class="col-1 text-center align-self-center"> <div class="col-1 text-center align-self-center">
<button type="button" class="btn btn-sm btn-danger" onclick="Admin.removeMetaItem({{ meta[0] }})"> <button type=button class="btn btn-sm btn-danger" onclick="Admin.removeMetaItem({{ meta[0] }})">
&minus; &minus;
</button> </button>
</div> </div>
<div class="col-3"> <div class=col-3>
<div class="form-floating"> <div class=form-floating>
<input type="text" name="MetaNames" id="metaNames_{{ meta[0] }}" class="form-control" <input type=text name=MetaNames id="metaNames_{{ meta[0] }}" class=form-control
placeholder="Name" value="{{ meta[1] }}"> placeholder=Name value="{{ meta[1] }}">
<label for="metaNames_{{ meta[0] }}">Name</label> <label for="metaNames_{{ meta[0] }}">Name</label>
</div> </div>
</div> </div>
<div class="col-8"> <div class=col-8>
<div class="form-floating"> <div class=form-floating>
<input type="text" name="MetaValues" id="metaValues_{{ meta[0] }}" class="form-control" <input type=text name=MetaValues id="metaValues_{{ meta[0] }}" class=form-control
placeholder="Value" value="{{ meta[2] }}"> placeholder=Value value="{{ meta[2] }}">
<label for="metaValues_{{ meta[0] }}">Value</label> <label for="metaValues_{{ meta[0] }}">Value</label>
</div> </div>
</div> </div>
</div> </div>
{% endfor -%} {% endfor -%}
</div> </div>
<button type="button" class="btn btn-sm btn-secondary" onclick="Admin.addMetaItem()">Add an Item</button> <button type=button class="btn btn-sm btn-secondary" onclick="Admin.addMetaItem()">Add an Item</button>
<script> <script>
document.addEventListener("DOMContentLoaded", () => Admin.setNextMetaIndex({{ metadata | size }})) document.addEventListener("DOMContentLoaded", () => Admin.setNextMetaIndex({{ metadata | size }}))
</script> </script>

View File

@ -1,4 +1,4 @@
<h2 class="my-3">{{ page_title }}</h2> <h2 class=my-3>{{ page_title }}</h2>
<article> <article>
<a href="{{ "admin/page/new/edit" | relative_link }}" class="btn btn-primary btn-sm mb-3">Create a New Page</a> <a href="{{ "admin/page/new/edit" | relative_link }}" class="btn btn-primary btn-sm mb-3">Create a New Page</a>
{%- assign page_count = pages | size -%} {%- assign page_count = pages | size -%}
@ -6,11 +6,11 @@
{%- assign title_col = "col-12 col-md-5" -%} {%- assign title_col = "col-12 col-md-5" -%}
{%- assign link_col = "col-12 col-md-5" -%} {%- assign link_col = "col-12 col-md-5" -%}
{%- assign upd8_col = "col-12 col-md-2" -%} {%- assign upd8_col = "col-12 col-md-2" -%}
<form method="post" class="container mb-3" hx-target="body"> <form method=post class="container mb-3" hx-target=body>
<input type="hidden" name="{{ csrf.form_field_name }}" value="{{ csrf.request_token }}"> <input type=hidden name="{{ csrf.form_field_name }}" value="{{ csrf.request_token }}">
<div class="row mwl-table-heading"> <div class="row mwl-table-heading">
<div class="{{ title_col }}"> <div class="{{ title_col }}">
<span class="d-none d-md-inline">Title</span><span class="d-md-none">Page</span> <span class="d-none d-md-inline">Title</span><span class=d-md-none>Page</span>
</div> </div>
<div class="{{ link_col }} d-none d-md-inline-block">Permalink</div> <div class="{{ link_col }} d-none d-md-inline-block">Permalink</div>
<div class="{{ upd8_col }} d-none d-md-inline-block">Updated</div> <div class="{{ upd8_col }} d-none d-md-inline-block">Updated</div>
@ -23,15 +23,15 @@
{%- if pg.is_in_page_list %} &nbsp; <span class="badge bg-primary">IN PAGE LIST</span> {% endif -%}<br> {%- if pg.is_in_page_list %} &nbsp; <span class="badge bg-primary">IN PAGE LIST</span> {% endif -%}<br>
<small> <small>
{%- capture pg_link %}{% unless pg.is_default %}{{ pg.permalink }}{% endunless %}{% endcapture -%} {%- capture pg_link %}{% unless pg.is_default %}{{ pg.permalink }}{% endunless %}{% endcapture -%}
<a href="{{ pg_link | relative_link }}" target="_blank">View Page</a> <a href="{{ pg_link | relative_link }}" target=_blank>View Page</a>
{% if is_editor or is_author and user_id == pg.author_id %} {% if is_editor or is_author and user_id == pg.author_id %}
<span class="text-muted"> &bull; </span> <span class=text-muted> &bull; </span>
<a href="{{ pg | edit_page_link }}">Edit</a> <a href="{{ pg | edit_page_link }}">Edit</a>
{% endif %} {% endif %}
{% if is_web_log_admin %} {% if is_web_log_admin %}
<span class="text-muted"> &bull; </span> <span class=text-muted> &bull; </span>
{%- assign pg_del_link = "admin/page/" | append: pg.id | append: "/delete" | relative_link -%} {%- assign pg_del_link = "admin/page/" | append: pg.id | append: "/delete" | relative_link -%}
<a href="{{ pg_del_link }}" hx-post="{{ pg_del_link }}" class="text-danger" <a href="{{ pg_del_link }}" hx-post="{{ pg_del_link }}" class=text-danger
hx-confirm="Are you sure you want to delete the page &ldquo;{{ pg.title | strip_html | escape }}&rdquo;? This action cannot be undone."> hx-confirm="Are you sure you want to delete the page &ldquo;{{ pg.title | strip_html | escape }}&rdquo;? This action cannot be undone.">
Delete Delete
</a> </a>
@ -40,7 +40,7 @@
</div> </div>
<div class="{{ link_col }}"> <div class="{{ link_col }}">
{%- capture pg_link %}/{% unless pg.is_default %}{{ pg.permalink }}{% endunless %}{% endcapture -%} {%- capture pg_link %}/{% unless pg.is_default %}{{ pg.permalink }}{% endunless %}{% endcapture -%}
<small class="d-md-none">{{ pg_link }}</small><span class="d-none d-md-inline">{{ pg_link }}</span> <small class=d-md-none>{{ pg_link }}</small><span class="d-none d-md-inline">{{ pg_link }}</span>
</div> </div>
<div class="{{ upd8_col }}"> <div class="{{ upd8_col }}">
<small class="d-md-none text-muted">Updated {{ pg.updated_on | date: "MMMM d, yyyy" }}</small> <small class="d-md-none text-muted">Updated {{ pg.updated_on | date: "MMMM d, yyyy" }}</small>
@ -57,7 +57,6 @@
<a class="btn btn-secondary" href="{{ "admin/pages" | append: prev_page | relative_link }}"> <a class="btn btn-secondary" href="{{ "admin/pages" | append: prev_page | relative_link }}">
&laquo; Previous &laquo; Previous
</a> </a>
</p>
{% endif %} {% endif %}
</div> </div>
<div class="text-right"> <div class="text-right">
@ -66,7 +65,6 @@
<a class="btn btn-secondary" href="{{ "admin/pages" | append: next_page | relative_link }}"> <a class="btn btn-secondary" href="{{ "admin/pages" | append: next_page | relative_link }}">
Next &raquo; Next &raquo;
</a> </a>
</p>
{% endif %} {% endif %}
</div> </div>
</div> </div>

View File

@ -1,43 +1,42 @@
<h2 class="my-3">{{ page_title }}</h2> <h2 class=my-3>{{ page_title }}</h2>
<article> <article>
{%- assign base_url = "admin/" | append: model.entity | append: "/" -%} {%- assign base_url = "admin/" | append: model.entity | append: "/" -%}
<form action="{{ base_url | append: "permalinks" | relative_link }}" method="post"> <form action="{{ base_url | append: "permalinks" | relative_link }}" method=post>
<input type="hidden" name="{{ csrf.form_field_name }}" value="{{ csrf.request_token }}"> <input type=hidden name="{{ csrf.form_field_name }}" value="{{ csrf.request_token }}">
<input type="hidden" name="Id" value="{{ model.id }}"> <input type=hidden name=Id value="{{ model.id }}">
<div class="container"> <div class=container>
<div class="row"> <div class=row>
<div class="col"> <div class=col>
<p style="line-height:1.2rem;"> <p style="line-height:1.2rem;">
<strong>{{ model.current_title }}</strong><br> <strong>{{ model.current_title }}</strong><br>
<small class="text-muted"> <small class=text-muted>
<span class="fst-italic">{{ model.current_permalink }}</span><br> <span class=fst-italic>{{ model.current_permalink }}</span><br>
<a href="{{ base_url | append: model.id | append: "/edit" | relative_link }}"> <a href="{{ base_url | append: model.id | append: "/edit" | relative_link }}">
&laquo; Back to Edit {{ model.entity | capitalize }} &laquo; Back to Edit {{ model.entity | capitalize }}
</a> </a>
</small> </small>
</p>
</div> </div>
</div> </div>
<div class="row mb-3"> <div class="row mb-3">
<div class="col"> <div class=col>
<button type="button" class="btn btn-sm btn-secondary" onclick="Admin.addPermalink()">Add a Permalink</button> <button type=button class="btn btn-sm btn-secondary" onclick="Admin.addPermalink()">Add a Permalink</button>
</div> </div>
</div> </div>
<div class="row mb-3"> <div class="row mb-3">
<div class="col"> <div class=col>
<div id="permalinks" class="container"> <div id=permalinks class=container>
{%- assign link_count = 0 -%} {%- assign link_count = 0 -%}
{%- for link in model.prior %} {%- for link in model.prior %}
<div id="link_{{ link_count }}" class="row mb-3"> <div id="link_{{ link_count }}" class="row mb-3">
<div class="col-1 text-center align-self-center"> <div class="col-1 text-center align-self-center">
<button type="button" class="btn btn-sm btn-danger" onclick="Admin.removePermalink({{ link_count }})"> <button type=button class="btn btn-sm btn-danger" onclick="Admin.removePermalink({{ link_count }})">
&minus; &minus;
</button> </button>
</div> </div>
<div class="col-11"> <div class=col-11>
<div class="form-floating"> <div class=form-floating>
<input type="text" name="Prior" id="prior_{{ link_count }}" class="form-control" <input type=text name=Prior id="prior_{{ link_count }}" class=form-control placeholder=Link
placeholder="Link" value="{{ link }}"> value="{{ link }}">
<label for="prior_{{ link_count }}">Link</label> <label for="prior_{{ link_count }}">Link</label>
</div> </div>
</div> </div>
@ -51,8 +50,8 @@
</div> </div>
</div> </div>
<div class="row pb-3"> <div class="row pb-3">
<div class="col"> <div class=col>
<button type="submit" class="btn btn-primary">Save Changes</button> <button type=submit class="btn btn-primary">Save Changes</button>
</div> </div>
</div> </div>
</div> </div>

View File

@ -1,205 +1,202 @@
<h2 class="my-3">{{ page_title }}</h2> <h2 class=my-3>{{ page_title }}</h2>
<article> <article>
<form action="{{ "admin/post/save" | relative_link }}" method="post" hx-push-url="true"> <form action="{{ "admin/post/save" | relative_link }}" method=post hx-push-url=true>
<input type="hidden" name="{{ csrf.form_field_name }}" value="{{ csrf.request_token }}"> <input type=hidden name="{{ csrf.form_field_name }}" value="{{ csrf.request_token }}">
<input type="hidden" name="PostId" value="{{ model.post_id }}"> <input type=hidden name=PostId value="{{ model.post_id }}">
<div class="container"> <div class=container>
<div class="row mb-3"> <div class="row mb-3">
<div class="col-12 col-lg-9"> <div class="col-12 col-lg-9">
{%- assign entity = "post" -%} {%- assign entity = "post" -%}
{%- assign entity_id = model.post_id -%} {%- assign entity_id = model.post_id -%}
{% include_template "_edit-common" %} {% include_template "_edit-common" %}
<div class="form-floating pb-3"> <div class="form-floating pb-3">
<input type="text" name="Tags" id="tags" class="form-control" placeholder="Tags" <input type=text name=Tags id=tags class=form-control placeholder=Tags value="{{ model.tags }}">
value="{{ model.tags }}"> <label for=tags>Tags</label>
<label for="tags">Tags</label> <div class=form-text>comma-delimited</div>
<div class="form-text">comma-delimited</div>
</div> </div>
{% if model.status == "Draft" %} {% if model.status == "Draft" %}
<div class="form-check form-switch pb-2"> <div class="form-check form-switch pb-2">
<input type="checkbox" name="DoPublish" id="doPublish" class="form-check-input" value="true"> <input type=checkbox name=DoPublish id=doPublish class=form-check-input value=true>
<label for="doPublish" class="form-check-label">Publish This Post</label> <label for=doPublish class=form-check-label>Publish This Post</label>
</div> </div>
{% endif %} {% endif %}
<button type="submit" class="btn btn-primary pb-2">Save Changes</button> <button type=submit class="btn btn-primary pb-2">Save Changes</button>
<hr class="mb-3"> <hr class=mb-3>
<fieldset class="mb-3"> <fieldset class=mb-3>
<legend> <legend>
<span class="form-check form-switch"> <span class="form-check form-switch">
<small> <small>
<input type="checkbox" name="IsEpisode" id="isEpisode" class="form-check-input" value="true" <input type=checkbox name=IsEpisode id=isEpisode class=form-check-input value=true
data-bs-toggle="collapse" data-bs-target="#episodeItems" onclick="Admin.toggleEpisodeFields()" data-bs-toggle=collapse data-bs-target=#episodeItems onclick="Admin.toggleEpisodeFields()"
{%- if model.is_episode %} checked="checked"{% endif %}> {%- if model.is_episode %} checked{% endif %}>
</small> </small>
<label for="isEpisode">Podcast Episode</label> <label for=isEpisode>Podcast Episode</label>
</span> </span>
</legend> </legend>
<div id="episodeItems" class="container p-0 collapse{% if model.is_episode %} show{% endif %}"> <div id=episodeItems class="container p-0 collapse{% if model.is_episode %} show{% endif %}">
<div class="row"> <div class=row>
<div class="col-12 col-md-8 pb-3"> <div class="col-12 col-md-8 pb-3">
<div class="form-floating"> <div class=form-floating>
<input type="text" name="Media" id="media" class="form-control" placeholder="Media" required <input type=text name=Media id=media class=form-control placeholder=Media required
value="{{ model.media }}"> value="{{ model.media }}">
<label for="media">Media File</label> <label for=media>Media File</label>
<div class="form-text"> <div class=form-text>
Relative URL will be appended to base media path (if set) or served from this web log Relative URL will be appended to base media path (if set) or served from this web log
</div> </div>
</div> </div>
</div> </div>
<div class="col-12 col-md-4 pb-3"> <div class="col-12 col-md-4 pb-3">
<div class="form-floating"> <div class=form-floating>
<input type="text" name="MediaType" id="mediaType" class="form-control" placeholder="Media Type" <input type=text name=MediaType id=mediaType class=form-control placeholder="Media Type"
value="{{ model.media_type }}"> value="{{ model.media_type }}">
<label for="mediaType">Media MIME Type</label> <label for=mediaType>Media MIME Type</label>
<div class="form-text">Optional; overrides podcast default</div> <div class=form-text>Optional; overrides podcast default</div>
</div> </div>
</div> </div>
</div> </div>
<div class="row pb-3"> <div class="row pb-3">
<div class="col"> <div class=col>
<div class="form-floating"> <div class=form-floating>
<input type="number" name="Length" id="length" class="form-control" placeholder="Length" required <input type=number name=Length id=length class=form-control placeholder=Length required
value="{{ model.length }}"> value="{{ model.length }}">
<label for="length">Media Length (bytes)</label> <label for=length>Media Length (bytes)</label>
<div class="form-text">TODO: derive from above file name</div> <div class=form-text>TODO: derive from above file name</div>
</div> </div>
</div> </div>
<div class="col"> <div class=col>
<div class="form-floating"> <div class=form-floating>
<input type="text" name="Duration" id="duration" class="form-control" placeholder="Duration" <input type=text name=Duration id=duration class=form-control placeholder=Duration
value="{{ model.duration }}"> value="{{ model.duration }}">
<label for="duration">Duration</label> <label for=duration>Duration</label>
<div class="form-text">Recommended; enter in <code>HH:MM:SS</code> format</div> <div class=form-text>Recommended; enter in <code>HH:MM:SS</code> format</div>
</div> </div>
</div> </div>
</div> </div>
<div class="row pb-3"> <div class="row pb-3">
<div class="col"> <div class=col>
<div class="form-floating"> <div class=form-floating>
<input type="text" name="Subtitle" id="subtitle" class="form-control" placeholder="Subtitle" <input type=text name=Subtitle id=subtitle class=form-control placeholder=Subtitle
value="{{ model.subtitle }}"> value="{{ model.subtitle }}">
<label for="subtitle">Subtitle</label> <label for=subtitle>Subtitle</label>
<div class="form-text">Optional; a subtitle for this episode</div> <div class=form-text>Optional; a subtitle for this episode</div>
</div> </div>
</div> </div>
</div> </div>
<div class="row"> <div class=row>
<div class="col-12 col-md-8 pb-3"> <div class="col-12 col-md-8 pb-3">
<div class="form-floating"> <div class=form-floating>
<input type="text" name="ImageUrl" id="imageUrl" class="form-control" placeholder="Image URL" <input type=text name=ImageUrl id=imageUrl class=form-control placeholder="Image URL"
value="{{ model.image_url }}"> value="{{ model.image_url }}">
<label for="imageUrl">Image URL</label> <label for=imageUrl>Image URL</label>
<div class="form-text"> <div class=form-text>
Optional; overrides podcast default; relative URL served from this web log Optional; overrides podcast default; relative URL served from this web log
</div> </div>
</div> </div>
</div> </div>
<div class="col-12 col-md-4 pb-3"> <div class="col-12 col-md-4 pb-3">
<div class="form-floating"> <div class=form-floating>
<select name="Explicit" id="explicit" class="form-control"> <select name=Explicit id=explicit class=form-control>
{% for exp_value in explicit_values %} {% for exp_value in explicit_values %}
<option value="{{ exp_value[0] }}" <option value="{{ exp_value[0] }}"{% if model.explicit == exp_value[0] %} selected{% endif -%}>
{%- if model.explicit == exp_value[0] %} selected="selected"{% endif -%}>
{{ exp_value[1] }} {{ exp_value[1] }}
</option> </option>
{% endfor %} {% endfor %}
</select> </select>
<label for="explicit">Explicit Rating</label> <label for=explicit>Explicit Rating</label>
<div class="form-text">Optional; overrides podcast default</div> <div class=form-text>Optional; overrides podcast default</div>
</div> </div>
</div> </div>
</div> </div>
<div class="row"> <div class=row>
<div class="col-12 col-md-8 pb-3"> <div class="col-12 col-md-8 pb-3">
<div class="form-floating"> <div class=form-floating>
<input type="text" name="ChapterFile" id="chapterFile" class="form-control" <input type=text name=ChapterFile id=chapterFile class=form-control placeholder="Chapter File"
placeholder="Chapter File" value="{{ model.chapter_file }}"> value="{{ model.chapter_file }}">
<label for="chapterFile">Chapter File</label> <label for=chapterFile>Chapter File</label>
<div class="form-text">Optional; relative URL served from this web log</div> <div class=form-text>Optional; relative URL served from this web log</div>
</div> </div>
</div> </div>
<div class="col-12 col-md-4 pb-3"> <div class="col-12 col-md-4 pb-3">
<div class="form-floating"> <div class=form-floating>
<input type="text" name="ChapterType" id="chapterType" class="form-control" <input type=text name=ChapterType id=chapterType class=form-control placeholder="Chapter Type"
placeholder="Chapter Type" value="{{ model.chapter_type }}"> value="{{ model.chapter_type }}">
<label for="chapterType">Chapter MIME Type</label> <label for=chapterType>Chapter MIME Type</label>
<div class="form-text"> <div class=form-text>
Optional; <code>application/json+chapters</code> assumed if chapter file ends with Optional; <code>application/json+chapters</code> assumed if chapter file ends with
<code>.json</code> <code>.json</code>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
<div class="row"> <div class=row>
<div class="col-12 col-md-8 pb-3"> <div class="col-12 col-md-8 pb-3">
<div class="form-floating"> <div class=form-floating>
<input type="text" name="TranscriptUrl" id="transcriptUrl" class="form-control" <input type=text name=TranscriptUrl id=transcriptUrl class=form-control placeholder="Transcript URL"
placeholder="Transcript URL" value="{{ model.transcript_url }}" value="{{ model.transcript_url }}" onkeyup="Admin.requireTranscriptType()">
onkeyup="Admin.requireTranscriptType()"> <label for=transcriptUrl>Transcript URL</label>
<label for="transcriptUrl">Transcript URL</label> <div class=form-text>Optional; relative URL served from this web log</div>
<div class="form-text">Optional; relative URL served from this web log</div>
</div> </div>
</div> </div>
<div class="col-12 col-md-4 pb-3"> <div class="col-12 col-md-4 pb-3">
<div class="form-floating"> <div class=form-floating>
<input type="text" name="TranscriptType" id="transcriptType" class="form-control" <input type=text name=TranscriptType id=transcriptType class=form-control
placeholder="Transcript Type" value="{{ model.transcript_type }}" placeholder="Transcript Type" value="{{ model.transcript_type }}"
{%- if model.transcript_url != "" %} required{% endif %}> {%- if model.transcript_url != "" %} required{% endif %}>
<label for="transcriptType">Transcript MIME Type</label> <label for=transcriptType>Transcript MIME Type</label>
<div class="form-text">Required if transcript URL provided</div> <div class=form-text>Required if transcript URL provided</div>
</div> </div>
</div> </div>
</div> </div>
<div class="row pb-3"> <div class="row pb-3">
<div class="col"> <div class=col>
<div class="form-floating"> <div class=form-floating>
<input type="text" name="TranscriptLang" id="transcriptLang" class="form-control" <input type=text name=TranscriptLang id=transcriptLang class=form-control
placeholder="Transcript Language" value="{{ model.transcript_lang }}"> placeholder="Transcript Language" value="{{ model.transcript_lang }}">
<label for="transcriptLang">Transcript Language</label> <label for=transcriptLang>Transcript Language</label>
<div class="form-text">Optional; overrides podcast default</div> <div class=form-text>Optional; overrides podcast default</div>
</div> </div>
</div> </div>
<div class="col d-flex justify-content-center"> <div class="col d-flex justify-content-center">
<div class="form-check form-switch align-self-center pb-3"> <div class="form-check form-switch align-self-center pb-3">
<input type="checkbox" name="TranscriptCaptions" id="transcriptCaptions" class="form-check-input" <input type=checkbox name=TranscriptCaptions id=transcriptCaptions class=form-check-input
value="true" {% if model.transcript_captions %} checked="checked"{% endif %}> value=true{% if model.transcript_captions %} checked{% endif %}>
<label for="transcriptCaptions">This is a captions file</label> <label for=transcriptCaptions>This is a captions file</label>
</div> </div>
</div> </div>
</div> </div>
<div class="row pb-3"> <div class="row pb-3">
<div class="col col-md-4"> <div class="col col-md-4">
<div class="form-floating"> <div class=form-floating>
<input type="number" name="SeasonNumber" id="seasonNumber" class="form-control" <input type=number name=SeasonNumber id=seasonNumber class=form-control placeholder="Season Number"
placeholder="Season Number" value="{{ model.season_number }}"> value="{{ model.season_number }}">
<label for="seasonNumber">Season Number</label> <label for=seasonNumber>Season Number</label>
<div class="form-text">Optional</div> <div class=form-text>Optional</div>
</div> </div>
</div> </div>
<div class="col col-md-8"> <div class="col col-md-8">
<div class="form-floating"> <div class=form-floating>
<input type="text" name="SeasonDescription" id="seasonDescription" class="form-control" <input type=text name=SeasonDescription id=seasonDescription class=form-control
placeholder="Season Description" maxlength="128" value="{{ model.season_description }}"> placeholder="Season Description" maxlength=128 value="{{ model.season_description }}">
<label for="seasonDescription">Season Description</label> <label for=seasonDescription>Season Description</label>
<div class="form-text">Optional</div> <div class=form-text>Optional</div>
</div> </div>
</div> </div>
</div> </div>
<div class="row pb-3"> <div class="row pb-3">
<div class="col col-md-4"> <div class="col col-md-4">
<div class="form-floating"> <div class=form-floating>
<input type="number" name="EpisodeNumber" id="episodeNumber" class="form-control" step="0.01" <input type=number name=EpisodeNumber id=episodeNumber class=form-control step=0.01
placeholder="Episode Number" value="{{ model.episode_number }}"> placeholder="Episode Number" value="{{ model.episode_number }}">
<label for="episodeNumber">Episode Number</label> <label for=episodeNumber>Episode Number</label>
<div class="form-text">Optional; up to 2 decimal points</div> <div class=form-text>Optional; up to 2 decimal points</div>
</div> </div>
</div> </div>
<div class="col col-md-8"> <div class="col col-md-8">
<div class="form-floating"> <div class=form-floating>
<input type="text" name="EpisodeDescription" id="episodeDescription" class="form-control" <input type=text name=EpisodeDescription id=episodeDescription class=form-control
placeholder="Episode Description" maxlength="128" value="{{ model.episode_description }}"> placeholder="Episode Description" maxlength=128 value="{{ model.episode_description }}">
<label for="episodeDescription">Episode Description</label> <label for=episodeDescription>Episode Description</label>
<div class="form-text">Optional</div> <div class=form-text>Optional</div>
</div> </div>
</div> </div>
</div> </div>
@ -208,72 +205,71 @@
document.addEventListener("DOMContentLoaded", () => Admin.toggleEpisodeFields()) document.addEventListener("DOMContentLoaded", () => Admin.toggleEpisodeFields())
</script> </script>
</fieldset> </fieldset>
<fieldset class="pb-3"> <fieldset class=pb-3>
<legend> <legend>
Metadata Metadata
<button type="button" class="btn btn-sm btn-secondary" data-bs-toggle="collapse" <button type=button class="btn btn-sm btn-secondary" data-bs-toggle=collapse
data-bs-target="#metaItemContainer"> data-bs-target="#metaItemContainer">
show show
</button> </button>
</legend> </legend>
<div id="metaItemContainer" class="collapse"> <div id=metaItemContainer class=collapse>
<div id="metaItems" class="container"> <div id=metaItems class=container>
{%- for meta in metadata %} {%- for meta in metadata %}
<div id="meta_{{ meta[0] }}" class="row mb-3"> <div id="meta_{{ meta[0] }}" class="row mb-3">
<div class="col-1 text-center align-self-center"> <div class="col-1 text-center align-self-center">
<button type="button" class="btn btn-sm btn-danger" onclick="Admin.removeMetaItem({{ meta[0] }})"> <button type=button class="btn btn-sm btn-danger" onclick="Admin.removeMetaItem({{ meta[0] }})">
&minus; &minus;
</button> </button>
</div> </div>
<div class="col-3"> <div class=col-3>
<div class="form-floating"> <div class=form-floating>
<input type="text" name="MetaNames" id="metaNames_{{ meta[0] }}" class="form-control" <input type=text name=MetaNames id="metaNames_{{ meta[0] }}" class=form-control
placeholder="Name" value="{{ meta[1] }}"> placeholder=Name value="{{ meta[1] }}">
<label for="metaNames_{{ meta[0] }}">Name</label> <label for="metaNames_{{ meta[0] }}">Name</label>
</div> </div>
</div> </div>
<div class="col-8"> <div class=col-8>
<div class="form-floating"> <div class=form-floating>
<input type="text" name="MetaValues" id="metaValues_{{ meta[0] }}" class="form-control" <input type=text name=MetaValues id="metaValues_{{ meta[0] }}" class=form-control
placeholder="Value" value="{{ meta[2] }}"> placeholder=Value value="{{ meta[2] }}">
<label for="metaValues_{{ meta[0] }}">Value</label> <label for="metaValues_{{ meta[0] }}">Value</label>
</div> </div>
</div> </div>
</div> </div>
{% endfor -%} {% endfor -%}
</div> </div>
<button type="button" class="btn btn-sm btn-secondary" onclick="Admin.addMetaItem()">Add an Item</button> <button type=button class="btn btn-sm btn-secondary" onclick="Admin.addMetaItem()">Add an Item</button>
<script> <script>
document.addEventListener("DOMContentLoaded", () => Admin.setNextMetaIndex({{ metadata | size }})) document.addEventListener("DOMContentLoaded", () => Admin.setNextMetaIndex({{ metadata | size }}))
</script> </script>
</div> </div>
</fieldset> </fieldset>
{% if model.status == "Published" %} {% if model.status == "Published" %}
<fieldset class="pb-3"> <fieldset class=pb-3>
<legend>Maintenance</legend> <legend>Maintenance</legend>
<div class="container"> <div class=container>
<div class="row"> <div class=row>
<div class="col align-self-center"> <div class="col align-self-center">
<div class="form-check form-switch pb-2"> <div class="form-check form-switch pb-2">
<input type="checkbox" name="SetPublished" id="setPublished" class="form-check-input" <input type=checkbox name=SetPublished id=setPublished class=form-check-input value=true>
value="true"> <label for=setPublished class=form-check-label>Set Published Date</label>
<label for="setPublished" class="form-check-label">Set Published Date</label>
</div> </div>
</div> </div>
<div class="col-4"> <div class=col-4>
<div class="form-floating"> <div class=form-floating>
<input type="datetime-local" name="PubOverride" id="pubOverride" class="form-control" <input type=datetime-local name=PubOverride id=pubOverride class=form-control
placeholder="Override Date" placeholder="Override Date"
{%- if model.pub_override -%} {%- if model.pub_override -%}
value="{{ model.pub_override | date: "yyyy-MM-dd\THH:mm" }}" value="{{ model.pub_override | date: "yyyy-MM-dd\THH:mm" }}"
{%- endif %}> {%- endif %}>
<label for="pubOverride" class="form-label">Published On</label> <label for=pubOverride class=form-label>Published On</label>
</div> </div>
</div> </div>
<div class="col-5 align-self-center"> <div class="col-5 align-self-center">
<div class="form-check form-switch pb-2"> <div class="form-check form-switch pb-2">
<input type="checkbox" name="SetUpdated" id="setUpdated" class="form-check-input" value="true"> <input type=checkbox name=SetUpdated id=setUpdated class=form-check-input value=true>
<label for="setUpdated" class="form-check-label"> <label for=setUpdated class=form-check-label>
Purge revisions and<br>set as updated date as well Purge revisions and<br>set as updated date as well
</label> </label>
</div> </div>
@ -285,22 +281,22 @@
</div> </div>
<div class="col-12 col-lg-3"> <div class="col-12 col-lg-3">
<div class="form-floating pb-3"> <div class="form-floating pb-3">
<select name="Template" id="template" class="form-control"> <select name=Template id=template class=form-control>
{% for tmpl in templates -%} {% for tmpl in templates -%}
<option value="{{ tmpl[0] }}"{% if model.template == tmpl[0] %} selected="selected"{% endif %}> <option value="{{ tmpl[0] }}"{% if model.template == tmpl[0] %} selected{% endif %}>
{{ tmpl[1] }} {{ tmpl[1] }}
</option> </option>
{%- endfor %} {%- endfor %}
</select> </select>
<label for="template">Post Template</label> <label for=template>Post Template</label>
</div> </div>
<fieldset> <fieldset>
<legend>Categories</legend> <legend>Categories</legend>
{% for cat in categories %} {% for cat in categories %}
<div class="form-check"> <div class=form-check>
<input type="checkbox" name="CategoryIds" id="categoryId_{{ cat.id }}" class="form-check-input" <input type=checkbox name=CategoryIds id="categoryId_{{ cat.id }}" class=form-check-input
value="{{ cat.id }}" {% if model.category_ids contains cat.id %} checked="checked"{% endif %}> value="{{ cat.id }}"{% if model.category_ids contains cat.id %} checked{% endif %}>
<label for="categoryId_{{ cat.id }}" class="form-check-label" <label for="categoryId_{{ cat.id }}" class=form-check-label
{%- if cat.description %} title="{{ cat.description.value | strip_html | escape }}"{% endif %}> {%- if cat.description %} title="{{ cat.description.value | strip_html | escape }}"{% endif %}>
{%- for it in cat.parent_names %}&nbsp; &rang; &nbsp;{% endfor %}{{ cat.name }} {%- for it in cat.parent_names %}&nbsp; &rang; &nbsp;{% endfor %}{{ cat.name }}
</label> </label>

View File

@ -1,17 +1,17 @@
<h2 class="my-3">{{ page_title }}</h2> <h2 class=my-3>{{ page_title }}</h2>
<article> <article>
<a href="{{ "admin/post/new/edit" | relative_link }}" class="btn btn-primary btn-sm mb-3">Write a New Post</a> <a href="{{ "admin/post/new/edit" | relative_link }}" class="btn btn-primary btn-sm mb-3">Write a New Post</a>
{%- assign post_count = model.posts | size -%} {%- assign post_count = model.posts | size -%}
{%- if post_count > 0 %} {%- if post_count > 0 %}
<form method="post" class="container mb-3" hx-target="body"> <form method=post class="container mb-3" hx-target=body>
<input type="hidden" name="{{ csrf.form_field_name }}" value="{{ csrf.request_token }}"> <input type=hidden name="{{ csrf.form_field_name }}" value="{{ csrf.request_token }}">
{%- assign date_col = "col-xs-12 col-md-3 col-lg-2" -%} {%- assign date_col = "col-xs-12 col-md-3 col-lg-2" -%}
{%- assign title_col = "col-xs-12 col-md-7 col-lg-6 col-xl-5 col-xxl-4" -%} {%- assign title_col = "col-xs-12 col-md-7 col-lg-6 col-xl-5 col-xxl-4" -%}
{%- assign author_col = "col-xs-12 col-md-2 col-lg-1" -%} {%- assign author_col = "col-xs-12 col-md-2 col-lg-1" -%}
{%- assign tag_col = "col-lg-3 col-xl-4 col-xxl-5 d-none d-lg-inline-block" -%} {%- assign tag_col = "col-lg-3 col-xl-4 col-xxl-5 d-none d-lg-inline-block" -%}
<div class="row mwl-table-heading"> <div class="row mwl-table-heading">
<div class="{{ date_col }}"> <div class="{{ date_col }}">
<span class="d-md-none">Post</span><span class="d-none d-md-inline">Date</span> <span class=d-md-none>Post</span><span class="d-none d-md-inline">Date</span>
</div> </div>
<div class="{{ title_col }} d-none d-md-inline-block">Title</div> <div class="{{ title_col }} d-none d-md-inline-block">Title</div>
<div class="{{ author_col }} d-none d-md-inline-block">Author</div> <div class="{{ author_col }} d-none d-md-inline-block">Author</div>
@ -20,14 +20,14 @@
{% for post in model.posts -%} {% for post in model.posts -%}
<div class="row mwl-table-detail"> <div class="row mwl-table-detail">
<div class="{{ date_col }} no-wrap"> <div class="{{ date_col }} no-wrap">
<small class="d-md-none"> <small class=d-md-none>
{%- if post.published_on -%} {%- if post.published_on -%}
Published {{ post.published_on | date: "MMMM d, yyyy" }} Published {{ post.published_on | date: "MMMM d, yyyy" }}
{%- else -%} {%- else -%}
Not Published Not Published
{%- endif -%} {%- endif -%}
{%- if post.published_on != post.updated_on -%} {%- if post.published_on != post.updated_on -%}
<em class="text-muted"> (Updated {{ post.updated_on | date: "MMMM d, yyyy" }})</em> <em class=text-muted> (Updated {{ post.updated_on | date: "MMMM d, yyyy" }})</em>
{%- endif %} {%- endif %}
</small> </small>
<span class="d-none d-md-inline"> <span class="d-none d-md-inline">
@ -37,7 +37,7 @@
Not Published Not Published
{%- endif -%} {%- endif -%}
{%- if post.published_on != post.updated_on %}<br> {%- if post.published_on != post.updated_on %}<br>
<small class="text-muted"><em>{{ post.updated_on | date: "MMMM d, yyyy" }}</em></small> <small class=text-muted><em>{{ post.updated_on | date: "MMMM d, yyyy" }}</em></small>
{%- endif %} {%- endif %}
</span> </span>
</div> </div>
@ -45,15 +45,15 @@
{%- if post.episode %}<span class="badge bg-success float-end text-uppercase mt-1">Episode</span>{% endif -%} {%- if post.episode %}<span class="badge bg-success float-end text-uppercase mt-1">Episode</span>{% endif -%}
{{ post.title }}<br> {{ post.title }}<br>
<small> <small>
<a href="{{ post | relative_link }}" target="_blank">View Post</a> <a href="{{ post | relative_link }}" target=_blank>View Post</a>
{% if is_editor or is_author and user_id == post.author_id %} {% if is_editor or is_author and user_id == post.author_id %}
<span class="text-muted"> &bull; </span> <span class=text-muted> &bull; </span>
<a href="{{ post | edit_post_link }}">Edit</a> <a href="{{ post | edit_post_link }}">Edit</a>
{% endif %} {% endif %}
{% if is_web_log_admin %} {% if is_web_log_admin %}
<span class="text-muted"> &bull; </span> <span class=text-muted> &bull; </span>
{%- assign post_del_link = "admin/post/" | append: post.id | append: "/delete" | relative_link -%} {%- assign post_del_link = "admin/post/" | append: post.id | append: "/delete" | relative_link -%}
<a href="{{ post_del_link }}" hx-post="{{ post_del_link }}" class="text-danger" <a href="{{ post_del_link }}" hx-post="{{ post_del_link }}" class=text-danger
hx-confirm="Are you sure you want to delete the post &ldquo;{{ post.title | strip_html | escape }}&rdquo;? This action cannot be undone."> hx-confirm="Are you sure you want to delete the post &ldquo;{{ post.title | strip_html | escape }}&rdquo;? This action cannot be undone.">
Delete Delete
</a> </a>
@ -62,7 +62,7 @@
</div> </div>
<div class="{{ author_col }}"> <div class="{{ author_col }}">
{%- assign tag_count = post.tags | size -%} {%- assign tag_count = post.tags | size -%}
<small class="d-md-none"> <small class=d-md-none>
Authored by {{ model.authors | value: post.author_id }} | Authored by {{ model.authors | value: post.author_id }} |
{% if tag_count == 0 -%} {% if tag_count == 0 -%}
No No
@ -73,7 +73,7 @@
<span class="d-none d-md-inline">{{ model.authors | value: post.author_id }}</span> <span class="d-none d-md-inline">{{ model.authors | value: post.author_id }}</span>
</div> </div>
<div class="{{ tag_col }}"> <div class="{{ tag_col }}">
<span class="no-wrap">{{ post.tags | join: "</span>, <span class='no-wrap'>" }}</span> <span class=no-wrap>{{ post.tags | join: "</span>, <span class='no-wrap'>" }}</span>
</div> </div>
</div> </div>
{%- endfor %} {%- endfor %}
@ -82,17 +82,17 @@
<div class="d-flex justify-content-evenly mb-3"> <div class="d-flex justify-content-evenly mb-3">
<div> <div>
{% if model.newer_link %} {% if model.newer_link %}
<p><a class="btn btn-secondary" href="{{ model.newer_link.value }}">&laquo; Newer Posts</a></p> <p><a class="btn btn-secondary" href="{{ model.newer_link.value }}">&laquo; Newer Posts</a>
{% endif %} {% endif %}
</div> </div>
<div class="text-right"> <div class="text-right">
{% if model.older_link %} {% if model.older_link %}
<p><a class="btn btn-secondary" href="{{ model.older_link.value }}">Older Posts &raquo;</a></p> <p><a class="btn btn-secondary" href="{{ model.older_link.value }}">Older Posts &raquo;</a>
{% endif %} {% endif %}
</div> </div>
</div> </div>
{% endif %} {% endif %}
{% else %} {% else %}
<p class="text-muted fst-italic text-center">This web log has no posts</p> <p class="text-muted fst-italic text-center">This web log has no posts
{% endif %} {% endif %}
</article> </article>

View File

@ -1,28 +1,28 @@
<h3>{% if model.rule_id < 0 %}Add{% else %}Edit{% endif %} Redirect Rule</h3> <h3>{% if model.rule_id < 0 %}Add{% else %}Edit{% endif %} Redirect Rule</h3>
{%- assign post_url = "admin/settings/redirect-rules/" | append: model.rule_id | relative_link -%} {%- assign post_url = "admin/settings/redirect-rules/" | append: model.rule_id | relative_link -%}
<form action="{{ post_url }}" hx-post="{{ post_url }}" hx-target="body" method="POST" class="container"> <form action="{{ post_url }}" hx-post="{{ post_url }}" hx-target=body method=post class=container>
<input type="hidden" name="{{ csrf.form_field_name }}" value="{{ csrf.request_token }}"> <input type=hidden name="{{ csrf.form_field_name }}" value="{{ csrf.request_token }}">
<input type="hidden" name="RuleId" value="{{ model.rule_id }}"> <input type=hidden name=RuleId value="{{ model.rule_id }}">
<div class="row"> <div class=row>
<div class="col-12 col-lg-5 mb-3"> <div class="col-12 col-lg-5 mb-3">
<div class="form-floating"> <div class=form-floating>
<input type="text" name="From" id="from" class="form-control" placeholder="From local URL/pattern" autofocus <input type=text name=From id=from class=form-control placeholder="From local URL/pattern" autofocus required
required value="{{ model.from | escape }}"> value="{{ model.from | escape }}">
<label for="from">From</label> <label for=from>From</label>
</div> </div>
</div> </div>
<div class="col-12 col-lg-5 mb-3"> <div class="col-12 col-lg-5 mb-3">
<div class="form-floating"> <div class=form-floating>
<input type="text" name="To" id="to" class="form-control" placeholder="To URL/pattern" required <input type=text name=To id=to class=form-control placeholder="To URL/pattern" required
value="{{ model.to | escape }}"> value="{{ model.to | escape }}">
<label for="from">To</label> <label for=to>To</label>
</div> </div>
</div> </div>
<div class="col-12 col-lg-2 mb-3"> <div class="col-12 col-lg-2 mb-3">
<div class="form-check form-switch"> <div class="form-check form-switch">
<input type="checkbox" name="IsRegex" id="isRegex" class="form-check-input" value="true" <input type=checkbox name=IsRegex id=isRegex class=form-check-input value=true
{%- if model.is_regex %} checked="checked"{% endif %}> {%- if model.is_regex %} checked{% endif %}>
<label for="isRegex">Use RegEx</label> <label for=isRegex>Use RegEx</label>
</div> </div>
</div> </div>
</div> </div>
@ -30,18 +30,18 @@
<div class="row mb-3"> <div class="row mb-3">
<div class="col-12 text-center"> <div class="col-12 text-center">
<label>Add Rule</label> <label>Add Rule</label>
<div class="btn-group btn-group-sm" role="group" aria-label="New rule placement button group"> <div class="btn-group btn-group-sm" role=group aria-label="New rule placement button group">
<input type="radio" name="InsertAtTop" id="insert_top" class="btn-check" value="true"> <input type=radio name=InsertAtTop id=insert_top class=btn-check value=true>
<label class="btn btn-sm btn-outline-secondary" for="insert_top">Top</label> <label class="btn btn-sm btn-outline-secondary" for=insert_top>Top</label>
<input type="radio" name="InsertAtTop" id="insert_bottom" class="btn-check" value="false" checked="checked"> <input type=radio name=InsertAtTop id=insert_bottom class=btn-check value=false checked>
<label class="btn btn-sm btn-outline-secondary" for="insert_bottom">Bottom</label> <label class="btn btn-sm btn-outline-secondary" for=insert_bottom>Bottom</label>
</div> </div>
</div> </div>
</div> </div>
{% endif %} {% endif %}
<div class="row mb-3"> <div class="row mb-3">
<div class="col text-center"> <div class="col text-center">
<button type="submit" class="btn btn-sm btn-primary">Save Changes</button> <button type=submit class="btn btn-sm btn-primary">Save Changes</button>
<a href="{{ "admin/settings/redirect-rules" | relative_link }}" class="btn btn-sm btn-secondary ms-3">Cancel</a> <a href="{{ "admin/settings/redirect-rules" | relative_link }}" class="btn btn-sm btn-secondary ms-3">Cancel</a>
</div> </div>
</div> </div>

View File

@ -1,31 +1,31 @@
<h2 class="my-3">{{ page_title }}</h2> <h2 class=my-3>{{ page_title }}</h2>
<article> <article>
<p class="mb-3"> <p class=mb-3>
<a href="{{ "admin/settings" | relative_link }}">&laquo; Back to Settings</a> <a href="{{ "admin/settings" | relative_link }}">&laquo; Back to Settings</a>
</p> </p>
<div class="container"> <div class=container>
<div class="row"> <div class=row>
<div class="col"> <div class=col>
<a href="{{ "admin/settings/redirect-rules/-1" | relative_link }}" class="btn btn-primary btn-sm mb-3" <a href="{{ "admin/settings/redirect-rules/-1" | relative_link }}" class="btn btn-primary btn-sm mb-3"
hx-target="#redir_new"> hx-target=#redir_new>
Add Redirect Rule Add Redirect Rule
</a> </a>
</div> </div>
</div> </div>
<div class="row"> <div class=row>
<div class="col"> <div class=col>
{%- assign redir_count = redirections | size -%} {%- assign redir_count = redirections | size -%}
{% if redir_count > 0 -%} {% if redir_count > 0 -%}
<div class="container"> <div class=container>
<div class="row mwl-table-heading"> <div class="row mwl-table-heading">
<div class="col-5">From</div> <div class=col-5>From</div>
<div class="col-5">To</div> <div class=col-5>To</div>
<div class="col-2 text-center">RegEx?</div> <div class="col-2 text-center">RegEx?</div>
</div> </div>
</div> </div>
<div class="row mwl-table-detail" id="redir_new"></div> <div class="row mwl-table-detail" id=redir_new></div>
<form method="post" class="container" hx-target="body"> <form method=post class=container hx-target=body>
<input type="hidden" name="{{ csrf.form_field_name }}" value="{{ csrf.request_token }}"> <input type=hidden name="{{ csrf.form_field_name }}" value="{{ csrf.request_token }}">
{% for redir in redirections -%} {% for redir in redirections -%}
{%- assign redir_id = "redir_" | append: forloop.index0 -%} {%- assign redir_id = "redir_" | append: forloop.index0 -%}
<div class="row mwl-table-detail" id="{{ redir_id }}"> <div class="row mwl-table-detail" id="{{ redir_id }}">
@ -38,31 +38,31 @@
Edit Edit
</a> </a>
{% unless forloop.first %} {% unless forloop.first %}
<span class="text-muted"> &bull; </span> <span class=text-muted> &bull; </span>
{%- assign move_up = redir_url | append: "/up" | relative_link -%} {%- assign move_up = redir_url | append: "/up" | relative_link -%}
<a href="{{ move_up }}" hx-post="{{ move_up }}">Move Up</a> <a href="{{ move_up }}" hx-post="{{ move_up }}">Move Up</a>
{% endunless %} {% endunless %}
{% unless forloop.last %} {% unless forloop.last %}
<span class="text-muted"> &bull; </span> <span class=text-muted> &bull; </span>
{%- assign move_down = redir_url | append: "/down" | relative_link -%} {%- assign move_down = redir_url | append: "/down" | relative_link -%}
<a href="{{ move_down }}" hx-post="{{ move_down }}">Move Down</a> <a href="{{ move_down }}" hx-post="{{ move_down }}">Move Down</a>
{% endunless %} {% endunless %}
<span class="text-muted"> &bull; </span> <span class=text-muted> &bull; </span>
{%- assign del_url = redir_url | append: "/delete" | relative_link -%} {%- assign del_url = redir_url | append: "/delete" | relative_link -%}
<a href="{{ del_url }}" hx-post="{{ del_url }}" class="text-danger" <a href="{{ del_url }}" hx-post="{{ del_url }}" class=text-danger
hx-confirm="Are you sure you want to delete this redirect rule?"> hx-confirm="Are you sure you want to delete this redirect rule?">
Delete Delete
</a> </a>
</small> </small>
</div> </div>
<div class="col-5">{{ redir.to }}</div> <div class=col-5>{{ redir.to }}</div>
<div class="col-2 text-center">{% if redir.is_regex %}Yes{% else %}No{% endif %}</div> <div class="col-2 text-center">{% if redir.is_regex %}Yes{% else %}No{% endif %}</div>
</div> </div>
{%- endfor %} {%- endfor %}
</form> </form>
{%- else -%} {%- else -%}
<div id="redir_new"> <div id=redir_new>
<p class="text-muted text-center fst-italic">This web log has no redirect rules defined</p> <p class="text-muted text-center fst-italic">This web log has no redirect rules defined
</div> </div>
{%- endif %} {%- endif %}
</div> </div>
@ -70,7 +70,6 @@
</div> </div>
<p class="mt-3 text-muted fst-italic text-center"> <p class="mt-3 text-muted fst-italic text-center">
This is an advanced feature; please This is an advanced feature; please
<a href="https://bitbadger.solutions/open-source/myweblog/advanced.html#redirect-rules" <a href=https://bitbadger.solutions/open-source/myweblog/advanced.html#redirect-rules
target="_blank">read and understand the documentation on this feature</a> before adding rules. target=_blank>read and understand the documentation on this feature</a> before adding rules.
</p>
</article> </article>

View File

@ -1,27 +1,26 @@
<h2 class="my-3">{{ page_title }}</h2> <h2 class=my-3>{{ page_title }}</h2>
<article> <article>
<form method="post" hx-target="body"> <form method=post hx-target=body>
<input type="hidden" name="{{ csrf.form_field_name }}" value="{{ csrf.request_token }}"> <input type=hidden name="{{ csrf.form_field_name }}" value="{{ csrf.request_token }}">
<input type="hidden" name="id" value="{{ model.id }}"> <input type=hidden name=Id value="{{ model.id }}">
<div class="container mb-3"> <div class="container mb-3">
<div class="row"> <div class=row>
<div class="col"> <div class=col>
<p style="line-height:1.2rem;"> <p style="line-height:1.2rem;">
<strong>{{ model.current_title }}</strong><br> <strong>{{ model.current_title }}</strong><br>
<small class="text-muted"> <small class=text-muted>
<a href="{{ "admin/" | append: model.entity | append: "/" | append: model.id | append: "/edit" | relative_link }}"> <a href="{{ "admin/" | append: model.entity | append: "/" | append: model.id | append: "/edit" | relative_link }}">
&laquo; Back to Edit {{ model.entity | capitalize }} &laquo; Back to Edit {{ model.entity | capitalize }}
</a> </a>
</small> </small>
</p>
</div> </div>
</div> </div>
{%- assign revision_count = model.revisions | size -%} {%- assign revision_count = model.revisions | size -%}
{%- assign rev_url_base = "admin/" | append: model.entity | append: "/" | append: model.id | append: "/revision" -%} {%- assign rev_url_base = "admin/" | append: model.entity | append: "/" | append: model.id | append: "/revision" -%}
{%- if revision_count > 1 %} {%- if revision_count > 1 %}
<div class="row mb-3"> <div class="row mb-3">
<div class="col"> <div class=col>
<button type="button" class="btn btn-sm btn-danger" <button type=button class="btn btn-sm btn-danger"
hx-post="{{ rev_url_base | append: "s/purge" | relative_link }}" hx-post="{{ rev_url_base | append: "s/purge" | relative_link }}"
hx-confirm="This will remove all revisions but the current one; are you sure this is what you wish to do?"> hx-confirm="This will remove all revisions but the current one; are you sure this is what you wish to do?">
Delete All Prior Revisions Delete All Prior Revisions
@ -29,9 +28,7 @@
</div> </div>
</div> </div>
{%- endif %} {%- endif %}
<div class="row mwl-table-heading"> <div class="row mwl-table-heading"><div class=col>Revision</div></div>
<div class="col">Revision</div>
</div>
{% for rev in model.revisions %} {% for rev in model.revisions %}
{%- assign as_of_string = rev.as_of | date: "o" -%} {%- assign as_of_string = rev.as_of | date: "o" -%}
{%- assign as_of_id = "rev_" | append: as_of_string | replace: "\.", "_" | replace: ":", "-" -%} {%- assign as_of_id = "rev_" | append: as_of_string | replace: "\.", "_" | replace: ":", "-" -%}
@ -50,17 +47,17 @@
<a href="{{ rev_url_prefix | append: "/preview" | relative_link }}" hx-target="#{{ as_of_id }}_preview"> <a href="{{ rev_url_prefix | append: "/preview" | relative_link }}" hx-target="#{{ as_of_id }}_preview">
Preview Preview
</a> </a>
<span class="text-muted"> &bull; </span> <span class=text-muted> &bull; </span>
<a href="{{ rev_restore }}" hx-post="{{ rev_restore }}">Restore as Current</a> <a href="{{ rev_restore }}" hx-post="{{ rev_restore }}">Restore as Current</a>
<span class="text-muted"> &bull; </span> <span class=text-muted> &bull; </span>
<a href="{{ rev_delete }}" hx-post="{{ rev_delete }}" hx-target="#{{ as_of_id }}" hx-swap="outerHTML" <a href="{{ rev_delete }}" hx-post="{{ rev_delete }}" hx-target="#{{ as_of_id }}" hx-swap=outerHTML
class="text-danger"> class=text-danger>
Delete Delete
</a> </a>
</small> </small>
{% endunless %} {% endunless %}
</div> </div>
{% unless forloop.first %}<div id="{{ as_of_id }}_preview" class="col-12"></div>{% endunless %} {% unless forloop.first %}<div id="{{ as_of_id }}_preview" class=col-12></div>{% endunless %}
</div> </div>
{% endfor %} {% endfor %}
</div> </div>

View File

@ -1,122 +1,122 @@
<h2 class="my-3">{{ web_log.name }} Settings</h2> <h2 class=my-3>{{ web_log.name }} Settings</h2>
<article> <article>
<p class="text-muted"> <p class=text-muted>
Go to: <a href="#users">Users</a> &bull; <a href="#rss-settings">RSS Settings</a> &bull; Go to: <a href=#users>Users</a> &bull; <a href=#rss-settings>RSS Settings</a> &bull;
<a href="#tag-mappings">Tag Mappings</a> &bull; <a href=#tag-mappings>Tag Mappings</a> &bull;
<a href="{{ "admin/settings/redirect-rules" | relative_link }}">Redirect Rules</a> <a href="{{ "admin/settings/redirect-rules" | relative_link }}">Redirect Rules</a>
</p> </p>
<fieldset class="container mb-3"> <fieldset class="container mb-3">
<legend>Web Log Settings</legend> <legend>Web Log Settings</legend>
<form action="{{ "admin/settings" | relative_link }}" method="post"> <form action="{{ "admin/settings" | relative_link }}" method=post>
<input type="hidden" name="{{ csrf.form_field_name }}" value="{{ csrf.request_token }}"> <input type=hidden name="{{ csrf.form_field_name }}" value="{{ csrf.request_token }}">
<div class="container"> <div class=container>
<div class="row"> <div class=row>
<div class="col-12 col-md-6 col-xl-4 pb-3"> <div class="col-12 col-md-6 col-xl-4 pb-3">
<div class="form-floating"> <div class=form-floating>
<input type="text" name="Name" id="name" class="form-control" placeholder="Name" required autofocus <input type=text name=Name id=name class=form-control placeholder=Name required autofocus
value="{{ model.name }}"> value="{{ model.name }}">
<label for="name">Name</label> <label for=name>Name</label>
</div> </div>
</div> </div>
<div class="col-12 col-md-6 col-xl-4 pb-3"> <div class="col-12 col-md-6 col-xl-4 pb-3">
<div class="form-floating"> <div class=form-floating>
<input type="text" name="Slug" id="slug" class="form-control" placeholder="Slug" required <input type=text name=Slug id=slug class=form-control placeholder="Slug" required
value="{{ model.slug }}"> value="{{ model.slug }}">
<label for="slug">Slug</label> <label for=slug>Slug</label>
<span class="form-text"> <span class=form-text>
<span class="badge rounded-pill bg-warning text-dark">WARNING</span> changing this value may break <span class="badge rounded-pill bg-warning text-dark">WARNING</span> changing this value may break
links links
(<a href="https://bitbadger.solutions/open-source/myweblog/configuring.html#blog-settings" (<a href=https://bitbadger.solutions/open-source/myweblog/configuring.html#blog-settings
target="_blank">more</a>) target=_blank>more</a>)
</span> </span>
</div> </div>
</div> </div>
<div class="col-12 col-md-6 col-xl-4 pb-3"> <div class="col-12 col-md-6 col-xl-4 pb-3">
<div class="form-floating"> <div class=form-floating>
<input type="text" name="Subtitle" id="subtitle" class="form-control" placeholder="Subtitle" <input type=text name=Subtitle id=subtitle class=form-control placeholder=Subtitle
value="{{ model.subtitle }}"> value="{{ model.subtitle }}">
<label for="subtitle">Subtitle</label> <label for=subtitle>Subtitle</label>
</div> </div>
</div> </div>
<div class="col-12 col-md-6 col-xl-4 offset-xl-1 pb-3"> <div class="col-12 col-md-6 col-xl-4 offset-xl-1 pb-3">
<div class="form-floating"> <div class=form-floating>
<select name="ThemeId" id="themeId" class="form-control" required> <select name=ThemeId id=themeId class=form-control required>
{% for theme in themes -%} {% for theme in themes -%}
<option value="{{ theme[0] }}"{% if model.theme_id == theme[0] %} selected="selected"{% endif %}> <option value="{{ theme[0] }}"{% if model.theme_id == theme[0] %} selected{% endif %}>
{{ theme[1] }} {{ theme[1] }}
</option> </option>
{%- endfor %} {%- endfor %}
</select> </select>
<label for="themeId">Theme</label> <label for=themeId>Theme</label>
</div> </div>
</div> </div>
<div class="col-12 col-md-6 offset-md-1 col-xl-4 offset-xl-0 pb-3"> <div class="col-12 col-md-6 offset-md-1 col-xl-4 offset-xl-0 pb-3">
<div class="form-floating"> <div class=form-floating>
<select name="DefaultPage" id="defaultPage" class="form-control" required> <select name=DefaultPage id=defaultPage class=form-control required>
{%- for pg in pages %} {%- for pg in pages %}
<option value="{{ pg[0] }}"{% if pg[0] == model.default_page %} selected="selected"{% endif %}> <option value="{{ pg[0] }}"{% if pg[0] == model.default_page %} selected{% endif %}>
{{ pg[1] }} {{ pg[1] }}
</option> </option>
{%- endfor %} {%- endfor %}
</select> </select>
<label for="defaultPage">Default Page</label> <label for=defaultPage>Default Page</label>
</div> </div>
</div> </div>
<div class="col-12 col-md-4 col-xl-2 pb-3"> <div class="col-12 col-md-4 col-xl-2 pb-3">
<div class="form-floating"> <div class=form-floating>
<input type="number" name="PostsPerPage" id="postsPerPage" class="form-control" min="0" max="50" required <input type=number name=PostsPerPage id=postsPerPage class=form-control min=0 max=50 required
value="{{ model.posts_per_page }}"> value="{{ model.posts_per_page }}">
<label for="postsPerPage">Posts per Page</label> <label for=postsPerPage>Posts per Page</label>
</div> </div>
</div> </div>
</div> </div>
<div class="row"> <div class=row>
<div class="col-12 col-md-4 col-xl-3 offset-xl-2 pb-3"> <div class="col-12 col-md-4 col-xl-3 offset-xl-2 pb-3">
<div class="form-floating"> <div class=form-floating>
<input type="text" name="TimeZone" id="timeZone" class="form-control" placeholder="Time Zone" required <input type=text name=TimeZone id=timeZone class=form-control placeholder="Time Zone" required
value="{{ model.time_zone }}"> value="{{ model.time_zone }}">
<label for="timeZone">Time Zone</label> <label for=timeZone>Time Zone</label>
</div> </div>
</div> </div>
<div class="col-12 col-md-4 col-xl-2"> <div class="col-12 col-md-4 col-xl-2">
<div class="form-check form-switch"> <div class="form-check form-switch">
<input type="checkbox" name="AutoHtmx" id="autoHtmx" class="form-check-input" value="true" <input type=checkbox name=AutoHtmx id=autoHtmx class=form-check-input value=true
{%- if model.auto_htmx %} checked="checked"{% endif %}> {%- if model.auto_htmx %} checked{% endif %}>
<label for="autoHtmx" class="form-check-label">Auto-Load htmx</label> <label for=autoHtmx class=form-check-label>Auto-Load htmx</label>
</div> </div>
<span class="form-text fst-italic"> <span class="form-text fst-italic">
<a href="https://htmx.org" target="_blank" rel="noopener">What is this?</a> <a href=https://htmx.org target=_blank rel=noopener>What is this?</a>
</span> </span>
</div> </div>
<div class="col-12 col-md-4 col-xl-3 pb-3"> <div class="col-12 col-md-4 col-xl-3 pb-3">
<div class="form-floating"> <div class=form-floating>
<select name="Uploads" id="uploads" class="form-control"> <select name=Uploads id=uploads class=form-control>
{%- for it in upload_values %} {%- for it in upload_values %}
<option value="{{ it[0] }}"{% if model.uploads == it[0] %} selected{% endif %}>{{ it[1] }}</option> <option value="{{ it[0] }}"{% if model.uploads == it[0] %} selected{% endif %}>{{ it[1] }}</option>
{%- endfor %} {%- endfor %}
</select> </select>
<label for="uploads">Default Upload Destination</label> <label for=uploads>Default Upload Destination</label>
</div> </div>
</div> </div>
</div> </div>
<div class="row pb-3"> <div class="row pb-3">
<div class="col text-center"> <div class="col text-center">
<button type="submit" class="btn btn-primary">Save Changes</button> <button type=submit class="btn btn-primary">Save Changes</button>
</div> </div>
</div> </div>
</div> </div>
</form> </form>
</fieldset> </fieldset>
<fieldset id="users" class="container mb-3 pb-0"> <fieldset id=users class="container mb-3 pb-0">
<legend>Users</legend> <legend>Users</legend>
{% include_template "_user-list-columns" %} {% include_template "_user-list-columns" %}
<a href="{{ "admin/settings/user/new/edit" | relative_link }}" class="btn btn-primary btn-sm mb-3" <a href="{{ "admin/settings/user/new/edit" | relative_link }}" class="btn btn-primary btn-sm mb-3"
hx-target="#user_new"> hx-target=#user_new>
Add a New User Add a New User
</a> </a>
<div class="container g-0"> <div class="container g-0">
<div class="row mwl-table-heading"> <div class="row mwl-table-heading">
<div class="{{ user_col }}">User<span class="d-md-none">; Full Name / E-mail; Last Log On</span></div> <div class="{{ user_col }}">User<span class=d-md-none>; Full Name / E-mail; Last Log On</span></div>
<div class="{{ email_col }} d-none d-md-inline-block">Full Name / E-mail</div> <div class="{{ email_col }} d-none d-md-inline-block">Full Name / E-mail</div>
<div class="{{ cre8_col }}">Created</div> <div class="{{ cre8_col }}">Created</div>
<div class="{{ last_col }} d-none d-md-block">Last Log On</div> <div class="{{ last_col }} d-none d-md-block">Last Log On</div>
@ -124,58 +124,60 @@
</div> </div>
{{ user_list }} {{ user_list }}
</fieldset> </fieldset>
<fieldset id="rss-settings" class="container mb-3 pb-0"> <fieldset id=rss-settings class="container mb-3 pb-0">
<legend>RSS Settings</legend> <legend>RSS Settings</legend>
<form action="{{ "admin/settings/rss" | relative_link }}" method="post"> <form action="{{ "admin/settings/rss" | relative_link }}" method=post>
<input type="hidden" name="{{ csrf.form_field_name }}" value="{{ csrf.request_token }}"> <input type=hidden name="{{ csrf.form_field_name }}" value="{{ csrf.request_token }}">
<div class="container"> <div class=container>
<div class="row pb-3"> <div class="row pb-3">
<div class="col col-xl-8 offset-xl-2"> <div class="col col-xl-8 offset-xl-2">
<fieldset class="d-flex justify-content-evenly flex-row"> <fieldset class="d-flex justify-content-evenly flex-row">
<legend>Feeds Enabled</legend> <legend>Feeds Enabled</legend>
<div class="form-check form-switch pb-2"> <div class="form-check form-switch pb-2">
<input type="checkbox" name="IsFeedEnabled" id="feedEnabled" class="form-check-input" value="true" <input type=checkbox name=IsFeedEnabled id=feedEnabled class=form-check-input value=true
{%- if rss_model.is_feed_enabled %} checked="checked"{% endif %}> {%- if rss_model.is_feed_enabled %} checked{% endif %}>
<label for="feedEnabled" class="form-check-label">All Posts</label> <label for=feedEnabled class=form-check-label>All Posts</label>
</div> </div>
<div class="form-check form-switch pb-2"> <div class="form-check form-switch pb-2">
<input type="checkbox" name="IsCategoryEnabled" id="categoryEnabled" class="form-check-input" <input type=checkbox name=IsCategoryEnabled id=categoryEnabled class=form-check-input value=true
value="true" {%- if rss_model.is_category_enabled %} checked="checked"{% endif %}> {%- if rss_model.is_category_enabled %} checked{% endif %}>
<label for="categoryEnabled" class="form-check-label">Posts by Category</label> <label for=categoryEnabled class=form-check-label>Posts by Category</label>
</div> </div>
<div class="form-check form-switch pb-2"> <div class="form-check form-switch pb-2">
<input type="checkbox" name="IsTagEnabled" id="tagEnabled" class="form-check-input" value="true" <input type=checkbox name=IsTagEnabled id=tagEnabled class=form-check-input value=true
{%- if rss_model.tag_enabled %} checked="checked"{% endif %}> {%- if rss_model.tag_enabled %} checked{% endif %}>
<label for="tagEnabled" class="form-check-label">Posts by Tag</label> <label for=tagEnabled class=form-check-label>Posts by Tag</label>
</div> </div>
</fieldset> </fieldset>
</div> </div>
</div> </div>
<div class="row"> <div class=row>
<div class="col-12 col-sm-6 col-md-3 col-xl-2 offset-xl-2 pb-3"> <div class="col-12 col-sm-6 col-md-3 col-xl-2 offset-xl-2 pb-3">
<div class="form-floating"> <div class=form-floating>
<input type="text" name="FeedName" id="feedName" class="form-control" placeholder="Feed File Name" <input type=text name=FeedName id=feedName class=form-control placeholder="Feed File Name"
value="{{ rss_model.feed_name }}"> value="{{ rss_model.feed_name }}">
<label for="feedName">Feed File Name</label> <label for=feedName>Feed File Name</label>
<span class="form-text">Default is <code>feed.xml</code></span> <span class=form-text>Default is <code>feed.xml</code></span>
</div> </div>
</div> </div>
<div class="col-12 col-sm-6 col-md-4 col-xl-2 pb-3"> <div class="col-12 col-sm-6 col-md-4 col-xl-2 pb-3">
<div class="form-floating"> <div class=form-floating>
<input type="number" name="ItemsInFeed" id="itemsInFeed" class="form-control" min="0" <input type=number name=ItemsInFeed id=itemsInFeed class=form-control min=0 placeholder="Items in Feed"
placeholder="Items in Feed" required value="{{ rss_model.items_in_feed }}"> required value="{{ rss_model.items_in_feed }}">
<label for="itemsInFeed">Items in Feed</label> <label for=itemsInFeed>Items in Feed</label>
<span class="form-text">Set to &ldquo;0&rdquo; to use &ldquo;Posts per Page&rdquo; setting ({{ web_log.posts_per_page }})</span> <span class=form-text>
Set to &ldquo;0&rdquo; to use &ldquo;Posts per Page&rdquo; setting ({{ web_log.posts_per_page }})
</span>
</div> </div>
</div> </div>
<div class="col-12 col-md-5 col-xl-4 pb-3"> <div class="col-12 col-md-5 col-xl-4 pb-3">
<div class="form-floating"> <div class=form-floating>
<input type="text" name="Copyright" id="copyright" class="form-control" placeholder="Copyright String" <input type=text name=Copyright id=copyright class=form-control placeholder="Copyright String"
value="{{ rss_model.copyright }}"> value="{{ rss_model.copyright }}">
<label for="copyright">Copyright String</label> <label for=copyright>Copyright String</label>
<span class="form-text"> <span class=form-text>
Can be a Can be a
<a href="https://creativecommons.org/share-your-work/" target="_blank" rel="noopener"> <a href="https://creativecommons.org/share-your-work/" target=_blank rel=noopener>
Creative Commons license string Creative Commons license string
</a> </a>
</span> </span>
@ -184,7 +186,7 @@
</div> </div>
<div class="row pb-3"> <div class="row pb-3">
<div class="col text-center"> <div class="col text-center">
<button type="submit" class="btn btn-primary">Save Changes</button> <button type=submit class="btn btn-primary">Save Changes</button>
</div> </div>
</div> </div>
</div> </div>
@ -196,13 +198,13 @@
</a> </a>
{%- assign feed_count = custom_feeds | size -%} {%- assign feed_count = custom_feeds | size -%}
{%- if feed_count > 0 %} {%- if feed_count > 0 %}
<form method="post" class="container g-0" hx-target="body"> <form method=post class="container g-0" hx-target=body>
{%- assign source_col = "col-12 col-md-6" -%} {%- assign source_col = "col-12 col-md-6" -%}
{%- assign path_col = "col-12 col-md-6" -%} {%- assign path_col = "col-12 col-md-6" -%}
<input type="hidden" name="{{ csrf.form_field_name }}" value="{{ csrf.request_token }}"> <input type=hidden name="{{ csrf.form_field_name }}" value="{{ csrf.request_token }}">
<div class="row mwl-table-heading"> <div class="row mwl-table-heading">
<div class="{{ source_col }}"> <div class="{{ source_col }}">
<span class="d-md-none">Feed</span><span class="d-none d-md-inline">Source</span> <span class=d-md-none>Feed</span><span class="d-none d-md-inline">Source</span>
</div> </div>
<div class="{{ path_col }} d-none d-md-inline-block">Relative Path</div> <div class="{{ path_col }} d-none d-md-inline-block">Relative Path</div>
</div> </div>
@ -213,33 +215,33 @@
{%- if feed.is_podcast %} &nbsp; <span class="badge bg-primary">PODCAST</span>{% endif %}<br> {%- if feed.is_podcast %} &nbsp; <span class="badge bg-primary">PODCAST</span>{% endif %}<br>
<small> <small>
{%- assign feed_url = "admin/settings/rss/" | append: feed.id -%} {%- assign feed_url = "admin/settings/rss/" | append: feed.id -%}
<a href="{{ feed.path | relative_link }}" target="_blank">View Feed</a> <a href="{{ feed.path | relative_link }}" target=_blank>View Feed</a>
<span class="text-muted"> &bull; </span> <span class=text-muted> &bull; </span>
<a href="{{ feed_url | append: "/edit" | relative_link }}">Edit</a> <a href="{{ feed_url | append: "/edit" | relative_link }}">Edit</a>
<span class="text-muted"> &bull; </span> <span class=text-muted> &bull; </span>
{%- assign feed_del_link = feed_url | append: "/delete" | relative_link -%} {%- assign feed_del_link = feed_url | append: "/delete" | relative_link -%}
<a href="{{ feed_del_link }}" hx-post="{{ feed_del_link }}" class="text-danger" <a href="{{ feed_del_link }}" hx-post="{{ feed_del_link }}" class=text-danger
hx-confirm="Are you sure you want to delete the custom RSS feed based on {{ feed.source | strip_html | escape }}? This action cannot be undone."> hx-confirm="Are you sure you want to delete the custom RSS feed based on {{ feed.source | strip_html | escape }}? This action cannot be undone.">
Delete Delete
</a> </a>
</small> </small>
</div> </div>
<div class="{{ path_col }}"> <div class="{{ path_col }}">
<small class="d-md-none">Served at {{ feed.path }}</small> <small class=d-md-none>Served at {{ feed.path }}</small>
<span class="d-none d-md-inline">{{ feed.path }}</span> <span class="d-none d-md-inline">{{ feed.path }}</span>
</div> </div>
</div> </div>
{%- endfor %} {%- endfor %}
</form> </form>
{%- else %} {%- else %}
<p class="text-muted fst-italic text-center">No custom feeds defined</p> <p class="text-muted fst-italic text-center">No custom feeds defined
{%- endif %} {%- endif %}
</fieldset> </fieldset>
</fieldset> </fieldset>
<fieldset id="tag-mappings" class="container mb-3 pb-0"> <fieldset id="tag-mappings" class="container mb-3 pb-0">
<legend>Tag Mappings</legend> <legend>Tag Mappings</legend>
<a href="{{ "admin/settings/tag-mapping/new/edit" | relative_link }}" class="btn btn-primary btn-sm mb-3" <a href="{{ "admin/settings/tag-mapping/new/edit" | relative_link }}" class="btn btn-primary btn-sm mb-3"
hx-target="#tag_new"> hx-target=#tag_new>
Add a New Tag Mapping Add a New Tag Mapping
</a> </a>
{{ tag_mapping_list }} {{ tag_mapping_list }}

View File

@ -1,30 +1,27 @@
<h5 class="my-3">{{ page_title }}</h5> <h5 class=my-3>{{ page_title }}</h5>
<form hx-post="{{ "admin/settings/tag-mapping/save" | relative_link }}" method="post" class="container" <form hx-post="{{ "admin/settings/tag-mapping/save" | relative_link }}" method=post class=container hx-target=#tagList
hx-target="#tagList" hx-swap="outerHTML show:window:top"> hx-swap="outerHTML show:window:top">
<input type="hidden" name="{{ csrf.form_field_name }}" value="{{ csrf.request_token }}"> <input type=hidden name="{{ csrf.form_field_name }}" value="{{ csrf.request_token }}">
<input type="hidden" name="Id" value="{{ model.id }}"> <input type=hidden name=Id value="{{ model.id }}">
<div class="row mb-3"> <div class="row mb-3">
<div class="col-6 col-lg-4 offset-lg-2"> <div class="col-6 col-lg-4 offset-lg-2">
<div class="form-floating"> <div class=form-floating>
<input type="text" name="Tag" id="tag" class="form-control" placeholder="Tag" autofocus required <input type=text name=Tag id=tag class=form-control placeholder=Tag autofocus required value="{{ model.tag }}">
value="{{ model.tag }}"> <label for=tag>Tag</label>
<label for="tag">Tag</label>
</div> </div>
</div> </div>
<div class="col-6 col-lg-4"> <div class="col-6 col-lg-4">
<div class="form-floating"> <div class=form-floating>
<input type="text" name="UrlValue" id="urlValue" class="form-control" placeholder="URL Value" required <input type=text name=UrlValue id=urlValue class=form-control placeholder="URL Value" required
value="{{ model.url_value }}"> value="{{ model.url_value }}">
<label for="urlValue">URL Value</label> <label for=urlValue>URL Value</label>
</div> </div>
</div> </div>
</div> </div>
<div class="row mb-3"> <div class="row mb-3">
<div class="col text-center"> <div class="col text-center">
<button type="submit" class="btn btn-sm btn-primary">Save Changes</button> <button type=submit class="btn btn-sm btn-primary">Save Changes</button>
<a href="{{ "admin/settings/tag-mappings" | relative_link }}" class="btn btn-sm btn-secondary ms-3"> <a href="{{ "admin/settings/tag-mappings" | relative_link }}" class="btn btn-sm btn-secondary ms-3">Cancel</a>
Cancel
</a>
</div> </div>
</div> </div>
</form> </form>

View File

@ -1,17 +1,17 @@
<div id="tagList" class="container"> <div id=tagList class=container>
<div class="row"> <div class=row>
<div class="col"> <div class=col>
{%- assign map_count = mappings | size -%} {%- assign map_count = mappings | size -%}
{% if map_count > 0 -%} {% if map_count > 0 -%}
<div class="container"> <div class=container>
<div class="row mwl-table-heading"> <div class="row mwl-table-heading">
<div class="col">Tag</div> <div class=col>Tag</div>
<div class="col">URL Value</div> <div class=col>URL Value</div>
</div> </div>
</div> </div>
<form method="post" class="container" hx-target="#tagList" hx-swap="outerHTML"> <form method=post class=container hx-target=#tagList hx-swap=outerHTML>
<input type="hidden" name="{{ csrf.form_field_name }}" value="{{ csrf.request_token }}"> <input type=hidden name="{{ csrf.form_field_name }}" value="{{ csrf.request_token }}">
<div class="row mwl-table-detail" id="tag_new"></div> <div class="row mwl-table-detail" id=tag_new></div>
{% for map in mappings -%} {% for map in mappings -%}
{%- assign map_id = mapping_ids | value: map.tag -%} {%- assign map_id = mapping_ids | value: map.tag -%}
<div class="row mwl-table-detail" id="tag_{{ map_id }}"> <div class="row mwl-table-detail" id="tag_{{ map_id }}">
@ -23,22 +23,20 @@
hx-swap="innerHTML show:#tag_{{ map_id }}:top"> hx-swap="innerHTML show:#tag_{{ map_id }}:top">
Edit Edit
</a> </a>
<span class="text-muted"> &bull; </span> <span class=text-muted> &bull; </span>
{%- assign map_del_link = map_url | append: "/delete" | relative_link -%} {%- assign map_del_link = map_url | append: "/delete" | relative_link -%}
<a href="{{ map_del_link }}" hx-post="{{ map_del_link }}" class="text-danger" <a href="{{ map_del_link }}" hx-post="{{ map_del_link }}" class=text-danger
hx-confirm="Are you sure you want to delete the mapping for &ldquo;{{ map.tag }}&rdquo;? This action cannot be undone."> hx-confirm="Are you sure you want to delete the mapping for &ldquo;{{ map.tag }}&rdquo;? This action cannot be undone.">
Delete Delete
</a> </a>
</small> </small>
</div> </div>
<div class="col">{{ map.url_value }}</div> <div class=col>{{ map.url_value }}</div>
</div> </div>
{%- endfor %} {%- endfor %}
</form> </form>
{%- else -%} {%- else -%}
<div id="tag_new"> <div id=tag_new><p class="text-muted text-center fst-italic">This web log has no tag mappings</div>
<p class="text-muted text-center fst-italic">This web log has no tag mappings</p>
</div>
{%- endif %} {%- endif %}
</div> </div>
</div> </div>

View File

@ -1,5 +1,5 @@
<form method="post" id="themeList" class="container g-0" hx-target="this" hx-swap="outerHTML show:window:top"> <form method=post id=themeList class="container g-0" hx-target=this hx-swap="outerHTML show:window:top">
<input type="hidden" name="{{ csrf.form_field_name }}" value="{{ csrf.request_token }}"> <input type=hidden name="{{ csrf.form_field_name }}" value="{{ csrf.request_token }}">
{% include_template "_theme-list-columns" %} {% include_template "_theme-list-columns" %}
{% for theme in themes -%} {% for theme in themes -%}
<div class="row mwl-table-detail" id="theme_{{ theme.id }}"> <div class="row mwl-table-detail" id="theme_{{ theme.id }}">
@ -12,11 +12,11 @@
<span class="badge bg-warning text-dark ms-2">NOT ON DISK</span> <span class="badge bg-warning text-dark ms-2">NOT ON DISK</span>
{%- endunless %}<br> {%- endunless %}<br>
<small> <small>
<span class="text-muted">v{{ theme.version }}</span> <span class=text-muted>v{{ theme.version }}</span>
{% unless theme.is_in_use or theme.id == "default" %} {% unless theme.is_in_use or theme.id == "default" %}
<span class="text-muted"> &bull; </span> <span class=text-muted> &bull; </span>
{%- assign theme_del_link = "admin/theme/" | append: theme.id | append: "/delete" | relative_link -%} {%- assign theme_del_link = "admin/theme/" | append: theme.id | append: "/delete" | relative_link -%}
<a href="{{ theme_del_link }}" hx-post="{{ theme_del_link }}" class="text-danger" <a href="{{ theme_del_link }}" hx-post="{{ theme_del_link }}" class=text-danger
hx-confirm="Are you sure you want to delete the theme &ldquo;{{ theme.name }}&rdquo;? This action cannot be undone."> hx-confirm="Are you sure you want to delete the theme &ldquo;{{ theme.name }}&rdquo;? This action cannot be undone.">
Delete Delete
</a> </a>

View File

@ -1,26 +1,26 @@
<div class="col"> <div class=col>
<h5 class="mt-2">{{ page_title }}</h5> <h5 class=mt-2>{{ page_title }}</h5>
<form action="{{ "admin/theme/new" | relative_link }}" method="post" class="container" enctype="multipart/form-data" <form action="{{ "admin/theme/new" | relative_link }}" method=post class=container enctype=multipart/form-data
hx-boost="false"> hx-boost=false>
<input type="hidden" name="{{ csrf.form_field_name }}" value="{{ csrf.request_token }}"> <input type=hidden name="{{ csrf.form_field_name }}" value="{{ csrf.request_token }}">
<div class="row"> <div class=row>
<div class="col-12 col-sm-6 pb-3"> <div class="col-12 col-sm-6 pb-3">
<div class="form-floating"> <div class=form-floating>
<input type="file" id="file" name="file" class="form-control" accept=".zip" placeholder="Theme File" required> <input type=file id=file name=file class=form-control accept=.zip placeholder="Theme File" required>
<label for="file">Theme File</label> <label for=file>Theme File</label>
</div> </div>
</div> </div>
<div class="col-12 col-sm-6 pb-3 d-flex justify-content-center align-items-center"> <div class="col-12 col-sm-6 pb-3 d-flex justify-content-center align-items-center">
<div class="form-check form-switch pb-2"> <div class="form-check form-switch pb-2">
<input type="checkbox" name="DoOverwrite" id="doOverwrite" class="form-check-input" value="true"> <input type=checkbox name=DoOverwrite id=doOverwrite class=form-check-input value=true>
<label for="doOverwrite" class="form-check-label">Overwrite</label> <label for=doOverwrite class=form-check-label>Overwrite</label>
</div> </div>
</div> </div>
</div> </div>
<div class="row pb-3"> <div class="row pb-3">
<div class="col text-center"> <div class="col text-center">
<button type="submit" class="btn btn-sm btn-primary">Upload Theme</button> <button type=submit class="btn btn-sm btn-primary">Upload Theme</button>
<button type="button" class="btn btn-sm btn-secondary ms-3" <button type=button class="btn btn-sm btn-secondary ms-3"
onclick="document.getElementById('theme_new').innerHTML = ''"> onclick="document.getElementById('theme_new').innerHTML = ''">
Cancel Cancel
</button> </button>

View File

@ -1,24 +1,24 @@
<h2 class="my-3">{{ page_title }}</h2> <h2 class=my-3>{{ page_title }}</h2>
<article> <article>
{%- capture base_url %}{{ "" | relative_link }}{% endcapture -%} {%- capture base_url %}{{ "" | relative_link }}{% endcapture -%}
{%- capture upload_path %}upload/{{ web_log.slug }}/{% endcapture -%} {%- capture upload_path %}upload/{{ web_log.slug }}/{% endcapture -%}
{%- capture upload_base %}{{ base_url }}{{ upload_path }}{% endcapture -%} {%- capture upload_base %}{{ base_url }}{{ upload_path }}{% endcapture -%}
<a href="{{ "admin/upload/new" | relative_link }}" class="btn btn-primary btn-sm mb-3">Upload a New File</a> <a href="{{ "admin/upload/new" | relative_link }}" class="btn btn-primary btn-sm mb-3">Upload a New File</a>
<form method="post" class="container" hx-target="body"> <form method=post class=container hx-target=body>
<input type="hidden" name="{{ csrf.form_field_name }}" value="{{ csrf.request_token }}"> <input type=hidden name="{{ csrf.form_field_name }}" value="{{ csrf.request_token }}">
<div class="row"> <div class=row>
<div class="col text-center"><em class="text-muted">Uploaded files served from</em><br>{{ upload_base }}</div> <div class="col text-center"><em class=text-muted>Uploaded files served from</em><br>{{ upload_base }}</div>
</div> </div>
{%- assign file_count = files | size -%} {%- assign file_count = files | size -%}
{%- if file_count > 0 %} {%- if file_count > 0 %}
<div class="row mwl-table-heading"> <div class="row mwl-table-heading">
<div class="col-6">File Name</div> <div class=col-6>File Name</div>
<div class="col-3">Path</div> <div class=col-3>Path</div>
<div class="col-3">File Date/Time</div> <div class=col-3>File Date/Time</div>
</div> </div>
{% for file in files %} {% for file in files %}
<div class="row mwl-table-detail"> <div class="row mwl-table-detail">
<div class="col-6"> <div class=col-6>
{%- capture badge_class -%} {%- capture badge_class -%}
{%- if file.source == "Disk" %}secondary{% else %}primary{% endif -%} {%- if file.source == "Disk" %}secondary{% else %}primary{% endif -%}
{%- endcapture -%} {%- endcapture -%}
@ -28,26 +28,25 @@
{{ file.name }}<br> {{ file.name }}<br>
<small> <small>
<a href="{{ upload_base | append: path_and_name }}" target="_blank">View File</a> <a href="{{ upload_base | append: path_and_name }}" target="_blank">View File</a>
<span class="text-muted"> &bull; Copy </span> <span class=text-muted> &bull; Copy </span>
<a href="{{ blog_rel | absolute_link }}" hx-boost="false" <a href="{{ blog_rel | absolute_link }}" hx-boost=false
onclick="return Admin.copyText('{{ blog_rel | absolute_link }}', this)"> onclick="return Admin.copyText('{{ blog_rel | absolute_link }}', this)">
Absolute Absolute
</a> </a>
<span class="text-muted"> | </span> <span class=text-muted> | </span>
<a href="{{ blog_rel | relative_link }}" hx-boost="false" <a href="{{ blog_rel | relative_link }}" hx-boost=false
onclick="return Admin.copyText('{{ blog_rel | relative_link }}', this)"> onclick="return Admin.copyText('{{ blog_rel | relative_link }}', this)">
Relative Relative
</a> </a>
{%- unless base_url == "/" %} {%- unless base_url == "/" %}
<span class="text-muted"> | </span> <span class=text-muted> | </span>
<a href="{{ blog_rel }}" hx-boost="false" <a href="{{ blog_rel }}" hx-boost=false onclick="return Admin.copyText('/{{ blog_rel }}', this)">
onclick="return Admin.copyText('/{{ blog_rel }}', this)">
For Post For Post
</a> </a>
{%- endunless %} {%- endunless %}
<span class="text-muted"> Link</span> <span class=text-muted> Link</span>
{% if is_web_log_admin %} {% if is_web_log_admin %}
<span class="text-muted"> &bull; </span> <span class=text-muted> &bull; </span>
{%- capture delete_url -%} {%- capture delete_url -%}
{%- if file.source == "Disk" -%} {%- if file.source == "Disk" -%}
admin/upload/delete/{{ path_and_name }} admin/upload/delete/{{ path_and_name }}
@ -57,18 +56,18 @@
{%- endcapture -%} {%- endcapture -%}
<a href="{{ delete_url | relative_link }}" hx-post="{{ delete_url | relative_link }}" <a href="{{ delete_url | relative_link }}" hx-post="{{ delete_url | relative_link }}"
hx-confirm="Are you sure you want to delete {{ file.name }}? This action cannot be undone." hx-confirm="Are you sure you want to delete {{ file.name }}? This action cannot be undone."
class="text-danger">Delete</a> class=text-danger>Delete</a>
{% endif %} {% endif %}
</small> </small>
</div> </div>
<div class="col-3">{{ file.path }}</div> <div class=col-3>{{ file.path }}</div>
<div class="col-3"> <div class=col-3>
{% if file.updated_on %}{{ file.updated_on.value | date: "yyyy-MM-dd/HH:mm" }}{% else %}--{% endif %} {% if file.updated_on %}{{ file.updated_on.value | date: "yyyy-MM-dd/HH:mm" }}{% else %}--{% endif %}
</div> </div>
</div> </div>
{% endfor %} {% endfor %}
{%- else -%} {%- else -%}
<div class="row"> <div class=row>
<div class="col text-muted fst-italic text-center"><br>This web log has uploaded files</div> <div class="col text-muted fst-italic text-center"><br>This web log has uploaded files</div>
</div> </div>
{%- endif %} {%- endif %}

View File

@ -1,31 +1,29 @@
<h2>{{ page_title }}</h2> <h2>{{ page_title }}</h2>
<article> <article>
<form action="{{ "admin/upload/save" | relative_link }}" <form action="{{ "admin/upload/save" | relative_link }}" method=post class=container enctype=multipart/form-data
method="post" class="container" enctype="multipart/form-data" hx-boost="false"> hx-boost=false>
<input type="hidden" name="{{ csrf.form_field_name }}" value="{{ csrf.request_token }}"> <input type=hidden name="{{ csrf.form_field_name }}" value="{{ csrf.request_token }}">
<div class="row"> <div class=row>
<div class="col-12 col-md-6 pb-3"> <div class="col-12 col-md-6 pb-3">
<div class="form-floating"> <div class=form-floating>
<input type="file" id="file" name="File" class="form-control" placeholder="File" required> <input type=file id=file name=File class=form-control placeholder=File required>
<label for="file">File to Upload</label> <label for=file>File to Upload</label>
</div> </div>
</div> </div>
<div class="col-12 col-md-6 pb-3 d-flex align-self-center justify-content-around"> <div class="col-12 col-md-6 pb-3 d-flex align-self-center justify-content-around">
Destination<br> Destination<br>
<div class="btn-group" role="group" aria-label="Upload destination button group"> <div class=btn-group role=group aria-label="Upload destination button group">
<input type="radio" name="Destination" id="destination_db" class="btn-check" value="Database" <input type=radio name=Destination id=destination_db class=btn-check value=Database
{%- if destination == "Database" %} checked="checked"{% endif %}> {%- if destination == "Database" %} checked{% endif %}>
<label class="btn btn-outline-primary" for="destination_db">Database</label> <label class="btn btn-outline-primary" for=destination_db>Database</label>
<input type="radio" name="Destination" id="destination_disk" class="btn-check" value="Disk" <input type=radio name=Destination id=destination_disk class=btn-check value=Disk
{%- if destination == "Disk" %} checked="checked"{% endif %}> {%- if destination == "Disk" %} checked{% endif %}>
<label class="btn btn-outline-secondary" for="destination_disk">Disk</label> <label class="btn btn-outline-secondary" for=destination_disk>Disk</label>
</div> </div>
</div> </div>
</div> </div>
<div class="row pb-3"> <div class="row pb-3">
<div class="col text-center"> <div class="col text-center"><button type=submit class="btn btn-primary">Upload File</button></div>
<button type="submit" class="btn btn-primary">Upload File</button>
</div>
</div> </div>
</form> </form>
</article> </article>

View File

@ -1,84 +1,81 @@
<div class="col-12"> <div class=col-12>
<h5 class="my-3">{{ page_title }}</h5> <h5 class=my-3>{{ page_title }}</h5>
<form hx-post="{{ "admin/settings/user/save" | relative_link }}" method="post" class="container" <form hx-post="{{ "admin/settings/user/save" | relative_link }}" method=post class=container hx-target=#userList
hx-target="#userList" hx-swap="outerHTML show:window:top"> hx-swap="outerHTML show:window:top">
<input type="hidden" name="{{ csrf.form_field_name }}" value="{{ csrf.request_token }}"> <input type=hidden name="{{ csrf.form_field_name }}" value="{{ csrf.request_token }}">
<input type="hidden" name="Id" value="{{ model.id }}"> <input type=hidden name=Id value="{{ model.id }}">
<div class="row"> <div class=row>
<div class="col-12 col-md-5 col-lg-3 col-xxl-2 offset-xxl-1 mb-3"> <div class="col-12 col-md-5 col-lg-3 col-xxl-2 offset-xxl-1 mb-3">
<div class="form-floating"> <div class=form-floating>
<select name="AccessLevel" id="accessLevel" class="form-control" required autofocus> <select name=AccessLevel id=accessLevel class=form-control required autofocus>
{%- for level in access_levels %} {%- for level in access_levels %}
<option value="{{ level[0] }}"{% if model.access_level == level[0] %} selected{% endif %}> <option value="{{ level[0] }}"{% if model.access_level == level[0] %} selected{% endif %}>
{{ level[1] }} {{ level[1] }}
</option> </option>
{%- endfor %} {%- endfor %}
</select> </select>
<label for="accessLevel">Access Level</label> <label for=accessLevel>Access Level</label>
</div> </div>
</div> </div>
<div class="col-12 col-md-7 col-lg-4 col-xxl-3 mb-3"> <div class="col-12 col-md-7 col-lg-4 col-xxl-3 mb-3">
<div class="form-floating"> <div class=form-floating>
<input type="email" name="Email" id="email" class="form-control" placeholder="E-mail" required <input type=email name=Email id=email class=form-control placeholder=E-mail required
value="{{ model.email | escape }}"> value="{{ model.email | escape }}">
<label for="email">E-mail Address</label> <label for=email>E-mail Address</label>
</div> </div>
</div> </div>
<div class="col-12 col-lg-5 mb-3"> <div class="col-12 col-lg-5 mb-3">
<div class="form-floating"> <div class=form-floating>
<input type="text" name="Url" id="url" class="form-control" placeholder="URL" <input type=text name=Url id=url class=form-control placeholder=URL value="{{ model.url | escape }}">
value="{{ model.url | escape }}"> <label for=url>User&rsquo;s Personal URL</label>
<label for="url">User&rsquo;s Personal URL</label>
</div> </div>
</div> </div>
</div> </div>
<div class="row mb-3"> <div class="row mb-3">
<div class="col-12 col-md-6 col-lg-4 col-xl-3 offset-xl-1 pb-3"> <div class="col-12 col-md-6 col-lg-4 col-xl-3 offset-xl-1 pb-3">
<div class="form-floating"> <div class=form-floating>
<input type="text" name="FirstName" id="firstName" class="form-control" placeholder="First" required <input type=text name=FirstName id=firstName class=form-control placeholder=First required
value="{{ model.first_name | escape }}"> value="{{ model.first_name | escape }}">
<label for="firstName">First Name</label> <label for=firstName>First Name</label>
</div> </div>
</div> </div>
<div class="col-12 col-md-6 col-lg-4 col-xl-3 pb-3"> <div class="col-12 col-md-6 col-lg-4 col-xl-3 pb-3">
<div class="form-floating"> <div class=form-floating>
<input type="text" name="LastName" id="lastName" class="form-control" placeholder="Last" required <input type=text name=LastName id=lastName class=form-control placeholder=Last required
value="{{ model.last_name | escape }}"> value="{{ model.last_name | escape }}">
<label for="lastName">Last Name</label> <label for=lastName>Last Name</label>
</div> </div>
</div> </div>
<div class="col-12 col-md-6 offset-md-3 col-lg-4 offset-lg-0 col-xl-3 offset-xl-1 pb-3"> <div class="col-12 col-md-6 offset-md-3 col-lg-4 offset-lg-0 col-xl-3 offset-xl-1 pb-3">
<div class="form-floating"> <div class=form-floating>
<input type="text" name="PreferredName" id="preferredName" class="form-control" <input type=text name=PreferredName id=preferredName class=form-control placeholder=Preferred required
placeholder="Preferred" required value="{{ model.preferred_name | escape }}"> value="{{ model.preferred_name | escape }}">
<label for="preferredName">Preferred Name</label> <label for=preferredName>Preferred Name</label>
</div> </div>
</div> </div>
</div> </div>
<div class="row mb-3"> <div class="row mb-3">
<div class="col-12 col-xl-10 offset-xl-1"> <div class="col-12 col-xl-10 offset-xl-1">
<fieldset class="p-2"> <fieldset class=p-2>
<legend class="ps-1">{% unless model.is_new %}Change {% endunless %}Password</legend> <legend class=ps-1>{% unless model.is_new %}Change {% endunless %}Password</legend>
{% unless model.is_new %} {% unless model.is_new %}
<div class="row"> <div class=row>
<div class="col"> <div class=col><p class=form-text>Optional; leave blank not change the user&rsquo;s password</div>
<p class="form-text">Optional; leave blank not change the user&rsquo;s password</p>
</div>
</div> </div>
{% endunless %} {% endunless %}
<div class="row"> <div class=row>
<div class="col-12 col-md-6 pb-3"> <div class="col-12 col-md-6 pb-3">
<div class="form-floating"> <div class=form-floating>
<input type="password" name="Password" id="password" class="form-control" <input type=password name=Password id=password class=form-control placeholder=Password
placeholder="Password"{% if model.is_new %} required{% endif %}> {%- if model.is_new %} required{% endif %}>
<label for="password">{% unless model.is_new %}New {% endunless %}Password</label> <label for=password>{% unless model.is_new %}New {% endunless %}Password</label>
</div> </div>
</div> </div>
<div class="col-12 col-md-6 pb-3"> <div class="col-12 col-md-6 pb-3">
<div class="form-floating"> <div class=form-floating>
<input type="password" name="PasswordConfirm" id="passwordConfirm" class="form-control" <input type=password name=PasswordConfirm id=passwordConfirm class=form-control placeholder=Confirm
placeholder="Confirm"{% if model.is_new %} required{% endif %}> {%- if model.is_new %} required{% endif %}>
<label for="passwordConfirm">Confirm{% unless model.is_new %} New{% endunless %} Password</label> <label for=passwordConfirm>Confirm{% unless model.is_new %} New{% endunless %} Password</label>
</div> </div>
</div> </div>
</div> </div>
@ -87,9 +84,9 @@
</div> </div>
<div class="row mb-3"> <div class="row mb-3">
<div class="col text-center"> <div class="col text-center">
<button type="submit" class="btn btn-sm btn-primary">Save Changes</button> <button type=submit class="btn btn-sm btn-primary">Save Changes</button>
{% if model.is_new %} {% if model.is_new %}
<button type="button" class="btn btn-sm btn-secondary ms-3" <button type=button class="btn btn-sm btn-secondary ms-3"
onclick="document.getElementById('user_new').innerHTML = ''"> onclick="document.getElementById('user_new').innerHTML = ''">
Cancel Cancel
</button> </button>

View File

@ -1,9 +1,9 @@
<div id="userList"> <div id=userList>
<div class="container g-0"> <div class="container g-0">
<div class="row mwl-table-detail" id="user_new"></div> <div class="row mwl-table-detail" id=user_new></div>
</div> </div>
<form method="post" id="userList" class="container g-0" hx-target="this" hx-swap="outerHTML show:window:top"> <form method=post id=userList class="container g-0" hx-target=this hx-swap="outerHTML show:window:top">
<input type="hidden" name="{{ csrf.form_field_name }}" value="{{ csrf.request_token }}"> <input type=hidden name="{{ csrf.form_field_name }}" value="{{ csrf.request_token }}">
{% include_template "_user-list-columns" %} {% include_template "_user-list-columns" %}
{%- assign badge = "ms-2 badge bg" -%} {%- assign badge = "ms-2 badge bg" -%}
{% for user in users -%} {% for user in users -%}
@ -27,9 +27,9 @@
Edit Edit
</a> </a>
{% unless user_id == user.id %} {% unless user_id == user.id %}
<span class="text-muted"> &bull; </span> <span class=text-muted> &bull; </span>
{%- assign user_del_link = user_url_base | append: "/delete" | relative_link -%} {%- assign user_del_link = user_url_base | append: "/delete" | relative_link -%}
<a href="{{ user_del_link }}" hx-post="{{ user_del_link }}" class="text-danger" <a href="{{ user_del_link }}" hx-post="{{ user_del_link }}" class=text-danger
hx-confirm="Are you sure you want to delete the user &ldquo;{{ user.preferred_name }}&rdquo;? This action cannot be undone. (This action will not succeed if the user has authored any posts or pages.)"> hx-confirm="Are you sure you want to delete the user &ldquo;{{ user.preferred_name }}&rdquo;? This action cannot be undone. (This action will not succeed if the user has authored any posts or pages.)">
Delete Delete
</a> </a>
@ -39,7 +39,7 @@
</div> </div>
<div class="{{ email_col }}"> <div class="{{ email_col }}">
{{ user.first_name }} {{ user.last_name }}<br> {{ user.first_name }} {{ user.last_name }}<br>
<small class="text-muted"> <small class=text-muted>
{{ user.email }} {{ user.email }}
{%- unless user.url == "" %}<br>{{ user.url }}{% endunless %} {%- unless user.url == "" %}<br>{{ user.url }}{% endunless %}
</small> </small>

View File

@ -1,6 +1,6 @@
{%- if is_category or is_tag %} {%- if is_category or is_tag %}
<h1 class="index-title">{{ page_title }}</h1> <h1 class=index-title>{{ page_title }}</h1>
{%- if subtitle %}<h4 class="text-muted">{{ subtitle }}</h4>{% endif -%} {%- if subtitle %}<h4 class=text-muted>{{ subtitle }}</h4>{% endif -%}
{% endif %} {% endif %}
{%- assign post_count = model.posts | size -%} {%- assign post_count = model.posts | size -%}
{%- if post_count > 0 %} {%- if post_count > 0 %}
@ -16,7 +16,6 @@
Published on {{ post.published_on | date: "MMMM d, yyyy" }} Published on {{ post.published_on | date: "MMMM d, yyyy" }}
at {{ post.published_on | date: "h:mmtt" | downcase }} at {{ post.published_on | date: "h:mmtt" | downcase }}
by {{ model.authors | value: post.author_id }} by {{ model.authors | value: post.author_id }}
</p>
{{ post.text }} {{ post.text }}
{%- assign category_count = post.category_ids | size -%} {%- assign category_count = post.category_ids | size -%}
{%- assign tag_count = post.tags | size -%} {%- assign tag_count = post.tags | size -%}
@ -36,25 +35,22 @@
{%- if tag_count > 0 %} {%- if tag_count > 0 %}
Tagged: {{ post.tags | join: ", " }} Tagged: {{ post.tags | join: ", " }}
{% endif -%} {% endif -%}
</p>
</footer> </footer>
{% endif %} {% endif %}
<hr> <hr>
</article> </article>
{% endfor %} {% endfor %}
</section> </section>
<nav aria-label="pagination"> <nav aria-label=pagination>
<ul class="pagination justify-content-evenly mt-2"> <ul class="pagination justify-content-evenly mt-2">
{% if model.newer_link -%} {% if model.newer_link -%}
<li class="page-item"><a class="page-link" href="{{ model.newer_link.value }}">&laquo; Newer Posts</a></li> <li class=page-item><a class=page-link href="{{ model.newer_link.value }}">&laquo; Newer Posts</a>
{% endif %} {% endif %}
{% if model.older_link -%} {% if model.older_link -%}
<li class="page-item"><a class="page-link" href="{{ model.older_link.value }}">Older Posts &raquo;</a></li> <li class=page-item><a class=page-link href="{{ model.older_link.value }}">Older Posts &raquo;</a>
{%- endif -%} {%- endif -%}
</ul> </ul>
</nav> </nav>
{%- else %} {%- else %}
<article> <article><p class="text-center mt-3">No posts found</article>
<p class="text-center mt-3">No posts found</p>
</article>
{%- endif %} {%- endif %}

View File

@ -1,27 +1,24 @@
<!DOCTYPE html> <!DOCTYPE html>
<html lang="en"> <html lang=en>
<head> <meta charset=utf-8>
<meta charset="utf-8"> <meta name=viewport content="width=device-width">
<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
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/css/bootstrap.min.css" integrity=sha384-1BmE4kWBq78iYhFldvKuhfTAU6auU8tT94WrHftjDbrCEXSU1oBoqyl2QvZ6jIW3 crossorigin=anonymous>
integrity="sha384-1BmE4kWBq78iYhFldvKuhfTAU6auU8tT94WrHftjDbrCEXSU1oBoqyl2QvZ6jIW3" crossorigin="anonymous">
<title>{{ page_title | strip_html }}{% if page_title %} &laquo; {% endif %}{{ web_log.name | strip_html }}</title> <title>{{ page_title | strip_html }}{% if page_title %} &laquo; {% endif %}{{ web_log.name | strip_html }}</title>
{% page_head -%} {% page_head -%}
</head>
<body>
<header> <header>
<nav class="navbar navbar-light bg-light navbar-expand-md justify-content-start px-2"> <nav class="navbar navbar-light bg-light navbar-expand-md justify-content-start px-2">
<div class="container-fluid"> <div class=container-fluid>
<a class="navbar-brand" href="{{ "" | relative_link }}">{{ web_log.name }}</a> <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" <button class=navbar-toggler type=button data-bs-toggle=collapse data-bs-target=#navbarText
aria-controls="navbarText" aria-expanded="false" aria-label="Toggle navigation"> aria-controls=navbarText aria-expanded=false aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span> <span class=navbar-toggler-icon></span>
</button> </button>
<div class="collapse navbar-collapse" id="navbarText"> <div class="collapse navbar-collapse" id=navbarText>
{% if web_log.subtitle -%} {% if web_log.subtitle -%}
<span class="navbar-text">{{ web_log.subtitle.value }}</span> <span class=navbar-text>{{ web_log.subtitle.value }}</span>
{%- endif %} {%- endif %}
<ul class="navbar-nav"> <ul class=navbar-nav>
{% unless web_log.default_page == "posts" %}{{ "page/1" | nav_link: "Posts" }}{% endunless %} {% unless web_log.default_page == "posts" %}{{ "page/1" | nav_link: "Posts" }}{% endunless %}
{% if page_list -%} {% if page_list -%}
{% for pg in page_list %}{{ pg.permalink | nav_link: pg.title }}{% endfor %} {% for pg in page_list %}{{ pg.permalink | nav_link: pg.title }}{% endfor %}
@ -32,17 +29,14 @@
</div> </div>
</nav> </nav>
</header> </header>
<main class="mx-3"> <main class=mx-3>
{% if messages %} {% if messages %}
<div class="messages"> <div class=messages>
{% for msg in messages %} {% for msg in messages %}
<div role="alert" class="alert alert-{{ msg.level }} alert-dismissible fade show"> <div role=alert class="alert alert-{{ msg.level }} alert-dismissible fade show">
{{ msg.message }} {{ msg.message }}
<button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="Close"></button> <button type=button class=btn-close data-bs-dismiss=alert aria-label=Close></button>
{% if msg.detail %} {% if msg.detail %}<hr><p>{{ msg.detail.value }}{% endif %}
<hr>
<p>{{ msg.detail.value }}</p>
{% endif %}
</div> </div>
{% endfor %} {% endfor %}
</div> </div>
@ -52,11 +46,10 @@
<footer> <footer>
<hr> <hr>
<div class="container-fluid text-end"> <div class="container-fluid text-end">
<img src="{{ "themes/admin/logo-dark.png" | relative_link }}" alt="myWebLog" width="120" height="34"> <img src="{{ "themes/admin/logo-dark.png" | relative_link }}" alt=myWebLog width=120 height=34>
</div> </div>
</footer> </footer>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/js/bootstrap.bundle.min.js" <script src=https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/js/bootstrap.bundle.min.js
integrity="sha384-ka7Sk0Gln4gmtz2MlQnikT1wXgYsOg+OMhuP+IlRH9sENBO0LRn5q+8nbTov4+1p" integrity=sha384-ka7Sk0Gln4gmtz2MlQnikT1wXgYsOg+OMhuP+IlRH9sENBO0LRn5q+8nbTov4+1p
crossorigin="anonymous"></script> crossorigin=anonymous></script>
</body>
</html> </html>

View File

@ -1,4 +1,2 @@
<h2 class="py-3">{{ page.title }}</h2> <h2 class=py-3>{{ page.title }}</h2>
<article class="container"> <article class="container">{{ page.text }}</article>
{{ page.text }}
</article>

View File

@ -9,7 +9,7 @@
{% endif %} {% endif %}
by {{ model.authors | value: post.author_id }} by {{ model.authors | value: post.author_id }}
{%- if is_editor or is_author and user_id == post.author_id %} {%- if is_editor or is_author and user_id == post.author_id %}
&bull; <a hx-boost="false" href="{{ post | edit_post_link }}">Edit Post</a> &bull; <a hx-boost=false href="{{ post | edit_post_link }}">Edit Post</a>
{%- endif %} {%- endif %}
</h4> </h4>
<div> <div>
@ -21,7 +21,7 @@
Categorized under Categorized under
{% for cat_id in post.category_ids -%} {% for cat_id in post.category_ids -%}
{% assign cat = categories | where: "Id", cat_id | first %} {% assign cat = categories | where: "Id", cat_id | first %}
<span class="text-nowrap"> <span class=text-nowrap>
<a href="{{ cat | category_link }}" title="Categorized under &ldquo;{{ cat.name | escape }}&rdquo;"> <a href="{{ cat | category_link }}" title="Categorized under &ldquo;{{ cat.name | escape }}&rdquo;">
{{ cat.name }} {{ cat.name }}
</a> </a>
@ -35,7 +35,7 @@
<h4 class="item-meta text-muted"> <h4 class="item-meta text-muted">
Tagged Tagged
{% for tag in post.tags %} {% for tag in post.tags %}
<span class="text-nowrap"> <span class=text-nowrap>
<a href="{{ tag | tag_link }}" title="Posts tagged &ldquo;{{ tag | escape }}&rdquo;" rel="tag">{{ tag }}</a> <a href="{{ tag | tag_link }}" title="Posts tagged &ldquo;{{ tag | escape }}&rdquo;" rel="tag">{{ tag }}</a>
</span> </span>
{% unless forloop.last %} &bull; {% endunless %} {% unless forloop.last %} &bull; {% endunless %}
@ -44,19 +44,17 @@
{%- endif %} {%- endif %}
</article> </article>
<div> <div>
<nav aria-label="pagination"> <nav aria-label=pagination>
<ul class="pagination justify-content-evenly mt-5"> <ul class="pagination justify-content-evenly mt-5">
{% if model.newer_link -%} {% if model.newer_link -%}
<li class="page-item"> <li class=page-item>
<a class="page-link" href="{{ model.newer_link.value | relative_link }}">{{ model.newer_name.value }}</a> <a class=page-link href="{{ model.newer_link.value | relative_link }}">{{ model.newer_name.value }}</a>
<span class="text-muted">&laquo; Previous Post</span> <span class=text-muted>&laquo; Previous Post</span>
</li>
{% endif %} {% endif %}
{% if model.older_link -%} {% if model.older_link -%}
<li class="page-item text-end"> <li class="page-item text-end">
<a class="page-link" href="{{ model.older_link.value | relative_link }}">{{ model.older_name.value }}</a> <a class=page-link href="{{ model.older_link.value | relative_link }}">{{ model.older_name.value }}</a>
<span class="text-muted">Next Post &raquo;</span> <span class=text-muted>Next Post &raquo;</span>
</li>
{%- endif -%} {%- endif -%}
</ul> </ul>
</nav> </nav>

View File

@ -1,2 +1,2 @@
myWebLog Default Theme myWebLog Default Theme
2.0.0 2.1.0