-Hexo +myWebLog

This commit is contained in:
2023-03-20 08:38:58 -04:00
parent 21a9e824fc
commit 203fef3c24
141 changed files with 389 additions and 9286 deletions

56
theme/index.liquid Normal file
View File

@@ -0,0 +1,56 @@
{% if is_category or is_tag %}
<h1>{{ page_title }}</h1>
{%- if subtitle %}
<p>{{ subtitle }}</p>
{%- endif %}
{% endif %}
{%- for post in model.posts %}
<article class="auto">
<div>
<h1 class="home-title">
<small class="home-lead">{{ post.published_on | date: "dddd, MMMM d, yyyy" }}</small><br>
&nbsp;
<a href="{{ post | relative_link }}"
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>
{%- assign cat_count = post.category_ids | size -%}
{%- if cat_count > 0 %}
<small>
Categorized under
{% for cat_id in post.category_ids -%}
{%- assign cat = categories | where: "Id", cat_id | first -%}
<a href="{{ cat | category_link }}" title="Categorized under {{ cat.name | strip_html | escape }}"
rel="tag">{{ cat.name }}</a>{% unless forloop.last %}, {% endunless %}
{%- endfor %}
</small><br>
{%- endif %}
{%- assign tag_count = post.tags | size -%}
{%- if tag_count > 0 %}
<small>
Tagged
{% for tag in post.tags -%}
<a href="{{ tag | tag_link }}" title="Tagged &ldquo;{{ tag | escape }}&rdquo;"
rel="tag">{{ tag }}</a>{% unless forloop.last %}, {% endunless %}
{%- endfor %}
</small><br>
{%- endif %}
{%- if logged_on %}<small><a hx-boost="false" href="{{ post | edit_post_link }}">Edit Post</a></small>{% endif %}
</article>
{%- endfor %}
<div class="bottom-nav" role="navigation">
<div class="nav-previous">
{% if model.newer_link -%}
<a href="{{ model.newer_link.value }}">&laquo; Newer Posts</a>
{% endif %}
</div>
<div class="nav-next">
{% if model.older_link -%}
<a href="{{ model.older_link.value }}">Older Posts &raquo;</a>
{% endif %}
</div>
</div>

View File

@@ -0,0 +1,14 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>
{%- if is_home -%}
{{ web_log.name }}{% if web_log.subtitle %} | {{ web_log.subtitle.value }}{% endif %}
{%- else -%}
{{ page_title | strip_html }}{% if page_title and page_title != "" %} &raquo; {% endif %}{{ web_log.name }}
{%- endif -%}
</title>
</head>
<body>{{ content }}</body>
</html>

92
theme/layout.liquid Normal file
View File

@@ -0,0 +1,92 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>
{%- if is_home -%}
{{ web_log.name }}{% if web_log.subtitle %} | {{ web_log.subtitle.value }}{% endif %}
{%- else -%}
{{ page_title | strip_html }}{% if page_title and page_title != "" %} &raquo; {% endif %}{{ web_log.name }}
{%- endif -%}
</title>
{% page_head -%}
</head>
<body>
<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:top"
hx-indicator="#loadOverlay">
<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:top"
hx-indicator="#loadOverlay">
The Bit Badger Blog
</a>
</div>
<div class="header-spacer">&nbsp;</div>
<div class="header-social">
<a href="{{ "feed.xml" | relative_link }}" title="Subscribe to The Bit Badger Blog via RSS">
<img src="{{ "img/rss.png" | theme_asset }}" alt="RSS">
</a> &nbsp; &nbsp;
<a href="https://twitter.com/Bit_Badger" title="Bit_Badger on Twitter">
<img src="{{ "img/twitter.png" | theme_asset }}" alt="Twitter">
</a> &nbsp; &nbsp;
<a href="https://www.facebook.com/bitbadger.solutions" title="Bit Badger Solutions on Facebook">
<img src="{{ "img/facebook.png" | theme_asset }}" alt="Facebook">
</a>
</div>
</header>
<div class="content-wrapper" hx-boost="true" hx-target="#content" hx-swap="innerHTML show:#top:top"
hx-indicator="#loadOverlay">
<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>
</div>
<div>
<div class="sidebar-head">Categories</div>
<ul class="cat-list">
{% for cat in categories -%}
{%- assign indent = cat.parent_names | size -%}
<li class="cat-list-item"{% if indent > 0 %} style="padding-left:{{ indent }}rem;"{% endif %}>
<a href="{{ cat | category_link }}" class="cat-list-link">{{ cat.name }}</a>
<span class="cat-list-count">{{ cat.post_count }}</span>
</li>
{%- endfor %}
</ul>
</div>
</aside>
</div>
<footer class="site-footer">
<span>
A production of
<a href="https://bitbadger.solutions" title="Bit Badger Solutions" target="_blank" rel="noopener"
class="no-wrap">
Bit Badger Solutions
</a>
</span>
<span>
Powered by <a href="https://github.com/bit-badger/myWebLog/tree/v2" target="_blank" rel="noopener">myWebLog</a>
&bull;
{% if logged_on %}
<a href="{{ "admin" | relative_link }}">Dashboard</a>
{% else %}
<a href="{{ "user/log-on" | relative_link }}">Log On</a>
{%- endif %}
</span>
</footer>
{% page_foot %}
</body>
</html>

7
theme/single-page.liquid Normal file
View File

@@ -0,0 +1,7 @@
<article class="auto">
<h1 class="entry-title">{{ page.title }}</h1>
<div class="entry-content">{{ page.text }}</div>
{%- if logged_on %}
<p><small><a hx-boost="false" href="{{ page | edit_page_link }}">Edit Page</a></small></p>
{% endif -%}
</article>

64
theme/single-post.liquid Normal file
View File

@@ -0,0 +1,64 @@
{%- assign post = model.posts | first -%}
<article class="auto">
<h1 class="entry-title">
{{ post.title }}
</h1>
<header class="entry-header">
<p>
Posted by {{ model.authors | value: post.author_id }} on {{ post.published_on | date: "dddd, MMMM d, yyyy" }}
at {{ post.published_on | date: "h:mm tt" | downcase }}
</p>
{%- assign cat_count = post.category_ids | size -%}
{%- if cat_count > 0 %}
<p>
<small>
Categorized under
{% for cat_id in post.category_ids -%}
{%- assign cat = categories | where: "Id", cat_id | first -%}
<a href="{{ cat | category_link }}" title="Categorized under {{ cat.name | strip_html | escape }}"
rel="tag">{{ cat.name }}</a>{% unless forloop.last %}, {% endunless %}
{%- endfor %}
</small>
</p>
{%- endif %}
</header>
<div class="entry-content">{{ post.text }}</div>
<footer class="entry-footer">
{%- assign tag_count = post.tags | size -%}
{%- if tag_count > 0 %}
<p>
Tagged:
{% for tag in post.tags -%}
<a href="{{ tag | tag_link }}" title="Tagged &ldquo;{{ tag | escape }}&rdquo;"
rel="tag">{{ tag }}</a>{% unless forloop.last %}, {% endunless %}
{%- endfor %}
</p>
{%- endif %}
<p>
Bookmark:
<a href="{{ post | absolute_link }}" rel="bookmark"
title="Permanent link to &ldquo;{{ post.title | strip_html | escape }}&rdquo;">
the permalink
</a>
</p>
<p>
{%- if logged_on %}
Edit: <a hx-boost="false" href="{{ post | edit_post_link }}">this post</a>
{% else %}
&nbsp;
{% endif -%}
</p>
{% if model.newer_link -%}
<p>
Next Newer Post:
<a href="{{ model.newer_link.value | relative_link }}">{{ model.newer_name.value }}</a>
</p>
{% endif %}
{% if model.older_link -%}
<p>
Next Older Post:
<a href="{{ model.older_link.value | relative_link }}">{{ model.older_name.value }}</a>
</p>
{%- endif -%}
</footer>
</article>

2
theme/version.txt Normal file
View File

@@ -0,0 +1,2 @@
The Bit Badger Blog
1.0.1

BIN
theme/wwwroot/favicon.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.4 KiB

BIN
theme/wwwroot/img/rss.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

484
theme/wwwroot/style.css Normal file
View File

@@ -0,0 +1,484 @@
@import url('https://fonts.googleapis.com/css?family=Oswald|Raleway');
@font-face {
font-family: 'JetBrains Mono';
src: url('https://raw.githubusercontent.com/JetBrains/JetBrainsMono/master/fonts/webfonts/JetBrainsMono-Regular.woff2') format('woff2'),
url('https://raw.githubusercontent.com/JetBrains/JetBrainsMono/master/fonts/ttf/JetBrainsMono-Regular.ttf') format('truetype');
font-weight: normal;
font-style: normal;
}
:root {
--heading-fonts: Oswald, "Segoe UI", Ubuntu, "DejaVu Sans", "Liberation Sans", Arial, sans-serif;
--body-fonts: Raleway, "Segoe UI", Ubuntu, Tahoma, "DejaVu Sans", "Liberation Sans", Arial, sans-serif;
--code-fonts: "JetBrains Mono", "SFMono-Regular", Consolas, "Liberation Mono", Menlo, Courier, monospace;
--accent-color: navy;
--app-color: maroon;
--edge-color: lightgray;
--bkg-color: #fffafa;
}
html {
background-color: lightgray;
scroll-behavior: smooth;
}
body, .entry-meta {
font-family: var(--body-fonts);
}
body {
margin: 0;
background-color: #FFFAFA;
}
a {
color: navy;
text-decoration: none;
}
a:hover {
border-bottom: dotted 1px var(--accent-color);
}
a img {
border:0;
}
acronym {
border-bottom:dotted 1px black;
text-decoration: none;
}
.site-header, h1, h2, h3, .site-footer a, .home-lead a, .highlight {
font-family: var(--heading-fonts);
}
h1 {
text-align: center;
margin: 1.4rem 0;
font-size: 2rem;
}
h2 {
margin: 1.2rem 0;
}
h3 {
margin: 1rem 0;
}
h2, h3 {
border-bottom: solid 2px var(--accent-color);
width: 95%;
}
@media all and (min-width: 40rem) {
h2, h3 {
width: 80%;
}
}
p {
margin: 1rem 0;
}
code, pre {
font-family: var(--code-fonts);
font-size: 80%;
}
code {
background-color: rgba(0, 0, 0, .1);
padding: 0 .25rem;
white-space: pre;
}
pre {
background-color: rgba(0, 0, 0, .9);
color: rgba(255, 255, 255, .9);
padding: .5rem;
border-radius: .5rem;
overflow: auto;
}
pre > code {
background-color: unset;
}
div[style="color:#DADADA;background-color:#1E1E1E;"] {
background-color: unset !important;
}
.content {
font-size: 1.1rem;
}
.auto {
margin: 0 auto;
}
@media all and (min-width: 68rem) {
.content {
width: 66rem;
}
}
.hdr {
font-size: 14pt;
font-weight: bold;
}
.site-header {
height: 100px;
display: flex;
flex-direction: row;
justify-content: space-between;
background-image: -webkit-gradient(linear, left top, left bottom, from(var(--edge-color)), to(var(--bkg-color)));
background-image: -webkit-linear-gradient(top, var(--edge-color), var(--bkg-color));
background-image: -moz-linear-gradient(top, var(--edge-color), var(--bkg-color));
background-image: linear-gradient(to bottom, var(--edge-color), var(--bkg-color));
}
.site-header a:link, .site-header a:visited {
color: black;
}
.site-header a:hover {
border-bottom:none;
}
.header-title {
font-size: 3rem;
font-weight: bold;
line-height: 100px;
text-align: center;
}
.header-spacer {
flex-grow: 3;
}
.header-social {
padding: 25px .8rem 0 0;
}
.header-social img {
width: 50px;
height: 50px;
}
@media all and (max-width: 40rem) {
.site-header {
height: auto;
flex-direction: column;
align-items: center;
}
.header-title {
line-height: 3rem;
}
.header-spacer {
display: none;
}
.header-social {
padding-right: 0;
}
}
.content-item {
padding-left: 5px;
padding-right: 5px;
font-size: 1rem;
}
article.page .metadata {
display: none;
}
.strike {
text-decoration: line-through;
}
.site-footer {
padding: 20px 15px 10px 15px;
display: flex;
flex-direction: row;
justify-content: space-between;
font-size: 1rem;
color: black;
clear: both;
background-image: -webkit-gradient(linear, left top, left bottom, from(var(--bkg-color)), to(var(--edge-color)));
background-image: -webkit-linear-gradient(top, var(--bkg-color), var(--edge-color));
background-image: -moz-linear-gradient(top, var(--bkg-color), var(--edge-color));
background-image: linear-gradient(to bottom, var(--bkg-color), var(--edge-color));
}
.site-footer a:link, .site-footer a:visited {
color: black;
}
.alignleft {
float:left;
padding-right: 5px;
}
ul {
padding-left: 1.5rem;
}
li {
list-style-type: disc;
}
.content-wrapper {
padding: 0 .5rem;
}
@media all and (min-width: 80rem) {
.content-wrapper {
margin: 0;
display: flex;
flex-flow: row;
align-items: flex-start;
justify-content: space-around;
}
.content {
margin-right: 1rem;
}
}
.load-overlay {
position: fixed;
display: block;
width: 90%;
height: 0;
z-index: 2000;
background-color: rgba(0, 0, 0, .5);
border-radius: 1rem;
animation: fadeOut .25s ease-in-out;
overflow: hidden;
}
.load-overlay h1 {
color: white;
background-color: rgba(0, 0, 0, .75);
margin-left: auto;
margin-right: auto;
border-radius: 1rem;
width: 50%;
padding: 1rem;
}
.load-overlay.htmx-request {
display: block;
height: 80vh;
animation: fadeIn .25s ease-in-out;
}
@keyframes fadeIn {
0% {
opacity: 0;
height: 80vh;
}
100% {
opacity: 1;
height: 80vh;
}
}
@keyframes fadeOut {
0% {
opacity: 1;
height: 80vh;
}
99% {
opacity: 0;
height: 80vh;
}
100% {
opacity: 0;
height: 0;
}
}
@media all and (min-width: 68rem) {
.content {
width: 66rem;
}
.load-overlay {
width: 60rem;
left: 2rem;
}
}
.home-title {
text-align: left;
line-height: 2rem;
}
.home-lead {
font-family: var(--body-fonts);
font-size: 1.2rem;
}
.home-break {
width: 80%;
border: dotted 1px var(--edge-color);
border-bottom: 0;
}
.blog-sidebar {
border-top: dotted 1px var(--edge-color);
padding-top: 1rem;
font-size: 1rem;
display: flex;
flex-flow: row wrap;
justify-content: space-around;
}
.blog-sidebar ul {
padding-left: 0;
}
.blog-sidebar > ul {
padding: 0;
margin: 0;
}
.blog-sidebar li {
list-style: none;
}
.blog-sidebar li:before {
content: '» ';
}
@media all and (min-width: 68rem) {
.blog-sidebar {
width: 66rem;
margin: auto;
}
}
@media all and (min-width: 80rem) {
.blog-sidebar {
min-width: 12rem;
max-width: 14rem;
border-top: none;
border-left: dotted 1px var(--edge-color);
padding-top: 0;
padding-left: 1rem;
margin: 0 0 0 1rem;
flex-direction: column;
}
}
.blog-sidebar a {
font-size: 10pt;
font-family: sans-serif;
}
.sidebar-head {
text-align: center;
font-family: var(--heading-fonts);
font-weight: bold;
color: var(--app-color);
margin-bottom: .8rem;
padding: 3px 12px;
border-bottom: solid 2px var(--edge-color);
font-size: 1rem;
}
.app-sidebar-name, .app-sidebar-description {
margin: 0;
padding: 0;
}
.app-sidebar-description {
font-style: italic;
color: #555555;
padding-bottom: .6rem;
}
.content {
font-size: 1.1rem;
}
.auto {
margin: 0 auto;
}
.auto > div {
max-width: 66rem;
}
.entry-title {
line-height: 1;
}
.entry-header {
text-align: center;
font-weight: bold;
font-size: 1rem;
}
.entry-content {
margin-top: 1.5rem;
}
.entry-footer {
font-size: 85%;
border-top: solid 1px rgba(0, 0, 0, .2);
}
.entry-header p, .entry-footer p {
margin: .5rem 0;
}
.cat-list-count {
font-size: .8rem;
}
.cat-list-count:before {
content: '(';
}
.cat-list-count:after {
content: ')';
}
.bottom-nav {
display: flex;
flex-flow: row wrap;
justify-content: space-between;
padding-top: 1.5rem;
}
.no-wrap {
white-space: nowrap;
}
figure.highlight {
background-color: #F8F8F8;
}
figure.highlight table {
background-color: #002b36;
width: 100%;
}
figure.highlight td.gutter,
figure.highlight td.code,
figure.highlight pre {
padding: 0;
border: 0;
background-color: #002b36;
color: #839496;
}
figure.highlight td.gutter {
text-align:right;
padding-right: .4rem;
}
figure.highlight td.gutter div.line:after {
content: ':';
color: #586e75;
}
figure.highlight td.code pre div.line:after {
content: '.';
visibility: hidden;
}
figure.highlight pre div.line,
figure.highlight pre div.line > * {
font-family: var(--code-fonts);
}
figure.highlight {
display: block;
overflow-x: auto;
padding: 0.5em;
color: #839496;
border:1px dashed #ddd;
}
figure.highlight .comment,
figure.highlight .quote {
color: #586e75;
}
/* Solarized Green */
figure.highlight .keyword,
figure.highlight .selector-tag,
figure.highlight .addition {
color: #859900;
}
/* Solarized Cyan */
figure.highlight .number,
figure.highlight .string,
figure.highlight .meta .meta-string,
figure.highlight .literal,
figure.highlight .doctag,
figure.highlight .regexp {
color: #2aa198;
}
/* Solarized Blue */
figure.highlight .title,
figure.highlight .section,
figure.highlight .name,
figure.highlight .selector-id,
figure.highlight .selector-class {
color: #268bd2;
}
/* Solarized Yellow */
figure.highlight .attribute,
figure.highlight .attr,
figure.highlight .variable,
figure.highlight .template-variable,
figure.highlight .class .title,
figure.highlight .type {
color: #b58900;
}
/* Solarized Orange */
figure.highlight .symbol,
figure.highlight .bullet,
figure.highlight .subst,
figure.highlight .meta,
figure.highlight .meta .keyword,
figure.highlight .selector-attr,
figure.highlight .selector-pseudo,
figure.highlight .link {
color: #cb4b16;
}
/* Solarized Red */
figure.highlight .built_in,
figure.highlight .deletion {
color: #dc322f;
}
figure.highlight .formula {
background: #eee8d5;
}
figure.highlight .emphasis {
font-style: italic;
}
figure.highlight .strong {
font-weight: bold;
}