trying this

This commit is contained in:
Laker Turner 2025-03-22 08:57:53 +00:00
parent e142e6b38f
commit a20dc1ee0b
No known key found for this signature in database
18 changed files with 170 additions and 81 deletions

View file

@ -6,5 +6,8 @@
"editor.formatOnSave": true, "editor.formatOnSave": true,
"editor.codeActionsOnSave": { "editor.codeActionsOnSave": {
"source.fixAll": "explicit" "source.fixAll": "explicit"
},
"editor.quickSuggestions": {
"strings": "on"
} }
} }

0
cli/src/main.ts Normal file
View file

View file

@ -1,40 +0,0 @@
---
import siteConfig from "~/site.config";
import { descriptionConstructor, titleConstructor } from "~/lib/metadata";
const { title, description } = Astro.props;
---
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>{titleConstructor(title)}</title>
<meta name="description" content={descriptionConstructor(description)} />
<meta name="author" content="Ivy Turner" />
{/* og */}
<meta property="og:title" content={titleConstructor(title)} />
<meta property="og:type" content="website" />
<meta property="og:url" content="https://ivyneeds.rest" />
<meta property="og:image" content="https://ivyneeds.rest/image.jpg" />
<link rel="icon" href="/favicon.ico" type="image/x-icon" />
<link rel="icon" type="image/x-icon" href="/favicon.ico" />
<meta name="theme-color" content="#5E409D" />
<link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png" />
{/* font awesone */}
<link
href="https://cdn.laker.tech/web/fa/css/fontawesome.css"
rel="stylesheet"
/>
<link href="https://cdn.laker.tech/web/fa/css/brands.css" rel="stylesheet" />
<link href="https://cdn.laker.tech/web/fa/css/solid.css" rel="stylesheet" />
{/* analytics */}
{/* astro generator */}
<meta name="generator" content={Astro.generator} />
</head>

View file

@ -4,7 +4,7 @@ import Date from "../util/Date.astro";
const { title, description, icon, date } = Astro.props; const { title, description, icon, date } = Astro.props;
--- ---
<div class="mb-4"> <div class="mb-4 mt-6">
<h2 class="text-xl font-bold"> <h2 class="text-xl font-bold">
<i class={`${icon} text-xl mr-2 text-light-pu dark:text-dark-pu`}></i> <i class={`${icon} text-xl mr-2 text-light-pu dark:text-dark-pu`}></i>
{title} {title}

View file

@ -0,0 +1,41 @@
---
import siteConfig from "~/site.config";
import { getClacks } from "~/lib/fun";
import { descriptionConstructor, titleConstructor } from "~/lib/metadata";
const { title, description } = Astro.props;
---
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>{titleConstructor(title)}</title>
<meta name="description" content={descriptionConstructor(description)} />
<meta name="author" content="Ivy Turner" />
{/* og */}
<meta property="og:title" content={titleConstructor(title)} />
<meta property="og:type" content="website" />
<meta property="og:url" content="https://ivyneeds.rest" />
<meta property="og:image" content="https://ivyneeds.rest/image.jpg" />
<link rel="icon" href="https://fav.farm/%F0%9F%92%9C" />
<meta name="theme-color" content="#5E409D" />
<link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png" />
{/* font awesone */}
<link
href="https://cdn.laker.tech/web/fa/css/fontawesome.css"
rel="stylesheet"
/>
<link href="https://cdn.laker.tech/web/fa/css/brands.css" rel="stylesheet" />
<link href="https://cdn.laker.tech/web/fa/css/solid.css" rel="stylesheet" />
{/* analytics */}
{/* astro generator */}
<meta name="generator" content={Astro.generator} />
{/* clacks */}
<meta http-equiv="X-Clacks-Overhead" content={`GNU ${getClacks()}`}
</head>

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

@ -0,0 +1 @@
Hey, my name is Ivy Rose. I

View file

@ -1,6 +1,3 @@
---
---
I'm a musician, student, part-time software developer and writer. I'm a musician, student, part-time software developer and writer.
I like making weird noises, websites (like this one) with [Astro](https://astro.build), and going outside whenever I'm not doing either of those things. I like making weird noises, websites (like this one) with [Astro](https://astro.build), and going outside whenever I'm not doing either of those things.

View file

@ -1,6 +1,7 @@
--- ---
title: Welcome title: Welcome
description: Lorem ipsum dolor sit amet irure tempor adipisicing esse minim nisi, aute duis elit. Adipisicing consequat pariatur duis incididunt nisi pariatur proident dolor deserunt et. description: Lorem ipsum dolor sit amet irure tempor adipisicing esse minim nisi, aute duis elit. Adipisicing consequat pariatur duis incididunt nisi pariatur proident dolor deserunt et.
date: 2025-03-19
tags: tags:
- welcome - welcome
--- ---

View file

@ -1,12 +1,14 @@
--- ---
import "~/styles/global.css"; import "~/styles/global.css";
import Head from "~/components/ui/Head.astro"; import Head from "~/components/util/Head.astro";
import { ClientRouter } from "astro:transitions"; import { ClientRouter } from "astro:transitions";
import SizeWarning from "~/components/ui/SizeWarning.astro"; import SizeWarning from "~/components/ui/SizeWarning.astro";
const { title, date, description } = Astro.props;
--- ---
<html class="bg-light-bg text-light-tx dark:bg-dark-bg dark:text-dark-tx"> <html class="bg-light-bg text-light-tx dark:bg-dark-bg dark:text-dark-tx">
<Head /> <Head title={title} date={date} description={description} />
<body class="pl-1 md:px-24 sm:pt-2 md:pt-6"> <body class="pl-1 md:px-24 sm:pt-2 md:pt-6">
<ClientRouter /> <ClientRouter />
<SizeWarning /> <SizeWarning />

View file

@ -6,7 +6,7 @@ import Footer from "~/components/ui/Footer.astro";
const { title, description, icon, date } = Astro.props; const { title, description, icon, date } = Astro.props;
--- ---
<Layout> <Layout title={title} description={description} date={date}>
<div> <div>
<Header /> <Header />
<main> <main>

View file

@ -30,4 +30,7 @@ export function isBirthday() {
return check; return check;
} }
export function getClacks(): string {
const clacks: string[] = ["Terry Pratchett", "Bram Moolenaar", "Alan Turing", "Haskell Curry", "Brianna Ghey"];
return clacks.join(", ");
}

View file

@ -2,6 +2,7 @@ import conf from "~/site.config";
// todo: add blog detection // todo: add blog detection
export const titleConstructor = (title: string) => { export const titleConstructor = (title: string) => {
console.log(title)
if (!title) return conf.siteName; if (!title) return conf.siteName;
return `${title} | ${conf.siteName}`; return `${title} | ${conf.siteName}`;
}; };

View file

@ -1,7 +1,16 @@
--- ---
import Page from "~/layouts/Page.astro"; import Page from "~/layouts/Page.astro";
import Prose from "~/components/ui/Prose.astro";
import { Content } from "~/content/about.md";
--- ---
<Page title="About" description="do you wanna know?" icon="fa-solid fa-user" date="2025-03-13"> <Page
<h1>i kiss girls</h1> title="About"
</Page> description="do you wanna know?"
icon="fa-solid fa-user"
date="2025-03-13"
>
<Prose>
<Content />
</Prose>
</Page>

View file

@ -0,0 +1,39 @@
---
import Layout from "~/layouts/Page.astro";
import { getCollection } from "astro:content";
export async function getStaticPaths() {
const allPosts = await getCollection("blog");
const tags = [...new Set(allPosts.map((post) => post.data.tags).flat())];
return tags.map((tag) => ({
params: { id: tag },
props: { tag },
}));
}
const allPosts = await getCollection("blog");
const { tag } = Astro.props;
const filteredPosts = allPosts.filter(
(post) => post.data.tags && post.data.tags.includes(tag as string)
);
---
<Layout
title={`Posts tagged with "${tag}"`}
description={`A collection of posts tagged with "${tag}"`}
>
<ul class="fa-ul">
{
filteredPosts.length > 0 ? (
filteredPosts.map((post) => (
<li>
<i class="fa-li fa-solid fa-file-alt" />
<a href={`/blog/${post.id}`}>{post.data.title}</a>
</li>
))
) : (
<li>No posts found for this tag.</li>
)
}
</ul>
</Layout>

View file

@ -0,0 +1,18 @@
---
import Layout from "~/layouts/Page.astro";
import { getCollection } from "astro:content";
const allPosts = await getCollection("blog");
const tags = [...new Set(allPosts.map((post) => post.data.tags).flat())];
---
<Layout title="Tags" description="">
<ul class="fa-ul">
{
tags.map((tag) => <li>
<i class="fa-li fa-solid fa-hashtag"></i>
<a href={`/blog/tags/${tag}`}>{tag}</a>
</li>)
}
</ul>
</Layout>

View file

@ -3,33 +3,38 @@ import Layout from "~/layouts/Page.astro";
--- ---
<Layout <Layout
title="Contact" title="Contact"
description="how to get a hold of me if you ever need to" description="where i am & where i'm not"
icon="fa-solid fa-envelope" icon="fa-solid fa-envelope"
> >
<p> <ul class="fa-ul">
I'm not really active on social media, but you can contact me via email. <li>
</p> <i class="fa-li fa-solid fa-envelope text-light-gr dark:text-dark-gr"></i>
<p> <a href="mailto:hello@ivyneeds.rest">ivy@omg.lol</a>
<a href="mailto:hello@ivyneeds.rest">hello@ivyneeds.rest</a> </li>
</p> <br>
<h3 class="text-lg font-bold my-2">where i am / where i'm not</h3> <li>
<ul class="fa-ul"> <i class="fa-li fa-brands fa-mastodon"></i>
<li> Fediverse: <a href="https://social.lol/@ivy">@ivy@social.lol</a>
<i class="fa-li fa-brands fa-mastodon"></i> </li>
Fediverse: <a href="https://social.lol/ivy">@ivy@social.lol</a> <br>
<li>
<i class="fa-li fa-brands fa-github"></i>
GitHub: <a href="https://github.com/ivyturner">@ivyturner</a>
</li> </li>
<li> <li>
<i class="fa-li fa-brands fa-github"></i> <i class="fa-li fa-solid fa-circle-notch"></i>
GitHub: <a href="https://github.com/ivyturner">@ivyturner</a> Sourcehut: <a href="https://sr.ht/~la">~la</a> ()
</li> </li>
<li> <br>
<i class="fa-li fa-brands fa-instagram"></i> <li>
Instagram: <a href="https://www.instagram.com/ivyturner">@ivyturner</a> <i class="fa-li fa-brands fa-instagram"></i>
</li> Instagram: <a href="https://www.instagram.com/ivyturner">@ivyturner</a>
<li> </li>
<i class="fa-li fa-brands fa-twitter text-light-re dark:text-dark-re"></i> <br>
Twitter: haha fuck right off, elon should get his arms broken <li>
</li> <i class="fa-li fa-brands fa-twitter text-light-re dark:text-dark-re"></i>
</ul> Twitter: haha fuck right off, elon should get his arms broken
</li>
</ul>
</Layout> </Layout>

View file

@ -6,7 +6,9 @@ import Box from "~/components/ui/Box.astro";
import CollectionList from "~/components/lists/BlogPostList.astro"; import CollectionList from "~/components/lists/BlogPostList.astro";
import NoteList from "~/components/lists/NoteList.astro"; 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 { getClacks } from "~/lib/fun";
--- ---
<Layout> <Layout>
@ -18,16 +20,20 @@ import {Content as Bio} from "~/content/bio.md"
> >
Hi! I'm Ivy, welcome to my website! Hi! I'm Ivy, welcome to my website!
</h1> </h1>
<Bio /> {getClacks()}
<Prose>
<Bio />
</Prose>
<div class="md:flex md:flex-column gap-2"> <div class="md:flex md:flex-column gap-2">
<Box title="latest blog posts" description="" icon="fa-solid fa-blog"> <Box title="latest blog posts" icon="fa-solid fa-blog">
<CollectionList collection="blog" limit={5} /> <CollectionList collection="blog" limit={5} />
<hr class="h-px my-8 bg-light-pu dark:bg-dark-pu" /> <hr class="h-px my-8 bg-light-pu dark:bg-dark-pu" />
<StyledLink href="/blog">see more</StyledLink> <StyledLink href="/blog">see more</StyledLink>
</Box> </Box>
<Box title="latest notes" description="" icon="fa-solid fa-sticky-note"> <Box title="latest notes" icon="fa-solid fa-sticky-note">
<NoteList limit={5} /> <NoteList limit={5} />
<hr class="h-px my-8 bg-light-pu dark:bg-dark-pu border-0" /> <hr class="h-px my-8 bg-light-pu dark:bg-dark-pu border-0" />
<StyledLink href="/notes">see more</StyledLink> <StyledLink href="/notes">see more</StyledLink>

View file

@ -203,3 +203,6 @@ hr {
} }
a {
cursor: url('https://fav.farm/✏️') 15 0, auto;
}