-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
148 lines (144 loc) · 4.51 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
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Number Dictionary</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<style>
body {
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
margin: 0;
padding: 0;
background-color: #f3f3f3;
color: #333;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
min-height: 100vh;
}
header {
width: 100%;
text-align: center;
background-color: #0078D4;
color: white;
padding: 15px 0;
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
position: fixed;
top: 0;
left: 0;
}
main {
margin: 80px auto 20px auto; /* Adjusted margin-top to account for fixed header */
max-width: 600px;
background-color: white;
padding: 20px;
border-radius: 10px;
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}
p {
margin: 0 0 10px;
}
#mobile-popup {
display: none; /* Hidden by default */
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
background-color: rgba(0, 0, 0, 0.5);
justify-content: center;
align-items: center;
}
#popup-content {
background-color: white;
padding: 20px;
border-radius: 10px;
max-width: 90%;
text-align: center;
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
transition: opacity 0.3s ease; /* Transition effect */
opacity: 0; /* Initially hidden */
}
#popup-content.show {
opacity: 1; /* Show with fade-in effect */
}
#popup-content button {
margin-top: 20px;
padding: 15px 30px; /* Increased padding for a larger button */
font-size: 1.2em; /* Increased font size for a larger button */
background-color: #0078D4;
color: white;
border: none;
border-radius: 5px;
cursor: pointer;
}
</style>
</head>
<body>
<header>
<h1>Number Dictionary</h1>
</header>
<main>
<p>Open DevTools to view the numbers!</p>
<p>v1.0.1</p>
</main>
<div id="mobile-popup">
<div id="popup-content" class="show">
<h2>Hey mobile user!</h2>
<p>It seems like you're on mobile, we're sorry but Number Dictionary is not on mobile yet (and probably never will) :(</p>
<p>But if we're mistaken or you somehow have access to DevTools on mobile, click close to close this popup window :D</p>
<button onclick="closePopup()">Close</button>
</div>
</div>
<script>
const numbers = [
1 / 0,
1 + 1,
1 + 9,
9 + 6,
4 + 5,
6 / 1,
12 + 81,
1 + 8,
42 + 52,
55 + 55,
11 + 69,
69 + 69 + 69 + 69,
1 + 6,
0o470 + 0o470,
Math.sqrt(16),
Math.pow(2, 10),
100 - 32,
5 * 12,
144 / 12,
Math.PI * 2,
100 % 3,
Math.floor(2.718 * 100),
Math.ceil(3.14 * 100) / 100,
1000 / 4,
3 ** 3,
21 + 21,
99 - 33,
88 / 8,
7 * 6,
10 ** 2
];
numbers.forEach((num, index) => {
console.log(`Calculation ${index + 1}: ${num}`);
});
function closePopup() {
document.getElementById('popup-content').classList.remove('show');
setTimeout(() => {
document.getElementById('mobile-popup').style.display = 'none';
}, 300); // Delayed for 0.3 seconds to show transition effect before hiding
}
function isMobileDevice() {
return /Mobi|Android|iPhone|iPad|iPod/.test(navigator.userAgent);
}
if (isMobileDevice()) {
document.getElementById('mobile-popup').style.display = 'flex';
}
</script>
</body>
</html>