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

@ -4,7 +4,7 @@ import { getCollection } from "astro:content";
import { getPublishedAndSortedPosts } from "~/lib/blog";
interface Props {
limit?: number;
limit?: number;
}
const { limit } = Astro.props;
@ -12,37 +12,42 @@ const items = getPublishedAndSortedPosts(await getCollection("blog"));
const limitedItems = limit ? items.slice(0, limit) : items;
const getPostIcon = (item: { data: { icon?: string } }) => {
if (item.data.icon && item.data.icon !== "fa-solid fa-blog") {
return item.data.icon;
}
return "fa-solid fa-arrow-right";
if (item.data.icon && item.data.icon !== "fa-solid fa-blog") {
return item.data.icon;
}
return "fa-solid fa-arrow-right";
};
---
<ul class="fa-ul space-y-4 my-2">
{
limitedItems.map((item) => (
<li>
<i class={`fa-li ${getPostIcon(item)}`} />
{
limitedItems.map((item) => (
<li>
<i class={`fa-li ${getPostIcon(item)}`} />
<a href={`/blog/${item.id}`}>
<h3 class="font-bold mb-0.5">{item.data.title}</h3>
</a>
<a href={`/blog/${item.id}`}>
<h3 class="font-bold mb-0.5">{item.data.title}</h3>
</a>
<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" />
<Date date={item.data.date} />
<i class="mx-3"></i>
<i class="fa-solid fa-tags mr-1.5 text-light-pu dark:text-dark-pu" />
{(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>
))}
</p>
<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" />
<Date date={item.data.date} />
<i class="mx-1.5" />
<i class="fa-solid fa-tags mr-1.5 text-light-pu dark:text-dark-pu" />
{(item.data.tags ?? []).map((tag) => (
<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"
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">
{item.data.description}
</blockquote>
</li>
))
}
<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}
</blockquote>
</li>
))
}
</ul>

View file

@ -24,10 +24,17 @@ const renderedItems = await Promise.all(
<ul class="fa-ul space-y-4 my-2">
{
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}`} />
<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>
<div>
<item.Content />

View file

@ -3,43 +3,42 @@ import Date from "~/components/util/Date.astro";
import { getCollection } from "astro:content";
interface Props {
limit?: number;
limit?: number;
}
const { limit } = Astro.props;
const items = await getCollection("projects");
const limitedItems = limit ? items.slice(0, limit) : items;
---
<ul class="fa-ul space-y-4 my-2">
{
limitedItems.map((item) => (
<li>
<i class={`fa-li ${item.data.icon}`} />
{
limitedItems.map((item) => (
<li>
<i class={`fa-li ${item.data.icon}`} />
<a href={`/projects/${item.id}`}>
<h3 class="font-bold mb-0.5">{item.data.name}</h3>
</a>
<a href={`/projects/${item.id}`}>
<h3 class="font-bold mb-0.5">{item.data.name}</h3>
</a>
<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" />
<Date date={item.data.date} />
<i class="fa-solid fa-tags mx-1 text-light-pu dark:text-dark-pu" />
{(item.data.tags ?? []).map((tag) => (
<a
class="bg-light-pu dark:bg-dark-pu text-white px-1 py-0.5 rounded-md"
href={`/${collection}/tags/${tag}`}
>
{tag}
</a>
))}
</p>
<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" />
<Date date={item.data.date} />
<i class="fa-solid fa-tags mx-1 text-light-pu dark:text-dark-pu" />
{(item.data.tags ?? []).map((tag) => (
<a
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={`/projects/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">
{item.data.description}
</blockquote>
</li>
))
}
<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}
</blockquote>
</li>
))
}
</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">
<p>© {new Date().getFullYear()} Ivy Turner</p>
<p>
<a class="underline" href="https://github.com/ivyturner">github</a> ~
<a class="underline" href="https://github.com/ivyturner/trellis">
ivyturner/trellis
view the source
</a>
</p>
<p>love yourself.
{isBirthday() && (
<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>
)}
</p>

View file

@ -36,11 +36,15 @@ const headerLinks = [
<nav class="flex flex-row gap-4">
{
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`} />
<a
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}
</a>

View file

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

View file

@ -1,10 +1,8 @@
// 1. Import utilities from `astro:content`
import { defineCollection, z } from "astro:content";
// 2. Import loader(s)
import { glob } from "astro/loaders";
// 3. Define your collection(s)
const blog = defineCollection({
loader: glob({ pattern: "*.md", base: "src/content/blog" }),
schema: z.object({
@ -46,6 +44,7 @@ const projects = defineCollection({
status: z.enum(["active", "finished", "backburner", "scrapped"]),
version: z.string(),
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 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
status: active
date: 2025-03-17
tags: ["web", "music", "statistics"]
---
aaa

View file

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

View file

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

View file

@ -12,7 +12,7 @@ export const descriptionConstructor = (description: string) => {
return `${description}`;
};
export const noteTitleConstructor = (title: string, date: Date) => {
export const noteTitleConstructor = (title: string | undefined, date: Date) => {
if (title) return `A note titled ${title}`;
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."
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>
<BlogPostList collection="blog" />
<p class="mb-6">
My personal blog is <a class="link" href="https://concorde.blog">Concorde</a
>, but here's where the technical stuff goes.
</p>
<BlogPostList />
</Page>

View file

@ -8,6 +8,7 @@ import NoteList from "~/components/lists/NoteList.astro";
import StyledLink from "~/components/util/StyledLink.astro";
import { Content as Bio } from "~/content/bio.md";
import Prose from "~/components/ui/Prose.astro";
import Date from "~/components/util/Date.astro";
---
<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 {
site: {
url: "https://ivyneeds.rest",
title: "Ivy Turner",
url: "https://ivy.rs",
title: "Ivy!",
description: "Ivy Turner's personal website",
},
author: {
name: "Ivy Turner",
fedi: "@ivy@social.lol",
email: "ivy@sorbet.gay",
},
devMode: {
showDraftPages: true,
},

View file

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