diff --git a/README.md b/README.md index 04b52f8..75b64c4 100644 --- a/README.md +++ b/README.md @@ -60,6 +60,31 @@ card-styled. `wish.weircon.dk` (Christmas-Community fork) consumes it this way. Override any of them in your own `:root` to re-skin without forking. +## Components + +Semantic classes so a site can drop hand-written CSS entirely: + +| Class | What | +|---|---| +| `.wt-header` / `.wt-nav` / `.wt-brand` `.wt-brand-dot` | sticky blurred header + centred nav bar + wordmark | +| `.wt-nav-links` / `.wt-nav-link` (`.is-active` / `[aria-current=page]`) | nav link row | +| `.wt-main` | centred content column (= `.wt-container` + vertical padding) | +| `.wt-footer` / `.wt-footer-inner` | footer with border + responsive row | +| `.wt-card` (`--hover` `--raised` `--link`) + `.wt-card-date/-title/-desc` | post/list card | +| `.wt-chip` | pill tag-link | +| `.wt-btn` (`--primary`) / `.wt-input` / `.wt-tag` / `.wt-muted` | controls | +| `.prose` | long-form markdown | +| `.theme-toggle` + `.sun-and-moon` | the sun⇄moon toggle (wire with `weirsoe-theme.js`) | + +These mirror, 1:1, the chrome of `agw/pw` (asger.weirsøe.dk) — the goal is for +that site to delete `src/styles/global.css` + its inline utility soup and +`@import` this framework instead. Also set the browser UI colour in `
`: + +```html + + +``` + ## Theme switching Set `data-theme` on ``: `dark` (default), `light`, or `terminal`. diff --git a/adapters/bulma.css b/adapters/bulma.css index a6934a9..76d5625 100644 --- a/adapters/bulma.css +++ b/adapters/bulma.css @@ -101,3 +101,11 @@ hr { background-color: var(--color-border); } /* Misc */ details summary { color: var(--color-accent); } .section { padding-top: 2rem; } + +/* Responsive content width: full-bleed on phones, a centred readable column on + large screens (so a wishlist doesn't stretch edge-to-edge on a desktop). The + app marks a wrapper with .container.fullwidth; constrain it past tablet. */ +@media (min-width: 769px) { + .container.fullwidth { max-width: 52rem; margin-left: auto; margin-right: auto; } + .container.fullwidth.is-wide { max-width: 72rem; } +} diff --git a/examples/demo.html b/examples/demo.html index cf3c424..8630bd8 100644 --- a/examples/demo.html +++ b/examples/demo.html @@ -4,7 +4,7 @@