diff --git a/src/app.d.ts b/src/app.d.ts index 743f07b2..12271898 100644 --- a/src/app.d.ts +++ b/src/app.d.ts @@ -8,6 +8,18 @@ declare global { // interface PageState {} // interface Platform {} } + + // add these lines + interface ViewTransition { + updateCallbackDone: Promise; + ready: Promise; + finished: Promise; + skipTransition: () => void; + } + + interface Document { + startViewTransition(updateCallback: () => Promise): ViewTransition; + } } export {}; diff --git a/src/app.scss b/src/app.scss index 21c7681d..1a5aea0c 100644 --- a/src/app.scss +++ b/src/app.scss @@ -209,6 +209,7 @@ nav details[role=list] summary, nav li[role=list] a { align-self: center; } +// TODO: view transition disable for heade header nav a, header nav a[role="button"], header nav summary[role="link"] { color: #fff; font-weight: 600; @@ -325,3 +326,12 @@ details > summary { [data-theme='dark'] .drop-shadow-a { filter: drop-shadow(0 4px 3px rgba(255, 255, 255, 0.212)) drop-shadow(0 2px 2px rgba(255, 255, 255, 0.212)); } + +/** ViewTransitions */ +@media (prefers-reduced-motion) { + ::view-transition-group(*), + ::view-transition-old(*), + ::view-transition-new(*) { + animation: none !important; + } +} diff --git a/src/lib/components/Applications.svelte b/src/lib/components/Applications.svelte index 517295e0..124da1a1 100644 --- a/src/lib/components/Applications.svelte +++ b/src/lib/components/Applications.svelte @@ -74,19 +74,3 @@ {/each} - - diff --git a/src/routes/+layout.svelte b/src/routes/+layout.svelte index e8e8a19d..29ff7128 100644 --- a/src/routes/+layout.svelte +++ b/src/routes/+layout.svelte @@ -1,77 +1,107 @@ -