This commit is contained in:
522
Gradient.js
Normal file
522
Gradient.js
Normal file
File diff suppressed because one or more lines are too long
19
components/GradientBG.tsx
Normal file
19
components/GradientBG.tsx
Normal 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 />
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
@@ -1,10 +1,13 @@
|
|||||||
import { PropsWithChildren } from "react";
|
import { PropsWithChildren } from "react";
|
||||||
|
|
||||||
|
import { GradientBG } from '../components/GradientBG';
|
||||||
import { Navbar } from "../components/Navbar";
|
import { Navbar } from "../components/Navbar";
|
||||||
|
|
||||||
export const MainLayout = ({ children }: PropsWithChildren) => {
|
export const MainLayout = ({ children }: PropsWithChildren) => {
|
||||||
return (
|
return (
|
||||||
<div className="w-full">
|
<div className="w-full">
|
||||||
<Navbar />
|
<Navbar />
|
||||||
|
<GradientBG />
|
||||||
<main className="xl:p-10 p-4 px-10 xl:mx-0">{children}</main>
|
<main className="xl:p-10 p-4 px-10 xl:mx-0">{children}</main>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
|||||||
5999
package-lock.json
generated
Normal file
5999
package-lock.json
generated
Normal file
File diff suppressed because it is too large
Load Diff
@@ -30,7 +30,8 @@
|
|||||||
"remark-gfm": "^3.0.1",
|
"remark-gfm": "^3.0.1",
|
||||||
"remark-html": "^15.0.1",
|
"remark-html": "^15.0.1",
|
||||||
"remark-smartypants": "^2.0.0",
|
"remark-smartypants": "^2.0.0",
|
||||||
"typescript": "4.9.3"
|
"typescript": "4.9.3",
|
||||||
|
"yarn": "^1.22.19"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@types/react-syntax-highlighter": "^15.5.5",
|
"@types/react-syntax-highlighter": "^15.5.5",
|
||||||
|
|||||||
@@ -47,4 +47,15 @@ h4 > a:hover::before {
|
|||||||
|
|
||||||
div > code, pre > code {
|
div > code, pre > code {
|
||||||
@apply p-0 m-0 !important
|
@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;
|
||||||
|
}
|
||||||
|
|
||||||
Reference in New Issue
Block a user