mirror of
https://github.com/LukeHagar/LukeHagar.com.git
synced 2025-12-06 04:20:17 +00:00
Update +layout.svelte
This commit is contained in:
@@ -2,9 +2,19 @@
|
||||
import '$lib/theme-luke.css';
|
||||
import '../app.postcss';
|
||||
|
||||
import Particles, { particlesInit } from '@tsparticles/svelte';
|
||||
import { onMount } from 'svelte';
|
||||
|
||||
import { particlesInit } from '@tsparticles/svelte';
|
||||
import { loadFull } from 'tsparticles';
|
||||
|
||||
let ParticlesComponent;
|
||||
|
||||
onMount(async () => {
|
||||
const module = await import('@tsparticles/svelte');
|
||||
|
||||
ParticlesComponent = module.default;
|
||||
});
|
||||
|
||||
const particlesConfig = {
|
||||
particles: {
|
||||
color: {
|
||||
@@ -33,6 +43,6 @@
|
||||
});
|
||||
</script>
|
||||
|
||||
<Particles id="tsparticles" options={particlesConfig} />
|
||||
<svelte:component this={ParticlesComponent} id="tsparticles" options={particlesConfig} />
|
||||
<!-- Page Route Content -->
|
||||
<slot />
|
||||
|
||||
Reference in New Issue
Block a user