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.
63 lines
3.0 KiB
Vue
63 lines
3.0 KiB
Vue
<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>
|