feat: Portfolio, Contact Us
This commit is contained in:
parent
ea37f92b5b
commit
7242a0afab
10 changed files with 2160 additions and 171 deletions
20
components/StarBackground/StarBackground.tsx
Normal file
20
components/StarBackground/StarBackground.tsx
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
import React from 'react';
|
||||
import Particles from 'react-tsparticles';
|
||||
import particlesConfig from "./particles.config.js";
|
||||
import { loadFull } from "tsparticles";
|
||||
|
||||
const StarBackground: React.FC = () => {
|
||||
async function loadParticles(main: any){
|
||||
await loadFull(main)
|
||||
}
|
||||
return (
|
||||
<Particles
|
||||
id="star-background"
|
||||
init={loadParticles}
|
||||
options={particlesConfig}
|
||||
style={{ position: 'fixed', top: 0, left: 0, width: '100%', height: '100%' }}
|
||||
/>
|
||||
);
|
||||
};
|
||||
|
||||
export default StarBackground;
|
||||
23
components/StarBackground/particles.config.js
Normal file
23
components/StarBackground/particles.config.js
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
|
||||
export default {
|
||||
particles: {
|
||||
number: {
|
||||
value: 100,
|
||||
},
|
||||
size: {
|
||||
value: 2, //
|
||||
shape: {
|
||||
type: 'star',
|
||||
},
|
||||
color: {
|
||||
value: '#ffffff',
|
||||
},
|
||||
opacity: {
|
||||
value: 0.8,
|
||||
},
|
||||
move: {
|
||||
speed: 0.5,
|
||||
},
|
||||
},
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue