Repository navigation
Expand file tree
/
Copy pathage.html
More file actions
364 lines (345 loc) · 9.75 KB
/
Copy pathage.html
File metadata and controls
364 lines (345 loc) · 9.75 KB
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
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Age & Milestone Calculator • Markmix Digital</title>
<meta name="description" content="Calculate your exact age, live seconds lived, zodiac signs, and upcoming life milestones. Powered by Markmix Digital." />
<style>
:root {
--bg: #090d16;
--card: #111827;
--surface: #1f2937;
--border: #374151;
--text: #f9fafb;
--muted: #9ca3af;
--accent: #38bdf8;
--accent-glow: rgba(56, 189, 248, 0.15);
--btn: #2563eb;
--btn-hover: #1d4ed8;
--error: #f87171;
}
* {
box-sizing: border-box;
}
body {
font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
background-color: var(--bg);
color: var(--text);
display: flex;
justify-content: center;
align-items: center;
min-height: 100vh;
margin: 0;
padding: 1rem;
}
.card {
background: var(--card);
padding: 2rem;
border-radius: 20px;
width: 100%;
max-width: 500px;
box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.6);
border: 1px solid var(--border);
}
.header {
text-align: center;
margin-bottom: 1.5rem;
}
.brand-badge {
display: inline-flex;
align-items: center;
gap: 0.35rem;
background: var(--accent-glow);
color: var(--accent);
border: 1px solid rgba(56, 189, 248, 0.3);
font-size: 0.72rem;
font-weight: 700;
padding: 0.25rem 0.75rem;
border-radius: 999px;
margin-bottom: 0.75rem;
letter-spacing: 0.05em;
}
h1 {
font-size: 1.55rem;
margin: 0 0 0.3rem 0;
letter-spacing: -0.02em;
}
.subtitle {
color: var(--muted);
font-size: 0.875rem;
}
label {
display: block;
margin-bottom: 0.45rem;
color: var(--muted);
font-size: 0.82rem;
font-weight: 600;
text-transform: uppercase;
letter-spacing: 0.04em;
}
.input-row {
display: flex;
gap: 0.5rem;
}
input[type="date"] {
flex: 1;
padding: 0.75rem 0.9rem;
border-radius: 10px;
border: 1px solid var(--border);
background: var(--surface);
color: var(--text);
font-size: 1rem;
font-family: inherit;
color-scheme: dark;
outline: none;
transition: border-color 0.2s;
}
input[type="date"]:focus {
border-color: var(--accent);
}
button {
padding: 0.75rem 1.25rem;
border: none;
border-radius: 10px;
background: var(--btn);
color: white;
font-size: 0.95rem;
font-weight: 600;
cursor: pointer;
transition: all 0.2s;
}
button:hover {
background: var(--btn-hover);
}
.error-msg {
color: var(--error);
font-size: 0.85rem;
margin-top: 0.5rem;
display: none;
}
.results {
display: none;
margin-top: 1.5rem;
padding-top: 1.5rem;
border-top: 1px solid var(--border);
animation: fadeIn 0.3s ease;
}
@keyframes fadeIn {
from { opacity: 0; transform: translateY(6px); }
to { opacity: 1; transform: translateY(0); }
}
.hero-age {
background: linear-gradient(145deg, #1f2937, #111827);
padding: 1.25rem 1rem;
border-radius: 14px;
text-align: center;
border: 1px solid var(--border);
margin-bottom: 1rem;
}
.hero-age .big {
font-size: 1.4rem;
font-weight: 800;
color: var(--accent);
}
.hero-age .live {
font-size: 0.85rem;
color: var(--muted);
margin-top: 0.4rem;
font-variant-numeric: tabular-nums;
}
.progress-wrap {
margin-top: 0.9rem;
text-align: left;
}
.progress-labels {
display: flex;
justify-content: space-between;
font-size: 0.75rem;
color: var(--muted);
margin-bottom: 0.35rem;
}
.progress-bar {
width: 100%;
height: 6px;
background: #090d16;
border-radius: 999px;
overflow: hidden;
}
.progress-fill {
height: 100%;
background: var(--accent);
border-radius: 999px;
transition: width 0.4s ease;
}
.grid {
display: grid;
grid-template-columns: 1fr 1fr;
gap: 0.75rem;
margin-bottom: 1rem;
}
.box {
background: var(--surface);
padding: 0.85rem;
border-radius: 12px;
border: 1px solid var(--border);
}
.box-label {
font-size: 0.7rem;
color: var(--muted);
text-transform: uppercase;
letter-spacing: 0.05em;
font-weight: 600;
}
.box-val {
font-size: 1rem;
font-weight: 700;
margin-top: 0.25rem;
color: var(--text);
}
.action-row {
display: grid;
grid-template-columns: 1fr 1fr;
gap: 0.6rem;
}
.secondary-btn {
background: var(--surface);
border: 1px solid var(--border);
font-size: 0.85rem;
padding: 0.7rem;
}
.secondary-btn:hover {
background: #374151;
}
.footer {
margin-top: 1.5rem;
padding-top: 1rem;
border-top: 1px solid var(--border);
text-align: center;
font-size: 0.8rem;
color: var(--muted);
}
.footer a {
color: var(--accent);
text-decoration: none;
font-weight: 600;
}
.footer a:hover {
text-decoration: underline;
}
</style>
</head>
<body>
<div class="card">
<div class="header">
<div class="brand-badge">⬡ MARKMIX DIGITAL</div>
<h1>Age & Milestone Calculator</h1>
<div class="subtitle">Real-time age tracker, zodiac & life milestones</div>
</div>
<label for="dob">Select Date of Birth</label>
<div class="input-row">
<input type="date" id="dob" />
<button onclick="startCalculator()">Calculate</button>
</div>
<div class="error-msg" id="errorMsg">Please enter a valid date in the past.</div>
<div class="results" id="results">
<div class="hero-age">
<div class="big" id="exactAge"></div>
<div class="live" id="liveTicker"></div>
<div class="progress-wrap">
<div class="progress-labels">
<span>Birthday Year Progress</span>
<span id="bdayPercent">0%</span>
</div>
<div class="progress-bar">
<div class="progress-fill" id="bdayFill" style="width: 0%"></div>
</div>
</div>
</div>
<div class="grid">
<div class="box">
<div class="box-label">Born On</div>
<div class="box-val" id="bornDay"></div>
</div>
<div class="box">
<div class="box-label">Next Birthday</div>
<div class="box-val" id="nextBirthday"></div>
</div>
<div class="box">
<div class="box-label">Western Zodiac</div>
<div class="box-val" id="zodiac"></div>
</div>
<div class="box">
<div class="box-label">Generation</div>
<div class="box-val" id="generation"></div>
</div>
<div class="box">
<div class="box-label">Total Days Lived</div>
<div class="box-val" id="totalDays"></div>
</div>
<div class="box">
<div class="box-label" id="milestoneLabel">Next Milestone</div>
<div class="box-val" id="nextMilestone"></div>
</div>
</div>
<div class="action-row">
<button class="secondary-btn" id="copyBtn" onclick="copySummary()">Copy Summary</button>
<button class="secondary-btn" id="linkBtn" onclick="copyShareLink()">Share Result Link</button>
</div>
</div>
<div class="footer">
Powered by <a href="https://github.io" target="_blank" rel="noopener noreferrer">Markmix Digital</a>
</div>
</div>
<script>
let tickerInterval = null;
let summaryText = "";
const dobField = document.getElementById("dob");
dobField.max = new Date().toISOString().split("T")[0];
window.addEventListener("DOMContentLoaded", () => {
const params = new URLSearchParams(window.location.search);
const sharedDob = params.get("dob");
if (sharedDob) {
dobField.value = sharedDob;
startCalculator();
}
});
function getZodiac(month, day) {
const signs = [
["Capricorn ♑", 19], ["Aquarius ♒", 18], ["Pisces ♓", 20],
["Aries ♈", 19], ["Taurus ♉", 20], ["Gemini ♊", 20],
["Cancer ♋", 22], ["Leo ♌", 22], ["Virgo ♍", 22],
["Libra ♎", 22], ["Scorpio ♏", 21], ["Sagittarius ♐", 21],
["Capricorn ♑", 31]
];
return day <= signs[month] ? signs[month] : signs[month + 1];
}
function getGeneration(year) {
if (year >= 2013) return "Gen Alpha";
if (year >= 1997) return "Gen Z";
if (year >= 1981) return "Millennial";
if (year >= 1965) return "Gen X";
if (year >= 1946) return "Baby Boomer";
return "Silent Gen";
}
function startCalculator() {
const dobInput = dobField.value;
const errorMsg = document.getElementById("errorMsg");
if (!dobInput) {
errorMsg.textContent = "Please select a valid date of birth.";
errorMsg.style.display = "block";
return;
}
const dob = new Date(dobInput + "T00:00:00");
const now = new Date();
if (isNaN(dob.getTime()) || dob > now) {
errorMsg.textContent = "Date of birth cannot be in the future.";
errorMsg.style.display = "block";
return;
}
errorMsg.style.display = "none";
const url = new URL(window.location);
url.searchParams.set("dob", dobInput);
window.history.replaceState({}, "", url);
if (tickerInterval) clearInterval(tickerInterval);
const updateStats = () => {