Initial Frost v0.1 framework
This commit is contained in:
@@ -0,0 +1,78 @@
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<title>Frost v0.1 example</title>
|
||||
<link rel="stylesheet" href="../frost.css">
|
||||
<style>
|
||||
body { padding-block: var(--frost-space-8); }
|
||||
.example-header { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: var(--frost-space-4); margin-block-end: var(--frost-space-8); }
|
||||
.example-header h1 { margin-block-end: var(--frost-space-2); }
|
||||
.example-section { margin-block-start: var(--frost-space-8); }
|
||||
.example-section > h2 { margin-block-end: var(--frost-space-4); }
|
||||
.example-sidebar { padding: var(--frost-space-4); background: var(--frost-color-surface-soft); border-inline-end: 1px solid var(--frost-color-border); }
|
||||
.example-sidebar a { display: block; padding: var(--frost-space-2); }
|
||||
.swatch { min-height: 4rem; padding: var(--frost-space-3); border-radius: var(--frost-radius-md); background: var(--frost-color-accent); color: var(--frost-color-on-accent); }
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<a class="frost-skip-link" href="#main">Skip to content</a>
|
||||
<main id="main" class="frost-container">
|
||||
<header class="example-header">
|
||||
<div>
|
||||
<p class="frost-text-muted">Frost CSS framework</p>
|
||||
<h1>Small foundations for cold starts.</h1>
|
||||
</div>
|
||||
<button class="frost-button frost-button--secondary" id="theme-toggle" type="button">Toggle theme</button>
|
||||
</header>
|
||||
|
||||
<section class="frost-notice frost-notice--info" aria-label="Framework note">
|
||||
Frost is CSS-only. This page uses a tiny script only to demonstrate explicit theme switching.
|
||||
</section>
|
||||
|
||||
<section class="example-section frost-stack">
|
||||
<h2>Tokens and surfaces</h2>
|
||||
<div class="frost-grid" style="--frost-grid-min: 12rem">
|
||||
<div class="swatch">Accent</div>
|
||||
<div class="frost-card frost-card--flat">Flat card</div>
|
||||
<div class="frost-card frost-card--elevated">Elevated card</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section class="example-section frost-stack">
|
||||
<h2>Buttons and badges</h2>
|
||||
<div class="frost-row">
|
||||
<button class="frost-button frost-button--primary">Primary</button>
|
||||
<button class="frost-button frost-button--secondary">Secondary</button>
|
||||
<button class="frost-button frost-button--ghost">Ghost</button>
|
||||
<button class="frost-button frost-button--danger">Danger</button>
|
||||
<button class="frost-button frost-button--secondary" disabled>Disabled</button>
|
||||
<span class="frost-badge frost-badge--success">Success</span>
|
||||
<span class="frost-badge frost-badge--warning">Warning</span>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section class="example-section frost-grid" style="--frost-grid-min: 18rem">
|
||||
<div class="frost-card">
|
||||
<h2>Form controls</h2>
|
||||
<form class="frost-stack" style="--frost-stack-gap: var(--frost-space-4)">
|
||||
<label class="frost-field"><span class="frost-label">Name</span><input class="frost-input" type="text" placeholder="Ada Lovelace"></label>
|
||||
<label class="frost-field"><span class="frost-label">Type</span><select class="frost-select"><option>Website</option><option>Application</option></select></label>
|
||||
<label class="frost-field"><span class="frost-label">Message</span><textarea class="frost-textarea" placeholder="Write something..."></textarea></label>
|
||||
<button class="frost-button frost-button--primary" type="submit">Submit</button>
|
||||
</form>
|
||||
</div>
|
||||
<div id="controls" class="frost-sidebar-layout">
|
||||
<aside class="frost-sidebar example-sidebar"><strong>Sidebar</strong><a href="#main">Overview</a><a href="#controls">Controls</a></aside>
|
||||
<div class="frost-main frost-card frost-card--flat"><h2>Sidebar layout</h2><p class="frost-text-muted">The layout becomes a normal single column below 48rem.</p></div>
|
||||
</div>
|
||||
</section>
|
||||
</main>
|
||||
<script>
|
||||
document.querySelector('#theme-toggle').addEventListener('click', () => {
|
||||
document.documentElement.dataset.theme = document.documentElement.dataset.theme === 'dark' ? 'light' : 'dark';
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user