feat(web): replace UI with greenfield Stitch sensing-engine hero
Rebuild the web frontend around the Stitch hero design: new app shell header with responsive navigation and a single / page preserving the Stitch main/footer copy. Remove the legacy Onyx pages, components, composables and CSS. Add bundled Tailwind 3.4.17 and @nuxt/icon with a locally bundled Material Symbols collection; no icon CDN at runtime. Include design notes for claims to reconcile before the pitch and verification screenshots.
This commit is contained in:
1 parent
9b61d6859e
commit
836e71c5f4
33 files changed
+1377
-4326
No files matched your search
+247
-258
@@ -1,268 +1,257 @@
|
||||
<script setup lang="ts">
|
||||
import {
|
||||
iconCalendar,
|
||||
iconCloud,
|
||||
iconLocationPin,
|
||||
iconSunny,
|
||||
iconTriangleWarning,
|
||||
} from '@sit-onyx/icons'
|
||||
import { weatherKind } from '#shared/insights'
|
||||
import { berlinParts } from '#shared/staffing'
|
||||
import type { ContextResponse, MetaResponse, Sensor, SeriesResponse } from '#shared/types'
|
||||
import {
|
||||
formatDate,
|
||||
formatDateTime,
|
||||
formatNumber,
|
||||
formatPercent,
|
||||
formatShortDate,
|
||||
formatTime,
|
||||
} from '~/utils/format'
|
||||
|
||||
useHead({ title: 'Now in Heilbronn — PulseCast' })
|
||||
|
||||
const config = useRuntimeConfig()
|
||||
const demoNow = String(config.public.demoNow)
|
||||
|
||||
const { data: sensors } = await useFetch<Sensor[]>('/api/sensors')
|
||||
const { data: context } = await useFetch<ContextResponse>('/api/context')
|
||||
const { data: meta } = await useFetch<MetaResponse>('/api/meta')
|
||||
const sensorId = ref(
|
||||
sensors.value?.find((sensor) => sensor.id === 'hn-stadtgalerie-01')?.id ??
|
||||
sensors.value?.[0]?.id ??
|
||||
'hn-stadtgalerie-01',
|
||||
)
|
||||
const { data: series } = await useFetch<SeriesResponse>('/api/series', {
|
||||
query: computed(() => ({ sensor: sensorId.value, step: '1h' })),
|
||||
})
|
||||
|
||||
const activeSensor = computed(() => sensors.value?.find((sensor) => sensor.id === sensorId.value))
|
||||
const sensorOptions = computed(() =>
|
||||
(sensors.value ?? []).map((sensor) => ({ value: sensor.id, label: sensor.name })),
|
||||
)
|
||||
|
||||
const lastPoint = computed(() => series.value?.points.at(-1))
|
||||
const previousPoint = computed(() => series.value?.points.at(-25))
|
||||
const deltaPct = computed(() => {
|
||||
if (!lastPoint.value || !previousPoint.value || previousPoint.value.v === 0) return 0
|
||||
return ((lastPoint.value.v - previousPoint.value.v) / previousPoint.value.v) * 100
|
||||
})
|
||||
const last24 = computed(() => series.value?.points.slice(-24) ?? [])
|
||||
const barMax = computed(() => Math.max(...last24.value.map((point) => point.v), 1))
|
||||
|
||||
const nowWeather = computed(() => context.value?.weather.now)
|
||||
const weatherIcon = computed(() =>
|
||||
nowWeather.value && weatherKind(nowWeather.value) === 'sunny' ? iconSunny : iconCloud,
|
||||
)
|
||||
const weatherLabel = computed(() => {
|
||||
if (!nowWeather.value) return '—'
|
||||
const kind = weatherKind(nowWeather.value)
|
||||
return kind === 'sunny' ? 'Sunny' : kind === 'partly-cloudy' ? 'Partly cloudy' : kind === 'rain' ? 'Rain' : 'Cloudy'
|
||||
})
|
||||
|
||||
const today = berlinParts(demoNow).date
|
||||
const todayHoliday = computed(() => context.value?.holidays.find((holiday) => holiday.date === today))
|
||||
const lastHoliday = computed(() =>
|
||||
context.value?.holidays.filter((holiday) => holiday.date < today).at(-1),
|
||||
)
|
||||
const nextHoliday = computed(() =>
|
||||
context.value?.holidays.find((holiday) => holiday.date > today),
|
||||
)
|
||||
|
||||
const latestPulse = computed(() => {
|
||||
if (!sensors.value?.length) return 0
|
||||
return Math.round(sensors.value.reduce((sum, sensor) => sum + sensor.mean, 0) / sensors.value.length)
|
||||
})
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div class="page page-stack">
|
||||
<header class="page-header">
|
||||
<div>
|
||||
<p class="eyebrow">Now · replay clock {{ formatDateTime(demoNow) }}</p>
|
||||
<OnyxHeadline is="h1">The pulse is in the pedestrian core.</OnyxHeadline>
|
||||
<p class="lede">
|
||||
Eight fixed sensors around Stadtgalerie and Kaiserstraße. This is estimated device density, not people,
|
||||
and not a city-wide heatmap. The decision lives on <NuxtLink to="/plan">Plan</NuxtLink>.
|
||||
</p>
|
||||
</div>
|
||||
<div class="hero-actions">
|
||||
<OnyxBadge color="warning">Replay, not live</OnyxBadge>
|
||||
<OnyxBadge color="neutral" density="compact">{{ sensors?.length ?? 8 }} sensors</OnyxBadge>
|
||||
</div>
|
||||
</header>
|
||||
|
||||
<div class="split-grid">
|
||||
<div class="card-stack">
|
||||
<OnyxCard>
|
||||
<div class="card-header">
|
||||
<div>
|
||||
<OnyxHeadline is="h2">Latest replay reading</OnyxHeadline>
|
||||
<p class="small muted" style="margin: 0">Last available hour in the API series.</p>
|
||||
</div>
|
||||
<div style="min-width: 12rem">
|
||||
<OnyxSelect
|
||||
v-model="sensorId"
|
||||
label="Sensor"
|
||||
list-label="Inner-city sensors"
|
||||
:options="sensorOptions"
|
||||
density="compact"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="reading-row">
|
||||
<p class="reading-value">{{ lastPoint ? formatNumber(lastPoint.v) : '—' }}</p>
|
||||
<div>
|
||||
<p style="margin: 0; font-weight: 600">estimated devices / hour</p>
|
||||
<p class="small muted" style="margin: 0">
|
||||
{{ activeSensor?.name }} · {{ activeSensor?.id }}
|
||||
<main class="w-full pt-16 bg-[#081723] min-h-[calc(100vh-160px)]">
|
||||
<div class="flex flex-col w-full">
|
||||
<!-- Above-The-Fold Master Container (1200px max width aligned) -->
|
||||
<section class="w-full bg-[#081723] pt-space-2xl pb-space-xl">
|
||||
<div class="max-w-[1200px] mx-auto px-margin-desktop flex flex-col gap-space-2xl">
|
||||
<!-- HERO TWO-COLUMN GRID (50% / 50%) -->
|
||||
<div class="grid grid-cols-1 lg:grid-cols-12 gap-space-xl items-center">
|
||||
<!-- LEFT COLUMN: Value Proposition & CTAs -->
|
||||
<div class="lg:col-span-6 flex flex-col justify-center gap-space-lg">
|
||||
<!-- Eyebrow Pill Badge -->
|
||||
<div class="inline-flex items-center gap-2 self-start px-3 py-1 rounded-full bg-[#0e2233] border border-[#1e3a52] shadow-sm">
|
||||
<span class="w-1.5 h-1.5 rounded-full bg-[#00C3CD]"></span>
|
||||
<span class="font-label-sm text-label-sm text-[#94A3B8] uppercase tracking-wider font-semibold">
|
||||
Schwarz IT · Sensing & Prediction Platform
|
||||
</span>
|
||||
</div>
|
||||
<!-- Headline -->
|
||||
<h1 class="text-[36px] leading-[40px] sm:text-[52px] sm:leading-[58px] tracking-[-0.03em] font-semibold text-[#FFFFFF]">
|
||||
You bring the data.<br />
|
||||
<span class="text-[#00C3CD]">We bring the engine.</span>
|
||||
</h1>
|
||||
<!-- Subline -->
|
||||
<p class="font-body-lg text-body-lg text-[#94A3B8] max-w-[500px] leading-relaxed">
|
||||
Privacy-preserving sensor counts in, decisions out. Turn raw edge signals into verified operational foresight without compromising individual identity.
|
||||
</p>
|
||||
<OnyxBadge :color="deltaPct >= 0 ? 'success' : 'warning'" density="compact">
|
||||
{{ deltaPct >= 0 ? '+' : '' }}{{ formatPercent(deltaPct, 0) }} vs 24 h earlier
|
||||
</OnyxBadge>
|
||||
<!-- CTAs Row -->
|
||||
<div class="flex flex-wrap items-center gap-space-md pt-space-xs">
|
||||
<a class="inline-flex items-center justify-center gap-2 px-6 h-12 rounded-xl bg-[#00C3CD] text-[#081723] font-label-md text-label-md font-semibold hover:bg-[#00d8e4] transition-all shadow-[0_2px_12px_rgba(0,195,205,0.25)] active:scale-[0.99] group" href="#playground">
|
||||
<span>Try the engine</span>
|
||||
<Icon name="material-symbols:arrow-forward" class="text-[18px] group-hover:translate-x-0.5 transition-transform text-[#081723]" />
|
||||
</a>
|
||||
<a class="inline-flex items-center justify-center gap-2 px-6 h-12 rounded-xl bg-[#0e2233] text-[#FFFFFF] border border-[#1e3a52] font-label-md text-label-md hover:bg-[#132b40] transition-all shadow-sm" href="#use-cases">
|
||||
<Icon name="material-symbols:visibility-outline" class="text-[18px] text-[#00C3CD]" />
|
||||
<span>See live use cases</span>
|
||||
</a>
|
||||
</div>
|
||||
<!-- Trust Micro-Copy -->
|
||||
<div class="flex items-center gap-2 pt-space-xs font-body-sm text-body-sm text-[#94A3B8]">
|
||||
<Icon name="material-symbols:verified-user" class="text-[17px] text-[#00C3CD]" />
|
||||
<span>Zero personally identifiable information (PII) processed. GDPR Art. 25 Privacy by Design.</span>
|
||||
</div>
|
||||
</div>
|
||||
<!-- RIGHT COLUMN: Pipeline Architecture Diagram Card -->
|
||||
<div class="lg:col-span-6 w-full">
|
||||
<div class="w-full bg-[#0e2233] border border-[#1e3a52] rounded-xl shadow-xl p-space-lg flex flex-col gap-space-md relative overflow-hidden">
|
||||
<!-- Card Header Badge -->
|
||||
<div class="flex flex-wrap items-center justify-between gap-2 pb-space-xs border-b border-[#1e3a52]/60">
|
||||
<div class="flex items-center gap-2">
|
||||
<span class="w-2 h-2 rounded-full bg-[#00C3CD] animate-pulse"></span>
|
||||
<span class="font-label-sm text-label-sm uppercase tracking-wider text-[#FFFFFF] font-semibold">Real-Time Core Pipeline</span>
|
||||
</div>
|
||||
<span class="font-label-sm text-label-sm bg-[#132b40] border border-[#1e3a52] px-2 py-0.5 rounded text-[#94A3B8] font-mono font-medium">v2.4-deterministic</span>
|
||||
</div>
|
||||
<!-- Pipeline Diagram Stage -->
|
||||
<div class="bg-[#081723]/60 border border-[#1e3a52] rounded-xl p-space-md flex flex-col gap-space-md relative">
|
||||
<!-- 3-Node Horizontal Pipeline Layout -->
|
||||
<div class="flex flex-col md:flex-row items-center justify-between gap-2 md:gap-1 w-full">
|
||||
<!-- NODE 1: Ingest -->
|
||||
<div class="w-full md:w-[30%] bg-[#0e2233] border border-[#1e3a52] rounded-xl p-space-sm flex flex-col items-center text-center shadow-sm">
|
||||
<div class="w-10 h-10 rounded-lg bg-[#132b40] border border-[#1e3a52] flex items-center justify-center text-[#00C3CD] mb-1">
|
||||
<Icon name="material-symbols:sensors" class="text-[20px]" />
|
||||
</div>
|
||||
<span class="font-headline-sm text-[13px] leading-tight text-[#FFFFFF] font-semibold">Anonymous Counts</span>
|
||||
<span class="font-body-sm text-[11px] text-[#94A3B8] mt-1">LiDAR, FLUX, In/Out Edge Turnstile</span>
|
||||
<div class="mt-2 w-full bg-[#132b40] border border-[#1e3a52]/80 px-1 py-0.5 rounded text-[10px] text-[#94A3B8] font-mono">
|
||||
Σ counts/min
|
||||
</div>
|
||||
</div>
|
||||
<!-- CONNECTOR 1 -->
|
||||
<div class="w-full md:w-auto flex flex-col items-center justify-center py-1 md:py-0 md:flex-1 md:px-1 relative">
|
||||
<div class="w-full h-[2px] bg-[#1e3a52] relative overflow-hidden flex items-center">
|
||||
<div class="w-1/2 h-[2px] bg-[#00C3CD] animate-flow"></div>
|
||||
</div>
|
||||
<span class="text-[9px] text-[#00C3CD] font-mono tracking-tighter mt-1 uppercase">100% PII-Free</span>
|
||||
</div>
|
||||
<!-- NODE 2: SENSING ENGINE (Centerpiece) -->
|
||||
<div class="w-full md:w-[38%] bg-[#132b40] border-2 border-[#00C3CD] text-[#FFFFFF] rounded-xl p-space-md flex flex-col items-center text-center shadow-lg relative overflow-hidden group">
|
||||
<div class="absolute -right-6 -bottom-6 w-20 h-20 rounded-full bg-[#00C3CD]/15 blur-xl pointer-events-none"></div>
|
||||
<div class="w-9 h-9 rounded-full bg-[#00C3CD]/20 border border-[#00C3CD]/40 flex items-center justify-center text-[#00C3CD] mb-1">
|
||||
<Icon name="material-symbols:hub-outline" class="text-[19px]" />
|
||||
</div>
|
||||
<span class="font-headline-sm text-[14px] leading-tight text-[#FFFFFF] font-semibold tracking-tight">SENSING ENGINE</span>
|
||||
<span class="font-label-sm text-[10px] text-[#00C3CD] uppercase tracking-wider font-semibold">Fuse + Predict</span>
|
||||
</div>
|
||||
<!-- CONNECTOR 2 -->
|
||||
<div class="w-full md:w-auto flex flex-col items-center justify-center py-1 md:py-0 md:flex-1 md:px-1 relative">
|
||||
<div class="w-full h-[2px] bg-[#1e3a52] relative overflow-hidden flex items-center">
|
||||
<div class="w-1/2 h-[2px] bg-[#00C3CD] animate-flow"></div>
|
||||
</div>
|
||||
<span class="text-[9px] text-[#00C3CD] font-mono tracking-tighter mt-1 uppercase">Inference</span>
|
||||
</div>
|
||||
<!-- NODE 3: Decisions -->
|
||||
<div class="w-full md:w-[30%] bg-[#0e2233] border border-[#1e3a52] rounded-xl p-space-sm flex flex-col items-center text-center shadow-sm">
|
||||
<div class="w-10 h-10 rounded-lg bg-[#132b40] border border-[#1e3a52] flex items-center justify-center text-[#00C3CD] mb-1">
|
||||
<Icon name="material-symbols:bolt-outline" class="text-[20px]" />
|
||||
</div>
|
||||
<span class="font-headline-sm text-[13px] leading-tight text-[#FFFFFF] font-semibold">Decisions</span>
|
||||
<span class="font-body-sm text-[11px] text-[#94A3B8] mt-1">Staff shift, dynamic routing, bin dispatch</span>
|
||||
<div class="mt-2 w-full bg-[#132b40] border border-[#1e3a52]/80 px-1 py-0.5 rounded text-[10px] text-[#00C3CD] font-mono font-semibold">
|
||||
Action Output
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- Real-world Context Fusion Ribbon -->
|
||||
<div class="flex flex-col gap-1.5 pt-1">
|
||||
<div class="flex items-center justify-between text-[#94A3B8] px-1">
|
||||
<span class="font-label-sm text-[11px] tracking-wider uppercase font-semibold text-[#94A3B8]">Contextual Signals Fused in Real-Time</span>
|
||||
<span class="text-[10px] font-mono text-[#00C3CD]">4 Global Feeds Active</span>
|
||||
</div>
|
||||
<div class="grid grid-cols-2 md:grid-cols-4 gap-1.5">
|
||||
<div class="flex items-center gap-1.5 px-2 py-1.5 rounded-lg bg-[#0e2233] border border-[#1e3a52] shadow-sm">
|
||||
<span class="text-[13px]">☀️</span>
|
||||
<div class="flex flex-col min-w-0">
|
||||
<span class="font-label-sm text-[11px] text-[#FFFFFF] truncate font-semibold">Sun Position</span>
|
||||
<span class="text-[9px] text-[#94A3B8] truncate">Solar Azimuth</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="flex items-center gap-1.5 px-2 py-1.5 rounded-lg bg-[#0e2233] border border-[#1e3a52] shadow-sm">
|
||||
<span class="text-[13px]">🌦️</span>
|
||||
<div class="flex flex-col min-w-0">
|
||||
<span class="font-label-sm text-[11px] text-[#FFFFFF] truncate font-semibold">DWD Weather</span>
|
||||
<span class="text-[9px] text-[#94A3B8] truncate">Hyperlocal Rain/Temp</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="flex items-center gap-1.5 px-2 py-1.5 rounded-lg bg-[#0e2233] border border-[#1e3a52] shadow-sm">
|
||||
<span class="text-[13px]">📅</span>
|
||||
<div class="flex flex-col min-w-0">
|
||||
<span class="font-label-sm text-[11px] text-[#FFFFFF] truncate font-semibold">Calendar Sync</span>
|
||||
<span class="text-[9px] text-[#94A3B8] truncate">Retail, Holidays, Paydays</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="flex items-center gap-1.5 px-2 py-1.5 rounded-lg bg-[#0e2233] border border-[#1e3a52] shadow-sm">
|
||||
<span class="text-[13px]">🗺️</span>
|
||||
<div class="flex flex-col min-w-0">
|
||||
<span class="font-label-sm text-[11px] text-[#FFFFFF] truncate font-semibold">Geo-Mesh Map</span>
|
||||
<span class="text-[9px] text-[#94A3B8] truncate">Store & Depot Spatial</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- Mini Telemetry Footer Bar -->
|
||||
<div class="flex items-center justify-between text-[#94A3B8] px-space-xs font-mono text-[11px]">
|
||||
<div class="flex items-center gap-1.5">
|
||||
<Icon name="material-symbols:speed" class="text-[14px] text-[#00C3CD]" />
|
||||
<span>Pipeline Latency: <strong class="text-[#FFFFFF]">< 42ms</strong></span>
|
||||
</div>
|
||||
<div class="flex items-center gap-1.5">
|
||||
<Icon name="material-symbols:sync" class="text-[14px] text-[#00C3CD]" />
|
||||
<span>Edge aggregation: <strong class="text-[#FFFFFF]">60s epoch</strong></span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="bar-chart" role="img" :aria-label="`Last 24 hours for ${activeSensor?.name}`">
|
||||
<div
|
||||
v-for="(point, index) in last24"
|
||||
:key="point.t"
|
||||
class="bar-chart__bar"
|
||||
:class="{ 'bar-chart__bar--now': index === last24.length - 1 }"
|
||||
:style="{ height: `${Math.max(4, (point.v / barMax) * 100)}%` }"
|
||||
:title="`${formatTime(point.t)} · ${point.v}`"
|
||||
/>
|
||||
</div>
|
||||
<div class="legend" style="justify-content: space-between; margin-top: var(--onyx-density-2xs)">
|
||||
<span class="small muted">{{ last24[0] ? formatTime(last24[0].t) : '—' }}</span>
|
||||
<span class="small muted">{{ lastPoint ? formatDateTime(lastPoint.t) : '—' }}</span>
|
||||
</div>
|
||||
|
||||
<p class="small muted table-note">
|
||||
The CSV is static. The replay clock is {{ formatDateTime(demoNow) }}; the last measured point is
|
||||
{{ lastPoint ? formatDateTime(lastPoint.t) : '—' }}. No live sensor feed is claimed.
|
||||
</p>
|
||||
</OnyxCard>
|
||||
|
||||
<OnyxCard>
|
||||
<div class="card-header">
|
||||
<div>
|
||||
<OnyxHeadline is="h2">Sensor cluster</OnyxHeadline>
|
||||
<p class="small muted" style="margin: 0">
|
||||
Select a sensor to update the reading. Bounds are relative; the basemap is the next map slice.
|
||||
</p>
|
||||
<!-- COMPLIANCE & ACCURACY STRIP (Full 1200px span) -->
|
||||
<div class="w-full bg-[#0e2233] border border-[#1e3a52] rounded-xl shadow-sm p-space-lg flex flex-col lg:flex-row items-center justify-between gap-space-lg">
|
||||
<!-- 4 Verified Core Value Pillars -->
|
||||
<div class="grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-space-md w-full lg:w-auto flex-1">
|
||||
<!-- Pillar 1 -->
|
||||
<div class="flex items-start gap-2.5">
|
||||
<div class="w-6 h-6 rounded-full bg-[#132b40] border border-[#1e3a52] flex items-center justify-center shrink-0 shadow-sm mt-0.5">
|
||||
<Icon name="material-symbols:check-circle" class="text-[15px] text-[#00C3CD]" />
|
||||
</div>
|
||||
<div class="flex flex-col">
|
||||
<span class="font-label-md text-label-md text-[#FFFFFF] font-semibold">Privacy-Preserving Sensors</span>
|
||||
<span class="font-body-sm text-body-sm text-[#94A3B8] leading-tight">No identities, only counts.</span>
|
||||
</div>
|
||||
</div>
|
||||
<!-- Pillar 2 -->
|
||||
<div class="flex items-start gap-2.5">
|
||||
<div class="w-6 h-6 rounded-full bg-[#132b40] border border-[#1e3a52] flex items-center justify-center shrink-0 shadow-sm mt-0.5">
|
||||
<Icon name="material-symbols:check-circle" class="text-[15px] text-[#00C3CD]" />
|
||||
</div>
|
||||
<div class="flex flex-col">
|
||||
<span class="font-label-md text-label-md text-[#FFFFFF] font-semibold">Real-World Context</span>
|
||||
<span class="font-body-sm text-body-sm text-[#94A3B8] leading-tight">Weather, sun, calendar, map.</span>
|
||||
</div>
|
||||
</div>
|
||||
<!-- Pillar 3 -->
|
||||
<div class="flex items-start gap-2.5">
|
||||
<div class="w-6 h-6 rounded-full bg-[#132b40] border border-[#1e3a52] flex items-center justify-center shrink-0 shadow-sm mt-0.5">
|
||||
<Icon name="material-symbols:check-circle" class="text-[15px] text-[#00C3CD]" />
|
||||
</div>
|
||||
<div class="flex flex-col">
|
||||
<span class="font-label-md text-label-md text-[#FFFFFF] font-semibold">Intuitive Visual Story</span>
|
||||
<span class="font-body-sm text-body-sm text-[#94A3B8] leading-tight">One answer per screen.</span>
|
||||
</div>
|
||||
</div>
|
||||
<!-- Pillar 4 -->
|
||||
<div class="flex items-start gap-2.5">
|
||||
<div class="w-6 h-6 rounded-full bg-[#132b40] border border-[#1e3a52] flex items-center justify-center shrink-0 shadow-sm mt-0.5">
|
||||
<Icon name="material-symbols:check-circle" class="text-[15px] text-[#00C3CD]" />
|
||||
</div>
|
||||
<div class="flex flex-col">
|
||||
<span class="font-label-md text-label-md text-[#FFFFFF] font-semibold">Predictive Engine</span>
|
||||
<span class="font-body-sm text-body-sm text-[#94A3B8] leading-tight">Hindsight becomes foresight.</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<OnyxBadge color="info" density="compact">580 m cluster</OnyxBadge>
|
||||
</div>
|
||||
<SensorClusterMap :sensors="sensors ?? []" :active-id="sensorId" @select="sensorId = $event" />
|
||||
</OnyxCard>
|
||||
</div>
|
||||
|
||||
<aside class="card-stack">
|
||||
<OnyxCard>
|
||||
<div class="card-header">
|
||||
<OnyxHeadline is="h2">Heilbronn weather</OnyxHeadline>
|
||||
<OnyxBadge color="neutral" density="compact">Open-Meteo context</OnyxBadge>
|
||||
</div>
|
||||
<div class="reading-row">
|
||||
<OnyxIcon :icon="weatherIcon" size="48px" color="primary" />
|
||||
<div>
|
||||
<p style="margin: 0; font-size: 2rem; font-weight: 700; line-height: 1">
|
||||
{{ nowWeather ? `${nowWeather.temp_c} °C` : '—' }}
|
||||
</p>
|
||||
<p class="small muted" style="margin: 0">{{ weatherLabel }}</p>
|
||||
<!-- ACCURACY BADGE (Far right telemetry badge) -->
|
||||
<div class="shrink-0 flex items-center gap-3 bg-[#132b40] border border-[#1e3a52] px-space-md py-2.5 rounded-lg shadow-sm w-full lg:w-auto justify-between lg:justify-start">
|
||||
<div class="flex items-center gap-2">
|
||||
<div class="w-7 h-7 rounded-md bg-[#0e2233] border border-[#1e3a52] flex items-center justify-center text-[#00C3CD]">
|
||||
<Icon name="material-symbols:verified-outline" class="text-[18px]" />
|
||||
</div>
|
||||
<div class="flex flex-col">
|
||||
<span class="font-label-sm text-[10px] text-[#94A3B8] uppercase tracking-wider font-semibold">Model Accuracy</span>
|
||||
<div class="flex items-center gap-1.5 font-mono text-[13px] font-semibold text-[#FFFFFF]">
|
||||
<span>Backtest MAE 4.2</span>
|
||||
<span class="text-[#1e3a52]">·</span>
|
||||
<span class="text-[#00C3CD]">MAPE 3.8%</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="hidden sm:flex items-center text-[11px] font-mono bg-[#0e2233] border border-[#1e3a52] px-2 py-1 rounded text-[#94A3B8]">
|
||||
730 days backtested
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<dl class="metric-list" style="margin-top: var(--onyx-density-md)">
|
||||
<div><dt>Precipitation</dt><dd>{{ nowWeather?.precip_mm ?? '—' }} mm</dd></div>
|
||||
<div><dt>Cloud cover</dt><dd>{{ nowWeather?.cloud_pct ?? '—' }}%</dd></div>
|
||||
<div><dt>Wind</dt><dd>{{ nowWeather?.wind_kmh ?? '—' }} km/h</dd></div>
|
||||
<div><dt>Humidity</dt><dd>{{ nowWeather?.humidity_pct ?? '—' }}%</dd></div>
|
||||
</dl>
|
||||
<p class="small muted table-note">
|
||||
Updated {{ context ? formatDateTime(context.updated_at) : '—' }} · context
|
||||
{{ context?.cached ? 'cached' : 'live' }}
|
||||
</p>
|
||||
</OnyxCard>
|
||||
|
||||
<OnyxCard>
|
||||
<div class="card-header">
|
||||
<OnyxHeadline is="h2">Holiday context</OnyxHeadline>
|
||||
<OnyxIcon :icon="iconCalendar" size="24px" color="primary" />
|
||||
</div>
|
||||
<OnyxBadge v-if="todayHoliday" color="warning">{{ todayHoliday.name }} today</OnyxBadge>
|
||||
<OnyxBadge v-else color="success">No public holiday today</OnyxBadge>
|
||||
<p class="small muted" style="margin: var(--onyx-density-sm) 0 0">
|
||||
<template v-if="nextHoliday">
|
||||
Next: <strong>{{ nextHoliday.name }}</strong> on {{ formatDate(nextHoliday.date) }}.
|
||||
</template>
|
||||
<template v-else>No upcoming holiday in the holiday calendar.</template>
|
||||
</p>
|
||||
<p v-if="lastHoliday" class="small muted" style="margin: var(--onyx-density-xs) 0 0">
|
||||
Last: {{ lastHoliday.name }} on {{ formatShortDate(lastHoliday.date) }}.
|
||||
</p>
|
||||
<p class="small muted table-note">
|
||||
Baden-Württemberg public holidays; used as model context, not as a causal claim.
|
||||
</p>
|
||||
</OnyxCard>
|
||||
|
||||
<OnyxCard>
|
||||
<div class="card-header">
|
||||
<OnyxHeadline is="h3">What to do next</OnyxHeadline>
|
||||
<OnyxIcon :icon="iconLocationPin" size="24px" color="primary" />
|
||||
</div>
|
||||
<p class="small" style="margin-top: 0">
|
||||
The average sensor is at <strong>{{ latestPulse }}</strong> estimated devices/hour. That is context,
|
||||
not a staffing decision. Open the plan to turn next week’s forecast into shifts.
|
||||
</p>
|
||||
<OnyxButton label="Open the staffing plan" link="/plan" color="primary" />
|
||||
</OnyxCard>
|
||||
</aside>
|
||||
</div>
|
||||
|
||||
<OnyxCard>
|
||||
<div class="card-header">
|
||||
<div>
|
||||
<OnyxHeadline is="h2">Eight sensors</OnyxHeadline>
|
||||
<p class="small muted" style="margin: 0">Measured points, stable order by ID. Battery may be null in the API.</p>
|
||||
</div>
|
||||
<OnyxBadge color="neutral" density="compact">measured points only</OnyxBadge>
|
||||
</div>
|
||||
<OnyxTable striped with-page-scrolling :table-attrs="{ style: 'min-width: 36rem' }">
|
||||
<template #head>
|
||||
<tr>
|
||||
<th scope="col">Sensor</th>
|
||||
<th scope="col">Mean</th>
|
||||
<th scope="col">P95</th>
|
||||
<th scope="col">Battery</th>
|
||||
<th scope="col">Source ID</th>
|
||||
</tr>
|
||||
</template>
|
||||
<tr v-for="sensor in sensors" :key="sensor.id">
|
||||
<th scope="row" style="text-align: left; font-weight: 600">
|
||||
{{ sensor.name }}
|
||||
<OnyxBadge v-if="sensor.id === sensorId" color="primary" density="compact" style="margin-left: 0.35rem">selected</OnyxBadge>
|
||||
</th>
|
||||
<td>{{ sensor.mean }}</td>
|
||||
<td>{{ sensor.p95 }}</td>
|
||||
<td>
|
||||
<OnyxBadge :color="sensor.battery === null ? 'neutral' : sensor.battery >= 60 ? 'success' : 'warning'" density="compact">
|
||||
{{ sensor.battery === null ? 'n/a' : `${sensor.battery}%` }}
|
||||
</OnyxBadge>
|
||||
</td>
|
||||
<td class="mono">{{ sensor.id }}</td>
|
||||
</tr>
|
||||
</OnyxTable>
|
||||
|
||||
<p v-if="meta" class="small muted table-note">
|
||||
Coverage {{ formatDate(meta.coverage.from) }} → {{ formatDate(meta.coverage.to) }} ·
|
||||
{{ meta.coverage.cadence_min }}-min cadence · data {{ meta.data_version }} · model {{ meta.model_version }}
|
||||
</p>
|
||||
</OnyxCard>
|
||||
|
||||
<div v-if="!sensors?.length" class="callout callout--warning">
|
||||
<OnyxIcon :icon="iconTriangleWarning" size="16px" color="warning" />
|
||||
Sensor data is missing. Check that the Go API is running and that NUXT_API_INTERNAL_BASE points to it.
|
||||
</section>
|
||||
</div>
|
||||
</div>
|
||||
</main>
|
||||
|
||||
<footer class="w-full bg-[#081723] border-t border-[#1e3a52] py-space-xl">
|
||||
<div class="max-w-[1200px] mx-auto px-margin-desktop flex flex-col md:flex-row items-center justify-between gap-space-lg font-body-sm text-body-sm text-[#94A3B8]">
|
||||
<div class="flex flex-wrap items-center gap-space-md">
|
||||
<span>© 2024 Schwarz IT KG. All rights reserved.</span>
|
||||
<span class="text-[#1e3a52]">|</span>
|
||||
<span class="flex items-center gap-1 text-[#00C3CD] font-label-sm text-label-sm">
|
||||
<Icon name="material-symbols:verified-user-outline" class="text-[16px]" />GDPR / ISO 27701 compliant</span>
|
||||
</div>
|
||||
<div class="flex flex-wrap items-center gap-space-md">
|
||||
<div class="flex items-center gap-1.5">
|
||||
<span class="w-2 h-2 rounded-full bg-[#00C3CD] animate-pulse"></span>
|
||||
<span class="font-label-sm text-label-sm text-[#FFFFFF]">System Status: All Engines Operational</span>
|
||||
</div>
|
||||
<span class="text-[#1e3a52]">|</span>
|
||||
<span class="bg-[#0e2233] px-2 py-0.5 rounded font-label-sm text-label-sm font-semibold text-[#94A3B8] border border-[#1e3a52]">v2.4-prod</span>
|
||||
</div>
|
||||
</div>
|
||||
</footer>
|
||||
</template>
|
||||
|
||||
<style>
|
||||
@keyframes pulseDataFlow {
|
||||
0% { transform: translateX(0); opacity: 0.15; }
|
||||
50% { opacity: 0.95; }
|
||||
100% { transform: translateX(64px); opacity: 0.15; }
|
||||
}
|
||||
|
||||
.animate-flow {
|
||||
animation: pulseDataFlow 2.4s cubic-bezier(0.4, 0, 0.2, 1) infinite;
|
||||
}
|
||||
</style>
|
||||
Reference in new issue
Block a user