feat: add resume.pdf button
This commit is contained in:
@@ -3,6 +3,7 @@
|
||||
import { createLeaves, setRotation } from "./leaves";
|
||||
import { Color } from "ogl";
|
||||
import { rgbToHex } from "@helpers/colors";
|
||||
import { colors } from "@helpers/colors";
|
||||
|
||||
let canvas: HTMLCanvasElement;
|
||||
|
||||
@@ -14,17 +15,17 @@
|
||||
|
||||
const color = new Color("#000000");
|
||||
|
||||
const updateBackgroundColor = () => {
|
||||
const background = window.getComputedStyle(document.body);
|
||||
const d = new Color(rgbToHex(background.backgroundColor));
|
||||
function updateColor(c: string) {
|
||||
const d = new Color(rgbToHex(c));
|
||||
color.set(d.r, d.g, d.b);
|
||||
};
|
||||
}
|
||||
|
||||
$: if ($colors.background) {
|
||||
updateColor($colors.background);
|
||||
}
|
||||
|
||||
onMount(() => {
|
||||
updateBackgroundColor();
|
||||
createLeaves({ canvas, num: 20, minZ: 0, maxZ: 1, color });
|
||||
// @ts-ignore
|
||||
window["updateBackgroundColor"] = updateBackgroundColor;
|
||||
createLeaves({ canvas, num: 40, minZ: 0, maxZ: 1, color });
|
||||
setTimeout(() => {
|
||||
loaded = true;
|
||||
}, 100);
|
||||
@@ -48,10 +49,10 @@
|
||||
z-index: -1;
|
||||
pointer-events: none;
|
||||
opacity: 0;
|
||||
transition: opacity 2s;
|
||||
transition: opacity 4s;
|
||||
}
|
||||
|
||||
.loaded {
|
||||
opacity: 0.2;
|
||||
opacity: 0.6;
|
||||
}
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user