Added particle effect
This commit is contained in:
23
src/components/home/BgParticles.astro
Normal file
23
src/components/home/BgParticles.astro
Normal file
@@ -0,0 +1,23 @@
|
||||
<div class="wrapper h-full w-full absolute inset-0 isolate -z-10 opacity-75">
|
||||
<div id="particles" class="h-full w-full absolute inset-0 -z-20"></div>
|
||||
</div>
|
||||
|
||||
<script is:inline src="/js/particles.min.js"></script>
|
||||
|
||||
<script is:inline>
|
||||
particlesJS.load('particles', '/js/particlesjs-config.json', function() {
|
||||
console.log('callback - particles-js config loaded');
|
||||
});
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.wrapper {
|
||||
&::before {
|
||||
content: '';
|
||||
position: absolute;
|
||||
inset: 0;
|
||||
z-index: -10;
|
||||
background: radial-gradient(circle, #020617 2%, transparent 20%);
|
||||
}
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user