Theme tokens in light and dark with high contrast, a palette cross-fade, motion curves and a damped spring, embedded Lucide icons with Inter and JetBrains Mono, Icon, Button, IconButton, and a gallery that captures its own window. Reviewed by codex gpt-6-astra (max): PASS in round 3.
20 lines
435 B
Rust
20 lines
435 B
Rust
mod buttons;
|
|
mod primitives;
|
|
mod theme;
|
|
|
|
use gpui::{AnyElement, App, Window};
|
|
|
|
pub struct Page {
|
|
pub number: u8,
|
|
pub slug: &'static str,
|
|
pub title: &'static str,
|
|
pub summary: &'static str,
|
|
pub render: fn(&mut Window, &mut App) -> AnyElement,
|
|
}
|
|
|
|
pub const ALL: &[Page] = &[primitives::PAGE, buttons::PAGE, theme::PAGE];
|
|
|
|
pub fn find(slug: &str) -> Option<usize> {
|
|
ALL.iter().position(|page| page.slug == slug)
|
|
}
|