Compare commits
2 Commits
7fb1f05a1e
...
ce4ddf5a17
Author | SHA1 | Date | |
---|---|---|---|
ce4ddf5a17 | |||
c1e82ffb2c |
1
.gitignore
vendored
1
.gitignore
vendored
@ -8,3 +8,4 @@ node_modules
|
||||
!.env.example
|
||||
vite.config.js.timestamp-*
|
||||
vite.config.ts.timestamp-*
|
||||
**/_test.*
|
@ -62,22 +62,31 @@
|
||||
.footer a {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 1rem;
|
||||
gap: 0.45em;
|
||||
|
||||
font-size: 0.9rem;
|
||||
font-size: 1rem;
|
||||
color: var(--content-color-faded);
|
||||
text-decoration: none;
|
||||
text-decoration: underline;
|
||||
text-underline-offset: 0.25em;
|
||||
text-decoration-color: transparent;
|
||||
|
||||
transition: 150ms;
|
||||
will-change: transform;
|
||||
}
|
||||
.footer a:hover {
|
||||
text-decoration-color: currentColor;
|
||||
text-decoration: underline;
|
||||
transform: scale(1.15);
|
||||
}
|
||||
|
||||
.footer svg {
|
||||
width: 1.5em;
|
||||
width: 1em;
|
||||
transition: 150ms;
|
||||
}
|
||||
|
||||
a.prev:hover svg {
|
||||
transform: translateX(-50%);
|
||||
}
|
||||
a.next:hover svg {
|
||||
transform: translateX(50%);
|
||||
}
|
||||
</style>
|
||||
|
||||
@ -104,8 +113,8 @@
|
||||
|
||||
<div class="footer">
|
||||
{#if prev}
|
||||
<a href="/{prev}" data-sveltekit-preload-data="hover">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="w-6 h-6">
|
||||
<a href="/{prev}" class="prev" data-sveltekit-preload-data="hover">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" d="M10.5 19.5L3 12m0 0l7.5-7.5M3 12h18" />
|
||||
</svg>
|
||||
Previous
|
||||
@ -114,9 +123,9 @@
|
||||
|
||||
{#if next}
|
||||
<!-- we use margin-left rather than justify-content so it works regardless of whether the "previous" link exists -->
|
||||
<a href="/{next}" style="margin-left: auto;" data-sveltekit-preload-data="hover">
|
||||
<a href="/{next}" class="next" style="margin-left: auto;" data-sveltekit-preload-data="hover">
|
||||
Next
|
||||
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="w-6 h-6">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" d="M13.5 4.5L21 12m0 0l-7.5 7.5M21 12H3" />
|
||||
</svg>
|
||||
</a>
|
||||
|
@ -89,6 +89,6 @@ function escape(text) {
|
||||
// we aren't going to bother with escaping attributes, so we won't worry about quotes
|
||||
return text
|
||||
.replaceAll('&', '&')
|
||||
.replaceAll('<', '>')
|
||||
.replaceAll('>', '<');
|
||||
.replaceAll('<', '<')
|
||||
.replaceAll('>', '>');
|
||||
}
|
||||
|
@ -16,18 +16,6 @@ for (const path in posts) {
|
||||
}
|
||||
|
||||
|
||||
let ids = new Set();
|
||||
for (const postMeta of postData) {
|
||||
if (postMeta.uuid === undefined) {
|
||||
throw(`Missing UUID for post: ${postMeta.title}`);
|
||||
}
|
||||
if (ids.has(postMeta.uuid)) {
|
||||
throw(`Duplicate UUID in post: ${postMeta.title}`);
|
||||
}
|
||||
ids.add(postMeta.uuid);
|
||||
}
|
||||
|
||||
|
||||
postData.sort((a, b) => {
|
||||
// sorting in reverse, so we flip the intuitive order
|
||||
if (a.date > b.date) return -1;
|
||||
|
@ -2,7 +2,6 @@
|
||||
title: Exposing Docker Containers to your LAN
|
||||
description: If, for some strange reason, you should want to do such a thing.
|
||||
date: 2022-03-21
|
||||
uuid: 81715fb3-990e-487e-9662-fed7b7d02943
|
||||
---
|
||||
<script>
|
||||
import Sidenote from '$lib/Sidenote.svelte';
|
||||
|
@ -2,7 +2,6 @@
|
||||
title: The Hitchiker's Guide to Mesh VPNs
|
||||
description: The golden age of VPNery is upon us.
|
||||
date: 2022-03-17
|
||||
uuid: fc6930ef-979c-4851-bc5a-c0e1b1698061
|
||||
---
|
||||
<script>
|
||||
import Sidenote from '$lib/Sidenote.svelte';
|
||||
|
@ -4,7 +4,6 @@ description: Can we replace passwords with something more user-friendly?
|
||||
date: 2021-04-30
|
||||
draft: true
|
||||
dropcap: false
|
||||
uuid: 696020b3-1513-42a8-b346-634d40f0e9d9
|
||||
---
|
||||
<script>
|
||||
import Sidenote from '$lib/Sidenote.svelte';
|
||||
|
@ -2,7 +2,6 @@
|
||||
title: 'Languages: High and Low'
|
||||
description: How high is up?
|
||||
date: 2022-08-19
|
||||
uuid: 89ae4194-7785-4fac-a841-8bcf5a5a3a2e
|
||||
draft: true
|
||||
---
|
||||
|
||||
|
@ -2,7 +2,6 @@
|
||||
title: Sidenotes
|
||||
description: An entirely-too-detailed dive into how I implemented sidenotes for this blog.
|
||||
date: 2023-08-14
|
||||
uuid: c514c46e-92f3-4078-a76b-e1dafd5f7e07
|
||||
---
|
||||
<script>
|
||||
import Sidenote from '$lib/Sidenote.svelte';
|
||||
|
@ -2,7 +2,6 @@
|
||||
title: Let's Design A Simpler SocketIO
|
||||
date: 2021-10-16
|
||||
description: SocketIO is packed with features. But do we really need all of them all the time?
|
||||
uuid: 95cde7e7-9293-4fab-a0b4-fc6ab7da08c8
|
||||
draft: true
|
||||
---
|
||||
|
||||
|
@ -2,7 +2,6 @@
|
||||
title: Sufficiently Advanced Technology Is Often Distinguishable From Magic
|
||||
description: I see what Arthur C. Clarke was getting at, but I don't think I agree.
|
||||
date: 2022-05-14
|
||||
uuid: 84636766-eb78-4060-a98d-593d8d5b55c9
|
||||
draft: true
|
||||
---
|
||||
<script>
|
||||
|
@ -2,7 +2,6 @@
|
||||
title: Thoughts on Vue vs Svelte
|
||||
description: They're more similar than they are different, but they say the most bitter enemies are those who have the fewest differences.
|
||||
date: 2023-06-29
|
||||
uuid: 8280f0e0-6bf5-43a2-9eac-b8c2508cca29
|
||||
---
|
||||
<script>
|
||||
import Sidenote from '$lib/Sidenote.svelte';
|
||||
|
@ -4,7 +4,7 @@ import { postData } from '../_posts/all.js';
|
||||
|
||||
export function GET() {
|
||||
return new Response(renderFeed(), {
|
||||
headers: {'Content-Type': 'text/xml'}
|
||||
headers: {'Content-Type': 'application/atom+xml'}
|
||||
});
|
||||
}
|
||||
|
||||
@ -12,9 +12,10 @@ export function GET() {
|
||||
function renderFeed() {
|
||||
const feed = tag('feed', {xmlns: 'http://www.w3.org/2005/Atom'});
|
||||
|
||||
feed.addTag('id', {}, [text('https://blog.jfmonty2.com')])
|
||||
feed.addTag('id', {}, [text('https://blog.jfmonty2.com/')])
|
||||
feed.addTag('title', {}, [text("Joe's Blog")]);
|
||||
feed.addTag('link', {href: 'https://blog.jfmonty2.com/'});
|
||||
feed.addTag('link', {rel: 'alternate', href: 'https://blog.jfmonty2.com/'});
|
||||
feed.addTag('link', {rel: 'self', href: 'https://blog.jfmonty2.com/feed/'});
|
||||
|
||||
const lastUpdate = iso(postData[0].updated || postData[0].date);
|
||||
feed.addTag('updated', {}, [text(lastUpdate)]);
|
||||
@ -23,10 +24,11 @@ function renderFeed() {
|
||||
author.addTag('name', {}, [text('Joseph Montanaro')]);
|
||||
|
||||
for (const post of postData) {
|
||||
const url = `https://blog.jfmonty2.com/${post.slug}`
|
||||
const entry = feed.addTag('entry');
|
||||
entry.addTag('title', {}, [text(post.title)]);
|
||||
entry.addTag('link', {rel: 'alternate', href: `https://blog.jfmonty2.com/${post.slug}`});
|
||||
entry.addTag('id', {}, [text(post.uuid)]);
|
||||
entry.addTag('link', {rel: 'alternate', href: url});
|
||||
entry.addTag('id', {}, [text(url)]);
|
||||
|
||||
const publishedDate = iso(post.date);
|
||||
entry.addTag('published', {}, [text(publishedDate)])
|
||||
|
Loading…
x
Reference in New Issue
Block a user