Skip to content

Commit 20e2da6

Browse files
committed
feat: spin logo
1 parent de871b8 commit 20e2da6

1 file changed

Lines changed: 28 additions & 1 deletion

File tree

index.html

Lines changed: 28 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,22 @@
99
rel="stylesheet"
1010
href="https://cdn.jsdelivr.net/npm/@exampledev/new.css@latest/new.min.css"
1111
/>
12+
<style>
13+
.spinning-logo {
14+
display: inline-block;
15+
}
16+
.spinning-logo.spin {
17+
animation: spin 0.6s cubic-bezier(0.68, -0.55, 0.27, 1.55);
18+
}
19+
@keyframes spin {
20+
from {
21+
transform: rotate(0deg);
22+
}
23+
to {
24+
transform: rotate(360deg);
25+
}
26+
}
27+
</style>
1228
<script>
1329
document.addEventListener("DOMContentLoaded", function () {
1430
const domain = window.location.hostname || "example.com";
@@ -31,6 +47,16 @@
3147
e.preventDefault();
3248
document.getElementById("escrow-form").submit();
3349
});
50+
51+
// Handle spinning logo - only once
52+
const logo = document.querySelector(".spinning-logo");
53+
let hasSpun = false;
54+
logo.addEventListener("mouseenter", function () {
55+
if (!hasSpun) {
56+
hasSpun = true;
57+
logo.classList.add("spin");
58+
}
59+
});
3460
});
3561
</script>
3662
</head>
@@ -81,9 +107,10 @@ <h1>The placeholder site</h1>
81107
</form>
82108
<a href="https://lineofflig.ht"
83109
><img
110+
class="spinning-logo"
84111
src="lineofflight.jpg?v={{ site.time | date: '%s' }}"
85112
alt="Line of Flight"
86-
width="40"
113+
width="60"
87114
/></a>
88115
</body>
89116
</html>

0 commit comments

Comments
 (0)