Move hx attributes up, boost page/post contents

This commit is contained in:
2026-07-24 22:04:03 -04:00
parent 4c8109b676
commit 6a7ce66114
5 changed files with 22 additions and 34 deletions
+6 -7
View File
@@ -10,17 +10,17 @@
<h1 class="home-title">
<small class="home-lead">{{ post.published_on | format_date: "dddd, MMMM d, yyyy" }}</small><br>
&nbsp;
<a href="{{ post | relative_link }}"
<a href="{{ post | relative_link }}" hx-boost=true
id="{{ post.title | strip_html | downcase | replace: " ", "-" | replace: ":", "" }}"
title="Permanent Link to &quot;{{ post.title | strip_html | escape }}&quot;">
{{ post.title }}
</a>
</h1>
</div>
<div class="entry-content">{{ post.text }}</div>
<div class="entry-content" hx-boost:inherited=true>{{ post.text }}</div>
{%- assign cat_count = post.category_ids | size -%}
{%- if cat_count > 0 %}
<small>
<small hx-boost:inherited=true>
Categorized under
{% for cat_id in post.category_ids -%}
{%- assign cat = categories | where: "Id", cat_id | first -%}
@@ -31,7 +31,7 @@
{%- endif %}
{%- assign tag_count = post.tags | size -%}
{%- if tag_count > 0 %}
<small>
<small hx-boost:inherited=true>
Tagged
{% for tag in post.tags -%}
<a href="{{ tag | tag_link }}" title="Tagged &ldquo;{{ tag | escape }}&rdquo;"
@@ -39,11 +39,10 @@
{%- endfor %}
</small><br>
{%- endif %}
{%- if logged_on %}<small><a hx-boost="false" href="{{ post | edit_post_link }}">Edit Post</a></small>{% endif %}
{%- if logged_on %}<small><a href="{{ post | edit_post_link }}">Edit Post</a></small>{% endif %}
</article>
{%- endfor %}
<div class="bottom-nav" role="navigation" hx-boost:inherited=true hx-target:inherited="#content"
hx-swap:inherited="innerHTML show:top showTarget:#top" hx-indicator:inherited="#loadOverlay">
<div class="bottom-nav" role="navigation" hx-boost:inherited=true>
<div class="nav-previous">
{% if posts.newer_link -%}
<a href="{{ posts.newer_link.value }}">&laquo; Newer Posts</a>
+8 -15
View File
@@ -13,21 +13,18 @@
</title>
{% page_head -%}
</head>
<body>
<body hx-indicator:inherited=#loadOverlay hx-target:inherited=#content
hx-swap:inherited="innerHTML show:top showTarget:#top">
<header class=site-header id=top>
<div class=header-logo>
<a href="{{ "" | relative_link }}" hx-boost=true hx-target="#content"
hx-swap="innerHTML show:top showTarget:#top" hx-indicator="#loadOverlay">
<a href="{{ "" | relative_link }}" hx-boost=true>
<img src="{{ "img/bitbadger.png" | theme_asset }}"
alt="A cartoon badger looking at a computer screen, with his paw on a mouse"
title="Bit Badger Solutions">
</a>
</div>
<div class=header-title>
<a href="{{ "" | relative_link }}" hx-boost=true hx-target="#content"
hx-swap="innerHTML show:top showTarget:#top" hx-indicator="#loadOverlay">
The Bit Badger Blog
</a>
<a href="{{ "" | relative_link }}" hx-boost=true>The Bit Badger Blog</a>
</div>
<div class="header-spacer">&nbsp;</div>
<div class="header-social">
@@ -42,23 +39,19 @@
</a>
</div>
</header>
<div class=content-wrapper hx-boost=true hx-target="#content" hx-swap="innerHTML show:top showTarget:#top"
hx-indicator="#loadOverlay">
<div class=load-overlay id=loadOverlay>
<h1>Loading&hellip;</h1>
</div>
<div class=content-wrapper>
<div class=load-overlay id=loadOverlay><h1>Loading&hellip;</h1></div>
<main class=content id=content role=main>
{{ content }}
</main>
<aside class=blog-sidebar>
<div>
<div class=sidebar-head>Linux Resources</div>
<ul><li><a href="{{ "linux/" | relative_link }}">Browse Resources</a></li></ul>
<ul><li><a href="{{ "linux/" | relative_link }}" hx-boost=true>Browse Resources</a></li></ul>
</div>
<div>
<div class=sidebar-head>Categories</div>
<ul class=cat-list hx-boost:inherited=true hx-target:inherited="#content"
hx-swap:inherited="innerHTML show:top showTarget:#top" hx-indicator:inherited="#loadOverlay">
<ul class=cat-list hx-boost:inherited=true>
{% for cat in categories -%}
{%- assign indent = cat.parent_names | size -%}
<li class=cat-list-item{% if indent > 0 %} style="padding-left:{{ indent }}rem;"{% endif %}>
+2 -2
View File
@@ -1,7 +1,7 @@
<article class=auto>
<h1 class=entry-title>{{ page.title }}</h1>
<div class=entry-content>{{ page.text }}</div>
<div class=entry-content hx-boost:inherited=true>{{ page.text }}</div>
{%- if is_logged_on %}
<p><small><a href="{{ page | edit_page_link }}">Edit Page</a></small></p>
<p><small><a hx-boost=false href="{{ page | edit_page_link }}">Edit Page</a></small></p>
{% endif -%}
</article>
+5 -9
View File
@@ -11,8 +11,7 @@
</p>
{%- assign cat_count = post.category_ids | size -%}
{%- if cat_count > 0 %}
<p hx-boost:inherited=true hx-target:inherited="#content" hx-swap:inherited="innerHTML show:top showTarget:#top"
hx-indicator:inherited="#loadOverlay">
<p hx-boost:inherited=true>
<small>
Categorized under
{% for cat_id in post.category_ids -%}
@@ -24,12 +23,11 @@
</p>
{%- endif %}
</header>
<div class=entry-content>{{ post.text }}</div>
<div class=entry-content hx-boost:inherited=true>{{ post.text }}</div>
<footer class=entry-footer>
{%- assign tag_count = post.tags | size -%}
{%- if tag_count > 0 %}
<p hx-boost:inherited=true hx-target:inheritied="#content" hx-swap:inherited="innerHTML show:top showTarget:#top"
hx-indicator:inherited="#loadOverlay">
<p hx-boost:inherited=true>
Tagged:
{% for tag in post.tags -%}
<a href="{{ tag | tag_link }}" title="Tagged &ldquo;{{ tag | escape }}&rdquo;"
@@ -54,15 +52,13 @@
{% if model.newer_link -%}
<p>
Next Newer Post:
<a href="{{ model.newer_link.value | relative_link }}" hx-boost=true hx-target="#content"
hx-swap="innerHTML show:top showTarget:#top" hx-indicator="#loadOverlay">{{ model.newer_name.value }}</a>
<a href="{{ model.newer_link.value | relative_link }}" hx-boost=true>{{ model.newer_name.value }}</a>
</p>
{% endif %}
{% if model.older_link -%}
<p>
Next Older Post:
<a href="{{ model.older_link.value | relative_link }}" hx-boost=true hx-target="#content"
hx-swap="innerHTML show:top showTarget:#top" hx-indicator="#loadOverlay">{{ model.older_name.value }}</a>
<a href="{{ model.older_link.value | relative_link }}" hx-boost=true>{{ model.older_name.value }}</a>
</p>
{%- endif -%}
</footer>
+1 -1
View File
@@ -1,2 +1,2 @@
The Bit Badger Blog
1.0.1
20260724