feat: build Onyx SSR shell and plan hero with mock data

This commit is contained in:
Noel Sabia committed 2026-11-14 05:17:36 +01:00
1 parent 84c20992f9
commit 2db494fb10
34 files changed
+3197 -2

No files matched your search

+25
View File
@@ -0,0 +1,25 @@
<script setup lang="ts">
import { iconCloud, iconSunny } from '@sit-onyx/icons'
import type { DailyWeather } from '#shared/insights'
import { formatShortDate, formatWeekdayShort } from '~/utils/format'
const props = defineProps<{
days: DailyWeather[]
}>()
function iconFor(kind: DailyWeather['kind']) {
return kind === 'sunny' || kind === 'partly-cloudy' ? iconSunny : iconCloud
}
</script>
<template>
<div class="weather-strip" role="list" aria-label="Weather forecast for the plan week">
<div v-for="day in props.days" :key="day.date" class="weather-day" role="listitem">
<strong>{{ formatWeekdayShort(day.date) }} {{ formatShortDate(day.date) }}</strong>
<OnyxIcon :icon="iconFor(day.kind)" size="24px" color="primary" />
<span>{{ Math.round(day.tempMin) }}–{{ Math.round(day.tempMax) }} °C</span>
<span class="muted">{{ day.precipMm.toFixed(1) }} mm</span>
<span class="muted">{{ Math.round(day.cloudPct) }}% cloud</span>
</div>
</div>
</template>