From e052ecc8a8889b46b6cb5cd6c856a8e2e1ca77cb Mon Sep 17 00:00:00 2001 From: MonkeyGG2 Date: Tue, 22 Aug 2023 16:34:29 +0530 Subject: [PATCH] gradient title and slight modifications --- css/style.css | 19 +++++++++++++++---- js/bg.js | 7 +++++++ jsconfig.json | 7 +++++++ 3 files changed, 29 insertions(+), 4 deletions(-) create mode 100644 jsconfig.json diff --git a/css/style.css b/css/style.css index cbdd5c85..1787f08c 100644 --- a/css/style.css +++ b/css/style.css @@ -1,5 +1,5 @@ @import url('https://fonts.googleapis.com/css2?family=Trispace:wght@100&display=swap'); -@import url('https://fonts.googleapis.com/css2?family=Lato:wght@400&display=swap'); +@import url('https://fonts.googleapis.com/css2?family=Work+Sans:wght@300&display=swap'); /*i titled these poorly, without trying how any of it looks*/ :root { @@ -8,7 +8,7 @@ --button-color: #373737; --hover-color: #3c3c3c; --font-color: #dcddde; - --font-family: 'Lato', sans-serif; + --font-family: 'Work Sans', sans-serif; } html { @@ -73,15 +73,21 @@ body.noscript { h1 { z-index: 50; position: relative; - display: flex; + display: inline-block; justify-self: center; text-align: center; + width: fit-content; + height: fit-content; margin-top: 3.5rem; font-size: 128px; font-weight: 100; font-family: 'Trispace', sans-serif; letter-spacing: 5px; - color: -webkit-linear-gradient(white, #38495a) + color: transparent; + background-image: linear-gradient(white, #38495a); + -webkit-background-clip: text; + background-clip: text; + pointer-events: none; } logo img { @@ -125,4 +131,9 @@ logo img { color: var(--font-color); font-family: var(--font-family); transition: all 0.2s ease-in; + cursor: pointer; +} + +.card:hover { + background-color: var(--hover-color); } \ No newline at end of file diff --git a/js/bg.js b/js/bg.js index b7a32033..b44d8064 100644 --- a/js/bg.js +++ b/js/bg.js @@ -16,6 +16,8 @@ const opt = { strokeWeight: 2, tail: 82 }; +changeTitleColor(); + const Particles = []; let time = 0; document.body.addEventListener("click", () => { @@ -26,6 +28,7 @@ document.body.addEventListener("click", () => { opt.l1 = rand(30, 80); opt.l2 = rand(30, 80); opt.angle += deg(random(60, 60)) * (Math.random() > 0.5 ? 1 : -1); + changeTitleColor(); for (let p of Particles) { p.randomize(); @@ -157,4 +160,8 @@ Resize --------------------*/ function windowResized() { resizeCanvas(windowWidth, windowHeight); +} + +function changeTitleColor() { + document.querySelector("#everything-else h1").style.background = `text linear-gradient(hsl(${opt.h1}, ${opt.s1}, ${opt.l1}), hsl(${opt.h2}, ${opt.s2}, ${opt.l2}));`; } \ No newline at end of file diff --git a/jsconfig.json b/jsconfig.json new file mode 100644 index 00000000..9ec9c2b7 --- /dev/null +++ b/jsconfig.json @@ -0,0 +1,7 @@ +{ + "typeAcquisition": { + "include": [ + "jquery" + ] + } +} \ No newline at end of file