Skip to content

Commit 4138614

Browse files
authored
Update index.html
1 parent 871291e commit 4138614

1 file changed

Lines changed: 78 additions & 2 deletions

File tree

index.html

Lines changed: 78 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,44 @@
1212
html, body { height:100%; }
1313
body { background:#fff; }
1414

15+
/* ---------- LICENSE POPUP ---------- */
16+
#licenseOverlay {
17+
position: fixed;
18+
inset: 0;
19+
background: rgba(0,0,0,0.45);
20+
display: none;
21+
align-items: center;
22+
justify-content: center;
23+
z-index: 20000;
24+
}
25+
26+
#licensePopup {
27+
background: #fff;
28+
width: 360px;
29+
padding: 20px;
30+
border-radius: 8px;
31+
text-align: center;
32+
box-shadow: 0 4px 10px rgba(0,0,0,0.25);
33+
}
34+
35+
#licensePopup a {
36+
word-break: break-all;
37+
}
38+
39+
#licensePopup label {
40+
display: block;
41+
margin-top: 12px;
42+
font-size: 14px;
43+
}
44+
45+
#licensePopup button {
46+
margin-top: 15px;
47+
padding: 8px 20px;
48+
font-weight: bold;
49+
cursor: pointer;
50+
}
51+
52+
1553
#topPanel {
1654
position: fixed;
1755
top:0; left:0;
@@ -29,8 +67,12 @@
2967
#topTimer { font-size:24px; font-weight:bold; }
3068

3169
.topButtons { display:flex; flex-direction: column; gap:10px; }
32-
.topButtons button { padding:8px 14px; font-weight:bold; cursor:pointer;For undefined values, type in "und."
33-
min-width:90px; }
70+
.topButtons button {
71+
padding:8px 14px;
72+
font-weight:bold;
73+
cursor:pointer;
74+
min-width:90px;
75+
}
3476

3577
#scrollContainer {
3678
max-width:900px;
@@ -74,6 +116,25 @@
74116
</style>
75117
</head>
76118
<body>
119+
<!-- LICENSE POPUP -->
120+
<div id="licenseOverlay">
121+
<div id="licensePopup">
122+
<p>
123+
This site is under an MIT License. It is open-source and you can view it here:
124+
<br><br>
125+
<a href="https://github.com/Vanish-Coder/unit-circle-practice" target="_blank">
126+
GitHub Repository
127+
</a>
128+
</p>
129+
130+
<label>
131+
<input type="checkbox" id="dontShowAgain">
132+
Don’t show again
133+
</label>
134+
135+
<button id="closeLicenseBtn">Close</button>
136+
</div>
137+
</div>
77138

78139
<div id="topPanel">
79140
<svg id="topMiniCircle" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 300 300">
@@ -389,6 +450,21 @@ <h2>Results</h2>
389450
restartBtn.onclick = init;
390451

391452
init();
453+
454+
/* ---------- LICENSE POPUP LOGIC ---------- */
455+
window.addEventListener("load", () => {
456+
if (!localStorage.getItem("hideLicensePopup")) {
457+
document.getElementById("licenseOverlay").style.display = "flex";
458+
}
459+
});
460+
461+
document.getElementById("closeLicenseBtn").onclick = () => {
462+
if (document.getElementById("dontShowAgain").checked) {
463+
localStorage.setItem("hideLicensePopup", "true");
464+
}
465+
document.getElementById("licenseOverlay").style.display = "none";
466+
};
467+
392468
</script>
393469

394470
</body>

0 commit comments

Comments
 (0)