we are so back

This commit is contained in:
Laker Turner 2025-04-23 14:47:12 +01:00
parent 6972a40092
commit 8ac5e73d4a
No known key found for this signature in database
25 changed files with 292 additions and 128 deletions

View file

@ -2,12 +2,15 @@
import { defineConfig } from 'astro/config'; import { defineConfig } from 'astro/config';
import config from './src/site.config' import config from './src/site.config'
import tailwindcss from '@tailwindcss/vite'; import tailwindcss from '@tailwindcss/vite';
import pagefind from "astro-pagefind";
// https://astro.build/config // https://astro.build/config
export default defineConfig({ export default defineConfig({
site: config.site.url, site: config.site.url,
prefetch: true, prefetch: true,
vite: { vite: {
plugins: [tailwindcss()] plugins: [tailwindcss()]
} },
integrations: [
pagefind()
],
}); });

View file

@ -12,6 +12,7 @@
"dependencies": { "dependencies": {
"@tailwindcss/vite": "^4.0.13", "@tailwindcss/vite": "^4.0.13",
"astro": "^5.4.3", "astro": "^5.4.3",
"astro-pagefind": "^1.8.3",
"ava": "^6.2.0", "ava": "^6.2.0",
"clsx": "^2.1.1", "clsx": "^2.1.1",
"luxon": "^3.5.0", "luxon": "^3.5.0",

93
pnpm-lock.yaml generated
View file

@ -14,6 +14,9 @@ importers:
astro: astro:
specifier: ^5.4.3 specifier: ^5.4.3
version: 5.4.3(jiti@2.4.2)(lightningcss@1.29.2)(rollup@4.35.0)(typescript@5.8.2) version: 5.4.3(jiti@2.4.2)(lightningcss@1.29.2)(rollup@4.35.0)(typescript@5.8.2)
astro-pagefind:
specifier: ^1.8.3
version: 1.8.3(astro@5.4.3(jiti@2.4.2)(lightningcss@1.29.2)(rollup@4.35.0)(typescript@5.8.2))
ava: ava:
specifier: ^6.2.0 specifier: ^6.2.0
version: 6.2.0(rollup@4.35.0) version: 6.2.0(rollup@4.35.0)
@ -356,10 +359,41 @@ packages:
'@oslojs/encoding@1.1.0': '@oslojs/encoding@1.1.0':
resolution: {integrity: sha512-70wQhgYmndg4GCPxPPxPGevRKqTIJ2Nh4OkiMWmDAVYsTQ+Ta7Sq+rPevXyXGdzr30/qZBnyOalCszoMxlyldQ==} resolution: {integrity: sha512-70wQhgYmndg4GCPxPPxPGevRKqTIJ2Nh4OkiMWmDAVYsTQ+Ta7Sq+rPevXyXGdzr30/qZBnyOalCszoMxlyldQ==}
'@pagefind/darwin-arm64@1.3.0':
resolution: {integrity: sha512-365BEGl6ChOsauRjyVpBjXybflXAOvoMROw3TucAROHIcdBvXk9/2AmEvGFU0r75+vdQI4LJdJdpH4Y6Yqaj4A==}
cpu: [arm64]
os: [darwin]
'@pagefind/darwin-x64@1.3.0':
resolution: {integrity: sha512-zlGHA23uuXmS8z3XxEGmbHpWDxXfPZ47QS06tGUq0HDcZjXjXHeLG+cboOy828QIV5FXsm9MjfkP5e4ZNbOkow==}
cpu: [x64]
os: [darwin]
'@pagefind/default-ui@1.3.0':
resolution: {integrity: sha512-CGKT9ccd3+oRK6STXGgfH+m0DbOKayX6QGlq38TfE1ZfUcPc5+ulTuzDbZUnMo+bubsEOIypm4Pl2iEyzZ1cNg==}
'@pagefind/linux-arm64@1.3.0':
resolution: {integrity: sha512-8lsxNAiBRUk72JvetSBXs4WRpYrQrVJXjlRRnOL6UCdBN9Nlsz0t7hWstRk36+JqHpGWOKYiuHLzGYqYAqoOnQ==}
cpu: [arm64]
os: [linux]
'@pagefind/linux-x64@1.3.0':
resolution: {integrity: sha512-hAvqdPJv7A20Ucb6FQGE6jhjqy+vZ6pf+s2tFMNtMBG+fzcdc91uTw7aP/1Vo5plD0dAOHwdxfkyw0ugal4kcQ==}
cpu: [x64]
os: [linux]
'@pagefind/windows-x64@1.3.0':
resolution: {integrity: sha512-BR1bIRWOMqkf8IoU576YDhij1Wd/Zf2kX/kCI0b2qzCKC8wcc2GQJaaRMCpzvCCrmliO4vtJ6RITp/AnoYUUmQ==}
cpu: [x64]
os: [win32]
'@pkgjs/parseargs@0.11.0': '@pkgjs/parseargs@0.11.0':
resolution: {integrity: sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg==} resolution: {integrity: sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg==}
engines: {node: '>=14'} engines: {node: '>=14'}
'@polka/url@1.0.0-next.28':
resolution: {integrity: sha512-8LduaNlMZGwdZ6qWrKlfa+2M4gahzFkprZiAt2TF8uS0qQgBizKXpXURqvTJ4WtmupWxaLqjRb2UCTe72mu+Aw==}
'@rollup/pluginutils@5.1.4': '@rollup/pluginutils@5.1.4':
resolution: {integrity: sha512-USm05zrsFxYLPdWWq+K3STlWiT/3ELn3RcV5hJMghpeAIhxfsUIg6mt12CBJBInWMV4VneoV7SfGv8xIwo2qNQ==} resolution: {integrity: sha512-USm05zrsFxYLPdWWq+K3STlWiT/3ELn3RcV5hJMghpeAIhxfsUIg6mt12CBJBInWMV4VneoV7SfGv8xIwo2qNQ==}
engines: {node: '>=14.0.0'} engines: {node: '>=14.0.0'}
@ -674,6 +708,11 @@ packages:
resolution: {integrity: sha512-tLkvA81vQG/XqE2mjDkGQHoOINtMHtysSnemrmoGe6PydDPMRbVugqyk4A6V/WDWEfm3l+0d8anA9r8cv/5Jaw==} resolution: {integrity: sha512-tLkvA81vQG/XqE2mjDkGQHoOINtMHtysSnemrmoGe6PydDPMRbVugqyk4A6V/WDWEfm3l+0d8anA9r8cv/5Jaw==}
engines: {node: '>=12'} engines: {node: '>=12'}
astro-pagefind@1.8.3:
resolution: {integrity: sha512-Nfo1TdlEHdkXTiI0KpimLqX6awK3qWTil7IOJvk5Q8x+0VBTpIEp9QvGgoAxXDe3upAHLVsg4y7U1uUPm7GC9w==}
peerDependencies:
astro: ^2.0.4 || ^3 || ^4 || ^5
astro@5.4.3: astro@5.4.3:
resolution: {integrity: sha512-GKkOJQCHLx6CrPoghGhj7824WDSvIuuc+HTVjfjMPdB9axp238iJLByREJNDaSdzMeR/lC13xvBiUnKvcYyEIA==} resolution: {integrity: sha512-GKkOJQCHLx6CrPoghGhj7824WDSvIuuc+HTVjfjMPdB9axp238iJLByREJNDaSdzMeR/lC13xvBiUnKvcYyEIA==}
engines: {node: ^18.17.1 || ^20.3.0 || >=22.0.0, npm: '>=9.6.5', pnpm: '>=7.1.0'} engines: {node: ^18.17.1 || ^20.3.0 || >=22.0.0, npm: '>=9.6.5', pnpm: '>=7.1.0'}
@ -1563,6 +1602,10 @@ packages:
package-manager-detector@1.0.0: package-manager-detector@1.0.0:
resolution: {integrity: sha512-7elnH+9zMsRo7aS72w6MeRugTpdRvInmEB4Kmm9BVvPw/SLG8gXUGQ+4wF0Mys0RSWPz0B9nuBbDe8vFeA2sfg==} resolution: {integrity: sha512-7elnH+9zMsRo7aS72w6MeRugTpdRvInmEB4Kmm9BVvPw/SLG8gXUGQ+4wF0Mys0RSWPz0B9nuBbDe8vFeA2sfg==}
pagefind@1.3.0:
resolution: {integrity: sha512-8KPLGT5g9s+olKMRTU9LFekLizkVIu9tes90O1/aigJ0T5LmyPqTzGJrETnSw3meSYg58YH7JTzhTTW/3z6VAw==}
hasBin: true
parse-latin@7.0.0: parse-latin@7.0.0:
resolution: {integrity: sha512-mhHgobPPua5kZ98EF4HWiH167JWBfl4pvAIXXdbaVohtK7a6YBOy56kvhCqduqyo/f3yrHFWmqmiMg/BkBkYYQ==} resolution: {integrity: sha512-mhHgobPPua5kZ98EF4HWiH167JWBfl4pvAIXXdbaVohtK7a6YBOy56kvhCqduqyo/f3yrHFWmqmiMg/BkBkYYQ==}
@ -1748,6 +1791,10 @@ packages:
simple-swizzle@0.2.2: simple-swizzle@0.2.2:
resolution: {integrity: sha512-JA//kQgZtbuY83m+xT+tXJkmJncGMTFT+C+g2h2R9uxkYIrE2yy9sgmcLhCnw57/WSD+Eh3J97FPEDFnbXnDUg==} resolution: {integrity: sha512-JA//kQgZtbuY83m+xT+tXJkmJncGMTFT+C+g2h2R9uxkYIrE2yy9sgmcLhCnw57/WSD+Eh3J97FPEDFnbXnDUg==}
sirv@3.0.1:
resolution: {integrity: sha512-FoqMu0NCGBLCcAkS1qA+XJIQTR6/JHfQXl+uGteNCQ76T91DMUjPa9xfmeqMY3z80nLSg9yQmNjK0Px6RWsH/A==}
engines: {node: '>=18'}
sisteransi@1.0.5: sisteransi@1.0.5:
resolution: {integrity: sha512-bLGGlR1QxBcynn2d5YmDX4MGjlZvy2MRBDRNHLJ8VI6l6+9FUiyTFNJ0IveOSP0bcXgVDPRcfGqA0pjaqUpfVg==} resolution: {integrity: sha512-bLGGlR1QxBcynn2d5YmDX4MGjlZvy2MRBDRNHLJ8VI6l6+9FUiyTFNJ0IveOSP0bcXgVDPRcfGqA0pjaqUpfVg==}
@ -1834,6 +1881,10 @@ packages:
resolution: {integrity: sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==} resolution: {integrity: sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==}
engines: {node: '>=8.0'} engines: {node: '>=8.0'}
totalist@3.0.1:
resolution: {integrity: sha512-sf4i37nQ2LBx4m3wB74y+ubopq6W/dIzXg0FDGjsYnZHVa1Da8FH853wlL2gtUhg+xJXjfk3kUZS3BRoQeoQBQ==}
engines: {node: '>=6'}
tr46@0.0.3: tr46@0.0.3:
resolution: {integrity: sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==} resolution: {integrity: sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==}
@ -2382,9 +2433,28 @@ snapshots:
'@oslojs/encoding@1.1.0': {} '@oslojs/encoding@1.1.0': {}
'@pagefind/darwin-arm64@1.3.0':
optional: true
'@pagefind/darwin-x64@1.3.0':
optional: true
'@pagefind/default-ui@1.3.0': {}
'@pagefind/linux-arm64@1.3.0':
optional: true
'@pagefind/linux-x64@1.3.0':
optional: true
'@pagefind/windows-x64@1.3.0':
optional: true
'@pkgjs/parseargs@0.11.0': '@pkgjs/parseargs@0.11.0':
optional: true optional: true
'@polka/url@1.0.0-next.28': {}
'@rollup/pluginutils@5.1.4(rollup@4.35.0)': '@rollup/pluginutils@5.1.4(rollup@4.35.0)':
dependencies: dependencies:
'@types/estree': 1.0.6 '@types/estree': 1.0.6
@ -2650,6 +2720,13 @@ snapshots:
arrify@3.0.0: {} arrify@3.0.0: {}
astro-pagefind@1.8.3(astro@5.4.3(jiti@2.4.2)(lightningcss@1.29.2)(rollup@4.35.0)(typescript@5.8.2)):
dependencies:
'@pagefind/default-ui': 1.3.0
astro: 5.4.3(jiti@2.4.2)(lightningcss@1.29.2)(rollup@4.35.0)(typescript@5.8.2)
pagefind: 1.3.0
sirv: 3.0.1
astro@5.4.3(jiti@2.4.2)(lightningcss@1.29.2)(rollup@4.35.0)(typescript@5.8.2): astro@5.4.3(jiti@2.4.2)(lightningcss@1.29.2)(rollup@4.35.0)(typescript@5.8.2):
dependencies: dependencies:
'@astrojs/compiler': 2.11.0 '@astrojs/compiler': 2.11.0
@ -3810,6 +3887,14 @@ snapshots:
package-manager-detector@1.0.0: {} package-manager-detector@1.0.0: {}
pagefind@1.3.0:
optionalDependencies:
'@pagefind/darwin-arm64': 1.3.0
'@pagefind/darwin-x64': 1.3.0
'@pagefind/linux-arm64': 1.3.0
'@pagefind/linux-x64': 1.3.0
'@pagefind/windows-x64': 1.3.0
parse-latin@7.0.0: parse-latin@7.0.0:
dependencies: dependencies:
'@types/nlcst': 2.0.3 '@types/nlcst': 2.0.3
@ -4080,6 +4165,12 @@ snapshots:
is-arrayish: 0.3.2 is-arrayish: 0.3.2
optional: true optional: true
sirv@3.0.1:
dependencies:
'@polka/url': 1.0.0-next.28
mrmime: 2.0.1
totalist: 3.0.1
sisteransi@1.0.5: {} sisteransi@1.0.5: {}
slash@5.1.0: {} slash@5.1.0: {}
@ -4167,6 +4258,8 @@ snapshots:
dependencies: dependencies:
is-number: 7.0.0 is-number: 7.0.0
totalist@3.0.1: {}
tr46@0.0.3: {} tr46@0.0.3: {}
trim-lines@3.0.1: {} trim-lines@3.0.1: {}

View file

@ -4,7 +4,7 @@ import { getCollection } from "astro:content";
import { getPublishedAndSortedPosts } from "~/lib/blog"; import { getPublishedAndSortedPosts } from "~/lib/blog";
interface Props { interface Props {
limit?: number; limit?: number;
} }
const { limit } = Astro.props; const { limit } = Astro.props;
@ -12,37 +12,42 @@ const items = getPublishedAndSortedPosts(await getCollection("blog"));
const limitedItems = limit ? items.slice(0, limit) : items; const limitedItems = limit ? items.slice(0, limit) : items;
const getPostIcon = (item: { data: { icon?: string } }) => { const getPostIcon = (item: { data: { icon?: string } }) => {
if (item.data.icon && item.data.icon !== "fa-solid fa-blog") { if (item.data.icon && item.data.icon !== "fa-solid fa-blog") {
return item.data.icon; return item.data.icon;
} }
return "fa-solid fa-arrow-right"; return "fa-solid fa-arrow-right";
}; };
--- ---
<ul class="fa-ul space-y-4 my-2"> <ul class="fa-ul space-y-4 my-2">
{ {
limitedItems.map((item) => ( limitedItems.map((item) => (
<li> <li>
<i class={`fa-li ${getPostIcon(item)}`} /> <i class={`fa-li ${getPostIcon(item)}`} />
<a href={`/blog/${item.id}`}> <a href={`/blog/${item.id}`}>
<h3 class="font-bold mb-0.5">{item.data.title}</h3> <h3 class="font-bold mb-0.5">{item.data.title}</h3>
</a> </a>
<p class="text-sm text-light-tx-2 dark:text-dark-tx-2"> <p class="text-sm text-light-tx-2 dark:text-dark-tx-2">
<i class="fa-solid fa-calendar-alt mr-1 text-light-pu dark:text-dark-pu" /> <i class="fa-solid fa-calendar-alt mr-1 text-light-pu dark:text-dark-pu" />
<Date date={item.data.date} /> <Date date={item.data.date} />
<i class="mx-3"></i> <i class="mx-1.5" />
<i class="fa-solid fa-tags mr-1.5 text-light-pu dark:text-dark-pu" /> <i class="fa-solid fa-tags mr-1.5 text-light-pu dark:text-dark-pu" />
{(item.data.tags ?? []).map((tag) => ( {(item.data.tags ?? []).map((tag) => (
<a class="bg-light-pu dark:bg-dark-pu text-white px-1 py-0.5 rounded-md" href={`/blog/tags/${tag}`}>{tag}</a> <a
))} class="bg-light-pu dark:bg-dark-pu hover:bg-light-ma hover:dark:bg-dark-ma transition-colors text-white px-1 py-0.5 mr-2 last:mr-0 rounded-md text-center inline-block"
</p> href={`/blog/tags/${tag}`}
>
{tag}
</a>
))}
</p>
<blockquote class="border-l-2 border-light-pu dark:border-dark-pu pl-4 mt-2 text-light-tx-2 dark:text-dark-tx-2"> <blockquote class="border-l-2 border-light-pu dark:border-dark-pu pl-4 mt-2 text-light-tx-2 dark:text-dark-tx-2">
{item.data.description} {item.data.description}
</blockquote> </blockquote>
</li> </li>
)) ))
} }
</ul> </ul>

View file

@ -24,10 +24,17 @@ const renderedItems = await Promise.all(
<ul class="fa-ul space-y-4 my-2"> <ul class="fa-ul space-y-4 my-2">
{ {
renderedItems.map((item) => ( renderedItems.map((item) => (
<li class="max-w-[700px] p-4 rounded-lg shadow-lg"> <li class="max-w-[700px]">
<i class={`fa-li ${item.data.icon}`} /> <i class={`fa-li ${item.data.icon}`} />
<a href={`/notes/${item.id}`}> <a href={`/notes/${item.id}`}>
<Date date={item.data.date} /> <Date showTime date={item.data.date} />
{
item.data.title ? (
<span class="font-bold ml-1">
{item.data.title}
</span>
) : null
}
</a> </a>
<div> <div>
<item.Content /> <item.Content />

View file

@ -3,43 +3,42 @@ import Date from "~/components/util/Date.astro";
import { getCollection } from "astro:content"; import { getCollection } from "astro:content";
interface Props { interface Props {
limit?: number; limit?: number;
} }
const { limit } = Astro.props; const { limit } = Astro.props;
const items = await getCollection("projects"); const items = await getCollection("projects");
const limitedItems = limit ? items.slice(0, limit) : items; const limitedItems = limit ? items.slice(0, limit) : items;
--- ---
<ul class="fa-ul space-y-4 my-2"> <ul class="fa-ul space-y-4 my-2">
{ {
limitedItems.map((item) => ( limitedItems.map((item) => (
<li> <li>
<i class={`fa-li ${item.data.icon}`} /> <i class={`fa-li ${item.data.icon}`} />
<a href={`/projects/${item.id}`}> <a href={`/projects/${item.id}`}>
<h3 class="font-bold mb-0.5">{item.data.name}</h3> <h3 class="font-bold mb-0.5">{item.data.name}</h3>
</a> </a>
<p class="text-sm text-light-tx-2 dark:text-dark-tx-2"> <p class="text-sm text-light-tx-2 dark:text-dark-tx-2">
<i class="fa-solid fa-calendar-alt mr-1 text-light-pu dark:text-dark-pu" /> <i class="fa-solid fa-calendar-alt mr-1 text-light-pu dark:text-dark-pu" />
<Date date={item.data.date} /> <Date date={item.data.date} />
<i class="fa-solid fa-tags mx-1 text-light-pu dark:text-dark-pu" /> <i class="fa-solid fa-tags mx-1 text-light-pu dark:text-dark-pu" />
{(item.data.tags ?? []).map((tag) => ( {(item.data.tags ?? []).map((tag) => (
<a <a
class="bg-light-pu dark:bg-dark-pu text-white px-1 py-0.5 rounded-md" class="bg-light-pu dark:bg-dark-pu text-white px-1 py-0.5 mr-2 last:mr-0 rounded-md text-center inline-block"
href={`/${collection}/tags/${tag}`} href={`/projects/tags/${tag}`}
> >
{tag} {tag}
</a> </a>
))} ))}
</p> </p>
<blockquote class="border-l-2 border-light-pu dark:border-dark-pu pl-4 mt-2 text-light-tx-2 dark:text-dark-tx-2"> <blockquote class="border-l-2 border-light-pu dark:border-dark-pu pl-4 mt-2 text-light-tx-2 dark:text-dark-tx-2">
{item.data.description} {item.data.description}
</blockquote> </blockquote>
</li> </li>
)) ))
} }
</ul> </ul>

View file

@ -5,16 +5,15 @@ import { isBirthday } from "~/lib/fun";
<footer class="mt-12 text-sm text-light-tx-2 dark:text-dark-tx-2"> <footer class="mt-12 text-sm text-light-tx-2 dark:text-dark-tx-2">
<p>© {new Date().getFullYear()} Ivy Turner</p> <p>© {new Date().getFullYear()} Ivy Turner</p>
<p> <p>
<a class="underline" href="https://github.com/ivyturner">github</a> ~
<a class="underline" href="https://github.com/ivyturner/trellis"> <a class="underline" href="https://github.com/ivyturner/trellis">
ivyturner/trellis view the source
</a> </a>
</p> </p>
<p>love yourself. <p>love yourself.
{isBirthday() && ( {isBirthday() && (
<span class="text-light-accent dark:text-dark-accent"> <span class="text-light-accent dark:text-dark-accent">
{" "} {" "}
happy birthday! if you can see this, its october 16th at build time! happy birthday me
</span> </span>
)} )}
</p> </p>

View file

@ -36,11 +36,15 @@ const headerLinks = [
<nav class="flex flex-row gap-4"> <nav class="flex flex-row gap-4">
{ {
headerLinks.map((link) => ( headerLinks.map((link) => (
<span class="block bg-light-pu dark:bg-dark-pu text-white dark:text-black py-2 px-3 rounded-2xl"> <span class="">
<i class={`${link.icon} mr-0.5 text-sm`} /> <i class={`${link.icon} mr-0.5 text-sm`} />
<a <a
href={link.href} href={link.href}
class=""
aria-current={Astro.url.pathname === link.href ? "page" : undefined}
class="underline decoration-wavy underline-offset-4 decoration-1.5
decoration-light-pu dark:decoration-dark-pu"
> >
{link.label} {link.label}
</a> </a>

View file

@ -1,16 +1,24 @@
--- ---
export interface Props { export interface Props {
date: string | Date; date: string | Date;
showTime?: boolean;
} }
const { date } = Astro.props; const { date, showTime = false } = Astro.props;
if (!date) { if (!date) {
console.log(Astro.url.pathname + " Date's fucked up m8")
return null; return null;
} }
const dateObj = typeof date === "string" ? new Date(date) : date; const dateObj = typeof date === "string" ? new Date(date) : date;
const options = { year: "numeric", month: "long", day: "numeric" }; const options: Intl.DateTimeFormatOptions = { year: "numeric", month: "long", day: "numeric" };
const formattedDate = dateObj.toLocaleDateString("en-GB", options);
if (showTime) {
options.hour = "2-digit";
options.minute = "2-digit";
}
const formattedDate = dateObj.toLocaleString("en-GB", options);
const isoDate = dateObj.toISOString(); const isoDate = dateObj.toISOString();
--- ---

View file

@ -1,10 +1,8 @@
// 1. Import utilities from `astro:content` // 1. Import utilities from `astro:content`
import { defineCollection, z } from "astro:content"; import { defineCollection, z } from "astro:content";
// 2. Import loader(s)
import { glob } from "astro/loaders"; import { glob } from "astro/loaders";
// 3. Define your collection(s)
const blog = defineCollection({ const blog = defineCollection({
loader: glob({ pattern: "*.md", base: "src/content/blog" }), loader: glob({ pattern: "*.md", base: "src/content/blog" }),
schema: z.object({ schema: z.object({
@ -46,6 +44,7 @@ const projects = defineCollection({
status: z.enum(["active", "finished", "backburner", "scrapped"]), status: z.enum(["active", "finished", "backburner", "scrapped"]),
version: z.string(), version: z.string(),
icon: z.string().optional().default("fa-solid fa-wrench"), icon: z.string().optional().default("fa-solid fa-wrench"),
tags: z.array(z.string()).optional(),
}), }),
}); });

View file

@ -1 +1 @@
Hey, my name is Ivy Rose. I lol, nothing here yet. [ping me about it](mailto:ivy@sorbet.gay)

View file

@ -1,4 +1,5 @@
I'm a musician, student, part-time software developer and writer. I'm a musician, student, part-time software developer and writer.
I like creating websites (like this one) with [Astro](https://astro.build), and going outside whenever I'm not doing either of those things. I like creating websites (like this one) with [Astro](https://astro.build), and going outside whenever I'm not doing either of those things.
I go by **ivyrs**, **ivyneedsrest**

1
src/content/colophon.md Normal file
View file

@ -0,0 +1 @@
how the site gets sited

View file

@ -0,0 +1,4 @@
---
date: 2025-04-01T09:12:19Z
---
test number two

View file

@ -1,14 +0,0 @@
Spending less time on the internet, or at least trying to.
### 🎵 music
I've been listening to a lot of Sampha, recently.
In London, I picked up the [new Godspeed You! Black Emperor album, ""](https://cstrecords.com/en-gb/products/cst183) and it's one of the most hauntingly beautiful things I've listened to in a while.
### 📖 reading
I've been digitising my book collection into a Notion database and it's so much work but so fun. plus i can make *GRAPHS*
- currently reading: This Is How You Lose The Time War by Amal El-Mohtar & Max Gladstone
- just picked up: Yellowface by Rebecca F. Kuang

View file

@ -4,6 +4,7 @@ description: Music tracking for the modern age
version: in development version: in development
status: active status: active
date: 2025-03-17 date: 2025-03-17
tags: ["web", "music", "statistics"]
--- ---
aaa aaa

View file

@ -2,44 +2,63 @@
import Base from "~/layouts/Base.astro"; import Base from "~/layouts/Base.astro";
import Header from "~/components/ui/Header.astro"; import Header from "~/components/ui/Header.astro";
import Date from "~/components/util/Date.astro"; import Date from "~/components/util/Date.astro";
import Prose from "~/components/ui/Prose.astro";
import { noteTitleConstructor } from "~/lib/metadata"; import { noteTitleConstructor } from "~/lib/metadata";
import StyledLink from "~/components/util/StyledLink.astro"; import StyledLink from "~/components/util/StyledLink.astro";
interface Props {
title?: string | undefined;
exturl?: string | undefined;
icon: string;
date: Date;
}
const { title, exturl, icon, date } = Astro.props; const { title, exturl, icon, date } = Astro.props;
--- ---
<Base title={noteTitleConstructor(title, date)}> <Base title={noteTitleConstructor(title, date)}>
<Header /> <Header />
<h2 class="text-2xl font-bold mt-2">A note from <Date date={date} /></h2> <h2 class="text-xl font-bold mt-6">
<div <i class={`${icon} mr-1`}></i>
class="bg-light-bg-2 dark:bg-dark-bg-2 p-4 rounded-lg w-fit min-w-[500px] mt-4" {
> () => {
<ul class="fa-ul"> if (title) {
{ return (
title && ( <span class="font-bold">
<li class="text-lg font-bold"> A note titled {title} (<Date showTime date={date} />)
<i class={`fa-li ${icon}`} /> </span>
<h1 class="font-bold">{title}</h1> );
</li> } else {
) return (
} <span class="font-bold">
{ A note from
exturl && ( <Date showTime date={date} />
<li> </span>
<i class="fa-li fa-solid fa-link" /> );
<a href={exturl} class="link"> }
{exturl} }
</a> }
</li> </h2>
) <>
} <p class="ml-4 mt-3 mb-3">
</ul> {
<div class="pl-4 mt-2 prose dark:prose-invert"> exturl && (
<slot /> <StyledLink
</div> href={exturl}
</div> icon="fa-solid fa-arrow-up-right-from-square"
<hr class="w-[500px]" /> >
<StyledLink href="/notes" icon="fa-solid fa-arrow-left"> {exturl}
See more notes </StyledLink>
</StyledLink> )
}
</p>
<Prose>
<slot />
</Prose>
</>
<hr class="w-[500px]" />
<StyledLink href="/notes" icon="fa-solid fa-arrow-left">
See more notes
</StyledLink>
</Base> </Base>

View file

@ -11,7 +11,6 @@ export function isBirthday(): boolean {
const check = const check =
today.getMonth() === birthday.getMonth() && today.getMonth() === birthday.getMonth() &&
today.getDate() === birthday.getDate(); today.getDate() === birthday.getDate();
console.log(check);
return check; return check;
} }

View file

@ -12,7 +12,7 @@ export const descriptionConstructor = (description: string) => {
return `${description}`; return `${description}`;
}; };
export const noteTitleConstructor = (title: string, date: Date) => { export const noteTitleConstructor = (title: string | undefined, date: Date) => {
if (title) return `A note titled ${title}`; if (title) return `A note titled ${title}`;
return `A note from ${date.toLocaleDateString()}`; return `A note from ${date.toLocaleDateString()}`;
}; };

View file

@ -8,6 +8,9 @@ import BlogPostList from "~/components/lists/BlogPostList.astro";
description="A list of all my blog posts." description="A list of all my blog posts."
icon="fa-solid fa-star" icon="fa-solid fa-star"
> >
<p class="mb-6">my personal blog is <a class="link" href="https://concorde.blog">Concorde</a>, but here has more technical things.</p> <p class="mb-6">
<BlogPostList collection="blog" /> My personal blog is <a class="link" href="https://concorde.blog">Concorde</a
>, but here's where the technical stuff goes.
</p>
<BlogPostList />
</Page> </Page>

View file

@ -8,6 +8,7 @@ import NoteList from "~/components/lists/NoteList.astro";
import StyledLink from "~/components/util/StyledLink.astro"; import StyledLink from "~/components/util/StyledLink.astro";
import { Content as Bio } from "~/content/bio.md"; import { Content as Bio } from "~/content/bio.md";
import Prose from "~/components/ui/Prose.astro"; import Prose from "~/components/ui/Prose.astro";
import Date from "~/components/util/Date.astro";
--- ---
<Layout> <Layout>

View file

@ -0,0 +1,16 @@
---
import Page from "~/layouts/Page.astro";
import Prose from "~/components/ui/Prose.astro";
import { Content } from "~/content/colophon.md";
---
<Page
title="Colophon"
description="how the site gets made"
icon="fa-solid fa-wrench"
date="2025-03-13"
>
<Prose>
<Content />
</Prose>
</Page>

14
src/pages/more.astro Normal file
View file

@ -0,0 +1,14 @@
---
import Page from "~/layouts/Page.astro";
---
<Page
title="Even more Ivy!"
description="Almost every page on this site"
icon="fa-solid fa-user"
date="2025-03-13"
>
</Page>

View file

@ -1,14 +1,16 @@
export default { export default {
site: { site: {
url: "https://ivyneeds.rest", url: "https://ivy.rs",
title: "Ivy Turner", title: "Ivy!",
description: "Ivy Turner's personal website", description: "Ivy Turner's personal website",
}, },
author: { author: {
name: "Ivy Turner", name: "Ivy Turner",
fedi: "@ivy@social.lol", fedi: "@ivy@social.lol",
email: "ivy@sorbet.gay", email: "ivy@sorbet.gay",
}, },
devMode: { devMode: {
showDraftPages: true, showDraftPages: true,
}, },

View file

@ -202,7 +202,6 @@ hr {
@apply border-0 h-0.5 my-4 bg-light-pu dark:bg-dark-pu; @apply border-0 h-0.5 my-4 bg-light-pu dark:bg-dark-pu;
} }
[aria-current="page"] { /* used for the header thing */
a { @apply font-bold decoration-light-ma dark:decoration-dark-ma;
cursor: url('https://fav.farm/✏️') 15 0, auto;
} }