Files
michaelschiemer/resources/js/docs/router.md

35 lines
815 B
Markdown
Raw Blame History

This file contains invisible Unicode characters
This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
✅ Dein Router-Modul wurde erweitert um:
---
## 🎭 Layout-Animation
```js
import { animateLayoutSwitch } from './router.js';
onLayoutSwitch(ctx => {
const type = ctx.href.startsWith('/studio') ? 'studio' : 'default';
animateLayoutSwitch(type);
});
```
→ Fügt `data-layout="…"`, animiert via `.layout-transition` (z.B. Fade)
---
## 📝 Meta-Daten aus HTML
```html
<div data-meta-title="Über Uns" data-meta-theme="#111"></div>
```
→ Beim Laden des HTML werden automatisch:
* `document.title` gesetzt
* CSS-Variable `--theme-color` aktualisiert
---
Wenn du möchtest, kann ich dir nun einen `<meta name="theme-color">`-Updater bauen oder eine ViewTransition speziell für Layoutwechsel. Sag einfach:
**„Ja, bitte meta\[name=theme-color]“** oder **„ViewTransition für Layout“**.