-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.html
99 lines (93 loc) · 2.8 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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
<!DOCTYPE html>
<html lang="en">
<head>
<title>(•̀ᴗ•́)</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link
rel="stylesheet"
href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.0/css/bootstrap.min.css"
/>
<style>
.container {
text-align: center;
padding: 20px;
}
#counter {
display: flex;
align-items: center;
justify-content: center;
font-size: 72px;
}
#counter .plus-sign {
font-size: 72px;
margin-right: 5px;
}
.info-btn {
display: inline-block;
margin-top: 20px;
background: none;
border: none;
color: #6c757d;
font-size: 14px;
cursor: pointer;
}
.info-box {
font-size: 14px;
display: none;
position: absolute;
top: calc(100% + 10px);
left: 50%;
transform: translateX(-50%);
width: 200px;
margin-bottom: 0;
background-color: #f8f9fa;
border: 1px solid #ced4da;
border-radius: 5px;
text-align: left;
z-index: 9999;
}
.show {
display: block !important;
}
</style>
<script src="https://code.jquery.com/jquery-3.5.1.slim.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/@popperjs/core@2.5.4/dist/umd/popper.min.js"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.5.0/js/bootstrap.min.js"></script>
</head>
<body>
<div class="container mt-5">
<h1>sick cell</h1>
<h1>killer ultra™</h1>
<h2>(•̀ᴗ•́)و ̑̑</h2>
<br />
<h5>dead cells so far:</h5>
<h1 id="counter"><span class="plus-sign">+</span>0</h1>
<button id="counterBtn" class="btn btn-dark btn-lg btn-block">
heal me
</button>
</div>
<div class="text-center">
<button id="infoBtn" class="info-btn">?</button>
<div id="infoBox" class="info-box">
<p>how does this work? witchcraft = sudo privileges to your body duh</p>
</div>
</div>
<script>
const localCount = localStorage.getItem('count');
let count = localCount ? parseInt(localCount) : 0;
const counterElement = document.getElementById('counter');
counterElement.innerText = '+' + count;
const button = document.getElementById('counterBtn');
const infoBtn = document.getElementById('infoBtn');
const infoBox = document.getElementById('infoBox');
button.addEventListener('click', function () {
count++;
window.localStorage.setItem('count', count);
counterElement.innerText = '+' + count;
});
infoBtn.addEventListener('click', function () {
infoBox.classList.toggle('show');
});
</script>
</body>
</html>