feat(ui): build homepage hero, terminal and feature cards

Compose pages/index.vue from the desktop homepage mockup: decorative
backdrop scoped to the hero but not clipped at its bottom edge, hero with
status pill, quote and contact chips with copy buttons, terminal panel fed
by a chapter array with derived counters, and the three feature cards.

Split into app/components/home/ (auto-imported with the Home* prefix) and
keep the chapter data in app/data/chapters.ts so GET /api/chapters can
replace the mockup values later.
This commit is contained in:
Noel Sabia committed 2026-10-23 21:22:02 +02:00
1 parent db04d441c9
commit 26739731ed
9 files changed
+321 -1

No files matched your search

+44
View File
@@ -0,0 +1,44 @@
<script setup lang="ts">
import type { Chapter } from '~/data/chapters'
const props = defineProps<{ chapter: Chapter }>()
const isActive = computed(() => props.chapter.status === 'active')
// Active rows report recoveries; finished rows report what sealed them.
const detail = computed(() => (isActive.value
? { label: 'self_healed', value: `${props.chapter.rebounds ?? 0}x` }
: props.chapter.outcome))
</script>
<template>
<div
class="flex min-w-[580px] items-center justify-between gap-4 rounded px-3 py-1.5 transition-colors hover:bg-surface-container-lowest"
:class="isActive ? 'bg-surface-container-lowest/60' : 'bg-surface-container-lowest/40'"
>
<span
class="font-medium"
:class="isActive ? 'text-primary-fixed-dim' : 'text-outline'"
>chapter=<span :class="isActive ? 'text-on-surface' : 'text-on-surface-variant'">{{ chapter.name }}</span></span>
<span
v-if="isActive"
class="flex items-center gap-1.5 font-semibold text-secondary"
>
<span class="h-1.5 w-1.5 rounded-full bg-secondary" />
status=active
</span>
<span v-else class="font-medium text-outline">status=finished</span>
<span
class="font-status-badge text-status-badge"
:class="isActive ? 'text-on-surface-variant' : 'text-on-surface-variant/70'"
>uptime={{ chapter.uptime }}</span>
<span
v-if="detail"
class="font-label-mono text-label-mono"
:class="isActive ? 'text-tertiary' : 'text-primary-fixed-dim'"
>{{ detail.label }}={{ detail.value }}</span>
</div>
</template>
+23
View File
@@ -0,0 +1,23 @@
<template>
<div class="mb-10 w-full max-w-3xl">
<div class="flex flex-wrap items-center justify-between gap-2 rounded-xl bg-surface-container/90 p-2 font-label-mono text-label-mono text-on-surface shadow-md backdrop-blur-md sm:p-2.5">
<HomeContactItem
icon="mail"
value="noel@noelsabia.dev"
copy-value="noel@noelsabia.dev"
class="min-w-[200px] flex-1"
/>
<HomeContactItem
icon="call"
value="+49 176 12345678"
copy-value="+4917612345678"
class="min-w-[190px] flex-1"
/>
<HomeContactItem
icon="near_me"
value="Wesel, Germany"
class="flex-initial"
/>
</div>
</div>
</template>
+54
View File
@@ -0,0 +1,54 @@
<script setup lang="ts">
const props = defineProps<{
icon: string
value: string
/** Omit for a plain chip (no copy button). */
copyValue?: string
}>()
const copied = ref(false)
let resetTimer: ReturnType<typeof setTimeout> | undefined
async function copy() {
if (!props.copyValue) return
try {
await navigator.clipboard.writeText(props.copyValue)
copied.value = true
clearTimeout(resetTimer)
resetTimer = setTimeout(() => {
copied.value = false
}, 1800)
} catch {
// Clipboard permission denied: leave the label on COPY.
}
}
onBeforeUnmount(() => clearTimeout(resetTimer))
</script>
<template>
<div
class="flex items-center gap-2 rounded-lg bg-surface-container-low/70 px-3 py-2"
:class="copyValue
? 'justify-between transition-colors hover:bg-surface-container-high'
: 'justify-center font-body-sm text-body-sm text-on-surface-variant'"
>
<div class="flex min-w-0 items-center gap-2.5">
<span class="material-symbols-outlined text-[1.125rem] text-outline">{{ icon }}</span>
<span
v-if="copyValue"
class="select-all truncate font-body-sm text-body-sm text-on-surface"
>{{ value }}</span>
<span v-else class="whitespace-nowrap text-on-surface">{{ value }}</span>
</div>
<button
v-if="copyValue"
type="button"
class="flex items-center gap-1 rounded bg-surface-variant px-2 py-1 text-[0.625rem] font-semibold tracking-wider text-on-surface-variant transition-colors hover:text-on-surface active:scale-95"
:aria-label="`Copy ${value}`"
@click="copy"
>
<span>{{ copied ? 'COPIED' : 'COPY' }}</span>
</button>
</div>
</template>
+18
View File
@@ -0,0 +1,18 @@
<script setup lang="ts">
defineProps<{
icon: string
title: string
description: string
iconClass: string
}>()
</script>
<template>
<div class="rounded-xl bg-surface-container p-6 shadow-sm transition-colors hover:bg-surface-container-high">
<div class="mb-4 flex h-10 w-10 items-center justify-center rounded-lg bg-surface-container-highest" :class="iconClass">
<span class="material-symbols-outlined text-[1.5rem]">{{ icon }}</span>
</div>
<h3 class="mb-2 font-headline-sm text-headline-sm text-on-surface">{{ title }}</h3>
<p class="font-body-sm text-body-sm leading-relaxed text-on-surface-variant">{{ description }}</p>
</div>
</template>
+34
View File
@@ -0,0 +1,34 @@
<script setup lang="ts">
const features = [
{
icon: 'shield_with_heart',
iconClass: 'text-primary',
title: 'Intentional Degrade',
description: 'Systems engineered to isolate faults instantly and degrade gracefully rather than collapsing cascade pipelines.',
},
{
icon: 'autorenew',
iconClass: 'text-secondary',
title: 'Self-Healing Loops',
description: 'Continuous reconciliation patterns across bare-metal k3s nodes, edge workloads, and AI compute pools.',
},
{
icon: 'data_thresholding',
iconClass: 'text-tertiary',
title: 'Rigorous Telemetry',
description: 'Low-overhead eBPF probes and observability pipelines capturing post-mortem clarity before issues materialize.',
},
]
</script>
<template>
<section class="relative mx-auto mb-20 w-full max-w-5xl px-6 sm:px-8">
<div class="grid grid-cols-1 gap-4 md:grid-cols-3">
<HomeFeatureCard
v-for="feature in features"
:key="feature.title"
v-bind="feature"
/>
</div>
</section>
</template>
+42
View File
@@ -0,0 +1,42 @@
<template>
<div class="relative mx-auto flex max-w-5xl flex-col items-center px-6 pb-20 pt-16 text-center sm:px-8 sm:pt-24 lg:px-12">
<div class="mb-8 inline-flex items-center gap-2.5 rounded-full bg-surface-container-high/80 px-3 py-1.5 font-label-mono text-label-mono text-on-surface-variant shadow-sm backdrop-blur-md">
<span class="relative inline-flex h-2 w-2">
<span class="absolute inline-flex h-full w-full animate-ping rounded-full bg-secondary opacity-75" />
<span class="relative inline-flex h-2 w-2 rounded-full bg-secondary shadow-[0_0_8px_#4ae176]" />
</span>
<span class="uppercase tracking-widest text-on-surface">SYS_ORCHESTRATOR // RESILIENCE LABS</span>
</div>
<h1 class="mb-4 font-display text-display tracking-tight text-on-surface selection:bg-primary selection:text-on-primary">
Noel Sabia
</h1>
<p class="mb-6 font-label-mono text-mono-code uppercase tracking-wider text-primary-fixed-dim">
Systems Engineer <span class="mx-1.5 text-outline-variant">·</span> Infrastructure &amp; AI
</p>
<p class="mx-auto mb-12 max-w-2xl font-headline-md text-headline-md italic leading-relaxed text-on-surface-variant">
&ldquo;I build systems that fall down and stand back up — on purpose.&rdquo;
</p>
<HomeContactBar />
<div class="flex flex-wrap items-center justify-center gap-4">
<a
href="#"
class="inline-flex items-center gap-2.5 rounded-lg bg-on-surface px-6 py-3 font-label-mono text-label-mono font-semibold text-surface shadow-lg transition-all hover:bg-inverse-surface hover:shadow-xl active:scale-[0.98]"
>
<span class="material-symbols-outlined text-[1.25rem]">arrow_downward</span>
<span>Download CV (PDF)</span>
</a>
<a
href="#system-terminal"
class="inline-flex items-center gap-2 rounded-lg bg-surface-container-high px-5 py-3 font-label-mono text-label-mono text-on-surface shadow-sm transition-colors hover:bg-surface-variant"
>
<span>See the life map</span>
<span class="material-symbols-outlined text-[1rem]">south</span>
</a>
</div>
</div>
</template>
+62
View File
@@ -0,0 +1,62 @@
<script setup lang="ts">
import type { Chapter } from '~/data/chapters'
const props = defineProps<{ chapters: Chapter[] }>()
const activeCount = computed(() => props.chapters.filter((chapter) => chapter.status === 'active').length)
const sealedCount = computed(() => props.chapters.length - activeCount.value)
const rebounds = computed(() => props.chapters.reduce((total, chapter) => total + (chapter.rebounds ?? 0), 0))
</script>
<template>
<section id="system-terminal" class="relative mx-auto mb-24 w-full max-w-4xl px-6 sm:px-8">
<div class="overflow-hidden rounded-xl bg-surface-container-low shadow-2xl">
<div class="flex items-center justify-between bg-surface-container-lowest px-4 py-2.5">
<div class="flex items-center gap-2">
<span class="inline-block h-3 w-3 rounded-full bg-outline-variant/60" />
<span class="inline-block h-3 w-3 rounded-full bg-outline-variant/60" />
<span class="inline-block h-3 w-3 rounded-full bg-outline-variant/60" />
</div>
<div class="flex items-center gap-1.5 font-label-mono text-[0.6875rem] tracking-wide text-on-surface-variant/80">
<span class="material-symbols-outlined text-[0.875rem] text-primary">terminal</span>
<span>~/noelsabia: cv$ --runtime=active</span>
</div>
<div class="flex items-center gap-1.5 font-status-badge text-[0.625rem] text-secondary">
<span class="inline-block h-1.5 w-1.5 rounded-full bg-secondary" />
<span>LIVE</span>
</div>
</div>
<div class="flex flex-col gap-3 overflow-x-auto bg-surface-container-low p-5 font-mono-code text-mono-code text-on-surface sm:p-7">
<div class="mb-1 select-none text-xs tracking-wider text-on-surface-variant/60">
# Resilience telemetry: autonomous remediation logs
</div>
<HomeChapterRow v-for="chapter in chapters" :key="chapter.name" :chapter="chapter" />
<div class="flex items-center gap-2 pt-3 font-label-mono text-sm text-primary">
<span class="text-secondary">$</span>
<span>watch --interval=5s ./chaos_reconcile.sh</span>
<span class="ml-0.5 inline-block h-4 w-2.5 animate-pulse bg-primary" />
</div>
</div>
<div class="flex flex-wrap items-center justify-between gap-3 bg-surface-container px-5 py-3 font-label-mono text-xs text-on-surface-variant">
<div class="flex items-center gap-4">
<span class="flex items-center gap-1.5">
<span class="h-2 w-2 rounded-full bg-secondary" />
{{ activeCount }} Systems Active
</span>
<span class="flex items-center gap-1.5">
<span class="h-2 w-2 rounded-full bg-outline" />
{{ sealedCount }} Sealed Archetypes
</span>
</div>
<div class="flex items-center gap-1.5 text-on-tertiary-container">
<span class="material-symbols-outlined text-[0.875rem]">sync_problem</span>
<span>Cumulative Rebounds: {{ rebounds }} events</span>
</div>
</div>
</div>
</section>
</template>