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,47 +2,47 @@
|
||||
import '$lib/theme-luke.css';
|
||||
import '../app.postcss';
|
||||
|
||||
// import { onMount } from 'svelte';
|
||||
import { onMount } from 'svelte';
|
||||
|
||||
// import { particlesInit } from '@tsparticles/svelte';
|
||||
// import { loadFull } from 'tsparticles';
|
||||
import { particlesInit } from '@tsparticles/svelte';
|
||||
import { loadFull } from 'tsparticles';
|
||||
|
||||
// let ParticlesComponent;
|
||||
let ParticlesComponent;
|
||||
|
||||
// onMount(async () => {
|
||||
// const module = await import('@tsparticles/svelte');
|
||||
onMount(async () => {
|
||||
const module = await import('@tsparticles/svelte');
|
||||
|
||||
// ParticlesComponent = module.default;
|
||||
// });
|
||||
ParticlesComponent = module.default;
|
||||
});
|
||||
|
||||
// const particlesConfig = {
|
||||
// particles: {
|
||||
// color: {
|
||||
// value: ['#ffffff', '#0033a1', '#0071ce', '#54c0e8', '#cc27b0']
|
||||
// },
|
||||
// links: {
|
||||
// enable: true,
|
||||
// color: '#54c0e8'
|
||||
// },
|
||||
// move: {
|
||||
// enable: true
|
||||
// },
|
||||
// number: {
|
||||
// value: 200
|
||||
// }
|
||||
// }
|
||||
// };
|
||||
const particlesConfig = {
|
||||
particles: {
|
||||
color: {
|
||||
value: ['#ffffff', '#0033a1', '#0071ce', '#54c0e8', '#cc27b0']
|
||||
},
|
||||
links: {
|
||||
enable: true,
|
||||
color: '#54c0e8'
|
||||
},
|
||||
move: {
|
||||
enable: true
|
||||
},
|
||||
number: {
|
||||
value: 200
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
// void particlesInit(async (engine) => {
|
||||
// // call this once per app
|
||||
// // you can use main to customize the tsParticles instance adding presets or custom shapes
|
||||
// // this loads the tsparticles package bundle, it's the easiest method for getting everything ready
|
||||
// // starting from v2 you can add only the features you need reducing the bundle size
|
||||
// await loadFull(engine);
|
||||
// // await loadSlim(engine);
|
||||
// });
|
||||
void particlesInit(async (engine) => {
|
||||
// call this once per app
|
||||
// you can use main to customize the tsParticles instance adding presets or custom shapes
|
||||
// this loads the tsparticles package bundle, it's the easiest method for getting everything ready
|
||||
// starting from v2 you can add only the features you need reducing the bundle size
|
||||
await loadFull(engine);
|
||||
// await loadSlim(engine);
|
||||
});
|
||||
</script>
|
||||
|
||||
<!-- <svelte:component this={ParticlesComponent} id="tsparticles" options={particlesConfig} /> -->
|
||||
<svelte:component this={ParticlesComponent} id="tsparticles" options={particlesConfig} />
|
||||
<!-- Page Route Content -->
|
||||
<slot />
|
||||
|
||||
Reference in New Issue
Block a user