Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 9 additions & 5 deletions HANDOFF.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
# Canonical Astro documentation
# sleepKIT landing consistency

Goal: retire the MkDocs compatibility layer while preserving public content and routes.
Goal: issue #55, align the landing page with heartKIT, compressionKIT and physioKIT. PR #56 is ready for review on codex/kit-home-consistency. Adam authorized merge after green CI.

PR: https://github.com/AmbiqAI/sleepkit/pull/49. Authored Markdown/MDX, navigation, redirects and static assets now belong to Astro. API pages, notebooks and downloads remain generated. MkDocs configuration and unused dependencies are removed.
Done: product hero icon, regular sleep prefix and bold KIT navbar suffix, shared quick buttons, overview, task cards with small pink icons and neutral borders, short installation path and full-card documentation links. Historical home anchors remain. The custom hero only renders on the home route.

Review: notebook source links, download command examples and generation regression coverage corrected. Local build, type checks, content checks and browser tests pass. Independent final review and CI on the fix commit gate merging. CompressionKIT follows this cleanup.
Verified: immutable helia-ui v0.1.0-alpha.24 pin and npm 11.19.0 lockfile, clean install, Astro check/build/output and 20 browser tests. Light/dark mobile and desktop screenshots inspected. Tests exercise title weights, logo, readable buttons, card-body navigation and absent home hero on 404. Full PR CI passed before the final regression assertion; CI on this assertion must finish before merge.

Ownership: edit astro-site/src/content/docs for authored pages, src/navigation.mjs for navigation and notebooks/ for notebook sources. See astro-site/README.md for generated paths and validation commands.
Review: prior dependency and installation-test findings resolved. Final review requested a more explicit 404 assertion and consistent handoff status; both addressed.

Next: verify final CI, complete review, squash merge and confirm Pages deployment. No publication of this landing change is claimed yet.

Preview: http://127.0.0.1:8776/sleepkit/. Builds use generated API and notebook material; training is not run. A clean install needs no package patch.
1 change: 1 addition & 0 deletions astro-site/astro.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ export default defineConfig({
sidebar: "always",
header: {
title: "sleepKIT",
titleRegularPrefix: "sleep",
Comment thread
apage224 marked this conversation as resolved.
Resolved
hub: {
label: "HELIA",
href: "https://ambiqai.github.io/helia-developer-hub/",
Expand Down
26 changes: 3 additions & 23 deletions astro-site/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion astro-site/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"test": "playwright test"
},
"dependencies": {
"@ambiqai/helia-ui": "github:AmbiqAI/helia-ui#v0.1.0-alpha.23",
"@ambiqai/helia-ui": "github:AmbiqAI/helia-ui#v0.1.0-alpha.24",
"@astrojs/markdown-remark": "^7.3.1",
"@astrojs/react": "7.0.0",
"@astrojs/starlight": "^0.41.5",
Expand Down
20 changes: 10 additions & 10 deletions astro-site/src/components/HomeHero.astro
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
---
import { readFileSync } from 'node:fs';
import DefaultHero from '@astrojs/starlight/components/Hero.astro';
import Button from '@ambiqai/helia-ui/astro/Button';
const { data } = Astro.locals.starlightRoute.entry;
const source = readFileSync('../pyproject.toml', 'utf8');
const version = source.match(/^version\s*=\s*"([^"]+)"/m)?.[1];
if (!version) throw new Error('Missing sleepKIT version in pyproject.toml');
const base = import.meta.env.BASE_URL;
const isHome = Astro.url.pathname.replace(/\/+$/, '') === base.replace(/\/+$/, '');
const tasks = [['Sleep detection', 'detect'], ['Sleep staging', 'stage'], ['Sleep apnea', 'apnea']];
const capabilities = [
['01', 'Prepare signals', 'Dataset loaders and feature extraction'],
Expand All @@ -14,9 +16,9 @@ const capabilities = [
['04', 'Prepare for the edge', 'Model export and task-level demos'],
];
---
{data.hero?.tagline ? <>
{isHome && data.hero?.tagline ? <>
<section class="sleepkit-hero" aria-labelledby="_top">
<div class="hero-meta"><span class="product">sleepKIT</span><span class="version">v{version}</span></div>
<div class="hero-meta"><span class="product"><img src={`${base}/assets/favicon.png`} alt="" width="28" height="28" />sleepKIT</span><span class="version">v{version}</span></div>
<div class="hero-layout">
<div class="hero-copy">
<h1 id="_top">From sleep signals<br /><span>to Edge AI.</span></h1>
Expand All @@ -33,26 +35,26 @@ const capabilities = [
</div>
</section>
<nav class="task-links" aria-label="Explore sleep tasks">
{tasks.map(([label, slug]) => <a href={`${base}/tasks/${slug}/`}>{label}<span aria-hidden="true">↗</span></a>)}
{tasks.map(([label, slug]) => <Button variant="secondary" size="sm" href={`${base}/tasks/${slug}/`}>{label} <span aria-hidden="true">↗</span></Button>)}
</nav>
</> : <DefaultHero />}
<style>
.sleepkit-hero { background: #101318; color: #d6d9e0; border: 1px solid #292f38; border-radius: 1.5rem; padding: clamp(1.5rem, 4vw, 3.5rem); }
.hero-meta { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-bottom: 2.25rem; }
.product { color: #f1f3f7; font-size: clamp(1.75rem, 3vw, 2.4rem); font-weight: 750; letter-spacing: -.04em; }
.product::before { content: ''; display: inline-block; width: .5rem; height: .5rem; background: #f77aaa; border-radius: 50%; margin: 0 .65rem .35rem 0; }
.product { display: inline-flex; align-items: center; gap: .6rem; color: #f1f3f7; font-size: clamp(1.75rem, 3vw, 2.4rem); font-weight: 750; letter-spacing: -.04em; }
.product img { display: block; width: 1.5rem; height: 1.5rem; object-fit: contain; }
.version { border: 1px solid #525966; border-radius: 999px; padding: .35rem .8rem; color: #c1c7d1; white-space: nowrap; font-size: .9rem; font-variant-numeric: tabular-nums; }
.hero-layout { display: grid; grid-template-columns: 1.3fr 1fr; gap: clamp(1.5rem, 4vw, 3.5rem); align-items: center; }
h1 { color: #fff; font-size: clamp(2.25rem, 3.5vw, 3.5rem); line-height: 1.1; letter-spacing: -.04em; margin: 0 0 1.5rem; }
h1 span { color: #f77aaa; }
.hero-copy p { max-width: 57ch; font-size: 1.08rem; line-height: 1.75; }
nav { display: flex; flex-wrap: wrap; gap: .75rem; }
.hero-actions { margin-top: 2rem; }
nav a { display: inline-flex; align-items: center; gap: .75rem; padding: .7rem 1.15rem; border: 1px solid #505761; border-radius: 999px; color: #f3f4f7; text-decoration: none; font-weight: 600; }
.hero-actions a { display: inline-flex; align-items: center; gap: .75rem; padding: .7rem 1.15rem; border: 1px solid #505761; border-radius: 999px; color: #f3f4f7; text-decoration: none; font-weight: 600; }
.hero-actions .primary { color: #151219; background: #f77aaa; border-color: #f77aaa; }
.hero-actions a:hover { border-color: #ffafd0; background: #28212b; }
.hero-actions .primary:hover { color: #151219; background: #ffafd0; }
a:focus-visible { outline: 2px solid #f77aaa; outline-offset: 4px; }
.hero-actions a:focus-visible { outline: 2px solid #f77aaa; outline-offset: 4px; }
.capabilities { background: #191e25; border: 1px solid #343d49; border-radius: 1.15rem; padding: 1.35rem; }
.capabilities-label { color: #c1c7d1; text-transform: uppercase; letter-spacing: .1em; font-size: .72rem; font-weight: 600; margin: 0 0 1.15rem; }
ol { display: grid; gap: .65rem; list-style: none; margin: 0; padding: 0; }
Expand All @@ -61,8 +63,6 @@ const capabilities = [
li strong { display: block; color: #f0f2f6; font-size: .95rem; }
li div > span { display: block; color: #bbc3d0; font-size: .8rem; margin-top: .2rem; line-height: 1.45; }
.task-links { justify-content: center; margin: 1.75rem 0 .25rem; }
.task-links a { color: var(--sleepkit-button-text); border-color: var(--sleepkit-button-border); font-weight: 500; }
.task-links a:hover { background: color-mix(in srgb, var(--sleepkit-button-border) 10%, transparent); }
@media (max-width: 60rem) { .hero-layout { grid-template-columns: 1fr; } .hero-copy p { max-width: 65ch; } ol { grid-template-columns: 1fr 1fr; } }
@media (max-width: 34rem) { ol { grid-template-columns: 1fr; } .hero-meta { margin-bottom: 1.75rem; } .task-links { gap: .5rem; } .task-links a { font-size: .85rem; padding: .6rem .9rem; } }
@media (max-width: 34rem) { ol { grid-template-columns: 1fr; } .hero-meta { margin-bottom: 1.75rem; } .task-links { gap: .5rem; } }
</style>
Loading
Loading