Skip to content

Commit

Permalink
IDK, what i changed at this point
Browse files Browse the repository at this point in the history
  • Loading branch information
eternalfrustation committed Nov 18, 2024
1 parent 47042eb commit 9d4b0ba
Show file tree
Hide file tree
Showing 2 changed files with 58 additions and 3 deletions.
21 changes: 19 additions & 2 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,10 @@
<link href="styles.css" rel="stylesheet">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="preload" as="font" href="/0xproto-webfont.woff2" crossorigin>
<script src="scripts.js">
</script>
</head>

<body>
<a class="floating-element" href="https://eternalfrustation.github.io/apocrypha/"><button>Apocrypha</button></a>
<div role="img" aria-label="Profile Photo" id="profilePhoto"></div>
<div id="profileInfo">
<h1>Sandeep Kumar</h1>
Expand Down Expand Up @@ -170,4 +169,22 @@ <h2> Currently</h2>
</div>
</body>

<script>

window.addEventListener("load", () => {
const cards = document.querySelectorAll("body > div");
for (const card of cards) {
card.addEventListener("mouseenter", (e) => {
const boundingBox = card.getBoundingClientRect();
const mrx = (e.x - boundingBox.x) / boundingBox.width;
const mry = (e.y - boundingBox.y) / boundingBox.height;
card.style.transform = `skew(${mrx}deg, ${mry}deg)`
}, true)
card.addEventListener("mouseleave", (e) => {
card.style.transform = ``;
})
}
})
</script>

</html>
40 changes: 39 additions & 1 deletion styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
--bg-square-inner-color: #8BE9FD;
--bg-square-edge-color: #85E2F6;
--bg-complementary: #8c0148;
--bg-complementary-light: #50fa7b;
--text-color: #18272F;
color: var(--text-color);
}
Expand Down Expand Up @@ -135,7 +136,8 @@ li:hover::marker {
color: var(--bg-complementary);
}
li::marker {
content: "╠══"
content: "╠══";
transform: scale(150%);
}

li:last-of-type::marker {
Expand Down Expand Up @@ -305,3 +307,39 @@ body>div:hover::after {
}

}

button {
background-color: var(--bg-complementary);
border-radius: 40px;
font-size: 2em;
padding: 10px;
border-width: 0;
box-shadow: 0px 0px 3px 3px gray;
transition: background-color 0.5s;
cursor: pointer;
}

.floating-element {
position: fixed;
bottom: 20px;
right: 20px;
z-index: 10;
}

button::before {
content: "";
background-color: var(--bg-complementary-light);
position: absolute;
left: 0;
bottom: 3px;
width: 0px;
height: 100%;
z-index: -1;
transition: all .3s ease-in-out;
}

button:hover::before {
bottom: 0;
width: 100%;
border-radius: 40px;
}

0 comments on commit 9d4b0ba

Please sign in to comment.