2026-06-05 14:31:12 -06:00
|
|
|
---
|
|
|
|
|
import Layout from '../../layouts/Layout.astro';
|
|
|
|
|
import { getCollection, getEntry, render } from 'astro:content';
|
|
|
|
|
import { type CollectionEntry } from 'astro:content';
|
|
|
|
|
import { dateFormat } from '../../utils/date';
|
|
|
|
|
import { urlfrag } from '../../utils/path';
|
|
|
|
|
import { titleCase } from '../../utils/strings';
|
|
|
|
|
|
|
|
|
|
interface Props {
|
|
|
|
|
note: CollectionEntry<'notes'>;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export async function getStaticPaths() {
|
|
|
|
|
const notes = await getCollection('notes');
|
|
|
|
|
return notes.map((note: CollectionEntry<'notes'>) => ({
|
2026-07-07 15:33:28 -06:00
|
|
|
params: { id: note.id.replace(/-/, '/') },
|
2026-06-05 14:31:12 -06:00
|
|
|
props: { note },
|
|
|
|
|
}));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
const base = import.meta.env.BASE_URL;
|
|
|
|
|
const { note } = Astro.props;
|
|
|
|
|
const { Content } = await render(note);
|
|
|
|
|
|
|
|
|
|
const meta = `{
|
|
|
|
|
"@context": "https://schema.org",
|
|
|
|
|
"@type": "BlogPosting",
|
2026-06-06 23:26:44 -06:00
|
|
|
"headline": "${note.data.title}",
|
|
|
|
|
"image": "${urlfrag(base, note.data.post_image)}",
|
2026-06-05 14:31:12 -06:00
|
|
|
"author": {"@type": "Person", "name": "Benjamin A. Shelton"},
|
|
|
|
|
"publisher": {"@type": "Organization", "name": "Just Us"},
|
2026-06-06 23:26:44 -06:00
|
|
|
"datePublished": "${note.data.date.toISOString()}",
|
|
|
|
|
"dateModified": "${note.data.date.toISOString()}"
|
2026-06-05 14:31:12 -06:00
|
|
|
}`;
|
|
|
|
|
|
|
|
|
|
---
|
|
|
|
|
|
2026-08-10 14:59:05 -06:00
|
|
|
<Layout title=`${note.data.title} - ${note.data.sub_heading}` image=`${urlfrag(base, note.data.post_image)}`>
|
2026-06-05 14:31:12 -06:00
|
|
|
{meta && <script type="application/ld+json" is:inline set:html={meta} />}
|
2026-07-29 22:55:24 -06:00
|
|
|
<script>
|
|
|
|
|
import { bindModals } from '../../utils/modal.js';
|
|
|
|
|
bindModals();
|
|
|
|
|
</script>
|
2026-06-05 14:31:12 -06:00
|
|
|
<article class="mx-auto p-4 lg:p-0 lg:max-w-6xl xl:p-0 xl:max-w-6xl 2xl:p-0 2xl:max-w-6xl" id="notes-page">
|
2026-06-11 18:57:20 -06:00
|
|
|
<div class="header">
|
|
|
|
|
<hgroup>
|
|
|
|
|
<h1 id="title">{note.data.title}</h1>
|
|
|
|
|
<h2 id="subtitle">{note.data.sub_heading}</h2>
|
|
|
|
|
</hgroup>
|
|
|
|
|
<section id="meta">
|
|
|
|
|
<time>{dateFormat(note.data.date)}</time>
|
|
|
|
|
<ul class="tags">
|
|
|
|
|
{note.data.tags?.filter((tag: string) => (tag != 'notes')).map((tag: string) => (
|
|
|
|
|
<li>{titleCase(tag)}</li>
|
|
|
|
|
))}</ul>
|
|
|
|
|
</section>
|
2026-06-05 14:31:12 -06:00
|
|
|
</div>
|
|
|
|
|
<div id="content" class="p-6">
|
|
|
|
|
<Content />
|
|
|
|
|
</div>
|
2026-07-29 22:55:24 -06:00
|
|
|
<dialog data-scripture=""
|
2026-08-11 20:56:28 -06:00
|
|
|
class="p-0 rounded-sm w-full lg:max-w-lg xl:max-w-lg 2xl:max-w-lg m-auto flex-col flex hidden scripture">
|
2026-07-30 16:17:31 -06:00
|
|
|
<div tabindex="-1" autofocus class="p-4">
|
2026-08-06 15:41:25 -06:00
|
|
|
<button data-close="">
|
|
|
|
|
<span class="align-middle">close</span>
|
|
|
|
|
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-x-circle inline" viewBox="0 0 16 16">
|
|
|
|
|
<path d="M8 15A7 7 0 1 1 8 1a7 7 0 0 1 0 14m0 1A8 8 0 1 0 8 0a8 8 0 0 0 0 16"/>
|
|
|
|
|
<path d="M4.646 4.646a.5.5 0 0 1 .708 0L8 7.293l2.646-2.647a.5.5 0 0 1 .708.708L8.707 8l2.647 2.646a.5.5 0 0 1-.708.708L8 8.707l-2.646 2.647a.5.5 0 0 1-.708-.708L7.293 8 4.646 5.354a.5.5 0 0 1 0-.708"/>
|
|
|
|
|
</svg>
|
|
|
|
|
</button>
|
2026-08-06 20:01:18 -06:00
|
|
|
<div class="spinner">
|
|
|
|
|
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-book-fill hidden" viewBox="0 0 16 16">
|
|
|
|
|
<path d="M8 1.783C7.015.936 5.587.81 4.287.94c-1.514.153-3.042.672-3.994 1.105A.5.5 0 0 0 0 2.5v11a.5.5 0 0 0 .707.455c.882-.4 2.303-.881 3.68-1.02 1.409-.142 2.59.087 3.223.877a.5.5 0 0 0 .78 0c.633-.79 1.814-1.019 3.222-.877 1.378.139 2.8.62 3.681 1.02A.5.5 0 0 0 16 13.5v-11a.5.5 0 0 0-.293-.455c-.952-.433-2.48-.952-3.994-1.105C10.413.809 8.985.936 8 1.783"/>
|
|
|
|
|
</svg>
|
|
|
|
|
</div>
|
2026-08-06 15:41:25 -06:00
|
|
|
<article class="mt-6">
|
|
|
|
|
</article>
|
|
|
|
|
<nav>
|
2026-08-06 18:19:27 -06:00
|
|
|
<a href="#" class="bg">
|
2026-08-07 13:39:57 -06:00
|
|
|
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-link-45deg inline" viewBox="0 0 16 16">
|
|
|
|
|
<path d="M4.715 6.542 3.343 7.914a3 3 0 1 0 4.243 4.243l1.828-1.829A3 3 0 0 0 8.586 5.5L8 6.086a1 1 0 0 0-.154.199 2 2 0 0 1 .861 3.337L6.88 11.45a2 2 0 1 1-2.83-2.83l.793-.792a4 4 0 0 1-.128-1.287z"/>
|
|
|
|
|
<path d="M6.586 4.672A3 3 0 0 0 7.414 9.5l.775-.776a2 2 0 0 1-.896-3.346L9.12 3.55a2 2 0 1 1 2.83 2.83l-.793.792c.112.42.155.855.128 1.287l1.372-1.372a3 3 0 1 0-4.243-4.243z"/>
|
|
|
|
|
</svg>
|
2026-08-09 14:20:40 -06:00
|
|
|
<span class="align-middle">Open <span class="scripture underline"></span> on Bible Gateway</span>
|
2026-08-07 13:39:57 -06:00
|
|
|
</a>
|
2026-08-06 15:41:25 -06:00
|
|
|
</nav>
|
2026-07-30 16:17:31 -06:00
|
|
|
</div>
|
2026-07-31 16:44:46 -06:00
|
|
|
</dialog>
|
2026-06-05 14:31:12 -06:00
|
|
|
</article>
|
|
|
|
|
</Layout>
|