chore: complete update
This commit is contained in:
34
resources/js/docs/router.md
Normal file
34
resources/js/docs/router.md
Normal file
@@ -0,0 +1,34 @@
|
||||
✅ 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“**.
|
||||
Reference in New Issue
Block a user