design: give PulseCast a shift-board identity
ci / check (push) Successful in 50s

- replace default Onyx surfaces with paper/ink, signal orange and Archivo
- make /plan answer peak, staff-hours, cost vs flat and coverage above the fold
- add the weekly shift board, shared plan helpers and a pulse line
- rebuild /live as a phone-first dark board and /stage as a full-bleed projector
- label the real 14-20 Nov window; remove 'next week' claims
- keep Onyx components, SSR, live scenario updates and accessible states
This commit is contained in:
Noel Sabia committed 2026-11-14 11:03:18 +01:00
1 parent 66b80a62fb
commit 33063afbdf
18 files changed
+4300 -1452

No files matched your search

+35 -29
View File
@@ -5,26 +5,22 @@ import {
iconCircleInformation,
iconFlash,
iconHome,
iconMobileSignal,
iconPresentionBoard,
} from '@sit-onyx/icons'
const route = useRoute()
const config = useRuntimeConfig()
const usingMock = computed(
() =>
config.public.useMock === true ||
config.public.useMock === '1' ||
config.public.useMock === 'true',
)
const usingMock = computed(() => {
const value = config.public.useMock
return value === true || value === '1' || value === 'true'
})
const isPresentation = computed(() => route.path === '/stage' || route.path === '/live')
const navigation = [
{ to: '/', label: 'Now', icon: iconHome },
{ to: '/forecast', label: 'Forecast', icon: iconChart },
{ to: '/plan', label: 'Plan', icon: iconCalendar },
{ to: '/simulate', label: 'Simulate', icon: iconFlash },
{ to: '/stage', label: 'Stage', icon: iconPresentionBoard },
{ to: '/live', label: 'Live', icon: iconMobileSignal },
{ to: '/about', label: 'About', icon: iconCircleInformation },
]
@@ -32,10 +28,32 @@ const hiddenPageLabels: Record<string, string> = { '/control': 'Control' }
const activeLabel = computed(
() => navigation.find((item) => item.to === route.path)?.label ?? hiddenPageLabels[route.path] ?? 'PulseCast',
)
useHead(() => ({
bodyAttrs: { class: isPresentation.value ? 'pc-presentation' : '' },
}))
// Onyx renders its overflow navigation as a `menubar` whose direct child is a
// div, which fails the required-children rule. The list is site navigation,
// not an application menu, so remove the menu role rather than fake menuitems.
let navRoleObserver: MutationObserver | undefined
function fixNavAria() {
for (const list of document.querySelectorAll('.onyx-more-list[role="menubar"]')) {
list.setAttribute('role', 'none')
}
}
onMounted(() => {
fixNavAria()
navRoleObserver = new MutationObserver(fixNavAria)
navRoleObserver.observe(document.body, { childList: true, subtree: true })
})
onBeforeUnmount(() => navRoleObserver?.disconnect())
</script>
<template>
<OnyxAppLayout>
<NuxtPage v-if="isPresentation" />
<OnyxAppLayout v-else>
<template #navBar>
<OnyxNavBar app-name="PulseCast" logo-url="/logo.svg" mobile="sm">
<OnyxUnstableNavButton
@@ -46,7 +64,8 @@ const activeLabel = computed(
:icon="item.icon"
/>
<template #contextArea>
<OnyxBadge :color="usingMock ? 'warning' : 'success'">{{ usingMock ? 'Mock data' : 'Go API' }}</OnyxBadge>
<NuxtLink class="pc-present" to="/stage">Stage</NuxtLink>
<NuxtLink class="pc-present" to="/live">Live</NuxtLink>
</template>
<template #mobileActivePage>{{ activeLabel }}</template>
</OnyxNavBar>
@@ -57,26 +76,13 @@ const activeLabel = computed(
<template #footer>
<footer class="app-footer">
<span><strong>PulseCast</strong> — staff the pulse, not the noise.</span>
<span class="muted small">
Prototype · forecast from the Go API · estimated devices, not people · 8 sensors in a 580 m cluster
<span class="pc-small">
Decision support, not an optimizer.
<NuxtLink to="/about">Method &amp; limits</NuxtLink>
<template v-if="usingMock"> · demo data</template>
</span>
</footer>
</template>
</OnyxPageLayout>
</OnyxAppLayout>
</template>
<style scoped>
.app-footer {
display: flex;
flex-wrap: wrap;
justify-content: space-between;
gap: var(--onyx-density-sm);
width: 100%;
max-width: 1440px;
margin-inline: auto;
padding-block: var(--onyx-density-sm);
color: var(--onyx-color-text-icons-neutral-medium);
font-size: 0.8125rem;
}
</style>