Extract header into component, specify general 'RSS' instead of 'Atom' feeds

This commit is contained in:
2023-11-27 20:04:18 -06:00
parent 3f3a3a4855
commit db25fa0a97
2 changed files with 17 additions and 9 deletions

View File

@@ -0,0 +1,13 @@
---
interface Props {
className?: string | null;
}
const { className } = Astro.props;
---
<header class:list={["text-5xl text-center lowercase", className]}>
<div class="stack" style="--stacks: 3;">
<span style="--index: 0;">undefined behaviors</span>
<span style="--index: 1;">undefined behaviors</span>
<span style="--index: 2;">undefined behaviors</span>
</div>
</header>

View File

@@ -1,6 +1,7 @@
---
import '@styles/global.scss';
import '@styles/fonts.scss';
import Header from '@components/Header.astro';
import { ViewTransitions } from 'astro:transitions';
const repository_url = `https://github.com/${import.meta.env.PUBLIC_VERCEL_GIT_REPO_OWNER}/${import.meta.env.PUBLIC_VERCEL_GIT_REPO_SLUG}`
@@ -28,7 +29,7 @@ const titleTag = title != undefined ? `${title} | undefined.behavio.rs` : 'undef
<link as="font" crossorigin href="/fonts/-cmuntt.woff2" rel="preload">
<link as="font" crossorigin href="/fonts/-cmunti.woff2" rel="preload">
<link as="sitemap" type="application/xml" href="/sitemap-index.xml">
<link href="/feed.xml" rel="alternate" type="application/atom+xml">
<link href="/feed.xml" rel="alternate" type="application/xml">
<ViewTransitions />
<!-- {page._preview_description and page.title or page.name == "index.html"} -->
<!-- <meta content="website" property="og:type"> -->
@@ -49,13 +50,7 @@ const titleTag = title != undefined ? `${title} | undefined.behavio.rs` : 'undef
<!-- {%- endif %} -->
</head>
<body class="flex-col align-middle w-full max-w-full">
<header class="text-5xl mt-5 mb-3 text-center lowercase">
<div class="stack" style="--stacks: 3;">
<span style="--index: 0;">undefined behaviors</span>
<span style="--index: 1;">undefined behaviors</span>
<span style="--index: 2;">undefined behaviors</span>
</div>
</header>
<Header className="mt-5 mb-3" />
<nav class="text-center text-xl text-[#808080] [&>a]:text-white [&>a]:underline decoration-white/85 [&>span]:select-none">
<a href="/">~/</a>
<span>:</span>
@@ -69,7 +64,7 @@ const titleTag = title != undefined ? `${title} | undefined.behavio.rs` : 'undef
<slot name="default" />
</div>
<p class="text-center">
<a href="/feed.xml">Atom</a>
<a href="/feed.xml">RSS</a>
|
<a href={`${repository_url}/commit/${build_revision}`}>
<span id="commit-id" style={{color: '#' + build_revision.slice(0, 6)}}>#{build_revision.slice(0, 7)}</span>