Leaflet Blog in Deno Fresh

tagline

Changed files
+41 -7
routes
static
+37 -6
routes/index.tsx
···
export const dynamic = "force-static";
export const revalidate = 3600; // 1 hour
+
const stupidSelfDeprecatingTaglinesToTryToPretendImSelfAware = [
+
"is looking into it",
+
"i think therefore imdb",
+
"isn't a real word",
+
"enjoys each protocol equally",
+
"is having a very semantic argument",
+
"fellas is it gay to write unit tests?",
+
"wrote these derivitive taglines",
+
"is way too into css animations",
+
"uses dark mode at noon",
+
"overthinks variable names",
+
"git pushes with -f",
+
"formats on save",
+
"is praising kier",
+
"pretends to understand monads",
+
"brags about their vim config",
+
"documents their code (lies)",
+
"isn't mysterious or important",
+
"wants to be included in discourse",
+
"is deeply offended by semicolons",
+
"is morraly opposed to touching grass",
+
"uses inline css (sue me)",
+
];
+
+
function getRandomTagline() {
+
return stupidSelfDeprecatingTaglinesToTryToPretendImSelfAware[Math.floor(Math.random() * stupidSelfDeprecatingTaglinesToTryToPretendImSelfAware.length)];
+
}
+
export default async function Home() {
const posts = await getPosts();
+
const tagline = getRandomTagline();
return (
<div className="grid grid-rows-[20px_1fr_20px] items-center justify-items-center min-h-dvh p-8 pb-20 gap-16 sm:p-20">
<main className="flex flex-col gap-8 row-start-2 items-center sm:items-start w-full max-w-[600px]">
<div className="self-center flex flex-col">
-
<Title level="h1" className="m-0">
-
knotbin
-
</Title>
-
<span className="font-bold text-xs opacity-50 text-right flex-1 mr-6">
-
looking into it
-
</span>
+
<div className="relative">
+
<Title className="m-0 mb-6 font-serif-italic text-4xl sm:text-5xl lowercase">
+
knotbin
+
</Title>
+
<span className="absolute bottom-3 -right-2 font-bold text-xs opacity-50 text-right whitespace-nowrap">
+
{tagline}
+
</span>
+
</div>
</div>
<div className="flex flex-col gap-4 w-full">
+2
routes/post/[slug].tsx
···
import { Title } from "../../components/typography.tsx";
import { getPost } from "../../lib/api.ts";
import { Head } from "$fresh/runtime.ts";
+
import { BlueskyComments } from "npm:bluesky-comments";
interface Post {
uri: string;
···
/>
</div>
</article>
+
</main>
<Footer />
</div>
+2 -1
static/styles.css
···
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;700&display=swap');
-
@import url('https://fonts.googleapis.com/css2?family=Libre+Bodoni:wght@400;700&display=swap');
+
@import url('https://fonts.googleapis.com/css2?family=Libre+Bodoni:ital,wght@0,400;0,700;1,400&display=swap');
@font-face {
font-family: 'Berkeley Mono';
src: url('/path/to/local/fonts/BerkeleyMono-Regular.woff2') format('woff2'),
···
.font-sans { font-family: var(--font-sans); }
.font-serif { font-family: var(--font-serif); }
.font-mono { font-family: var(--font-mono); }
+
.font-serif-italic { font-family: var(--font-serif); font-style: italic;}
/*
The default border color has changed to `currentColor` in Tailwind CSS v4,