remove so much stuff
This commit is contained in:
parent
7f1c155a7b
commit
dac0749890
54 changed files with 183 additions and 5010 deletions
|
|
@ -8,28 +8,6 @@ import BaseLayout from "../layouts/BaseLayout.astro";
|
|||
</div>
|
||||
</BaseLayout>
|
||||
|
||||
<script>
|
||||
document.addEventListener("DOMContentLoaded", function () {
|
||||
const base = "barrett@ruth:~$ ";
|
||||
const el = document.querySelector(".terminal-prompt");
|
||||
if (!el) return;
|
||||
|
||||
const type = () => {
|
||||
const target = "/not-found";
|
||||
let i = 0;
|
||||
el.textContent = base;
|
||||
(function step() {
|
||||
if (i < target.length) {
|
||||
el.textContent += target.charAt(i++);
|
||||
setTimeout(step, 250 / target.length);
|
||||
}
|
||||
})();
|
||||
};
|
||||
|
||||
type();
|
||||
});
|
||||
</script>
|
||||
|
||||
<style>
|
||||
.not-found-container {
|
||||
display: flex;
|
||||
|
|
|
|||
|
|
@ -1,49 +0,0 @@
|
|||
---
|
||||
import { getCollection } from "astro:content";
|
||||
import PostLayout from "../../layouts/PostLayout.astro";
|
||||
import * as collections from "../../content/config";
|
||||
import type { PostCollection, AnyCollectionEntry } from "../../types";
|
||||
|
||||
export async function getStaticPaths() {
|
||||
const categories = Object.keys(collections.collections).filter(
|
||||
(c) => c !== "git" && c !== "gists",
|
||||
) as PostCollection[];
|
||||
|
||||
const entries: Array<{
|
||||
params: { category: string; slug: string };
|
||||
props: { post: AnyCollectionEntry };
|
||||
}> = [];
|
||||
|
||||
for (const category of categories) {
|
||||
const docs = await getCollection(category);
|
||||
for (const doc of docs) {
|
||||
entries.push({
|
||||
params: { category, slug: doc.slug },
|
||||
props: { post: doc },
|
||||
});
|
||||
}
|
||||
}
|
||||
return entries;
|
||||
}
|
||||
|
||||
interface Props {
|
||||
post: AnyCollectionEntry;
|
||||
}
|
||||
|
||||
const { post } = Astro.props;
|
||||
const category = Astro.params.category;
|
||||
const { Content, headings } = await post.render();
|
||||
const pageTitle = `${category}/${post.data.title ?? post.slug}`;
|
||||
|
||||
if (post.data?.redirect) {
|
||||
return Astro.redirect(post.data.redirect, 301);
|
||||
}
|
||||
---
|
||||
|
||||
<PostLayout frontmatter={post.data} post={post} headings={headings}>
|
||||
<Fragment slot="head">
|
||||
<title>{pageTitle}</title>
|
||||
<script src="/scripts/index.js" is:inline></script>
|
||||
</Fragment>
|
||||
<Content />
|
||||
</PostLayout>
|
||||
|
|
@ -1,57 +0,0 @@
|
|||
---
|
||||
import BaseLayout from "../../layouts/BaseLayout.astro";
|
||||
import { getCollection } from "astro:content";
|
||||
import { sortItem } from "../../utils/sort.js";
|
||||
import * as collections from "../../content/config";
|
||||
import type { PostCollection } from "../../types";
|
||||
|
||||
export async function getStaticPaths() {
|
||||
return Object.keys(collections.collections)
|
||||
.filter((category) => category !== "git" && category !== "gists")
|
||||
.map((category) => ({
|
||||
params: { category },
|
||||
}));
|
||||
}
|
||||
|
||||
const category = Astro.params.category as PostCollection;
|
||||
const title = "Barrett Ruth";
|
||||
|
||||
const posts = await getCollection(category);
|
||||
posts.sort(sortItem);
|
||||
---
|
||||
|
||||
<BaseLayout title={title}>
|
||||
<slot name="head" slot="head">
|
||||
<link rel="stylesheet" href="/styles/index.css" />
|
||||
</slot>
|
||||
|
||||
<div class="content">
|
||||
<ul class="topics">
|
||||
<li class="topic algorithms">
|
||||
<a href="/algorithms" data-topic="algorithms">algorithms</a>
|
||||
</li>
|
||||
<li class="topic software">
|
||||
<a href="/software" data-topic="software">software</a>
|
||||
</li>
|
||||
<li class="topic meditations">
|
||||
<a href="/meditations" data-topic="meditations">meditations</a>
|
||||
</li>
|
||||
<li class="topic autonomous-racing">
|
||||
<a href="/autonomous-racing" data-topic="autonomous-racing"
|
||||
>autonomous-racing</a
|
||||
>
|
||||
</li>
|
||||
<li class="topic death">
|
||||
<a href="/death" data-topic="death">death</a>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<div class="posts" id="posts">
|
||||
{
|
||||
posts.map((p) => (
|
||||
<a href={`/${category}/${p.slug}.html`}>{p.data.title}</a>
|
||||
))
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
</BaseLayout>
|
||||
|
|
@ -1,71 +0,0 @@
|
|||
---
|
||||
import BaseLayout from "../layouts/BaseLayout.astro";
|
||||
import { sortItem } from "../utils/sort.js";
|
||||
import { getCollection } from "astro:content";
|
||||
import type { PostCollection } from "../types";
|
||||
|
||||
const title = "Barrett Ruth";
|
||||
const CATS: PostCollection[] = [
|
||||
"algorithms",
|
||||
"software",
|
||||
"meditations",
|
||||
"autonomous-racing",
|
||||
];
|
||||
|
||||
type PostData = {
|
||||
id: string;
|
||||
slug: string;
|
||||
data: {
|
||||
title: string;
|
||||
date: string | null;
|
||||
};
|
||||
};
|
||||
|
||||
const postsByCategory: Record<string, PostData[]> = {};
|
||||
for (const c of CATS) {
|
||||
const entries = await getCollection(c);
|
||||
entries.sort(sortItem);
|
||||
postsByCategory[c] = entries.map((e) => ({
|
||||
id: `${c}/${e.slug}.mdx`,
|
||||
slug: e.slug,
|
||||
data: {
|
||||
title: e.data.title ?? e.slug,
|
||||
date: e.data.date ?? null,
|
||||
},
|
||||
}));
|
||||
}
|
||||
---
|
||||
|
||||
<BaseLayout title={title}>
|
||||
<slot name="head" slot="head">
|
||||
<link rel="stylesheet" href="/styles/index.css" />
|
||||
</slot>
|
||||
|
||||
<div class="content">
|
||||
<ul class="topics">
|
||||
<li class="topic algorithms">
|
||||
<a href="#algorithms" data-topic="algorithms">algorithms</a>
|
||||
</li>
|
||||
<li class="topic software">
|
||||
<a href="#software" data-topic="software">software</a>
|
||||
</li>
|
||||
<li class="topic meditations">
|
||||
<a href="#meditations" data-topic="meditations">meditations</a>
|
||||
</li>
|
||||
<li class="topic autonomous-racing">
|
||||
<a href="#autonomous-racing" data-topic="autonomous-racing"
|
||||
>autonomous racing</a
|
||||
>
|
||||
</li>
|
||||
<li class="topic death">
|
||||
<a href="/death.html" data-topic="death">death</a>
|
||||
</li>
|
||||
</ul>
|
||||
<div class="posts" id="posts"></div>
|
||||
</div>
|
||||
|
||||
<script slot="scripts" define:vars={{ postsByCategory }} is:inline>
|
||||
window.postsByCategory = postsByCategory;
|
||||
</script>
|
||||
<script slot="scripts" src="/scripts/index.js" is:inline></script>
|
||||
</BaseLayout>
|
||||
|
|
@ -1,19 +0,0 @@
|
|||
---
|
||||
import { getCollection } from "astro:content";
|
||||
import PostLayout from "../../layouts/PostLayout.astro";
|
||||
|
||||
export async function getStaticPaths() {
|
||||
const gists = await getCollection("gists");
|
||||
return gists.map((gist) => ({
|
||||
params: { slug: gist.slug },
|
||||
props: { gist },
|
||||
}));
|
||||
}
|
||||
|
||||
const { gist } = Astro.props;
|
||||
const { Content } = await gist.render();
|
||||
---
|
||||
|
||||
<PostLayout frontmatter={gist.data} post={gist}>
|
||||
<Content />
|
||||
</PostLayout>
|
||||
|
|
@ -1,31 +0,0 @@
|
|||
---
|
||||
import BaseLayout from "../layouts/BaseLayout.astro";
|
||||
import { getCollection } from "astro:content";
|
||||
import { sortItem } from "../utils/sort.js";
|
||||
|
||||
const title = "git repos";
|
||||
const repos = await getCollection("git");
|
||||
repos.sort(sortItem);
|
||||
---
|
||||
|
||||
<BaseLayout title={title}>
|
||||
<slot name="head" slot="head">
|
||||
<link rel="stylesheet" href="/styles/index.css" />
|
||||
<script src="/scripts/index.js" is:inline></script>
|
||||
</slot>
|
||||
|
||||
<div class="content">
|
||||
<ul class="topics" id="repo-list">
|
||||
{
|
||||
repos.map((r) => (
|
||||
<li class="topic">
|
||||
<a href={`/git/${r.slug}.html`} data-topic={`git/${r.slug}`}>
|
||||
{r.data.title || r.slug}
|
||||
</a>
|
||||
</li>
|
||||
))
|
||||
}
|
||||
</ul>
|
||||
<div class="posts" id="posts"></div>
|
||||
</div>
|
||||
</BaseLayout>
|
||||
|
|
@ -1,32 +0,0 @@
|
|||
---
|
||||
import { getCollection } from "astro:content";
|
||||
import PostLayout from "../../layouts/PostLayout.astro";
|
||||
|
||||
export async function getStaticPaths() {
|
||||
const repos = await getCollection("git");
|
||||
return repos.map((repo) => ({
|
||||
params: { slug: repo.slug },
|
||||
props: { repo },
|
||||
}));
|
||||
}
|
||||
|
||||
const { repo } = Astro.props;
|
||||
const { Content } = await repo.render();
|
||||
const cloneCommand = `git clone https://git.barrettruth.com/${repo.slug}.git`;
|
||||
const githubUrl = `https://github.com/barrettruth/${repo.slug}`;
|
||||
---
|
||||
|
||||
<PostLayout frontmatter={repo.data} post={repo}>
|
||||
<Fragment slot="head">
|
||||
<link rel="stylesheet" href="/styles/git.css" />
|
||||
</Fragment>
|
||||
|
||||
<div class="clone-line">
|
||||
<code><span class="prompt">> </span>{cloneCommand}</code>
|
||||
</div>
|
||||
|
||||
<br />
|
||||
<div><a href={githubUrl}>source code</a></div>
|
||||
|
||||
<Content />
|
||||
</PostLayout>
|
||||
|
|
@ -3,66 +3,4 @@ import BaseLayout from "../layouts/BaseLayout.astro";
|
|||
const title = "barrett ruth";
|
||||
---
|
||||
|
||||
<BaseLayout title={title} useHeader={false}>
|
||||
<div class="death-container">
|
||||
<img id="death-image" src="/death/death.webp" alt="Philip Matthew Ruth" />
|
||||
<div id="tribute-text" class="tribute">
|
||||
rip philip matthew ruth<br />
|
||||
february 8, 1967 – c. december 2, 2025
|
||||
</div>
|
||||
<div class="credit">
|
||||
gary wray<br />
|
||||
<em>waiting in line</em>, 2021
|
||||
</div>
|
||||
</div>
|
||||
<style>
|
||||
html,
|
||||
body {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
overflow: hidden;
|
||||
background: black;
|
||||
color: white !important;
|
||||
}
|
||||
.death-container {
|
||||
position: relative;
|
||||
width: 100vw;
|
||||
height: 100vh;
|
||||
display: grid;
|
||||
grid-template-rows: 1fr auto;
|
||||
grid-template-columns: 1fr 1fr;
|
||||
}
|
||||
img {
|
||||
grid-row: 1 / -1;
|
||||
grid-column: 1 / -1;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
object-fit: cover;
|
||||
display: block;
|
||||
}
|
||||
.tribute {
|
||||
grid-row: 2;
|
||||
grid-column: 2;
|
||||
justify-self: end;
|
||||
align-self: end;
|
||||
padding: 1.5rem;
|
||||
font-size: clamp(1.5rem, 4vmin, 3em);
|
||||
z-index: 10;
|
||||
text-align: right;
|
||||
color: white;
|
||||
}
|
||||
.credit {
|
||||
grid-row: 2;
|
||||
grid-column: 1;
|
||||
justify-self: start;
|
||||
align-self: end;
|
||||
padding: 1.5rem;
|
||||
z-index: 10;
|
||||
font-size: clamp(1.2rem, 3vmin, 2em);
|
||||
text-align: left;
|
||||
color: white;
|
||||
}
|
||||
</style>
|
||||
</BaseLayout>
|
||||
<BaseLayout title={title} useHeader={false}> henlo </BaseLayout>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue