add gradient BG
Some checks failed
continuous-integration/drone/push Build is failing

This commit is contained in:
2023-02-08 17:17:40 +01:00
parent 50358c43b9
commit 9a48d20a16
7 changed files with 8102 additions and 1608 deletions

522
Gradient.js Normal file

File diff suppressed because one or more lines are too long

19
components/GradientBG.tsx Normal file
View File

@@ -0,0 +1,19 @@
import { useEffect } from 'react'
import { Gradient } from '../Gradient.js'
export const GradientBG = () =>{
// Create your instance
const gradient = new Gradient();
useEffect(() => {
// Call `initGradient` with the selector to your canvas
gradient.initGradient('#gradient-background')
}, []);
return (
<canvas className='-z-40 w-screen h-screen fixed top-0 left-0' id="gradient-background" data-transition-in />
);
};

View File

@@ -1,10 +1,13 @@
import { PropsWithChildren } from "react";
import { GradientBG } from '../components/GradientBG';
import { Navbar } from "../components/Navbar";
export const MainLayout = ({ children }: PropsWithChildren) => {
return (
<div className="w-full">
<Navbar />
<GradientBG />
<main className="xl:p-10 p-4 px-10 xl:mx-0">{children}</main>
</div>
);

5999
package-lock.json generated Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -30,7 +30,8 @@
"remark-gfm": "^3.0.1",
"remark-html": "^15.0.1",
"remark-smartypants": "^2.0.0",
"typescript": "4.9.3"
"typescript": "4.9.3",
"yarn": "^1.22.19"
},
"devDependencies": {
"@types/react-syntax-highlighter": "^15.5.5",

View File

@@ -47,4 +47,15 @@ h4 > a:hover::before {
div > code, pre > code {
@apply p-0 m-0 !important
}
}
#gradient-background {
width:100%;
height:100%;
fill: rgba(0, 0, 0, 0.6);
--gradient-color-1: #161926;
--gradient-color-2: #1E96FC;
--gradient-color-3: #FF3366;
--gradient-color-4: #1b2034;
}

3151
yarn.lock

File diff suppressed because it is too large Load Diff