@ywkrlerche/richardwho 1.0.43 → 1.0.44
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/app.js +459 -47
- package/config.js +4 -0
- package/games.json +1 -1
- package/index.html +99 -14
- package/index.svg +17 -5
- package/package.json +1 -1
- package/style.css +124 -1
package/index.html
CHANGED
|
@@ -13,29 +13,46 @@
|
|
|
13
13
|
// Apply the saved tab disguise and theme before anything else shows (app.js has the full theme code)
|
|
14
14
|
try {
|
|
15
15
|
var s = JSON.parse(localStorage.getItem("rug-settings") || "{}");
|
|
16
|
-
//
|
|
17
|
-
window.rugHoliday
|
|
16
|
+
// The holiday calendar: which theme is on today (null = none) and each holiday's big day this season.
|
|
17
|
+
// Shared with app.js as window.rugHoliday(now) and window.rugHolidayDay(name, now).
|
|
18
|
+
var calendar = function (now) {
|
|
18
19
|
now = now || new Date();
|
|
19
20
|
var y = now.getFullYear(), m = now.getMonth(), d = now.getDate(), today = new Date(y, m, d).getTime(), DAY = 864e5;
|
|
21
|
+
var at = function (mo, da, yr) { return new Date(yr || y, mo, da).getTime(); };
|
|
20
22
|
// Easter Sunday (Gregorian computus)
|
|
21
23
|
var a = y % 19, b = Math.floor(y / 100), c = y % 100, h = (19 * a + b - Math.floor(b / 4) - Math.floor((b - Math.floor((b + 8) / 25) + 1) / 3) + 15) % 30;
|
|
22
24
|
var l = (32 + 2 * (b % 4) + 2 * Math.floor(c / 4) - h - c % 4) % 7, mm = Math.floor((a + 11 * h + 22 * l) / 451);
|
|
23
|
-
var easter =
|
|
25
|
+
var easter = at(Math.floor((h + l - 7 * mm + 114) / 31) - 1, (h + l - 7 * mm + 114) % 31 + 1);
|
|
24
26
|
var thanksgiving = 1 + (4 - new Date(y, 10, 1).getDay() + 7) % 7 + 21; // 4th Thursday of November
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
if (m ===
|
|
32
|
-
if (
|
|
33
|
-
|
|
27
|
+
var superbowl = at(1, 1 + (7 - new Date(y, 1, 1).getDay()) % 7 + 7); // 2nd Sunday of February
|
|
28
|
+
var day = {
|
|
29
|
+
newyear: m === 11 ? at(0, 1, y + 1) : at(0, 1), superbowl: superbowl, valentines: at(1, 14), stpatricks: at(2, 17),
|
|
30
|
+
aprilfools: at(3, 1), easter: easter, july4: at(6, 4), halloween: at(9, 31), thanksgiving: at(10, thanksgiving), christmas: at(11, 25)
|
|
31
|
+
};
|
|
32
|
+
var theme = null;
|
|
33
|
+
if ((m === 11 && d === 31) || (m === 0 && d <= 7)) theme = "newyear";
|
|
34
|
+
else if (today >= superbowl - 2 * DAY && today <= superbowl) theme = "superbowl"; // Friday to Sunday
|
|
35
|
+
else if (m === 1 && d <= 14) theme = "valentines";
|
|
36
|
+
else if (m === 2 && d >= 10 && d <= 17) theme = "stpatricks";
|
|
37
|
+
else if (m === 3 && d === 1) theme = "aprilfools";
|
|
38
|
+
else if (today >= easter - 7 * DAY && today <= easter + DAY) theme = "easter";
|
|
39
|
+
else if (m === 6 && d <= 5) theme = "july4";
|
|
40
|
+
else if ((m === 5 && d >= 15) || m === 6 || (m === 7 && d <= 10)) theme = "summer";
|
|
41
|
+
else if ((m === 7 && d >= 20) || (m === 8 && d <= 7)) theme = "backtoschool";
|
|
42
|
+
else if (m === 9) theme = "halloween";
|
|
43
|
+
else if (m === 10 && d <= thanksgiving + 1) theme = "thanksgiving";
|
|
44
|
+
else if (m === 11 && d <= 26) theme = "christmas";
|
|
45
|
+
return { theme: theme, day: day };
|
|
34
46
|
};
|
|
47
|
+
window.rugHoliday = function (now) { return calendar(now).theme; };
|
|
48
|
+
window.rugHolidayDay = function (name, now) { return calendar(now).day[name] || null; };
|
|
35
49
|
var t = s.theme === "black" || s.theme === "white" ? s.theme : window.rugHoliday() || "black";
|
|
36
50
|
document.documentElement.dataset.theme = t === "white" ? "light" : "dark";
|
|
37
|
-
if (t !== "black" && t !== "white")
|
|
38
|
-
|
|
51
|
+
if (t !== "black" && t !== "white") {
|
|
52
|
+
document.documentElement.classList.add(t, "holiday");
|
|
53
|
+
if (t !== "halloween" && t !== "christmas") document.documentElement.classList.add("fest");
|
|
54
|
+
}
|
|
55
|
+
if (s.disguise === "off") document.documentElement.classList.add("no-splash"); // no Classroom screen when the disguise is off
|
|
39
56
|
if (s.tabTitle) document.title = s.tabTitle;
|
|
40
57
|
if (s.tabIcon) document.getElementById("tab-icon").href = s.tabIcon;
|
|
41
58
|
} catch (e) {}
|
|
@@ -44,6 +61,46 @@
|
|
|
44
61
|
<body>
|
|
45
62
|
<!-- Keyboard users: first Tab stop jumps past the side bar. A button, not href="#main", since # links drive the page routing -->
|
|
46
63
|
<button class="skip-link" type="button" id="skip-link">Skip to content</button>
|
|
64
|
+
<!-- Disguise: looks like Google Classroom loading for a moment, then fades into the boot screen below (app.js) -->
|
|
65
|
+
<div class="gc-splash" id="gc-splash" aria-hidden="true">
|
|
66
|
+
<header class="gc-top">
|
|
67
|
+
<svg class="gc-ico" viewBox="0 0 24 24"><path d="M3 18h18v-2H3v2Zm0-5h18v-2H3v2Zm0-7v2h18V6H3Z"/></svg>
|
|
68
|
+
<svg class="gc-mark" viewBox="0 0 48 48"><rect x="2" y="6" width="44" height="36" rx="4" fill="#f9ab00"/><rect x="6" y="10" width="36" height="28" rx="2" fill="#0f9d58"/>
|
|
69
|
+
<circle cx="24" cy="21" r="4.2" fill="#fff"/><path d="M15.5 33c.8-4.4 4.3-7 8.5-7s7.7 2.6 8.5 7Z" fill="#fff"/>
|
|
70
|
+
<circle cx="13.5" cy="22.5" r="3" fill="#57bb8a"/><path d="M8 33c.5-3.4 2.8-5.4 5.5-5.4 1.4 0 2.6.5 3.6 1.4-1 1.1-1.7 2.5-2 4Z" fill="#57bb8a"/>
|
|
71
|
+
<circle cx="34.5" cy="22.5" r="3" fill="#57bb8a"/><path d="M40 33c-.5-3.4-2.8-5.4-5.5-5.4-1.4 0-2.6.5-3.6 1.4 1 1.1 1.7 2.5 2 4Z" fill="#57bb8a"/>
|
|
72
|
+
<rect x="27" y="38" width="13" height="3" rx="1" fill="#fff"/></svg>
|
|
73
|
+
<span class="gc-name"><span class="gc-google">Google</span> Classroom</span>
|
|
74
|
+
<span class="gc-spacer"></span>
|
|
75
|
+
<svg class="gc-ico" viewBox="0 0 24 24"><path d="M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2Z"/></svg>
|
|
76
|
+
<svg class="gc-ico" viewBox="0 0 24 24"><path d="M6 8a2 2 0 1 0 0-4 2 2 0 0 0 0 4Zm6 0a2 2 0 1 0 0-4 2 2 0 0 0 0 4Zm6 0a2 2 0 1 0 0-4 2 2 0 0 0 0 4ZM6 14a2 2 0 1 0 0-4 2 2 0 0 0 0 4Zm6 0a2 2 0 1 0 0-4 2 2 0 0 0 0 4Zm6 0a2 2 0 1 0 0-4 2 2 0 0 0 0 4ZM6 20a2 2 0 1 0 0-4 2 2 0 0 0 0 4Zm6 0a2 2 0 1 0 0-4 2 2 0 0 0 0 4Zm6 0a2 2 0 1 0 0-4 2 2 0 0 0 0 4Z"/></svg>
|
|
77
|
+
<span class="gc-me">S</span>
|
|
78
|
+
<div class="gc-bar"><div class="gc-bar-fill"></div></div>
|
|
79
|
+
</header>
|
|
80
|
+
<div class="gc-body">
|
|
81
|
+
<nav class="gc-nav">
|
|
82
|
+
<div class="gc-nav-item on"><svg viewBox="0 0 24 24"><path d="M10 20v-6h4v6h5v-8h3L12 3 2 12h3v8h5Z"/></svg>Home</div>
|
|
83
|
+
<div class="gc-nav-item"><svg viewBox="0 0 24 24"><path d="M19 4h-1V2h-2v2H8V2H6v2H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V6a2 2 0 0 0-2-2Zm0 16H5V9h14v11Z"/></svg>Calendar</div>
|
|
84
|
+
<hr>
|
|
85
|
+
<div class="gc-nav-item"><svg viewBox="0 0 24 24"><path d="M12 3 1 9l11 6 9-4.9V17h2V9L12 3Zm-7 9.2v4L12 20l7-3.8v-4L12 16l-7-3.8Z"/></svg>Enrolled</div>
|
|
86
|
+
<div class="gc-nav-item sub"><svg viewBox="0 0 24 24"><path d="M19 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V5a2 2 0 0 0-2-2Zm-9 14-5-5 1.4-1.4 3.6 3.6 7.6-7.6L19 8l-9 9Z"/></svg>To-do</div>
|
|
87
|
+
<div class="gc-nav-item sub"><i style="background:#1967d2">A</i>Algebra II</div>
|
|
88
|
+
<div class="gc-nav-item sub"><i style="background:#137333">B</i>Biology</div>
|
|
89
|
+
<div class="gc-nav-item sub"><i style="background:#e37400">E</i>English 10 Honors</div>
|
|
90
|
+
<div class="gc-nav-item sub"><i style="background:#a142f4">W</i>World History</div>
|
|
91
|
+
<div class="gc-nav-item sub"><i style="background:#c5221f">S</i>Spanish II</div>
|
|
92
|
+
<div class="gc-nav-item sub"><i style="background:#007b83">P</i>Physical Education</div>
|
|
93
|
+
</nav>
|
|
94
|
+
<main class="gc-cards">
|
|
95
|
+
<div class="gc-card" style="--c:#1967d2"><div class="gc-head"><b>Algebra II</b><span>Period 2</span><small>Mr. Daniels</small><em style="background:#5e97f6">D</em></div><div class="gc-due"><span>Due Friday</span>Unit 4 Quiz: Quadratics</div></div>
|
|
96
|
+
<div class="gc-card" style="--c:#137333"><div class="gc-head"><b>Biology</b><span>Period 4</span><small>Mrs. Okafor</small><em style="background:#33a853">O</em></div><div class="gc-due"><span>Due tomorrow</span>Cell Respiration Lab</div></div>
|
|
97
|
+
<div class="gc-card" style="--c:#e37400"><div class="gc-head"><b>English 10 Honors</b><span>Period 1</span><small>Ms. Reyes</small><em style="background:#f6ae2d">R</em></div><div class="gc-due"><span>Due Monday</span>Of Mice and Men: Ch. 3 Response</div></div>
|
|
98
|
+
<div class="gc-card" style="--c:#a142f4"><div class="gc-head"><b>World History</b><span>Period 6</span><small>Mr. Brennan</small><em style="background:#c58af9">B</em></div><div class="gc-due"><span>Due Wednesday</span>Industrial Revolution DBQ</div></div>
|
|
99
|
+
<div class="gc-card" style="--c:#c5221f"><div class="gc-head"><b>Spanish II</b><span>Period 3</span><small>Sra. Morales</small><em style="background:#ee675c">M</em></div><div class="gc-due"><span>Due Thursday</span>Vocabulario: La comida</div></div>
|
|
100
|
+
<div class="gc-card" style="--c:#007b83"><div class="gc-head"><b>Physical Education</b><span>Period 5</span><small>Coach Turner</small><em style="background:#24a1a8">T</em></div><div class="gc-due"><span>No work due soon</span></div></div>
|
|
101
|
+
</main>
|
|
102
|
+
</div>
|
|
103
|
+
</div>
|
|
47
104
|
<!-- Boot screen: shows instantly while the site checks for a newer version and loads the game list -->
|
|
48
105
|
<div class="boot" id="boot" aria-live="polite">
|
|
49
106
|
<div class="boot-inner">
|
|
@@ -124,6 +181,7 @@
|
|
|
124
181
|
<span class="sweep" aria-hidden="true"></span>
|
|
125
182
|
</form>
|
|
126
183
|
<p class="home-sub" id="home-sub"></p>
|
|
184
|
+
<p class="holiday-banner" id="holiday-banner" hidden></p>
|
|
127
185
|
<p class="online" id="online" hidden><span class="online-dot"></span><span id="online-count"></span></p>
|
|
128
186
|
<!-- bottom-left corner: bookmark chip, latest version, what's new -->
|
|
129
187
|
<div class="home-corner">
|
|
@@ -284,10 +342,34 @@
|
|
|
284
342
|
<section id="view-chat" class="view chat" hidden>
|
|
285
343
|
<header class="games-head"><div><h1>Chat</h1><p class="lede">Be nice. Swears, slurs, links and personal info are blocked. Don't post photos of real people without asking them. 🚩 reports anything bad.</p></div></header>
|
|
286
344
|
<div class="chat-box" id="chat-box">
|
|
345
|
+
<!-- Public chat, then a tab for each private room you're in, then "+ Room" -->
|
|
346
|
+
<div class="chat-tabs" id="chat-tabs" role="tablist" aria-label="Chats"></div>
|
|
287
347
|
<div class="chat-top">
|
|
288
348
|
<span class="chat-here" id="chat-here"><span class="online-dot"></span><span id="chat-here-n">Connecting…</span></span>
|
|
289
349
|
<button class="text-btn" type="button" id="chat-full-btn" title="Full-screen chat (Esc to leave)">⛶ Full screen</button>
|
|
290
350
|
</div>
|
|
351
|
+
<!-- Private rooms: this strip shows while you're in one; the panel is for hosting or joining -->
|
|
352
|
+
<div class="room-strip" id="room-strip" hidden>
|
|
353
|
+
<span>🔒 Private room <b id="room-strip-code"></b></span>
|
|
354
|
+
<button class="text-btn" type="button" id="room-copy" title="Copy the code to share it">Copy code</button>
|
|
355
|
+
<span class="room-left" id="room-strip-left"></span>
|
|
356
|
+
<span class="room-strip-btns">
|
|
357
|
+
<button class="text-btn" type="button" id="room-close" title="Close the room for everyone and delete its messages" hidden>Close room</button>
|
|
358
|
+
<button class="text-btn" type="button" id="room-leave" title="Leave this room and remove its tab">Leave</button>
|
|
359
|
+
</span>
|
|
360
|
+
</div>
|
|
361
|
+
<div class="room-panel" id="room-panel" hidden>
|
|
362
|
+
<div class="room-row">
|
|
363
|
+
<button class="pill-btn" type="button" id="room-host">Host a room</button>
|
|
364
|
+
<span class="room-or">or join one:</span>
|
|
365
|
+
<form class="room-join" id="room-join" autocomplete="off">
|
|
366
|
+
<input id="room-code" maxlength="6" placeholder="CODE" aria-label="Room code" spellcheck="false" autocapitalize="characters">
|
|
367
|
+
<button class="pill-btn" type="submit">Join</button>
|
|
368
|
+
</form>
|
|
369
|
+
</div>
|
|
370
|
+
<p class="room-msg" id="room-msg" aria-live="polite"></p>
|
|
371
|
+
<p class="room-help">Hosting gives you a code to share. Rooms close after 24 hours. The chat rules still apply, and the site owner can check any room.</p>
|
|
372
|
+
</div>
|
|
291
373
|
<div class="chat-off" id="chat-off" hidden>
|
|
292
374
|
<p><strong>Chat isn't switched on yet.</strong></p>
|
|
293
375
|
<p>It needs the site's free Firebase database (see SETUP.md).</p>
|
|
@@ -432,6 +514,9 @@
|
|
|
432
514
|
<div class="reports" id="reported-list"></div>
|
|
433
515
|
<h3 class="set-sub">Muted and banned</h3>
|
|
434
516
|
<div class="reports" id="punished-list"></div>
|
|
517
|
+
<h3 class="set-sub">Private rooms <span id="rooms-count"></span></h3>
|
|
518
|
+
<p class="set-help">Rooms people are hosting right now. Open one to read it and moderate it like the main chat.</p>
|
|
519
|
+
<div class="reports" id="rooms-list"></div>
|
|
435
520
|
</div>
|
|
436
521
|
<div id="admin-quotes" hidden>
|
|
437
522
|
<h3 class="set-sub">Quote submissions <span id="quotes-count"></span></h3>
|
package/index.svg
CHANGED
|
@@ -50,12 +50,24 @@
|
|
|
50
50
|
frame.setAttribute("allowfullscreen", "");
|
|
51
51
|
document.getElementById("root").appendChild(frame);
|
|
52
52
|
// Write the page into a blank frame so it keeps this real https:// address (games need it)
|
|
53
|
-
const
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
53
|
+
const show = (hash) => {
|
|
54
|
+
const doc = frame.contentDocument;
|
|
55
|
+
doc.open();
|
|
56
|
+
doc.write(html);
|
|
57
|
+
doc.close();
|
|
58
|
+
if (hash && hash.length > 1) frame.contentWindow.location.hash = hash;
|
|
59
|
+
frame.contentWindow.focus();
|
|
60
|
+
};
|
|
61
|
+
show(location.hash);
|
|
57
62
|
msg.remove();
|
|
58
|
-
frame
|
|
63
|
+
// If the frame ever ends up on another page (a reload, or a stray link), put the site back
|
|
64
|
+
frame.addEventListener("load", () => {
|
|
65
|
+
try {
|
|
66
|
+
const d = frame.contentDocument;
|
|
67
|
+
const hash = frame.contentWindow.location.hash;
|
|
68
|
+
if (d && !d.getElementById("view-home")) show(hash.indexOf("#play/") === 0 ? "" : hash);
|
|
69
|
+
} catch (e) {}
|
|
70
|
+
});
|
|
59
71
|
// keep the tab's name and icon in step with the site (disguise changes, game names)
|
|
60
72
|
setInterval(() => {
|
|
61
73
|
try {
|
package/package.json
CHANGED
package/style.css
CHANGED
|
@@ -50,6 +50,44 @@ button { cursor: pointer; }
|
|
|
50
50
|
kbd { font: 600 11px ui-monospace, Consolas, monospace; padding: 1px 6px; border-radius: 5px; border: 1px solid var(--line); background: var(--soft); }
|
|
51
51
|
:focus-visible { outline: 2px solid var(--text); outline-offset: 2px; }
|
|
52
52
|
|
|
53
|
+
/* ---------- "Google Classroom" loading screen (shown first, then the boot screen) ---------- */
|
|
54
|
+
/* A made-up Classroom home page: top bar, class list on the left, class cards, and the blue loading bar */
|
|
55
|
+
.gc-splash { position: fixed; inset: 0; z-index: 200; display: flex; flex-direction: column; background: #fff; color: #3c4043;
|
|
56
|
+
font: 400 14px/1.4 "Google Sans", Roboto, Arial, sans-serif; transition: opacity .3s ease, visibility .3s; overflow: hidden; }
|
|
57
|
+
.gc-splash.gone { opacity: 0; visibility: hidden; pointer-events: none; }
|
|
58
|
+
html.no-splash .gc-splash { display: none; }
|
|
59
|
+
.gc-top { position: relative; flex: none; display: flex; align-items: center; gap: 4px; height: 64px; padding: 0 16px 0 12px; border-bottom: 1px solid #e0e0e0; }
|
|
60
|
+
.gc-ico { width: 24px; height: 24px; margin: 0 8px; fill: #5f6368; }
|
|
61
|
+
.gc-mark { width: 40px; height: 40px; margin: 0 4px 0 6px; }
|
|
62
|
+
.gc-name { color: #5f6368; font-size: 22px; letter-spacing: -.01em; white-space: nowrap; }
|
|
63
|
+
.gc-google { font-weight: 500; }
|
|
64
|
+
.gc-spacer { flex: 1; }
|
|
65
|
+
.gc-me { display: grid; place-items: center; width: 32px; height: 32px; margin-left: 10px; border-radius: 50%; background: #8e24aa; color: #fff; font-size: 15px; font-weight: 500; }
|
|
66
|
+
.gc-bar { position: absolute; left: 0; right: 0; bottom: -1px; height: 4px; background: #c6dafc; overflow: hidden; }
|
|
67
|
+
.gc-bar-fill { position: absolute; top: 0; bottom: 0; left: -40%; width: 40%; background: #1a73e8; animation: gc-load 1.1s cubic-bezier(.4, 0, .2, 1) infinite; }
|
|
68
|
+
@keyframes gc-load { to { left: 100%; } }
|
|
69
|
+
.gc-body { flex: 1; display: flex; min-height: 0; }
|
|
70
|
+
.gc-nav { flex: none; width: 300px; padding: 8px 12px 8px 0; border-right: 1px solid #e0e0e0; overflow: hidden; }
|
|
71
|
+
.gc-nav hr { margin: 8px 0 8px 0; border: 0; border-top: 1px solid #e0e0e0; }
|
|
72
|
+
.gc-nav-item { display: flex; align-items: center; gap: 20px; height: 48px; padding: 0 24px; border-radius: 0 24px 24px 0; color: #3c4043; font-size: 14px; font-weight: 500; white-space: nowrap; }
|
|
73
|
+
.gc-nav-item.on { background: #e8f0fe; color: #1967d2; }
|
|
74
|
+
.gc-nav-item svg { width: 24px; height: 24px; flex: none; fill: currentColor; opacity: .85; }
|
|
75
|
+
.gc-nav-item.on svg { opacity: 1; }
|
|
76
|
+
.gc-nav-item.sub { height: 52px; padding-left: 24px; font-weight: 400; }
|
|
77
|
+
.gc-nav-item i { display: grid; place-items: center; flex: none; width: 32px; height: 32px; border-radius: 50%; color: #fff; font-style: normal; font-size: 15px; font-weight: 500; }
|
|
78
|
+
.gc-cards { flex: 1; display: flex; flex-wrap: wrap; align-content: flex-start; gap: 24px; padding: 24px; overflow: hidden; }
|
|
79
|
+
.gc-card { width: 300px; height: 296px; display: flex; flex-direction: column; border: 1px solid #dadce0; border-radius: 8px; overflow: hidden; background: #fff; }
|
|
80
|
+
.gc-head { position: relative; height: 100px; padding: 16px 16px 0; color: #fff;
|
|
81
|
+
background: radial-gradient(circle at 88% 22%, rgba(255,255,255,.16) 0 34px, transparent 35px), radial-gradient(circle at 70% 115%, rgba(255,255,255,.12) 0 52px, transparent 53px), var(--c); }
|
|
82
|
+
.gc-head b { display: block; font-size: 22px; font-weight: 400; line-height: 28px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 220px; }
|
|
83
|
+
.gc-head span { display: block; font-size: 14px; line-height: 20px; }
|
|
84
|
+
.gc-head small { display: block; margin-top: 6px; font-size: 13px; opacity: .92; }
|
|
85
|
+
.gc-head em { position: absolute; right: 16px; bottom: -36px; display: grid; place-items: center; width: 72px; height: 72px; border-radius: 50%; border: 0; color: #fff; font-style: normal; font-size: 30px; }
|
|
86
|
+
.gc-due { flex: 1; padding: 48px 16px 0; color: #3c4043; font-size: 14px; border-bottom: 1px solid #dadce0; }
|
|
87
|
+
.gc-due span { display: block; margin-bottom: 4px; color: #5f6368; font-size: 13px; }
|
|
88
|
+
@media (max-width: 960px) { .gc-nav { display: none; } }
|
|
89
|
+
@media (max-width: 560px) { .gc-top .gc-ico:not(:first-child), .gc-me { display: none; } .gc-card { width: 100%; } .gc-cards { padding: 16px; } }
|
|
90
|
+
|
|
53
91
|
/* ---------- Boot screen ---------- */
|
|
54
92
|
.boot {
|
|
55
93
|
position: fixed; inset: 0; z-index: 100; display: grid; place-items: center;
|
|
@@ -1039,7 +1077,6 @@ html.fest[data-theme="dark"] .rail-show { background: color-mix(in srgb, var(--f
|
|
|
1039
1077
|
html.fest[data-theme="dark"] .home-search { border-color: color-mix(in srgb, var(--f-a) 28%, transparent); background: color-mix(in srgb, var(--f-bg) 80%, transparent); border-radius: 8px; }
|
|
1040
1078
|
.festive { position: fixed; inset: 0 0 0 var(--rail-w); z-index: -1; overflow: hidden; pointer-events: none; display: none; }
|
|
1041
1079
|
html.fest[data-theme="dark"] .festive { display: block; }
|
|
1042
|
-
.festive-hills { position: absolute; left: 0; bottom: 0; width: 100%; height: 22vh; fill: var(--f-hill); }
|
|
1043
1080
|
.festive-prop { position: absolute; bottom: 10px; font-size: var(--s); opacity: .9; animation: prop-bob 3.2s ease-in-out infinite alternate; filter: drop-shadow(0 0 14px color-mix(in srgb, var(--f-a) 30%, transparent)); }
|
|
1044
1081
|
@keyframes prop-bob { to { transform: translateY(-5px) rotate(-3deg); } }
|
|
1045
1082
|
@media (prefers-reduced-motion: reduce) { .festive * { animation: none !important; } }
|
|
@@ -1054,3 +1091,89 @@ html.fest[data-theme="dark"] .festive { display: block; }
|
|
|
1054
1091
|
#view-games .games-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
|
|
1055
1092
|
.games-foot { display: flex; justify-content: center; margin: 28px 0 8px; }
|
|
1056
1093
|
.games-foot:empty { display: none; }
|
|
1094
|
+
|
|
1095
|
+
/* ---------- Private chat rooms ---------- */
|
|
1096
|
+
.chat-top-btns { display: inline-flex; align-items: center; gap: 14px; }
|
|
1097
|
+
.room-strip { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 14px; padding: 8px 12px; border-bottom: 1px solid var(--line); background: color-mix(in srgb, var(--glow-cyan, #22d3ee) 9%, transparent); font-size: 13px; }
|
|
1098
|
+
.room-strip b { margin-left: 4px; font-family: ui-monospace, Consolas, monospace; font-size: 15px; letter-spacing: .12em; }
|
|
1099
|
+
.room-left { color: var(--muted); font-size: 12px; }
|
|
1100
|
+
.room-strip-btns { margin-left: auto; display: inline-flex; gap: 14px; }
|
|
1101
|
+
.room-panel { padding: 12px; border-bottom: 1px solid var(--line); }
|
|
1102
|
+
.room-row, .room-join { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
|
|
1103
|
+
.room-or { color: var(--muted); font-size: 13px; }
|
|
1104
|
+
#room-code { width: 108px; height: 36px; padding: 0 10px; border-radius: 6px; border: 1px solid var(--line-2); background: var(--panel); color: var(--text); font-family: ui-monospace, Consolas, monospace; font-size: 15px; letter-spacing: .14em; text-transform: uppercase; }
|
|
1105
|
+
.room-msg { margin: 8px 0 0; min-height: 1.3em; font-size: 13px; color: var(--danger); }
|
|
1106
|
+
.room-help { margin: 2px 0 0; font-size: 12px; color: var(--muted); }
|
|
1107
|
+
.chat-log.host .chat-msg .act-delete { display: inline-block; }
|
|
1108
|
+
|
|
1109
|
+
/* ---------- Holiday themes, part 2: scenes, bunting, more holidays, touches on every page ---------- */
|
|
1110
|
+
html.superbowl { --f-bg: #07140c; --f-bg2: #030a06; --f-a: #fbbf24; --f-b: #4ade80; --f-cream: #f7fee7; --f-glow1: rgba(74, 222, 128, .12); --f-glow2: rgba(251, 191, 36, .1); --f-on: #1c1403; --f-hill: #0c2414; }
|
|
1111
|
+
html.aprilfools { --f-bg: #14101f; --f-bg2: #0a0812; --f-a: #a78bfa; --f-b: #34d399; --f-cream: #f5f3ff; --f-glow1: rgba(167, 139, 250, .15); --f-glow2: rgba(52, 211, 153, .1); --f-on: #160f2e; --f-hill: #1d1733; }
|
|
1112
|
+
html.summer { --f-bg: #0b1a2b; --f-bg2: #050d17; --f-a: #fbbf24; --f-b: #38bdf8; --f-cream: #fff7e0; --f-glow1: rgba(251, 191, 36, .14); --f-glow2: rgba(56, 189, 248, .12); --f-on: #1f1503; --f-hill: #0b1b2a; }
|
|
1113
|
+
html.backtoschool { --f-bg: #101426; --f-bg2: #070a15; --f-a: #facc15; --f-b: #f87171; --f-cream: #fefce8; --f-glow1: rgba(250, 204, 21, .12); --f-glow2: rgba(96, 165, 250, .12); --f-on: #1a1503; --f-hill: #171c33; }
|
|
1114
|
+
/* the two older themes get the same accent variables, so the shared rules below cover them too */
|
|
1115
|
+
html.halloween { --f-a: #fb923c; --f-b: #fdba74; --f-on: #170c20; }
|
|
1116
|
+
html.christmas { --f-a: #dc2626; --f-b: #22c55e; --f-on: #fff; }
|
|
1117
|
+
html.newyear { --f-emoji: "🎉"; } html.valentines { --f-emoji: "💘"; } html.stpatricks { --f-emoji: "☘️"; } html.easter { --f-emoji: "🐣"; }
|
|
1118
|
+
html.july4 { --f-emoji: "🎆"; } html.thanksgiving { --f-emoji: "🦃"; } html.superbowl { --f-emoji: "🏈"; } html.aprilfools { --f-emoji: "🤡"; }
|
|
1119
|
+
html.summer { --f-emoji: "☀️"; } html.backtoschool { --f-emoji: "✏️"; } html.halloween { --f-emoji: "🎃"; } html.christmas { --f-emoji: "🎄"; }
|
|
1120
|
+
|
|
1121
|
+
/* drawn scene along the bottom of the home page */
|
|
1122
|
+
.festive-scene { position: absolute; left: 0; bottom: 0; width: 100%; height: 30vh; overflow: visible; }
|
|
1123
|
+
.festive-scene .s-hill { fill: var(--f-hill); }
|
|
1124
|
+
.festive-scene .s-dark { fill: var(--f-hill); stroke: var(--f-hill); }
|
|
1125
|
+
.festive-scene .s-win { fill: var(--f-b); opacity: .5; }
|
|
1126
|
+
.festive-scene .s-float { transform-box: fill-box; transform-origin: 50% 100%; animation: s-float 4.5s ease-in-out infinite alternate; }
|
|
1127
|
+
@keyframes s-float { from { transform: translateY(0) rotate(-3deg); } to { transform: translateY(-9px) rotate(3deg); } }
|
|
1128
|
+
/* a string of little flags under the quote bar */
|
|
1129
|
+
.bunting { position: absolute; top: 62px; left: 0; right: 0; height: 34px; }
|
|
1130
|
+
.bunting svg { position: absolute; inset: 0; width: 100%; height: 22px; fill: none; stroke: rgba(255, 255, 255, .22); stroke-width: .4; }
|
|
1131
|
+
.bunting i { position: absolute; width: 16px; height: 18px; margin-left: -8px; background: var(--c); clip-path: polygon(0 0, 100% 0, 50% 100%); opacity: .78; transform-origin: 50% 0; animation: flag-sway 2.8s ease-in-out infinite alternate; }
|
|
1132
|
+
@keyframes flag-sway { from { transform: rotate(-7deg); } to { transform: rotate(7deg); } }
|
|
1133
|
+
/* April Fools': the scenery hangs from the ceiling and the logo is mirrored until you point at it */
|
|
1134
|
+
html.aprilfools[data-theme="dark"] .festive { transform: rotate(180deg); }
|
|
1135
|
+
html.aprilfools[data-theme="dark"] .wordmark { transform: scaleX(-1); transition: transform .35s ease; }
|
|
1136
|
+
html.aprilfools[data-theme="dark"] .wordmark:hover { transform: none; }
|
|
1137
|
+
/* "12 days until Christmas" / "Happy Halloween!" under the home page search */
|
|
1138
|
+
.holiday-banner { margin: 14px 0 0; display: inline-block; padding: 6px 14px; border-radius: 999px; font-size: 13px; font-weight: 700;
|
|
1139
|
+
color: var(--f-cream, var(--text)); background: color-mix(in srgb, var(--f-a, #fff) 14%, transparent); border: 1px solid color-mix(in srgb, var(--f-a, #fff) 35%, transparent); }
|
|
1140
|
+
.holiday-banner[hidden] { display: none; }
|
|
1141
|
+
|
|
1142
|
+
/* every other page: the holiday's accent color on the selected things, its emoji by the page title and in the corner */
|
|
1143
|
+
html.holiday[data-theme="dark"] .games-head h1::after { content: var(--f-emoji); margin-left: 12px; font-size: .62em; vertical-align: .12em; }
|
|
1144
|
+
html.holiday[data-theme="dark"] .games-head h1 { text-shadow: 0 0 34px color-mix(in srgb, var(--f-a) 30%, transparent); }
|
|
1145
|
+
html.holiday[data-theme="dark"] .tab[aria-selected="true"],
|
|
1146
|
+
html.holiday[data-theme="dark"] .trivia-opt[aria-selected="true"] { background: var(--f-a); border-color: var(--f-a); color: var(--f-on); }
|
|
1147
|
+
html.holiday[data-theme="dark"] #chat-send,
|
|
1148
|
+
html.holiday[data-theme="dark"] .pill-btn.play { background: var(--f-a); border-color: var(--f-a); color: var(--f-on); }
|
|
1149
|
+
html.holiday[data-theme="dark"] .chat-box,
|
|
1150
|
+
html.holiday[data-theme="dark"] .trivia-card,
|
|
1151
|
+
html.holiday[data-theme="dark"] .set-group { border-color: color-mix(in srgb, var(--f-a) 22%, var(--line)); }
|
|
1152
|
+
html.holiday[data-theme="dark"] .gotd { border-color: color-mix(in srgb, var(--f-a) 35%, var(--line)); }
|
|
1153
|
+
html.holiday[data-theme="dark"] .block-head h2::before { content: ""; display: inline-block; width: 8px; height: 8px; margin-right: 8px; border-radius: 50%; background: var(--f-a); vertical-align: 1px; }
|
|
1154
|
+
html.holiday[data-theme="dark"] body::after { content: var(--f-emoji); position: fixed; right: 20px; bottom: 12px; z-index: 0; font-size: 72px; line-height: 1; opacity: .16; pointer-events: none; }
|
|
1155
|
+
html.holiday[data-theme="dark"] body:has(#view-home:not([hidden]))::after,
|
|
1156
|
+
html.holiday[data-theme="dark"] body.playing::after,
|
|
1157
|
+
html.holiday[data-theme="dark"] body.chat-full::after { content: none; }
|
|
1158
|
+
@media (prefers-reduced-motion: reduce) { .bunting i, .festive-scene .s-float { animation: none !important; } }
|
|
1159
|
+
@media (max-width: 720px) {
|
|
1160
|
+
.festive-scene { height: 22vh; }
|
|
1161
|
+
.bunting i:nth-of-type(even) { display: none; }
|
|
1162
|
+
html.holiday[data-theme="dark"] body::after { display: none; }
|
|
1163
|
+
}
|
|
1164
|
+
|
|
1165
|
+
/* ---------- Chat tabs: Public, your rooms, + Room ---------- */
|
|
1166
|
+
.chat-tabs { display: flex; align-items: flex-end; gap: 2px; padding: 8px 10px 0; border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
|
|
1167
|
+
.chat-tabs::-webkit-scrollbar { display: none; }
|
|
1168
|
+
.chat-tab { position: relative; flex: none; padding: 8px 14px; border: 1px solid transparent; border-bottom: 0; border-radius: 6px 6px 0 0; background: none; color: var(--muted); font-size: 13px; font-weight: 600; cursor: pointer; }
|
|
1169
|
+
.chat-tab:hover { color: var(--text); background: var(--soft); }
|
|
1170
|
+
.chat-tab[aria-selected="true"] { color: var(--text); background: color-mix(in srgb, var(--panel) 92%, transparent); border-color: var(--line); margin-bottom: -1px; padding-bottom: 9px; }
|
|
1171
|
+
.chat-tab[data-tab]:not([data-tab="main"]) { font-family: ui-monospace, Consolas, monospace; letter-spacing: .06em; }
|
|
1172
|
+
.chat-tab.unread::after { content: ""; position: absolute; top: 6px; right: 5px; width: 7px; height: 7px; border-radius: 50%; background: var(--glow-cyan, #22d3ee); box-shadow: 0 0 6px var(--glow-cyan, #22d3ee); }
|
|
1173
|
+
.chat-tab.add { color: var(--text); }
|
|
1174
|
+
.chat-tab.add[aria-expanded="true"] { background: var(--soft); }
|
|
1175
|
+
html.holiday[data-theme="dark"] .chat-tab[aria-selected="true"] { box-shadow: inset 0 2px 0 var(--f-a); }
|
|
1176
|
+
html.holiday[data-theme="dark"] .chat-tab.unread::after, html.holiday[data-theme="dark"] .chat-tab.add { color: var(--f-a); background-color: transparent; }
|
|
1177
|
+
html.holiday[data-theme="dark"] .chat-tab.unread::after { background: var(--f-a); box-shadow: 0 0 6px var(--f-a); }
|
|
1178
|
+
/* the two little icons along the bottom of a Classroom card (your work, folder) */
|
|
1179
|
+
.gc-card::after { content: ""; flex: none; height: 52px; background: no-repeat right 14px center / 96px 24px url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 96 24' fill='%235f6368'%3E%3Cpath d='M30 4H18l-1 2h-3v2h16V6h-3l-1-2Zm-2 6H16v10c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V10Zm-7 2h2v8h-2v-8Zm4 0h2v8h-2v-8Z' opacity='0'/%3E%3Cpath d='M20 3a3 3 0 1 1 0 6 3 3 0 0 1 0-6Zm-6 15c0-3 3-5 6-5s6 2 6 5v2H14v-2Zm14-12h6v2h-6V6Zm0 4h6v2h-6v-2Zm0 4h6v2h-6v-2Z'/%3E%3Cpath d='M78 6h-8l-2-2h-6c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V8c0-1.1-.9-2-2-2Zm0 12H62V8h16v10Z'/%3E%3C/svg%3E"); }
|