Merge branch 'master' into usx-parser

This commit is contained in:
Benjamin A. Shelton 2026-06-24 15:15:34 -06:00
commit 8b4ce261b1
Signed by: zancarius
GPG key ID: 8BD42DBD6C337E01
5 changed files with 229 additions and 22 deletions

View file

@ -0,0 +1,3 @@
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-circle-half" viewBox="0 0 16 16">
<path d="M8 15A7 7 0 1 0 8 1zm0 1A8 8 0 1 1 8 0a8 8 0 0 1 0 16"/>
</svg>

After

Width:  |  Height:  |  Size: 205 B

View file

@ -1,9 +1,12 @@
---
import "../styles/global.css";
import Icon from '../assets/circle-half.svg';
---
<footer>
<ul>
<li>&copy; 2026 <a href="https://bashelton.com/">Benjamin A. Shelton</a></li>
<li><a href="https://creativecommons.org/licenses/by-nc-sa/4.0/">CC BY-NC-SA 4.0</a></li>
<li><a href="https://git.destrealm.org/zancarius/sundays">revised § June 2026</a></li>
<li>Content License: <a href="https://creativecommons.org/licenses/by-nc-sa/4.0/">CC BY-NC-SA 4.0</a></li>
<li>Revised § <a href="https://git.destrealm.org/zancarius/sundays">June 2026</a></li>
<li><button data-toggle-theme><Icon /></button></li>
</ul>
</footer>

View file

@ -8,21 +8,21 @@ import { titleCase } from '../utils/strings';
import { type CollectionEntry } from 'astro:content';
const scriptureStyles: {[index: string]:string} = {
gospels: 'bg-gospels',
pentateuch: 'bg-pentateuch',
historic: 'bg-historic',
acts: 'bg-acts',
wisdom: 'bg-wisdom',
pauline: 'bg-pauline',
prophets: 'bg-prophets',
revelation: 'bg-revelation',
devotional: 'bg-devotional',
gospels: 'gospels',
pentateuch: 'pentateuch',
historic: 'historic',
acts: 'acts',
wisdom: 'wisdom',
pauline: 'pauline',
prophets: 'prophets',
revelation: 'revelation',
devotional: 'devotional',
};
const getScriptureStyle = (cat: any): string => {
if (cat in scriptureStyles) {
return scriptureStyles[cat];
}
return 'bg-gospels';
return 'gospels';
};
const base = import.meta.env.BASE_URL;

View file

@ -18,6 +18,116 @@ const base = import.meta.env.BASE_URL;
<link rel="icon" href={urlfrag(base, 'favicon.png')} />
<meta name="generator" content={Astro.generator} />
<title>{title}</title>
<script is:inline>
function hasLocalStorage() {
try {
var ls = localStorage;
var key = "__test";
ls.setItem(key, key);
ls.removeItem(key);
return true;
} catch (e) {
return (
e instanceof DOMException &&
e.name === "QuotaExceededError" &&
localStorage &&
localStorage.length !== 0
);
}
}
var theme = 'light';
if (hasLocalStorage()) {
theme = (('theme' in localStorage) && localStorage.theme !== 'undefined') ? localStorage.theme : 'light';
}
switch (theme) {
case 'light':
document.documentElement.classList.remove('dark');
break
case 'dark':
document.documentElement.classList.toggle('dark', true);
break
default:
if (matchMedia('(prefers-color-scheme: dark').matches) {
document.documentElement.classList.toggle('dark', true);
} else {
document.documentElement.classList.remove('dark');
}
}
</script>
<script>
class ThemeToggler {
elements: NodeListOf<Element>;
btnState: string = 'light';
constructor() {
this.toggleClass();
if ('theme' in localStorage && localStorage.theme !== 'undefined') {
this.btnState = localStorage.theme;
} else {
this.btnState = 'system';
}
this.elements = document.querySelectorAll('[data-toggle-theme]');
this.elements.forEach((e) => {
this.setState(e, this.btnState);
e.addEventListener('click', this);
});
}
handleEvent() {
const state = localStorage.theme;
this.elements.forEach((e) => {
this.setNextState(e, state);
const s = this.getState(e);
if (s != localStorage.theme) {
localStorage.theme = this.getState(e);
}
});
this.toggleClass();
}
getState(element: Element): string {
const attr = element.getAttribute('data-toggle-theme');
return attr != null ? attr : 'light';
}
getSysTheme(): string {
return window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light';
}
setState(element: Element, state: string) {
element.setAttribute('data-toggle-theme', state);
}
setNextState(element: Element, state: string) {
const states = ['light', 'dark', 'system'];
let next = states.indexOf(state) + 1;
if (next === states.length) {
next = 0;
}
element.setAttribute('data-toggle-theme', states[next]);
}
sysTheme(): string {
return window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light';
}
toggleClass() {
const ele = document.documentElement;
switch (localStorage.theme) {
case 'light':
ele.classList.remove('dark');
break;
case 'dark':
ele.classList.add('dark');
break;
default:
ele.classList.toggle('dark', this.getSysTheme() === 'dark');
}
}
}
new ThemeToggler();
</script>
</head>
<body class="flex flex-col min-h-screen">
<Header />

View file

@ -2,6 +2,8 @@
@source "../layouts/**/*.astro";
@source "../pages/**/*.astro";
@custom-variant dark (&:where(.dark, .dark *));
@theme {
--color-sunday-theme: #28303c;
@ -18,6 +20,46 @@
--color-revelation: #7c0808;
--color-devotional: #b8c9d6;
--color-devotional-dark: #6b757d;
}
#notes-list ul.tags {
li.gospels {
@apply bg-gospels;
}
li.pentateuch {
@apply bg-pentateuch;
}
li.historic {
@apply bg-historic;
}
li.acts {
@apply bg-acts;
}
li.wisdom {
@apply bg-wisdom;
}
li.pauline {
@apply bg-pauline;
}
li.prophets {
@apply bg-prophets;
}
li.revelation {
@apply bg-revelation;
}
li.devotional {
@apply bg-devotional text-gray-800 text-shadow-none;
@apply dark:bg-devotional-dark dark:text-white dark:text-shadow-md dark:text-shadow-gray-800;
}
}
body {
@apply dark:bg-gray-900;
}
body {
@apply dark:bg-gray-900;
}
header {
@ -25,17 +67,49 @@ header {
}
footer {
@apply justify-center flex mt-4 p-8 text-gray-500 text-sm;
a {
border-bottom: 5px;
@apply bg-sunday-theme font-mono mt-4 p-8 text-gray-500 text-sm;
@apply dark:bg-neutral-950;
ul li {
@apply block mb-4;
}
ul li a {
@apply border-b-2 border-gray-500 hover:text-gray-300 hover:border-gray-300;
}
button {
@apply border-gray-500 rounded-md p-4 font-mono hover:bg-gray-700 hover:border-gray-400 hover:text-gray-400;
border-style: solid;
@apply border-cyan-100 transition duration-500 ease-in-out hover:border-cyan-900 hover:text-gray-700;
border-width: 1px;
}
ul > li {
@apply inline pr-2;
button[data-toggle-theme] svg {
@apply text-amber-500 inline mr-4 transition-transform duration-500;
transform: rotate(90deg);
filter: drop-shadow(0px 0px 4px var(--color-amber-500));
}
ul > li:last-child {
@apply pr-0;
button[data-toggle-theme]:first-child:after {
content: "light";
@apply align-middle;
}
button[data-toggle-theme="dark"]:first-child:after {
content: "dark";
}
button[data-toggle-theme="dark"] svg {
@apply text-neutral-300;
transform: rotate(270deg);
filter: drop-shadow(0px 0px 4px var(--color-neutral-300));
}
button[data-toggle-theme="system"]:first-child:after {
content: "system";
}
button[data-toggle-theme="system"] svg {
@apply text-purple-700;
transform: rotate(180deg);
filter: drop-shadow(0px 0px 4px var(--color-purple-700));
}
}
@ -49,12 +123,14 @@ footer {
#notes-list > ul > li {
@apply flex flex-col rounded-xl bg-gray-100 p-2 hover:bg-gray-200;
@apply dark:text-gray-300 dark:bg-gray-800 dark:hover:bg-gray-700;
}
#notes-list ul > li h2 a {
border-bottom: 5px;
border-style: solid;
@apply border-cyan-300 transition duration-500 ease-in-out hover:border-cyan-900 hover:text-cyan-900;
@apply dark:border-cyan-600 hover:border-cyan-500 hover:text-cyan-500;
}
#notes-list ul > li > hgroup {
@ -86,6 +162,7 @@ footer {
article#notes-page {
@apply pt-4 text-xl;
@apply dark:text-gray-200;
hgroup h1 {
@apply font-bold mt-8 mb-8 text-3xl lg:text-6xl;
}
@ -94,33 +171,41 @@ article#notes-page {
}
.header {
@apply bg-gray-100 rounded-md p-6 bg-linear-to-b from-gray-100 to-gray-200;
@apply dark:bg-gray-800 dark:from-gray-700 dark:to-gray-800;
}
#content {
a {
border-bottom: 5px;
border-style: solid;
@apply border-cyan-300 transition duration-500 ease-in-out hover:border-cyan-900 hover:text-cyan-600;
@apply dark:border-blue-500 dark:hover:border-blue-300 dark:hover:text-blue-300;
}
a.scripture {
@apply border-green-400 hover:border-green-700 hover:text-green-800;
@apply dark:border-emerald-600 dark:hover:border-emerald-400 dark:hover:text-emerald-400;
}
a.scripture.cite {
@apply font-bold bg-purple-50 border-purple-100 text-gray-800 hover:text-black;
@apply dark:bg-purple-950 dark:border-purple-900 dark:text-gray-300 dark:hover:text-gray-300;
}
a.scripture.cite[href]:not([href=""]) {
@apply border-purple-400 hover:border-purple-900 hover:text-purple-900;
@apply dark:border-purple-950 dark:hover:border-purple-900 dark:hover:text-gray-300;
}
a.scripture.quote {
@apply font-bold text-rose-900;
}
a.scripture.quote:not([href]) {
@apply border-none text-rose-900 hover:text-rose-900;
@apply dark:text-rose-400 dark:hover:text-rose-400;
}
a.scripture.quote[href]:not([href=""]) {
@apply border-rose-900 hover:text-rose-800 hover:border-rose-800;
@apply dark:border-rose-400 dark:hover:text-rose-500 dark:hover:border-rose-500;
}
a.scripture.quote, a.scripture.quote.cite {
@apply border-rose-900 text-rose-900;
@apply dark:border-rose-400 dark:text-rose-400;
}
h1, h2, h3, h4, h5, h6 {
@apply font-bold mb-6 mt-6;
@ -160,6 +245,7 @@ article#notes-page {
}
section#meta {
@apply text-gray-600 mb-2 text-lg;
@apply dark:text-gray-300;
time {
@apply inline;
}
@ -189,20 +275,24 @@ nav#pagination {
@apply inline;
}
li a {
@apply bg-gray-100 font-bold p-4 rounded-md text-cyan-900 text-sm hover:bg-gray-200 hover:text-black;
@apply bg-gray-100 font-bold mb-2 p-4 rounded-md text-cyan-900 text-sm hover:bg-gray-200 hover:text-black inline;
@apply dark:bg-gray-700 dark:text-blue-300 dark:hover:text-gray-300 dark:hover:bg-gray-600;
}
li a.disabled {
@apply text-gray-400 bg-gray-50 hover:bg-gray-50;
@apply dark:bg-gray-800 dark:text-gray-500 dark:hover:bg-gray-800;
}
}
article blockquote {
@apply border-l-4 border-l-green-200 text-gray-600 ml-6 pl-4;
@apply border-l-4 border-l-green-200 text-gray-600 ml-2 md:ml-6 lg:ml-6 xl:ml-6 pl-4;
@apply dark:border-l-emerald-600 dark:text-gray-400;
}
article blockquote.scripture {
/*@apply italic;*/
@apply bg-gray-50 pt-1 pb-1 pl-4 pr-2;
@apply dark:bg-gray-700;
}
article blockquote.cite {
@ -211,4 +301,5 @@ article blockquote.cite {
article#notes-page #content blockquote.scripture > p > a {
@apply border-b-green-200 text-lg text-gray-400 not-italic transition duration-500 ease-in-out hover:border-b-green-800 hover:text-gray-800;
@apply dark:border-b-emerald-600 dark:hover:text-emerald-300 dark:hover:border-b-emerald-500;
}