-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
66 lines (61 loc) · 2.66 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
<!DOCTYPE html>
<html lang="">
<head>
<meta charset="utf-8" />
<meta name="description" content="Hawmi's personal portfolio" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link rel="stylesheet" href="style.css" />
<title>Hawmi</title>
</head>
<body>
<main>
<div id="home-section" class="section">
<img src="assets/hawmi-avatar-nobg.gif" alt="logo" class="entry-fade-delay" />
<h1 id="main-title" class="anim-typewriter">hawmi</h1>
<p id="main-aka" class="entry-fade-delay">aka. Hami, Niavaran, Shemiranat</p>
<p id="main-description" class="entry-fade-delay">
Half Emirati half Persian teenager who lives in Lavasanat and Abu Dhabi. Dedicated
Valorant fade player and decent Minecraft PotPvP player. Owns ign Niavaran on minecraft
</p>
<div id="main-buttons" class="entry-fade-delay">
<a class="button" href="/hardware.html">
<img src="assets/icons/laptop.png" alt="pc" />
Hardware
</a>
<a id="discord-button" class="button" href="#" onclick="showDiscordPopup()">
<img src="assets/icons/discord.png" alt="dc" />
Discord
</a>
</div>
</div>
</main>
</body>
</html>
<script>
let discordButton = document.getElementById("discord-button");
function showDiscordPopup() {
navigator.clipboard.writeText("Hawmi");
const tooltip = document.createElement("div");
tooltip.innerText = "Hawmi#9999 copied to clipboard";
tooltip.style.position = "absolute";
const targetBox = discordButton.getBoundingClientRect();
tooltip.style.transition = "0.3s";
tooltip.style.opacity = "0";
tooltip.style.padding = "10px";
tooltip.style.color = "white";
tooltip.style.background = "var(--background-primary)";
tooltip.style.border = "1px solid var(--accent-primary)";
document.body.appendChild(tooltip);
tooltip.style.left = targetBox.left + targetBox.width / 2 - tooltip.getBoundingClientRect().width / 2 + "px";
tooltip.style.top = targetBox.top + targetBox.height + 10 + "px";
setTimeout(() => {
tooltip.style.opacity = "1";
}, 100);
setTimeout(() => {
tooltip.style.opacity = "0";
setTimeout(() => {
document.body.removeChild(tooltip);
}, 300);
}, 5000);
}
</script>