trying this
This commit is contained in:
parent
e142e6b38f
commit
a20dc1ee0b
18 changed files with 170 additions and 81 deletions
3
.vscode/settings.json
vendored
3
.vscode/settings.json
vendored
|
@ -6,5 +6,8 @@
|
|||
"editor.formatOnSave": true,
|
||||
"editor.codeActionsOnSave": {
|
||||
"source.fixAll": "explicit"
|
||||
},
|
||||
"editor.quickSuggestions": {
|
||||
"strings": "on"
|
||||
}
|
||||
}
|
||||
|
|
0
cli/src/main.ts
Normal file
0
cli/src/main.ts
Normal 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>
|
|
@ -4,7 +4,7 @@ import Date from "../util/Date.astro";
|
|||
const { title, description, icon, date } = Astro.props;
|
||||
---
|
||||
|
||||
<div class="mb-4">
|
||||
<div class="mb-4 mt-6">
|
||||
<h2 class="text-xl font-bold">
|
||||
<i class={`${icon} text-xl mr-2 text-light-pu dark:text-dark-pu`}></i>
|
||||
{title}
|
||||
|
|
41
src/components/util/Head.astro
Normal file
41
src/components/util/Head.astro
Normal 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
1
src/content/about.md
Normal file
|
@ -0,0 +1 @@
|
|||
Hey, my name is Ivy Rose. I
|
|
@ -1,6 +1,3 @@
|
|||
---
|
||||
---
|
||||
|
||||
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.
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
---
|
||||
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.
|
||||
date: 2025-03-19
|
||||
tags:
|
||||
- welcome
|
||||
---
|
||||
|
|
|
@ -1,12 +1,14 @@
|
|||
---
|
||||
import "~/styles/global.css";
|
||||
import Head from "~/components/ui/Head.astro";
|
||||
import Head from "~/components/util/Head.astro";
|
||||
import { ClientRouter } from "astro:transitions";
|
||||
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">
|
||||
<Head />
|
||||
<Head title={title} date={date} description={description} />
|
||||
<body class="pl-1 md:px-24 sm:pt-2 md:pt-6">
|
||||
<ClientRouter />
|
||||
<SizeWarning />
|
||||
|
|
|
@ -6,7 +6,7 @@ import Footer from "~/components/ui/Footer.astro";
|
|||
const { title, description, icon, date } = Astro.props;
|
||||
---
|
||||
|
||||
<Layout>
|
||||
<Layout title={title} description={description} date={date}>
|
||||
<div>
|
||||
<Header />
|
||||
<main>
|
||||
|
|
|
@ -30,4 +30,7 @@ export function isBirthday() {
|
|||
return check;
|
||||
}
|
||||
|
||||
|
||||
export function getClacks(): string {
|
||||
const clacks: string[] = ["Terry Pratchett", "Bram Moolenaar", "Alan Turing", "Haskell Curry", "Brianna Ghey"];
|
||||
return clacks.join(", ");
|
||||
}
|
|
@ -2,6 +2,7 @@ import conf from "~/site.config";
|
|||
// todo: add blog detection
|
||||
|
||||
export const titleConstructor = (title: string) => {
|
||||
console.log(title)
|
||||
if (!title) return conf.siteName;
|
||||
return `${title} | ${conf.siteName}`;
|
||||
};
|
||||
|
|
|
@ -1,7 +1,16 @@
|
|||
---
|
||||
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">
|
||||
<h1>i kiss girls</h1>
|
||||
<Page
|
||||
title="About"
|
||||
description="do you wanna know?"
|
||||
icon="fa-solid fa-user"
|
||||
date="2025-03-13"
|
||||
>
|
||||
<Prose>
|
||||
<Content />
|
||||
</Prose>
|
||||
</Page>
|
39
src/pages/blog/tags/[id].astro
Normal file
39
src/pages/blog/tags/[id].astro
Normal 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>
|
18
src/pages/blog/tags/index.astro
Normal file
18
src/pages/blog/tags/index.astro
Normal 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>
|
|
@ -4,29 +4,34 @@ import Layout from "~/layouts/Page.astro";
|
|||
|
||||
<Layout
|
||||
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"
|
||||
>
|
||||
<p>
|
||||
I'm not really active on social media, but you can contact me via email.
|
||||
</p>
|
||||
<p>
|
||||
<a href="mailto:hello@ivyneeds.rest">hello@ivyneeds.rest</a>
|
||||
</p>
|
||||
<h3 class="text-lg font-bold my-2">where i am / where i'm not</h3>
|
||||
<ul class="fa-ul">
|
||||
<li>
|
||||
<i class="fa-li fa-brands fa-mastodon"></i>
|
||||
Fediverse: <a href="https://social.lol/ivy">@ivy@social.lol</a>
|
||||
<i class="fa-li fa-solid fa-envelope text-light-gr dark:text-dark-gr"></i>
|
||||
<a href="mailto:hello@ivyneeds.rest">ivy@omg.lol</a>
|
||||
</li>
|
||||
<br>
|
||||
<li>
|
||||
<i class="fa-li fa-brands fa-mastodon"></i>
|
||||
Fediverse: <a href="https://social.lol/@ivy">@ivy@social.lol</a>
|
||||
</li>
|
||||
<br>
|
||||
<li>
|
||||
<i class="fa-li fa-brands fa-github"></i>
|
||||
GitHub: <a href="https://github.com/ivyturner">@ivyturner</a>
|
||||
</li>
|
||||
<li>
|
||||
<i class="fa-li fa-solid fa-circle-notch"></i>
|
||||
Sourcehut: <a href="https://sr.ht/~la">~la</a> ()
|
||||
</li>
|
||||
<br>
|
||||
<li>
|
||||
<i class="fa-li fa-brands fa-instagram"></i>
|
||||
Instagram: <a href="https://www.instagram.com/ivyturner">@ivyturner</a>
|
||||
</li>
|
||||
<br>
|
||||
<li>
|
||||
<i class="fa-li fa-brands fa-twitter text-light-re dark:text-dark-re"></i>
|
||||
Twitter: haha fuck right off, elon should get his arms broken
|
||||
|
|
|
@ -6,7 +6,9 @@ import Box from "~/components/ui/Box.astro";
|
|||
import CollectionList from "~/components/lists/BlogPostList.astro";
|
||||
import NoteList from "~/components/lists/NoteList.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>
|
||||
|
@ -19,15 +21,19 @@ import {Content as Bio} from "~/content/bio.md"
|
|||
Hi! I'm Ivy, welcome to my website!
|
||||
</h1>
|
||||
|
||||
{getClacks()}
|
||||
|
||||
<Prose>
|
||||
<Bio />
|
||||
</Prose>
|
||||
|
||||
<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} />
|
||||
<hr class="h-px my-8 bg-light-pu dark:bg-dark-pu" />
|
||||
<StyledLink href="/blog">see more</StyledLink>
|
||||
</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} />
|
||||
<hr class="h-px my-8 bg-light-pu dark:bg-dark-pu border-0" />
|
||||
<StyledLink href="/notes">see more</StyledLink>
|
||||
|
|
|
@ -203,3 +203,6 @@ hr {
|
|||
}
|
||||
|
||||
|
||||
a {
|
||||
cursor: url('https://fav.farm/✏️') 15 0, auto;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue