Skip to content

Commit

Permalink
feat: faster transition
Browse files Browse the repository at this point in the history
  • Loading branch information
Darkness4 committed Jan 22, 2024
1 parent 54069f4 commit b7b553a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
7 changes: 5 additions & 2 deletions src/lib/components/BackgroundParticles.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
type: 'circle'
},
color: {
value: ['#FFFFFF']
value: ['#C945FF']
},
links: {
color: '#C945FF',
Expand All @@ -39,7 +39,10 @@
speed: 0.1
},
number: {
value: 200
value:
(window.innerHeight * window.innerWidth) / 10000 > 200
? 200
: (window.innerHeight * window.innerWidth) / 10000
},
effect: {
close: true,
Expand Down
4 changes: 1 addition & 3 deletions src/routes/+layout.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@
import Footer from './Footer.svelte';
import Header from './Header.svelte';
const year = new Date().getFullYear();
onNavigate((navigation) => {
if (!document.startViewTransition) return;
Expand All @@ -21,7 +19,7 @@

<Header />

<main in:fade={{ duration: 100, delay: 200 }} out:fade={{ duration: 100 }}>
<main in:fade={{ duration: 50, delay: 50 }} out:fade={{ duration: 50 }}>
<slot />
</main>

Expand Down

0 comments on commit b7b553a

Please sign in to comment.