Skip to content

Commit 65db17c

Browse files
committed
feat: CC & favicon & MDJAmin
1 parent 991c5d5 commit 65db17c

File tree

4 files changed

+66
-22
lines changed

4 files changed

+66
-22
lines changed

css/style.css

Lines changed: 31 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,8 @@
1515
hsl(var(--hue) 80% 70%),
1616
transparent
1717
)
18-
calc((var(--x) * 1px) - (var(--size) * 0.5))
19-
calc((var(--y) * 1px) - (var(--size) * 0.5)) / var(--size) var(--size)
20-
no-repeat fixed;
18+
calc((var(--x) * 1px) - (var(--size) * 0.5)) calc((var(--y) * 1px) - (var(--size) * 0.5)) /
19+
var(--size) var(--size) no-repeat fixed;
2120
}
2221

2322
.controls {
@@ -33,8 +32,8 @@ body {
3332
flex-wrap: wrap;
3433
justify-content: center;
3534
min-height: 100vh;
36-
font-family: "SF Pro Text", "SF Pro Icons", "AOS Icons", "Helvetica Neue",
37-
Helvetica, Arial, sans-serif, system-ui;
35+
font-family: "SF Pro Text", "SF Pro Icons", "AOS Icons", "Helvetica Neue", Helvetica, Arial,
36+
sans-serif, system-ui;
3837
background: var(--bg);
3938
}
4039

@@ -89,3 +88,30 @@ button::after {
8988
background: var(--glow);
9089
border-radius: 1rem;
9190
}
91+
92+
.MDJAminDiv {
93+
z-index: 4444;
94+
position: fixed;
95+
bottom: 5%;
96+
left: 2%;
97+
}
98+
99+
.MDJAmin {
100+
text-decoration: none;
101+
border-bottom: 1px dashed rgb(204, 204, 204);
102+
border-top: 1px dashed rgb(204, 204, 204);
103+
/* border-bottom: 1px dashed rgb(44, 44, 44); */
104+
/* border-top: 1px dashed rgb(44, 44, 44); */
105+
padding: 4px 0;
106+
/* color: rgba(44, 44, 44, 0.525); */
107+
color: rgba(204, 204, 204, 0.414);
108+
font-family: monospace;
109+
font-style: italic;
110+
font-size: 1.1em;
111+
transition: all 0.5s;
112+
}
113+
114+
.MDJAmin:hover {
115+
/* color: #000000; */
116+
color: white;
117+
}

favicon.png

10.5 KB
Loading

index.html

Lines changed: 25 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,22 +2,41 @@
22
<html lang="en">
33
<head>
44
<meta charset="UTF-8" />
5-
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
6-
<link rel="stylesheet" href="css/style.css" />
7-
<title>Document</title>
5+
<meta
6+
name="viewport"
7+
content="width=device-width, initial-scale=1.0"
8+
/>
9+
<link
10+
rel="stylesheet"
11+
href="css/style.css"
12+
/>
13+
<link
14+
rel="shortcut icon"
15+
href="favicon.png"
16+
type="image/x-icon"
17+
/>
18+
<title>Futuristic Glowing Button</title>
819
</head>
920
<body>
1021
<div>
1122
<button>
12-
<span>Start</span>
23+
<span>Hover</span>
1324
</button>
1425
<button>
15-
<span>Stop</span>
26+
<span>CLick</span>
1627
</button>
1728
<button>
18-
Click
29+
<span>Hold</span>
1930
</button>
2031
</div>
32+
<div class="MDJAminDiv">
33+
<a
34+
class="MDJAmin"
35+
href="https://github.com/MDJAmin"
36+
target="_blank"
37+
>MDJAmin</a
38+
>
39+
</div>
2140
<script src="js/script.js"></script>
2241
</body>
2342
</html>

js/script.js

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
11
const syncPointer = ({ x: pointerX, y: pointerY }) => {
2-
const x = pointerX.toFixed(2)
3-
const y = pointerY.toFixed(2)
4-
const xp = (pointerX / window.innerWidth).toFixed(2)
5-
const yp = (pointerY / window.innerHeight).toFixed(2)
6-
document.documentElement.style.setProperty('--x', x)
7-
document.documentElement.style.setProperty('--xp', xp)
8-
document.documentElement.style.setProperty('--y', y)
9-
document.documentElement.style.setProperty('--yp', yp)
10-
}
11-
document.body.addEventListener('pointermove', syncPointer)
12-
2+
const x = pointerX.toFixed(2);
3+
const y = pointerY.toFixed(2);
4+
const xp = (pointerX / window.innerWidth).toFixed(2);
5+
const yp = (pointerY / window.innerHeight).toFixed(2);
6+
document.documentElement.style.setProperty("--x", x);
7+
document.documentElement.style.setProperty("--xp", xp);
8+
document.documentElement.style.setProperty("--y", y);
9+
document.documentElement.style.setProperty("--yp", yp);
10+
};
11+
document.body.addEventListener("pointermove", syncPointer);

0 commit comments

Comments
 (0)