Version 2.1 #41

Merged
danieljsummers merged 123 commits from version-2.1 into main 2024-03-27 00:13:28 +00:00
36 changed files with 914 additions and 1092 deletions
Showing only changes of commit da5918b154 - Show all commits

View File

@ -83,13 +83,13 @@ type NavLinkFilter() =
let extraPath = ctx.WebLog.ExtraPath
let path = if extraPath = "" then "" else $"{extraPath[1..]}/"
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"
"\" href=\""
ctx.WebLog.RelativeUrl(Permalink url)
"\">"
text
"</a></li>"
"</a>"
}
|> String.concat ""
@ -111,23 +111,23 @@ type PageHeadTag() =
let getBool name =
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
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
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
let feedLink title url =
let escTitle = HttpUtility.HtmlAttributeEncode title
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
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
let slug = context.Environments[0].["slug"] :?> string
@ -140,12 +140,12 @@ type PageHeadTag() =
if getBool "is_post" then
let post = context.Environments[0].["model"] :?> PostDisplay
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
let page = context.Environments[0].["page"] :?> DisplayPage
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
@ -191,10 +191,10 @@ type UserLinksTag() =
"""<ul class="navbar-nav flex-grow-1 justify-content-end">"""
match Convert.ToBoolean context.Environments[0].["is_logged_on"] with
| 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 "user/log-off"}">Log Off</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>"""
| 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>"
}
|> Seq.iter result.WriteLine

View File

@ -1,32 +1,32 @@
<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 }}">
<label for="title">Title</label>
<label for=title>Title</label>
</div>
<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 }}">
<label for="permalink">Permalink</label>
<label for=permalink>Permalink</label>
{%- unless model.is_new %}
{%- 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>
<span class="text-muted"> &bull; </span>
<span class=text-muted> &bull; </span>
<a href="{{ entity_url_base | append: "/revisions" | relative_link }}">Manage Revisions</a>
</span>
{%- endunless -%}
</div>
<div class="mb-2">
<label for="text">Text</label> &nbsp; &nbsp;
<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"
{%- if model.source == "HTML" %} checked="checked"{% endif %}>
<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"
{%- if model.source == "Markdown" %} checked="checked"{% endif %}>
<label class="btn btn-sm btn-outline-secondary" for="source_md">Markdown</label>
<div class=mb-2>
<label for=text>Text</label> &nbsp; &nbsp;
<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
{%- if model.source == "HTML" %} checked{% endif %}>
<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
{%- if model.source == "Markdown" %} checked{% endif %}>
<label class="btn btn-sm btn-outline-secondary" for=source_md>Markdown</label>
</div>
</div>
<div class="pb-3">
<textarea name="Text" id="text" class="form-control" rows="20">{{ model.text }}</textarea>
<div class=pb-3>
<textarea name=Text id=text class=form-control rows=20>{{ model.text }}</textarea>
</div>

View File

@ -1,65 +1,60 @@
<header>
<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">
<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"
aria-controls="navbarText" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
<div class=container-fluid>
<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
aria-controls=navbarText aria-expanded=false aria-label="Toggle navigation">
<span class=navbar-toggler-icon></span>
</button>
<div class="collapse navbar-collapse" id="navbarText">
<div class="collapse navbar-collapse" id=navbarText>
{%- if is_logged_on %}
<ul class="navbar-nav">
{{ "admin/dashboard" | nav_link: "Dashboard" }}
{%- if is_author %}
{{ "admin/pages" | nav_link: "Pages" }}
{{ "admin/posts" | nav_link: "Posts" }}
{{ "admin/uploads" | nav_link: "Uploads" }}
{%- endif %}
{%- if is_web_log_admin %}
{{ "admin/categories" | nav_link: "Categories" }}
{{ "admin/settings" | nav_link: "Settings" }}
{%- endif %}
{%- if is_administrator %}
{{ "admin/administration" | nav_link: "Admin" }}
{%- endif %}
<ul class=navbar-nav>
{{ "admin/dashboard" | nav_link: "Dashboard" }}
{%- if is_author %}
{{ "admin/pages" | nav_link: "Pages" }}
{{ "admin/posts" | nav_link: "Posts" }}
{{ "admin/uploads" | nav_link: "Uploads" }}
{%- endif %}
{%- if is_web_log_admin %}
{{ "admin/categories" | nav_link: "Categories" }}
{{ "admin/settings" | nav_link: "Settings" }}
{%- endif %}
{%- if is_administrator %}
{{ "admin/administration" | nav_link: "Admin" }}
{%- endif %}
</ul>
{%- endif %}
<ul class="navbar-nav flex-grow-1 justify-content-end">
{%- if is_logged_on %}
{{ "admin/my-info" | nav_link: "My Info" }}
<li class="nav-item">
<a class="nav-link" href="https://bitbadger.solutions/open-source/myweblog/#how-to-use-myweblog"
target="_blank">
Docs
</a>
</li>
<li class="nav-item">
<a class="nav-link" href="{{ "user/log-off" | relative_link }}" hx-boost="false">Log Off</a>
</li>
{%- else -%}
<li class="nav-item">
<a class="nav-link" href="https://bitbadger.solutions/open-source/myweblog/#how-to-use-myweblog"
target="_blank">
Docs
</a>
</li>
{{ "user/log-on" | nav_link: "Log On" }}
{%- endif %}
{%- if is_logged_on %}
{{ "admin/my-info" | nav_link: "My Info" }}
<li class=nav-item>
<a class=nav-link href=https://bitbadger.solutions/open-source/myweblog/#how-to-use-myweblog target=_blank>
Docs
</a>
<li class=nav-item>
<a class=nav-link href="{{ "user/log-off" | relative_link }}" hx-boost=false>Log Off</a>
{%- else -%}
<li class=nav-item>
<a class=nav-link href=https://bitbadger.solutions/open-source/myweblog/#how-to-use-myweblog target=_blank>
Docs
</a>
{{ "user/log-on" | nav_link: "Log On" }}
{%- endif %}
</ul>
</div>
</div>
</nav>
</header>
<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=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">
{% 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 %}>
<div class="toast-header bg-{{ msg.level }}{% unless msg.level == "warning" %} text-white{% endunless %}">
<strong class="me-auto text-uppercase">
{% if msg.level == "danger" %}error{% else %}{{ msg.level}}{% endif %}
</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 class="toast-body bg-{{ msg.level }} bg-opacity-25">
{{ msg.message }}
@ -73,13 +68,13 @@
</div>
</div>
<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 }}
</main>
<footer class="position-fixed bottom-0 w-100">
<div class="text-end text-white me-2">
{%- assign version = generator | split: " " -%}
<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>
</footer>

View File

@ -1,9 +1,8 @@
<h2 class="my-3">{{ page_title }}</h2>
<h2 class=my-3>{{ page_title }}</h2>
<article>
<fieldset class="container mb-3 pb-0">
<legend>Themes</legend>
<a href="{{ "admin/theme/new" | relative_link }}" class="btn btn-primary btn-sm mb-3"
hx-target="#theme_new">
<a href="{{ "admin/theme/new" | relative_link }}" class="btn btn-primary btn-sm mb-3" hx-target=#theme_new>
Upload a New Theme
</a>
<div class="container g-0">
@ -21,39 +20,37 @@
{%- assign cache_base_url = "admin/cache/" -%}
<legend>Caches</legend>
<div class="row pb-2">
<div class="col">
<div class=col>
<p>
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"
target="_blank">more information</a>)
</p>
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
target=_blank>more information</a>)
</div>
</div>
<div class="row">
<div class=row>
<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>
<div class="card-body pb-0">
<h6 class="card-subtitle text-muted pb-3">
These caches include the page list and categories for each web log
</h6>
{%- assign web_log_base_url = cache_base_url | append: "web-log/" -%}
<form method="post" class="container g-0" hx-boost="false" hx-target="body"
hx-swap="innerHTML show:window:top">
<input type="hidden" name="{{ csrf.form_field_name }}" value="{{ csrf.request_token }}">
<button type="submit" class="btn btn-sm btn-primary mb-2"
<form method=post class="container g-0" hx-boost=false hx-target=body hx-swap="innerHTML show:window:top">
<input type=hidden name="{{ csrf.form_field_name }}" value="{{ csrf.request_token }}">
<button type=submit class="btn btn-sm btn-primary mb-2"
hx-post="{{ web_log_base_url | append: "all/refresh" | relative_link }}">
Refresh All
</button>
<div class="row mwl-table-heading">
<div class="col">Web Log</div>
<div class=col>Web Log</div>
</div>
{%- for web_log in web_logs %}
<div class="row mwl-table-detail">
<div class="col">
<div class=col>
{{ web_log[1] }}<br>
<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 -%}
<a href="{{ refresh_url }}" hx-post="{{ refresh_url }}">Refresh</a>
</small>
@ -65,7 +62,7 @@
</div>
</div>
<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>
<div class="card-body pb-0">
<h6 class="card-subtitle text-muted pb-3">
@ -73,29 +70,28 @@
templates will still refresh its asset cache
</h6>
{%- assign theme_base_url = cache_base_url | append: "theme/" -%}
<form method="post" class="container g-0" hx-boost="false" hx-target="body"
hx-swap="innerHTML show:window:top">
<input type="hidden" name="{{ csrf.form_field_name }}" value="{{ csrf.request_token }}">
<button type="submit" class="btn btn-sm btn-primary mb-2"
<form method=post class="container g-0" hx-boost=false hx-target=body hx-swap="innerHTML show:window:top">
<input type=hidden name="{{ csrf.form_field_name }}" value="{{ csrf.request_token }}">
<button type=submit class="btn btn-sm btn-primary mb-2"
hx-post="{{ theme_base_url | append: "all/refresh" | relative_link }}">
Refresh All
</button>
<div class="row mwl-table-heading">
<div class="col-8">Theme</div>
<div class="col-4">Cached</div>
<div class=col-8>Theme</div>
<div class=col-4>Cached</div>
</div>
{%- for theme in cached_themes %}
{% unless theme[0] == "admin" %}
<div class="row mwl-table-detail">
<div class="col-8">
<div class=col-8>
{{ theme[1] }}<br>
<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 -%}
<a href="{{ refresh_url }}" hx-post="{{ refresh_url }}">Refresh</a>
</small>
</div>
<div class="col-4">{{ theme[2] }}</div>
<div class=col-4>{{ theme[2] }}</div>
</div>
{% endunless %}
{%- endfor %}

View File

@ -1,52 +1,50 @@
<div class="col-12">
<h5 class="my-3">{{ page_title }}</h5>
<form hx-post="{{ "admin/category/save" | relative_link }}" 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="CategoryId" value="{{ model.category_id }}">
<div class="row">
<div class=col-12>
<h5 class=my-3>{{ page_title }}</h5>
<form hx-post="{{ "admin/category/save" | relative_link }}" 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=CategoryId value="{{ model.category_id }}">
<div class=row>
<div class="col-12 col-sm-6 col-lg-4 col-xxl-3 offset-xxl-1 mb-3">
<div class="form-floating">
<input type="text" name="Name" id="name" class="form-control" placeholder="Name" autofocus required
<div class=form-floating>
<input type=text name=Name id=name class=form-control placeholder=Name autofocus required
value="{{ model.name | escape }}">
<label for="name">Name</label>
<label for=name>Name</label>
</div>
</div>
<div class="col-12 col-sm-6 col-lg-4 col-xxl-3 mb-3">
<div class="form-floating">
<input type="text" name="Slug" id="slug" class="form-control" placeholder="Slug" required
<div class=form-floating>
<input type=text name=Slug id=slug class=form-control placeholder=Slug required
value="{{ model.slug | escape }}">
<label for="slug">Slug</label>
<label for=slug>Slug</label>
</div>
</div>
<div class="col-12 col-lg-4 col-xxl-3 offset-xxl-1 mb-3">
<div class="form-floating">
<select name="ParentId" id="parentId" class="form-control">
<option value=""{% if model.parent_id == "" %} selected="selected"{% endif %}>
&ndash; None &ndash;
</option>
<div class=form-floating>
<select name=ParentId id=parentId class=form-control>
<option value=""{% if model.parent_id == "" %} selected{% endif %}>&ndash; None &ndash;</option>
{% for cat in categories -%}
{%- 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 }}
</option>
{% endunless -%}
{%- endfor %}
</select>
<label for="parentId">Parent Category</label>
<label for=parentId>Parent Category</label>
</div>
</div>
<div class="col-12 col-xl-10 offset-xl-1 mb-3">
<div class="form-floating">
<input name="Description" id="description" class="form-control"
<div class=form-floating>
<input name=Description id=description class=form-control
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 class="row mb-3">
<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>
</div>
</div>

View File

@ -1,55 +1,55 @@
<div id="catList" class="container">
<div class="row">
<div class="col">
<div id=catList class=container>
<div class=row>
<div class=col>
{%- assign cat_count = categories | size -%}
{% if cat_count > 0 %}
{%- 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" -%}
<div class="container">
<div class=container>
<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>
</div>
<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 }}">
<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 }}">
<div class="row mwl-table-detail" id="cat_new"></div>
{% for cat in categories -%}
<div class="row mwl-table-detail" id="cat_{{ cat.id }}">
<div class="{{ cat_col }} no-wrap">
{%- 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 %}
{{ cat.name }}<br>
<small>
{%- assign cat_url_base = "admin/category/" | append: cat.id -%}
{%- 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 -%}
</a>
<span class="text-muted"> &bull; </span>
<span class=text-muted> &bull; </span>
{%- endif %}
<a href="{{ cat_url_base | append: "/edit" | relative_link }}" hx-target="#cat_{{ cat.id }}"
hx-swap="innerHTML show:#cat_{{ cat.id }}:top">
Edit
</a>
<span class="text-muted"> &bull; </span>
<span class=text-muted> &bull; </span>
{%- 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.">
Delete
</a>
</small>
</div>
<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>
{%- endfor %}
</form>
{%- else -%}
<div id="cat_new">
<p class="text-muted fst-italic text-center">This web log has no categores defined</p>
<div id=cat_new>
<p class="text-muted fst-italic text-center">This web log has no categories defined</p>
</div>
{%- endif %}
</div>

View File

@ -1,7 +1,7 @@
<h2 class="my-3">{{ page_title }}</h2>
<h2 class=my-3>{{ page_title }}</h2>
<article>
<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
</a>
{{ category_list }}

View File

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

View File

@ -1,10 +1,10 @@
<h2 class="my-3">{{ web_log.name }} &bull; Dashboard</h2>
<article class="container">
<div class="row">
<h2 class=my-3>{{ web_log.name }} &bull; Dashboard</h2>
<article class=container>
<div class=row>
<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>
<div class="card-body">
<div class=card-body>
<h6 class="card-subtitle text-muted pb-3">
Published <span class="badge rounded-pill bg-secondary">{{ model.posts }}</span>
&nbsp; Drafts <span class="badge rounded-pill bg-secondary">{{ model.drafts }}</span>
@ -17,9 +17,9 @@
</div>
</section>
<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>
<div class="card-body">
<div class=card-body>
<h6 class="card-subtitle text-muted pb-3">
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>
@ -32,11 +32,11 @@
</div>
</section>
</div>
<div class="row">
<div class=row>
<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>
<div class="card-body">
<div class=card-body>
<h6 class="card-subtitle text-muted pb-3">
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>

View File

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

View File

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

View File

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

View File

@ -1,28 +1,28 @@
<h2 class="my-3">Log On to {{ web_log.name }}</h2>
<article class="py-3">
<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 }}">
<h2 class=my-3>Log On to {{ web_log.name }}</h2>
<article class=py-3>
<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 }}">
{% 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 %}
<div class="container">
<div class="row">
<div class=container>
<div class=row>
<div class="col-12 col-md-6 col-lg-4 offset-lg-2 pb-3">
<div class="form-floating">
<input type="email" id="email" name="EmailAddress" class="form-control" autofocus required>
<label for="email">E-mail Address</label>
<div class=form-floating>
<input type=email id=email name=EmailAddress class=form-control autofocus required>
<label for=email>E-mail Address</label>
</div>
</div>
<div class="col-12 col-md-6 col-lg-4 pb-3">
<div class="form-floating">
<input type="password" id="password" name="Password" class="form-control" required>
<label for="password">Password</label>
<div class=form-floating>
<input type=password id=password name=Password class=form-control required>
<label for=password>Password</label>
</div>
</div>
</div>
<div class="row pb-3">
<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>

View File

@ -1,75 +1,72 @@
<h2 class="my-3">{{ page_title }}</h2>
<h2 class=my-3>{{ page_title }}</h2>
<article>
<form action="{{ "admin/my-info" | relative_link }}" method="post">
<input type="hidden" name="{{ csrf.form_field_name }}" value="{{ csrf.request_token }}">
<form action="{{ "admin/my-info" | relative_link }}" method=post>
<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="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 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 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 }}
</div>
</div>
<div class="container">
<div class="row"><div class="col"><hr class="mt-0"></div></div>
<div class=container>
<div class=row><div class=col><hr class=mt-0></div></div>
<div class="row mb-3">
<div class="col-12 col-md-6 col-lg-4 pb-3">
<div class="form-floating">
<input type="text" name="FirstName" id="firstName" class="form-control" autofocus required
placeholder="First" value="{{ model.first_name }}">
<label for="firstName">First Name</label>
<div class=form-floating>
<input type=text name=FirstName id=firstName class=form-control autofocus required placeholder=First
value="{{ model.first_name }}">
<label for=firstName>First Name</label>
</div>
</div>
<div class="col-12 col-md-6 col-lg-4 pb-3">
<div class="form-floating">
<input type="text" name="LastName" id="lastName" class="form-control" required
placeholder="Last" value="{{ model.last_name }}">
<label for="lastName">Last Name</label>
<div class=form-floating>
<input type=text name=LastName id=lastName class=form-control required placeholder="Last"
value="{{ model.last_name }}">
<label for=lastName>Last Name</label>
</div>
</div>
<div class="col-12 col-md-6 col-lg-4 pb-3">
<div class="form-floating">
<input type="text" name="PreferredName" id="preferredName" class="form-control" required
placeholder="Preferred" value="{{ model.preferred_name }}">
<label for="preferredName">Preferred Name</label>
<div class=form-floating>
<input type=text name=PreferredName id=preferredName class=form-control required placeholder="Preferred"
value="{{ model.preferred_name }}">
<label for=preferredName>Preferred Name</label>
</div>
</div>
</div>
<div class="row mb-3">
<div class="col">
<fieldset class="p-2">
<legend class="ps-1">Change Password</legend>
<div class="row">
<div class="col">
<p class="form-text">Optional; leave blank to keep your current password</p>
</div>
<div class=col>
<fieldset class=p-2>
<legend class=ps-1>Change Password</legend>
<div class=row>
<div class=col><p class=form-text>Optional; leave blank to keep your current password</div>
</div>
<div class="row">
<div class=row>
<div class="col-12 col-md-6 pb-3">
<div class="form-floating">
<input type="password" name="NewPassword" id="newPassword" class="form-control"
placeholder="Password">
<label for="newPassword">New Password</label>
<div class=form-floating>
<input type=password name=NewPassword id=newPassword class=form-control placeholder=Password>
<label for=newPassword>New Password</label>
</div>
</div>
<div class="col-12 col-md-6 pb-3">
<div class="form-floating">
<input type="password" name="NewPasswordConfirm" id="newPasswordConfirm" class="form-control"
placeholder="Confirm">
<label for="newPasswordConfirm">Confirm New Password</label>
<div class=form-floating>
<input type=password name=NewPasswordConfirm id=newPasswordConfirm class=form-control
placeholder=Confirm>
<label for=newPasswordConfirm>Confirm New Password</label>
</div>
</div>
</div>
</fieldset>
</div>
</div>
<div class="row">
<div class=row>
<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>

View File

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

View File

@ -1,4 +1,4 @@
<h2 class="my-3">{{ page_title }}</h2>
<h2 class=my-3>{{ page_title }}</h2>
<article>
<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 -%}
@ -6,11 +6,11 @@
{%- assign title_col = "col-12 col-md-5" -%}
{%- assign link_col = "col-12 col-md-5" -%}
{%- assign upd8_col = "col-12 col-md-2" -%}
<form method="post" class="container mb-3" hx-target="body">
<input type="hidden" name="{{ csrf.form_field_name }}" value="{{ csrf.request_token }}">
<form method=post class="container mb-3" hx-target=body>
<input type=hidden name="{{ csrf.form_field_name }}" value="{{ csrf.request_token }}">
<div class="row mwl-table-heading">
<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 class="{{ link_col }} d-none d-md-inline-block">Permalink</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>
<small>
{%- 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 %}
<span class="text-muted"> &bull; </span>
<span class=text-muted> &bull; </span>
<a href="{{ pg | edit_page_link }}">Edit</a>
{% endif %}
{% 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 -%}
<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.">
Delete
</a>
@ -40,7 +40,7 @@
</div>
<div class="{{ link_col }}">
{%- 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 class="{{ upd8_col }}">
<small class="d-md-none text-muted">Updated {{ pg.updated_on | date: "MMMM d, yyyy" }}</small>
@ -54,19 +54,17 @@
<div>
{% if page_nbr > 1 %}
<p>
<a class="btn btn-secondary" href="{{ "admin/pages" | append: prev_page | relative_link }}">
&laquo; Previous
</a>
</p>
<a class="btn btn-secondary" href="{{ "admin/pages" | append: prev_page | relative_link }}">
&laquo; Previous
</a>
{% endif %}
</div>
<div class="text-right">
{% if has_next %}
<p>
<a class="btn btn-secondary" href="{{ "admin/pages" | append: next_page | relative_link }}">
Next &raquo;
</a>
</p>
<a class="btn btn-secondary" href="{{ "admin/pages" | append: next_page | relative_link }}">
Next &raquo;
</a>
{% endif %}
</div>
</div>

View File

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

View File

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

View File

@ -1,17 +1,17 @@
<h2 class="my-3">{{ page_title }}</h2>
<h2 class=my-3>{{ page_title }}</h2>
<article>
<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 -%}
{%- if post_count > 0 %}
<form method="post" class="container mb-3" hx-target="body">
<input type="hidden" name="{{ csrf.form_field_name }}" value="{{ csrf.request_token }}">
<form method=post class="container mb-3" hx-target=body>
<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 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 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="{{ 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 class="{{ title_col }} d-none d-md-inline-block">Title</div>
<div class="{{ author_col }} d-none d-md-inline-block">Author</div>
@ -20,14 +20,14 @@
{% for post in model.posts -%}
<div class="row mwl-table-detail">
<div class="{{ date_col }} no-wrap">
<small class="d-md-none">
<small class=d-md-none>
{%- if post.published_on -%}
Published {{ post.published_on | date: "MMMM d, yyyy" }}
{%- else -%}
Not Published
{%- endif -%}
{%- 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 %}
</small>
<span class="d-none d-md-inline">
@ -37,7 +37,7 @@
Not Published
{%- endif -%}
{%- 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 %}
</span>
</div>
@ -45,15 +45,15 @@
{%- if post.episode %}<span class="badge bg-success float-end text-uppercase mt-1">Episode</span>{% endif -%}
{{ post.title }}<br>
<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 %}
<span class="text-muted"> &bull; </span>
<span class=text-muted> &bull; </span>
<a href="{{ post | edit_post_link }}">Edit</a>
{% endif %}
{% 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 -%}
<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.">
Delete
</a>
@ -62,7 +62,7 @@
</div>
<div class="{{ author_col }}">
{%- assign tag_count = post.tags | size -%}
<small class="d-md-none">
<small class=d-md-none>
Authored by {{ model.authors | value: post.author_id }} |
{% if tag_count == 0 -%}
No
@ -73,7 +73,7 @@
<span class="d-none d-md-inline">{{ model.authors | value: post.author_id }}</span>
</div>
<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>
{%- endfor %}
@ -82,17 +82,17 @@
<div class="d-flex justify-content-evenly mb-3">
<div>
{% 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 %}
</div>
<div class="text-right">
{% 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 %}
</div>
</div>
{% endif %}
{% 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 %}
</article>

View File

@ -1,28 +1,28 @@
<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 -%}
<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="RuleId" value="{{ model.rule_id }}">
<div class="row">
<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=RuleId value="{{ model.rule_id }}">
<div class=row>
<div class="col-12 col-lg-5 mb-3">
<div class="form-floating">
<input type="text" name="From" id="from" class="form-control" placeholder="From local URL/pattern" autofocus
required value="{{ model.from | escape }}">
<label for="from">From</label>
<div class=form-floating>
<input type=text name=From id=from class=form-control placeholder="From local URL/pattern" autofocus required
value="{{ model.from | escape }}">
<label for=from>From</label>
</div>
</div>
<div class="col-12 col-lg-5 mb-3">
<div class="form-floating">
<input type="text" name="To" id="to" class="form-control" placeholder="To URL/pattern" required
<div class=form-floating>
<input type=text name=To id=to class=form-control placeholder="To URL/pattern" required
value="{{ model.to | escape }}">
<label for="from">To</label>
<label for=to>To</label>
</div>
</div>
<div class="col-12 col-lg-2 mb-3">
<div class="form-check form-switch">
<input type="checkbox" name="IsRegex" id="isRegex" class="form-check-input" value="true"
{%- if model.is_regex %} checked="checked"{% endif %}>
<label for="isRegex">Use RegEx</label>
<input type=checkbox name=IsRegex id=isRegex class=form-check-input value=true
{%- if model.is_regex %} checked{% endif %}>
<label for=isRegex>Use RegEx</label>
</div>
</div>
</div>
@ -30,18 +30,18 @@
<div class="row mb-3">
<div class="col-12 text-center">
<label>Add Rule</label>
<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">
<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">
<label class="btn btn-sm btn-outline-secondary" for="insert_bottom">Bottom</label>
<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>
<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>
<label class="btn btn-sm btn-outline-secondary" for=insert_bottom>Bottom</label>
</div>
</div>
</div>
{% endif %}
<div class="row mb-3">
<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>
</div>
</div>

View File

@ -1,31 +1,31 @@
<h2 class="my-3">{{ page_title }}</h2>
<h2 class=my-3>{{ page_title }}</h2>
<article>
<p class="mb-3">
<p class=mb-3>
<a href="{{ "admin/settings" | relative_link }}">&laquo; Back to Settings</a>
</p>
<div class="container">
<div class="row">
<div class="col">
<div class=container>
<div class=row>
<div class=col>
<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
</a>
</div>
</div>
<div class="row">
<div class="col">
<div class=row>
<div class=col>
{%- assign redir_count = redirections | size -%}
{% if redir_count > 0 -%}
<div class="container">
<div class=container>
<div class="row mwl-table-heading">
<div class="col-5">From</div>
<div class="col-5">To</div>
<div class=col-5>From</div>
<div class=col-5>To</div>
<div class="col-2 text-center">RegEx?</div>
</div>
</div>
<div class="row mwl-table-detail" id="redir_new"></div>
<form method="post" class="container" hx-target="body">
<input type="hidden" name="{{ csrf.form_field_name }}" value="{{ csrf.request_token }}">
<div class="row mwl-table-detail" id=redir_new></div>
<form method=post class=container hx-target=body>
<input type=hidden name="{{ csrf.form_field_name }}" value="{{ csrf.request_token }}">
{% for redir in redirections -%}
{%- assign redir_id = "redir_" | append: forloop.index0 -%}
<div class="row mwl-table-detail" id="{{ redir_id }}">
@ -38,39 +38,38 @@
Edit
</a>
{% unless forloop.first %}
<span class="text-muted"> &bull; </span>
<span class=text-muted> &bull; </span>
{%- assign move_up = redir_url | append: "/up" | relative_link -%}
<a href="{{ move_up }}" hx-post="{{ move_up }}">Move Up</a>
{% endunless %}
{% unless forloop.last %}
<span class="text-muted"> &bull; </span>
<span class=text-muted> &bull; </span>
{%- assign move_down = redir_url | append: "/down" | relative_link -%}
<a href="{{ move_down }}" hx-post="{{ move_down }}">Move Down</a>
{% endunless %}
<span class="text-muted"> &bull; </span>
<span class=text-muted> &bull; </span>
{%- 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?">
Delete
</a>
</small>
</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>
{%- endfor %}
</form>
{%- else -%}
<div id="redir_new">
<p class="text-muted text-center fst-italic">This web log has no redirect rules defined</p>
<div id=redir_new>
<p class="text-muted text-center fst-italic">This web log has no redirect rules defined
</div>
{%- endif %}
</div>
</div>
</div>
<p class="mt-3 text-muted fst-italic text-center">
This is an advanced feature; please
<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.
</p>
This is an advanced feature; please
<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.
</article>

View File

@ -1,27 +1,26 @@
<h2 class="my-3">{{ page_title }}</h2>
<h2 class=my-3>{{ page_title }}</h2>
<article>
<form method="post" hx-target="body">
<input type="hidden" name="{{ csrf.form_field_name }}" value="{{ csrf.request_token }}">
<input type="hidden" name="id" value="{{ model.id }}">
<form method=post hx-target=body>
<input type=hidden name="{{ csrf.form_field_name }}" value="{{ csrf.request_token }}">
<input type=hidden name=Id value="{{ model.id }}">
<div class="container mb-3">
<div class="row">
<div class="col">
<div class=row>
<div class=col>
<p style="line-height:1.2rem;">
<strong>{{ model.current_title }}</strong><br>
<small class="text-muted">
<a href="{{ "admin/" | append: model.entity | append: "/" | append: model.id | append: "/edit" | relative_link }}">
&laquo; Back to Edit {{ model.entity | capitalize }}
</a>
</small>
</p>
<strong>{{ model.current_title }}</strong><br>
<small class=text-muted>
<a href="{{ "admin/" | append: model.entity | append: "/" | append: model.id | append: "/edit" | relative_link }}">
&laquo; Back to Edit {{ model.entity | capitalize }}
</a>
</small>
</div>
</div>
{%- assign revision_count = model.revisions | size -%}
{%- assign rev_url_base = "admin/" | append: model.entity | append: "/" | append: model.id | append: "/revision" -%}
{%- if revision_count > 1 %}
<div class="row mb-3">
<div class="col">
<button type="button" class="btn btn-sm btn-danger"
<div class=col>
<button type=button class="btn btn-sm btn-danger"
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?">
Delete All Prior Revisions
@ -29,9 +28,7 @@
</div>
</div>
{%- endif %}
<div class="row mwl-table-heading">
<div class="col">Revision</div>
</div>
<div class="row mwl-table-heading"><div class=col>Revision</div></div>
{% for rev in model.revisions %}
{%- assign as_of_string = rev.as_of | date: "o" -%}
{%- 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">
Preview
</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>
<span class="text-muted"> &bull; </span>
<a href="{{ rev_delete }}" hx-post="{{ rev_delete }}" hx-target="#{{ as_of_id }}" hx-swap="outerHTML"
class="text-danger">
<span class=text-muted> &bull; </span>
<a href="{{ rev_delete }}" hx-post="{{ rev_delete }}" hx-target="#{{ as_of_id }}" hx-swap=outerHTML
class=text-danger>
Delete
</a>
</small>
{% endunless %}
</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>
{% endfor %}
</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>
<p class="text-muted">
Go to: <a href="#users">Users</a> &bull; <a href="#rss-settings">RSS Settings</a> &bull;
<a href="#tag-mappings">Tag Mappings</a> &bull;
<p class=text-muted>
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="{{ "admin/settings/redirect-rules" | relative_link }}">Redirect Rules</a>
</p>
<fieldset class="container mb-3">
<legend>Web Log Settings</legend>
<form action="{{ "admin/settings" | relative_link }}" method="post">
<input type="hidden" name="{{ csrf.form_field_name }}" value="{{ csrf.request_token }}">
<div class="container">
<div class="row">
<form action="{{ "admin/settings" | relative_link }}" method=post>
<input type=hidden name="{{ csrf.form_field_name }}" value="{{ csrf.request_token }}">
<div class=container>
<div class=row>
<div class="col-12 col-md-6 col-xl-4 pb-3">
<div class="form-floating">
<input type="text" name="Name" id="name" class="form-control" placeholder="Name" required autofocus
<div class=form-floating>
<input type=text name=Name id=name class=form-control placeholder=Name required autofocus
value="{{ model.name }}">
<label for="name">Name</label>
<label for=name>Name</label>
</div>
</div>
<div class="col-12 col-md-6 col-xl-4 pb-3">
<div class="form-floating">
<input type="text" name="Slug" id="slug" class="form-control" placeholder="Slug" required
<div class=form-floating>
<input type=text name=Slug id=slug class=form-control placeholder="Slug" required
value="{{ model.slug }}">
<label for="slug">Slug</label>
<span class="form-text">
<label for=slug>Slug</label>
<span class=form-text>
<span class="badge rounded-pill bg-warning text-dark">WARNING</span> changing this value may break
links
(<a href="https://bitbadger.solutions/open-source/myweblog/configuring.html#blog-settings"
target="_blank">more</a>)
(<a href=https://bitbadger.solutions/open-source/myweblog/configuring.html#blog-settings
target=_blank>more</a>)
</span>
</div>
</div>
<div class="col-12 col-md-6 col-xl-4 pb-3">
<div class="form-floating">
<input type="text" name="Subtitle" id="subtitle" class="form-control" placeholder="Subtitle"
<div class=form-floating>
<input type=text name=Subtitle id=subtitle class=form-control placeholder=Subtitle
value="{{ model.subtitle }}">
<label for="subtitle">Subtitle</label>
<label for=subtitle>Subtitle</label>
</div>
</div>
<div class="col-12 col-md-6 col-xl-4 offset-xl-1 pb-3">
<div class="form-floating">
<select name="ThemeId" id="themeId" class="form-control" required>
<div class=form-floating>
<select name=ThemeId id=themeId class=form-control required>
{% 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] }}
</option>
{%- endfor %}
</select>
<label for="themeId">Theme</label>
<label for=themeId>Theme</label>
</div>
</div>
<div class="col-12 col-md-6 offset-md-1 col-xl-4 offset-xl-0 pb-3">
<div class="form-floating">
<select name="DefaultPage" id="defaultPage" class="form-control" required>
<div class=form-floating>
<select name=DefaultPage id=defaultPage class=form-control required>
{%- 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] }}
</option>
{%- endfor %}
</select>
<label for="defaultPage">Default Page</label>
<label for=defaultPage>Default Page</label>
</div>
</div>
<div class="col-12 col-md-4 col-xl-2 pb-3">
<div class="form-floating">
<input type="number" name="PostsPerPage" id="postsPerPage" class="form-control" min="0" max="50" required
<div class=form-floating>
<input type=number name=PostsPerPage id=postsPerPage class=form-control min=0 max=50 required
value="{{ model.posts_per_page }}">
<label for="postsPerPage">Posts per Page</label>
<label for=postsPerPage>Posts per Page</label>
</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="form-floating">
<input type="text" name="TimeZone" id="timeZone" class="form-control" placeholder="Time Zone" required
<div class=form-floating>
<input type=text name=TimeZone id=timeZone class=form-control placeholder="Time Zone" required
value="{{ model.time_zone }}">
<label for="timeZone">Time Zone</label>
<label for=timeZone>Time Zone</label>
</div>
</div>
<div class="col-12 col-md-4 col-xl-2">
<div class="form-check form-switch">
<input type="checkbox" name="AutoHtmx" id="autoHtmx" class="form-check-input" value="true"
{%- if model.auto_htmx %} checked="checked"{% endif %}>
<label for="autoHtmx" class="form-check-label">Auto-Load htmx</label>
<input type=checkbox name=AutoHtmx id=autoHtmx class=form-check-input value=true
{%- if model.auto_htmx %} checked{% endif %}>
<label for=autoHtmx class=form-check-label>Auto-Load htmx</label>
</div>
<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>
</div>
<div class="col-12 col-md-4 col-xl-3 pb-3">
<div class="form-floating">
<select name="Uploads" id="uploads" class="form-control">
<div class=form-floating>
<select name=Uploads id=uploads class=form-control>
{%- for it in upload_values %}
<option value="{{ it[0] }}"{% if model.uploads == it[0] %} selected{% endif %}>{{ it[1] }}</option>
{%- endfor %}
</select>
<label for="uploads">Default Upload Destination</label>
<label for=uploads>Default Upload Destination</label>
</div>
</div>
</div>
<div class="row pb-3">
<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>
</form>
</fieldset>
<fieldset id="users" class="container mb-3 pb-0">
<fieldset id=users class="container mb-3 pb-0">
<legend>Users</legend>
{% include_template "_user-list-columns" %}
<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
</a>
<div class="container g-0">
<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="{{ cre8_col }}">Created</div>
<div class="{{ last_col }} d-none d-md-block">Last Log On</div>
@ -124,67 +124,69 @@
</div>
{{ user_list }}
</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>
<form action="{{ "admin/settings/rss" | relative_link }}" method="post">
<input type="hidden" name="{{ csrf.form_field_name }}" value="{{ csrf.request_token }}">
<div class="container">
<form action="{{ "admin/settings/rss" | relative_link }}" method=post>
<input type=hidden name="{{ csrf.form_field_name }}" value="{{ csrf.request_token }}">
<div class=container>
<div class="row pb-3">
<div class="col col-xl-8 offset-xl-2">
<fieldset class="d-flex justify-content-evenly flex-row">
<legend>Feeds Enabled</legend>
<div class="form-check form-switch pb-2">
<input type="checkbox" name="IsFeedEnabled" id="feedEnabled" class="form-check-input" value="true"
{%- if rss_model.is_feed_enabled %} checked="checked"{% endif %}>
<label for="feedEnabled" class="form-check-label">All Posts</label>
<input type=checkbox name=IsFeedEnabled id=feedEnabled class=form-check-input value=true
{%- if rss_model.is_feed_enabled %} checked{% endif %}>
<label for=feedEnabled class=form-check-label>All Posts</label>
</div>
<div class="form-check form-switch pb-2">
<input type="checkbox" name="IsCategoryEnabled" id="categoryEnabled" class="form-check-input"
value="true" {%- if rss_model.is_category_enabled %} checked="checked"{% endif %}>
<label for="categoryEnabled" class="form-check-label">Posts by Category</label>
<input type=checkbox name=IsCategoryEnabled id=categoryEnabled class=form-check-input value=true
{%- if rss_model.is_category_enabled %} checked{% endif %}>
<label for=categoryEnabled class=form-check-label>Posts by Category</label>
</div>
<div class="form-check form-switch pb-2">
<input type="checkbox" name="IsTagEnabled" id="tagEnabled" class="form-check-input" value="true"
{%- if rss_model.tag_enabled %} checked="checked"{% endif %}>
<label for="tagEnabled" class="form-check-label">Posts by Tag</label>
<input type=checkbox name=IsTagEnabled id=tagEnabled class=form-check-input value=true
{%- if rss_model.tag_enabled %} checked{% endif %}>
<label for=tagEnabled class=form-check-label>Posts by Tag</label>
</div>
</fieldset>
</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="form-floating">
<input type="text" name="FeedName" id="feedName" class="form-control" placeholder="Feed File Name"
<div class=form-floating>
<input type=text name=FeedName id=feedName class=form-control placeholder="Feed File Name"
value="{{ rss_model.feed_name }}">
<label for="feedName">Feed File Name</label>
<span class="form-text">Default is <code>feed.xml</code></span>
<label for=feedName>Feed File Name</label>
<span class=form-text>Default is <code>feed.xml</code></span>
</div>
</div>
<div class="col-12 col-sm-6 col-md-4 col-xl-2 pb-3">
<div class="form-floating">
<input type="number" name="ItemsInFeed" id="itemsInFeed" class="form-control" min="0"
placeholder="Items in Feed" required value="{{ rss_model.items_in_feed }}">
<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>
<div class=form-floating>
<input type=number name=ItemsInFeed id=itemsInFeed class=form-control min=0 placeholder="Items in Feed"
required value="{{ rss_model.items_in_feed }}">
<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>
</div>
</div>
<div class="col-12 col-md-5 col-xl-4 pb-3">
<div class="form-floating">
<input type="text" name="Copyright" id="copyright" class="form-control" placeholder="Copyright String"
<div class=form-floating>
<input type=text name=Copyright id=copyright class=form-control placeholder="Copyright String"
value="{{ rss_model.copyright }}">
<label for="copyright">Copyright String</label>
<span class="form-text">
Can be a
<a href="https://creativecommons.org/share-your-work/" target="_blank" rel="noopener">
Creative Commons license string
</a>
</span>
<label for=copyright>Copyright String</label>
<span class=form-text>
Can be a
<a href="https://creativecommons.org/share-your-work/" target=_blank rel=noopener>
Creative Commons license string
</a>
</span>
</div>
</div>
</div>
<div class="row pb-3">
<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>
@ -196,13 +198,13 @@
</a>
{%- assign feed_count = custom_feeds | size -%}
{%- 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 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="{{ 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 class="{{ path_col }} d-none d-md-inline-block">Relative Path</div>
</div>
@ -213,33 +215,33 @@
{%- if feed.is_podcast %} &nbsp; <span class="badge bg-primary">PODCAST</span>{% endif %}<br>
<small>
{%- assign feed_url = "admin/settings/rss/" | append: feed.id -%}
<a href="{{ feed.path | relative_link }}" target="_blank">View Feed</a>
<span class="text-muted"> &bull; </span>
<a href="{{ feed.path | relative_link }}" target=_blank>View Feed</a>
<span class=text-muted> &bull; </span>
<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 -%}
<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.">
Delete
</a>
</small>
</div>
<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>
</div>
</div>
{%- endfor %}
</form>
{%- 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 %}
</fieldset>
</fieldset>
<fieldset id="tag-mappings" class="container mb-3 pb-0">
<legend>Tag Mappings</legend>
<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
</a>
{{ tag_mapping_list }}

View File

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

View File

@ -1,17 +1,17 @@
<div id="tagList" class="container">
<div class="row">
<div class="col">
<div id=tagList class=container>
<div class=row>
<div class=col>
{%- assign map_count = mappings | size -%}
{% if map_count > 0 -%}
<div class="container">
<div class=container>
<div class="row mwl-table-heading">
<div class="col">Tag</div>
<div class="col">URL Value</div>
<div class=col>Tag</div>
<div class=col>URL Value</div>
</div>
</div>
<form method="post" class="container" hx-target="#tagList" hx-swap="outerHTML">
<input type="hidden" name="{{ csrf.form_field_name }}" value="{{ csrf.request_token }}">
<div class="row mwl-table-detail" id="tag_new"></div>
<form method=post class=container hx-target=#tagList hx-swap=outerHTML>
<input type=hidden name="{{ csrf.form_field_name }}" value="{{ csrf.request_token }}">
<div class="row mwl-table-detail" id=tag_new></div>
{% for map in mappings -%}
{%- assign map_id = mapping_ids | value: map.tag -%}
<div class="row mwl-table-detail" id="tag_{{ map_id }}">
@ -23,22 +23,20 @@
hx-swap="innerHTML show:#tag_{{ map_id }}:top">
Edit
</a>
<span class="text-muted"> &bull; </span>
<span class=text-muted> &bull; </span>
{%- 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.">
Delete
</a>
</small>
</div>
<div class="col">{{ map.url_value }}</div>
<div class=col>{{ map.url_value }}</div>
</div>
{%- endfor %}
</form>
{%- else -%}
<div id="tag_new">
<p class="text-muted text-center fst-italic">This web log has no tag mappings</p>
</div>
<div id=tag_new><p class="text-muted text-center fst-italic">This web log has no tag mappings</div>
{%- endif %}
</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">
<input type="hidden" name="{{ csrf.form_field_name }}" value="{{ csrf.request_token }}">
<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 }}">
{% include_template "_theme-list-columns" %}
{% for theme in themes -%}
<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>
{%- endunless %}<br>
<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" %}
<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 -%}
<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.">
Delete
</a>

View File

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

View File

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

View File

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

View File

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

View File

@ -1,9 +1,9 @@
<div id="userList">
<div id=userList>
<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>
<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 }}">
<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 }}">
{% include_template "_user-list-columns" %}
{%- assign badge = "ms-2 badge bg" -%}
{% for user in users -%}
@ -27,9 +27,9 @@
Edit
</a>
{% 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 -%}
<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.)">
Delete
</a>
@ -39,7 +39,7 @@
</div>
<div class="{{ email_col }}">
{{ user.first_name }} {{ user.last_name }}<br>
<small class="text-muted">
<small class=text-muted>
{{ user.email }}
{%- unless user.url == "" %}<br>{{ user.url }}{% endunless %}
</small>

View File

@ -1,6 +1,6 @@
{%- if is_category or is_tag %}
<h1 class="index-title">{{ page_title }}</h1>
{%- if subtitle %}<h4 class="text-muted">{{ subtitle }}</h4>{% endif -%}
<h1 class=index-title>{{ page_title }}</h1>
{%- if subtitle %}<h4 class=text-muted>{{ subtitle }}</h4>{% endif -%}
{% endif %}
{%- assign post_count = model.posts | size -%}
{%- if post_count > 0 %}
@ -13,48 +13,44 @@
</a>
</h1>
<p>
Published on {{ post.published_on | date: "MMMM d, yyyy" }}
at {{ post.published_on | date: "h:mmtt" | downcase }}
by {{ model.authors | value: post.author_id }}
</p>
Published on {{ post.published_on | date: "MMMM d, yyyy" }}
at {{ post.published_on | date: "h:mmtt" | downcase }}
by {{ model.authors | value: post.author_id }}
{{ post.text }}
{%- assign category_count = post.category_ids | size -%}
{%- assign tag_count = post.tags | size -%}
{% if category_count > 0 or tag_count > 0 %}
<footer>
<p>
{%- if category_count > 0 -%}
Categorized under:
{% for cat in post.category_ids -%}
{%- assign this_cat = categories | where: "Id", cat | first -%}
{{ this_cat.name }}{% unless forloop.last %}, {% endunless %}
{%- assign cat_names = this_cat.name | concat: cat_names -%}
{%- endfor -%}
{%- assign cat_names = "" -%}
<br>
{% endif -%}
{%- if tag_count > 0 %}
Tagged: {{ post.tags | join: ", " }}
{% endif -%}
</p>
{%- if category_count > 0 -%}
Categorized under:
{% for cat in post.category_ids -%}
{%- assign this_cat = categories | where: "Id", cat | first -%}
{{ this_cat.name }}{% unless forloop.last %}, {% endunless %}
{%- assign cat_names = this_cat.name | concat: cat_names -%}
{%- endfor -%}
{%- assign cat_names = "" -%}
<br>
{% endif -%}
{%- if tag_count > 0 %}
Tagged: {{ post.tags | join: ", " }}
{% endif -%}
</footer>
{% endif %}
<hr>
</article>
{% endfor %}
</section>
<nav aria-label="pagination">
<nav aria-label=pagination>
<ul class="pagination justify-content-evenly mt-2">
{% if model.newer_link -%}
<li class="page-item"><a class="page-link" href="{{ model.newer_link.value }}">&laquo; Newer Posts</a></li>
{% endif %}
{% if model.older_link -%}
<li class="page-item"><a class="page-link" href="{{ model.older_link.value }}">Older Posts &raquo;</a></li>
{%- endif -%}
{% if model.newer_link -%}
<li class=page-item><a class=page-link href="{{ model.newer_link.value }}">&laquo; Newer Posts</a>
{% endif %}
{% if model.older_link -%}
<li class=page-item><a class=page-link href="{{ model.older_link.value }}">Older Posts &raquo;</a>
{%- endif -%}
</ul>
</nav>
{%- else %}
<article>
<p class="text-center mt-3">No posts found</p>
</article>
<article><p class="text-center mt-3">No posts found</article>
{%- endif %}

View File

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

View File

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

View File

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

View File

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