This commit is contained in:
Binary file not shown.
|
After Width: | Height: | Size: 15 KiB |
+107
@@ -0,0 +1,107 @@
|
||||
@import "tailwindcss";
|
||||
|
||||
:root {
|
||||
--background: #060a14;
|
||||
--foreground: #e6edf7;
|
||||
color-scheme: dark;
|
||||
}
|
||||
|
||||
@theme inline {
|
||||
--color-background: var(--background);
|
||||
--color-foreground: var(--foreground);
|
||||
--font-sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto,
|
||||
"Helvetica Neue", Arial, sans-serif;
|
||||
--font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas,
|
||||
"Liberation Mono", monospace;
|
||||
}
|
||||
|
||||
html {
|
||||
scroll-behavior: smooth;
|
||||
}
|
||||
|
||||
body {
|
||||
background-color: var(--background);
|
||||
color: var(--foreground);
|
||||
font-family: var(--font-sans);
|
||||
background-image:
|
||||
radial-gradient(60rem 30rem at 15% -10%, rgb(56 189 248 / 0.14), transparent 60%),
|
||||
radial-gradient(50rem 30rem at 95% 5%, rgb(129 140 248 / 0.12), transparent 60%),
|
||||
linear-gradient(rgb(255 255 255 / 0.025) 1px, transparent 1px),
|
||||
linear-gradient(90deg, rgb(255 255 255 / 0.025) 1px, transparent 1px);
|
||||
background-size: auto, auto, 48px 48px, 48px 48px;
|
||||
background-repeat: no-repeat, no-repeat, repeat, repeat;
|
||||
}
|
||||
|
||||
/*
|
||||
* Animated "traffic" connector used by the flow diagrams.
|
||||
* Vertical by default (mobile); turns horizontal from the lg breakpoint.
|
||||
*/
|
||||
.flow-line {
|
||||
--flow-color: #38bdf8;
|
||||
flex: none;
|
||||
width: 2px;
|
||||
height: 2rem;
|
||||
background-image: linear-gradient(to bottom, var(--flow-color) 0 6px, transparent 6px);
|
||||
background-size: 2px 10px;
|
||||
background-repeat: repeat-y;
|
||||
animation: flow-y 0.9s linear infinite;
|
||||
}
|
||||
|
||||
@media (min-width: 1024px) {
|
||||
.flow-line {
|
||||
width: 2.25rem;
|
||||
height: 2px;
|
||||
background-image: linear-gradient(to right, var(--flow-color) 0 6px, transparent 6px);
|
||||
background-size: 10px 2px;
|
||||
background-repeat: repeat-x;
|
||||
animation-name: flow-x;
|
||||
}
|
||||
}
|
||||
|
||||
/* Always-vertical variant for hand-offs between stacked boundaries. */
|
||||
.flow-line-v {
|
||||
--flow-color: #38bdf8;
|
||||
flex: none;
|
||||
width: 2px;
|
||||
height: 2rem;
|
||||
background-image: linear-gradient(to bottom, var(--flow-color) 0 6px, transparent 6px);
|
||||
background-size: 2px 10px;
|
||||
background-repeat: repeat-y;
|
||||
animation: flow-y 0.9s linear infinite;
|
||||
}
|
||||
|
||||
@keyframes flow-y {
|
||||
to {
|
||||
background-position: 0 10px;
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes flow-x {
|
||||
to {
|
||||
background-position: 10px 0;
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes pulse-ring {
|
||||
0% {
|
||||
box-shadow: 0 0 0 0 rgb(52 211 153 / 0.5);
|
||||
}
|
||||
100% {
|
||||
box-shadow: 0 0 0 10px rgb(52 211 153 / 0);
|
||||
}
|
||||
}
|
||||
|
||||
.pulse-ring {
|
||||
animation: pulse-ring 1.8s ease-out infinite;
|
||||
}
|
||||
|
||||
@media (prefers-reduced-motion: reduce) {
|
||||
html {
|
||||
scroll-behavior: auto;
|
||||
}
|
||||
.flow-line,
|
||||
.flow-line-v,
|
||||
.pulse-ring {
|
||||
animation: none;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
import type { Metadata } from "next";
|
||||
import { profile } from "@/content/site";
|
||||
import "./globals.css";
|
||||
|
||||
export const metadata: Metadata = {
|
||||
title: `${profile.name} · Portal`,
|
||||
description:
|
||||
"Personal portal: an introduction, the architecture and CI/CD workflow of my Kubernetes home lab, and my travel album.",
|
||||
};
|
||||
|
||||
export default function RootLayout({ children }: LayoutProps<"/">) {
|
||||
return (
|
||||
<html lang="en" className="h-full antialiased">
|
||||
<body className="flex min-h-full flex-col">{children}</body>
|
||||
</html>
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,66 @@
|
||||
import { Header } from "@/components/Header";
|
||||
import { Introduction } from "@/components/Introduction";
|
||||
import { Section } from "@/components/Section";
|
||||
import { Travel } from "@/components/Travel";
|
||||
import { CicdFlow } from "@/components/lab/CicdFlow";
|
||||
import { RequestFlow } from "@/components/lab/RequestFlow";
|
||||
import { ServiceLinks } from "@/components/lab/ServiceLinks";
|
||||
import { StackBadges } from "@/components/lab/StackBadges";
|
||||
|
||||
function SubHeading({ title, children }: { title: string; children?: React.ReactNode }) {
|
||||
return (
|
||||
<div className="mb-8">
|
||||
<h3 className="text-xl font-semibold text-white">{title}</h3>
|
||||
{children && <p className="mt-1 max-w-3xl text-sm leading-6 text-slate-400">{children}</p>}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
export default function Home() {
|
||||
return (
|
||||
<>
|
||||
<span id="top" />
|
||||
<Header />
|
||||
<main className="flex-1">
|
||||
<Introduction />
|
||||
|
||||
<Section
|
||||
id="lab"
|
||||
eyebrow="The Lab"
|
||||
title="A Kubernetes lab on a Mac mini"
|
||||
lead="Kubernetes comes from Docker Desktop on my Mac mini. A host-level Nginx accepts traffic on port 80 and hands it to the cluster's ingress controller, which routes each hostname to the right service. Everything below is hosted on that one machine, including this site."
|
||||
>
|
||||
<StackBadges />
|
||||
|
||||
<div className="mt-14">
|
||||
<SubHeading title="How a request reaches a pod">
|
||||
DNS is managed at GoDaddy. From there a request passes through the host Nginx and
|
||||
the cluster ingress before landing on a pod.
|
||||
</SubHeading>
|
||||
<RequestFlow />
|
||||
</div>
|
||||
|
||||
<div className="mt-20">
|
||||
<SubHeading title="From git push to running pod">
|
||||
Gitea Actions builds the image on the Docker Desktop daemon, stores it in Harbor and
|
||||
deploys it with Helm. A branch push goes to dev, a tag goes to prod.
|
||||
</SubHeading>
|
||||
<CicdFlow />
|
||||
</div>
|
||||
|
||||
<div className="mt-20">
|
||||
<SubHeading title="Lab services">
|
||||
Live endpoints you can open yourself.
|
||||
</SubHeading>
|
||||
<ServiceLinks />
|
||||
</div>
|
||||
</Section>
|
||||
|
||||
<Travel />
|
||||
</main>
|
||||
<footer className="border-t border-white/10 py-8 text-center text-sm text-slate-500">
|
||||
Built with Next.js and deployed by the pipeline described above.
|
||||
</footer>
|
||||
</>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user