Skip to content

Commit 362da25

Browse files
Added Day 95
1 parent 004b467 commit 362da25

1 file changed

Lines changed: 109 additions & 0 deletions

File tree

public/95/index.html

Lines changed: 109 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,109 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="UTF-8" />
5+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
6+
<link rel="icon" href="/assets/icon.png" />
7+
<title>Day 95/100</title>
8+
</head>
9+
<body>
10+
<main>
11+
<div class="menu menu-1" id="menu">
12+
<div class="item item-1" id="item-1">HOME</div>
13+
<div class="item item-2" id="item-2">ABOUT</div>
14+
<div class="dot"></div>
15+
</div>
16+
</main>
17+
18+
<style>
19+
@font-face {
20+
font-family: "SpaceMono";
21+
src: url("/assets/SpaceMono-Bold.woff2") format("woff2");
22+
font-weight: 700;
23+
}
24+
25+
body {
26+
margin: 0;
27+
overflow: hidden;
28+
display: flex;
29+
justify-content: center;
30+
align-items: center;
31+
min-height: 100vh;
32+
background-color: #000;
33+
}
34+
35+
.menu {
36+
position: relative;
37+
display: grid;
38+
grid-template-columns: 1fr 1fr;
39+
gap: 20px;
40+
}
41+
42+
.item {
43+
cursor: pointer;
44+
font-family: "SpaceMono", monospace;
45+
font-weight: 700;
46+
font-size: 20px;
47+
color: #fff;
48+
opacity: 0.5;
49+
text-align: center;
50+
transition: opacity 0.25s ease-in-out;
51+
}
52+
53+
.item:hover {
54+
opacity: 1;
55+
}
56+
57+
.menu-1 .item-1 {
58+
opacity: 1;
59+
}
60+
61+
.menu-2 .item-2 {
62+
opacity: 1;
63+
}
64+
65+
.dot {
66+
position: absolute;
67+
left: calc(25% - 8px);
68+
top: -40%;
69+
width: calc(25% + 8px);
70+
height: 8px;
71+
transform-origin: right center;
72+
transition: all 0.5s ease-in-out;
73+
}
74+
75+
.menu-1 .dot {
76+
rotate: 0deg;
77+
}
78+
79+
.menu-2 .dot {
80+
rotate: 180deg;
81+
}
82+
83+
.dot:after {
84+
content: "";
85+
position: absolute;
86+
left: 0%;
87+
top: 0%;
88+
height: 100%;
89+
aspect-ratio: 1 / 1;
90+
border-radius: 100%;
91+
background-color: #fff;
92+
}
93+
</style>
94+
95+
<script>
96+
const menu = document.getElementById("menu");
97+
const item1 = document.getElementById("item-1");
98+
const item2 = document.getElementById("item-2");
99+
100+
item1.addEventListener("click", () => {
101+
menu.classList = "menu menu-1";
102+
});
103+
104+
item2.addEventListener("click", () => {
105+
menu.classList = "menu menu-2";
106+
});
107+
</script>
108+
</body>
109+
</html>

0 commit comments

Comments
 (0)