Skip to content

Commit 9ddf961

Browse files
authored
Update md.html
1 parent bf523e4 commit 9ddf961

1 file changed

Lines changed: 101 additions & 10 deletions

File tree

‎misc/md.html‎

Lines changed: 101 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -664,6 +664,41 @@
664664
font-size: 1.2rem;
665665
}
666666

667+
.version-info {
668+
font-size: 0.85rem;
669+
color: #888;
670+
margin-top: 0.5rem;
671+
}
672+
673+
.geocities-counter {
674+
display: inline-flex;
675+
align-items: center;
676+
gap: 0.5rem;
677+
margin-top: 1rem;
678+
padding: 0.5rem 1rem;
679+
background: linear-gradient(180deg, #ff00ff 0%, #8800ff 100%);
680+
border: 3px ridge #ffff00;
681+
border-radius: 4px;
682+
box-shadow: 0 0 20px rgba(255, 0, 255, 0.6), inset 0 0 10px rgba(255, 255, 255, 0.3);
683+
font-family: 'Courier New', monospace;
684+
font-weight: 900;
685+
font-size: 1.1rem;
686+
color: #ffff00;
687+
text-shadow: 0 0 5px #ff00ff, 2px 2px 0 #000;
688+
}
689+
690+
.counter-digit {
691+
display: inline-block;
692+
min-width: 1.2rem;
693+
text-align: center;
694+
background: #000;
695+
border: 2px inset #666;
696+
padding: 0.2rem 0.3rem;
697+
margin: 0 1px;
698+
color: #00ff00;
699+
text-shadow: 0 0 10px #00ff00;
700+
}
701+
667702
.footer-btn {
668703
background: linear-gradient(135deg, #2a2a3e 0%, #3a3a4e 100%);
669704
color: #00ffff;
@@ -944,13 +979,18 @@ <h2 id="viewTitle" class="view-title"></h2>
944979
<div class="footer">
945980
Created by Dteyn
946981
<button class="footer-btn" onclick="openPanel('aboutPanel')">About</button>
982+
<div class="version-info">Version 1.0.0 | October 30, 2025</div>
983+
<div class="geocities-counter">
984+
👁️ VISITORS: <span id="counterDisplay">000000</span>
985+
</div>
947986
</div>
948987

949988
<div class="overlay" id="aboutPanel">
950989
<div class="panel">
951990
<button class="panel-close" onclick="closePanel('aboutPanel')">×</button>
952991
<h2>About</h2>
953992
<p><strong>Created by Dteyn</strong></p>
993+
<p><strong>Version 1.0.0 | October 30, 2025</strong></p>
954994
<p>This is a hobby project to help players of <em>After the Fall</em> plan their gameplay around the rotating mutator system.</p>
955995

956996
<h3>Links</h3>
@@ -1087,9 +1127,16 @@ <h4>Discord Timestamps</h4>
10871127

10881128
function updateActiveMutator() {
10891129
const now = new Date();
1090-
const block = now.getHours() - (now.getHours() % 2);
1091-
const dt = new Date(Date.UTC(now.getUTCFullYear(), now.getUTCMonth(), now.getUTCDate(), now.getUTCHours() - (now.getUTCHours() % 2)));
1092-
const { level, mutator } = getBlock(dt);
1130+
1131+
// Get current 2-hour block in UTC
1132+
const baseHour = Math.floor(now.getUTCHours() / 2) * 2;
1133+
const blockTime = new Date(Date.UTC(now.getUTCFullYear(), now.getUTCMonth(), now.getUTCDate(), baseHour, 0, 0, 0));
1134+
1135+
const { level, mutator } = getBlock(blockTime);
1136+
1137+
// Convert to local time for display
1138+
const localTime = new Date(blockTime.getTime());
1139+
const localHour = localTime.getHours();
10931140

10941141
const display = document.getElementById("activeMutatorDisplay");
10951142
const clsL = sanitizeClassName(level);
@@ -1105,7 +1152,7 @@ <h4>Discord Timestamps</h4>
11051152
</div>
11061153
</div>
11071154
<div class="active-mutator-text">
1108-
${fmtHour(block)} — ${level} — ${mutator}
1155+
${fmtHour(localHour)} — ${level} — ${mutator}
11091156
</div>
11101157
`;
11111158

@@ -1189,9 +1236,18 @@ <h4>Discord Timestamps</h4>
11891236
const nowHour = now.getHours();
11901237

11911238
for (let h = 0; h < 24; h += 2) {
1192-
const localDt = new Date(currentDate.getFullYear(), currentDate.getMonth(), currentDate.getDate(), h);
1193-
const utcOffset = localDt.getTimezoneOffset();
1194-
const utcDt = new Date(localDt.getTime() + utcOffset * 60000);
1239+
// Create local datetime for this hour
1240+
const localDt = new Date(currentDate.getFullYear(), currentDate.getMonth(), currentDate.getDate(), h, 0, 0, 0);
1241+
1242+
// Convert to UTC for calculation
1243+
const utcDt = new Date(Date.UTC(
1244+
localDt.getUTCFullYear(),
1245+
localDt.getUTCMonth(),
1246+
localDt.getUTCDate(),
1247+
localDt.getUTCHours(),
1248+
localDt.getUTCMinutes(),
1249+
0, 0
1250+
));
11951251

11961252
const { level, mutator } = getBlock(utcDt);
11971253

@@ -1232,18 +1288,26 @@ <h4>Discord Timestamps</h4>
12321288
const levelIcon = block.querySelector(".level-icon");
12331289
[levelPill, levelIcon].forEach(el => {
12341290
el.onmouseenter = (e) => {
1291+
e.stopPropagation();
12351292
showTooltip(e, `<h4>${level}</h4><p>${LEVEL_DESCRIPTIONS[level]}</p>`);
12361293
};
1237-
el.onmouseleave = hideTooltip;
1294+
el.onmouseleave = (e) => {
1295+
e.stopPropagation();
1296+
hideTooltip();
1297+
};
12381298
});
12391299

12401300
const mutPill = block.querySelector(".mutator-pill");
12411301
const mutIcon = block.querySelector(".mutator-icon");
12421302
[mutPill, mutIcon].forEach(el => {
12431303
el.onmouseenter = (e) => {
1304+
e.stopPropagation();
12441305
showTooltip(e, `<h4>${mutator}</h4><p>${MUTATOR_DESCRIPTIONS[mutator]}</p>`);
12451306
};
1246-
el.onmouseleave = hideTooltip;
1307+
el.onmouseleave = (e) => {
1308+
e.stopPropagation();
1309+
hideTooltip();
1310+
};
12471311
});
12481312

12491313
list.appendChild(block);
@@ -1614,8 +1678,35 @@ <h4>Discord Timestamps</h4>
16141678
setupDateSelector();
16151679
updateActiveMutator();
16161680
setView("daily");
1681+
updatePageCounter();
16171682

16181683
setInterval(updateActiveMutator, 60000);
1684+
1685+
async function updatePageCounter() {
1686+
const endpoint = 'https://github-page-counter.netlify.app/.netlify/functions/pageviews';
1687+
const key = 'atf-mutator-test';
1688+
1689+
try {
1690+
const res = await fetch(`${endpoint}?key=${encodeURIComponent(key)}`, {
1691+
method: 'POST',
1692+
mode: 'cors'
1693+
});
1694+
const data = await res.json();
1695+
const count = data.count || 0;
1696+
1697+
// Format with leading zeros
1698+
const formatted = String(count).padStart(6, '0');
1699+
const digits = formatted.split('').map(d =>
1700+
`<span class="counter-digit">${d}</span>`
1701+
).join('');
1702+
1703+
document.getElementById('counterDisplay').innerHTML = digits;
1704+
} catch (err) {
1705+
console.error('Counter error:', err);
1706+
document.getElementById('counterDisplay').innerHTML =
1707+
'<span class="counter-digit">E</span><span class="counter-digit">R</span><span class="counter-digit">R</span>';
1708+
}
1709+
}
16191710
</script>
16201711
</body>
1621-
</html>
1712+
</html>

0 commit comments

Comments
 (0)