Skip to content

Commit aa256ae

Browse files
authored
Merge pull request #337 from ASCoding11/claude/lucid-hawking-t8pygi
Back Room: every section's game rows are even
2 parents 642d935 + 34a41e7 commit aa256ae

7 files changed

Lines changed: 228 additions & 119 deletions

File tree

‎README.md‎

Lines changed: 2 additions & 2 deletions
Large diffs are not rendered by default.

‎e63334287a3deaa3/games.css‎

Lines changed: 47 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -69,11 +69,14 @@
6969
.gs-tt p{margin:5px 0 0;color:var(--ink-2);font-size:15px;line-height:1.4}
7070
.gs-n{flex:none;align-self:center;font-family:var(--mono);font-size:12px;font-weight:600;letter-spacing:.08em;text-transform:uppercase;white-space:nowrap;color:var(--gs-c);background:color-mix(in srgb,var(--gs-c) 13%,transparent);border-radius:999px;padding:5px 12px}
7171

72-
/* ---------- the grid: 4 across on computers, 3 on small laptops, 2 on tablets and phones ---------- */
73-
.gc-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));grid-auto-rows:1fr;gap:18px}
74-
@media (max-width:959px){.gc-grid{grid-template-columns:repeat(3,minmax(0,1fr));grid-auto-rows:auto}}
75-
@media (max-width:879px){.gc-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}}
76-
@media (max-width:330px){.gc-grid{grid-template-columns:minmax(0,1fr)}}
72+
/* ---------- the grid: at most 4 across on computers, 3 on small laptops, 2 on tablets and phones ----------
73+
Even rows: layout.js counts each section's visible cards and picks how many columns it uses (--ev-cols, up to
74+
--ev-max) and which cards are wide (data-ev-w), so every row ends flush (see README: Even rows). Without it
75+
(the script not loaded yet) the grid uses --ev-max columns and the .wide / .pw cards below. */
76+
.gc-grid{--ev-max:4;display:grid;grid-template-columns:repeat(var(--ev-cols,var(--ev-max)),minmax(0,1fr));grid-auto-rows:1fr;gap:18px}
77+
@media (max-width:959px){.gc-grid{--ev-max:3;grid-auto-rows:auto}}
78+
@media (max-width:879px){.gc-grid{--ev-max:2;gap:14px}}
79+
@media (max-width:330px){.gc-grid{--ev-max:1}}
7780

7881
/* ---------- a game card ---------- */
7982
.br-games .gc{position:relative;display:flex;flex-direction:column;min-width:0;background:var(--panel);border:1px solid color-mix(in srgb,var(--line) 80%,transparent);border-radius:var(--gc-r);overflow:hidden;box-shadow:var(--gc-shadow);transition:transform .2s ease,box-shadow .2s ease,border-color .2s ease}
@@ -95,21 +98,34 @@
9598
.br-games .gc .btn.primary{width:100%;justify-content:center;min-height:42px;border-radius:11px;font-size:15px;background:var(--gs-c);border-color:var(--gs-c);color:var(--gs-ink);box-shadow:0 6px 14px -8px var(--gs-c);transition:filter .15s ease,transform .15s ease}
9699
.br-games .gc .btn.primary:active{transform:scale(.97)}
97100

98-
/* Wide cards (two columns, picture on the left) keep each section's rows full on computers, four across: Shooters has
99-
4 regular, Parkour 6 (2 wide + 4 = two rows), Arcade 5 (3 wide + 2 = two rows), Cars, Party and Puzzles
100-
4 regular too. The wide ones
101-
are each section's most played. Between 560 and 960 px a wide card takes a whole row of two, which keeps the other
102-
cards in pairs. On phones (560 px and less) only .pw cards (Coil, so the others pair up) take a
103-
whole row and the rest pair up. If a section's count changes, fix wide/pw. */
101+
/* Wide cards (two columns, picture on the left). .wide (computers and tablets) and .pw (phones) say which games the
102+
site would like big, usually each section's most played; Edit layout (layout.js) can change that per player.
103+
Those are wishes: layout.js keeps every row full, so it marks the cards that are actually wide with data-ev-w,
104+
making a card wide or small where that's what keeps the rows even. In a grid of two columns a wide card is a
105+
whole row. The .wide rules here only apply before layout.js has run (no data-ev on the grid). */
104106
@media (min-width:960px), (min-width:561px) and (max-width:879px){
105-
.br-games .gc.wide{grid-column:span 2;flex-direction:row}
106-
.br-games .gc.wide .shot{flex:0 0 52%;aspect-ratio:auto;min-height:220px;margin:7px 0 7px 7px}
107-
.br-games .gc.wide .shot img{position:absolute;inset:0}
108-
.br-games .gc.wide .body{padding:16px 18px 16px;gap:9px}
109-
.br-games .gc.wide h3{font-size:31px}
110-
.br-games .gc.wide .gc-blurb{font-size:15px;-webkit-line-clamp:4;min-height:0}
111-
.br-games .gc.wide .gc-more summary{right:auto;left:calc(52% - 31px)}
112-
.br-games .gc.wide .gc-more[open] summary{left:auto;right:15px} /* open: the info covers the whole card, so the × goes back to its corner */
107+
.br-games .gc-grid:not([data-ev]) > .gc.wide{grid-column:span 2}
108+
}
109+
.br-games .gc-grid[data-ev] > .gc[data-ev-w]{grid-column:span 2}
110+
@media (min-width:960px), (min-width:561px) and (max-width:879px){
111+
.br-games .gc-grid:not([data-ev]) > .gc.wide{flex-direction:row}
112+
.br-games .gc-grid:not([data-ev]) > .gc.wide .shot{flex:0 0 52%;aspect-ratio:auto;min-height:220px;margin:7px 0 7px 7px}
113+
.br-games .gc-grid:not([data-ev]) > .gc.wide .shot img{position:absolute;inset:0}
114+
.br-games .gc-grid:not([data-ev]) > .gc.wide .body{padding:16px 18px 16px;gap:9px}
115+
.br-games .gc-grid:not([data-ev]) > .gc.wide h3{font-size:31px}
116+
.br-games .gc-grid:not([data-ev]) > .gc.wide .gc-blurb{font-size:15px;-webkit-line-clamp:4;min-height:0}
117+
.br-games .gc-grid:not([data-ev]) > .gc.wide .gc-more summary{right:auto;left:calc(52% - 31px)}
118+
.br-games .gc-grid:not([data-ev]) > .gc.wide .gc-more[open] summary{left:auto;right:15px} /* open: the info covers the whole card, so the × goes back to its corner */
119+
}
120+
@media (min-width:561px){
121+
.br-games .gc-grid[data-ev] > .gc[data-ev-w]{flex-direction:row}
122+
.br-games .gc-grid[data-ev] > .gc[data-ev-w] .shot{flex:0 0 52%;aspect-ratio:auto;min-height:220px;margin:7px 0 7px 7px}
123+
.br-games .gc-grid[data-ev] > .gc[data-ev-w] .shot img{position:absolute;inset:0}
124+
.br-games .gc-grid[data-ev] > .gc[data-ev-w] .body{padding:16px 18px 16px;gap:9px}
125+
.br-games .gc-grid[data-ev] > .gc[data-ev-w] h3{font-size:31px}
126+
.br-games .gc-grid[data-ev] > .gc[data-ev-w] .gc-blurb{font-size:15px;-webkit-line-clamp:4;min-height:0}
127+
.br-games .gc-grid[data-ev] > .gc[data-ev-w] .gc-more summary{right:auto;left:calc(52% - 31px)}
128+
.br-games .gc-grid[data-ev] > .gc[data-ev-w] .gc-more[open] summary{left:auto;right:15px}
113129
}
114130
/* Hover and keyboard focus: lift the card, zoom and brighten the picture. */
115131
@media (hover: hover){
@@ -171,11 +187,12 @@
171187
.br-games .gc .gc-blurb{font-size:12.5px;line-height:1.35;-webkit-line-clamp:3;min-height:2.7em}
172188
.gc-chips{gap:4px}
173189
.gc-chips li{font-size:10.5px;padding:3px 7px;gap:5px}
174-
.gc:not(.pw):not(.gc-daily) .gc-chips li:nth-child(n+2){display:none}
175-
/* phones: only the first card of Puzzles, Parkour and Shooter / Action (.pw) stays a whole row; the others pair up */
176-
.br-games .gc.pw{grid-column:1 / -1}
177-
.br-games .gc.pw h3{font-size:26px}
178-
.br-games .gc.pw .gc-blurb{font-size:14px;min-height:0}
190+
.gc-grid:not([data-ev]) > .gc:not(.pw):not(.gc-daily) .gc-chips li:nth-child(n+2),
191+
.gc-grid[data-ev] > .gc:not([data-ev-w]):not(.gc-daily) .gc-chips li:nth-child(n+2){display:none}
192+
/* phones: a wide card (.pw before layout.js runs, data-ev-w after) is a whole row, picture on top; the others pair up */
193+
.br-games .gc-grid:not([data-ev]) > .gc.pw{grid-column:1 / -1}
194+
.br-games .gc-grid:not([data-ev]) > .gc.pw h3,.br-games .gc-grid[data-ev] > .gc[data-ev-w] h3{font-size:26px}
195+
.br-games .gc-grid:not([data-ev]) > .gc.pw .gc-blurb,.br-games .gc-grid[data-ev] > .gc[data-ev-w] .gc-blurb{font-size:14px;min-height:0}
179196
.gc-chips li.on::before{width:6px;height:6px}
180197
.br-games .gc .btn.primary{min-height:38px;font-size:14px;border-radius:9px;padding:6px 10px}
181198
.gc-info{padding:12px 12px 14px;font-size:13px}
@@ -197,16 +214,16 @@
197214
.pz-wrap{grid-column:1 / -1;min-width:0}
198215
/* Puzzles' rows needn't all be as tall as its game cards: the tiles take only what they need */
199216
.gs-puzzles .gc-grid{grid-auto-rows:auto}
200-
/* Shooters: four regular cards, kept in one row of four down to 880 px (where other sections drop to three); 2 x 2 below that */
201-
@media (min-width:880px) and (max-width:959px){.br-games .gs-shooters .gc-grid{grid-template-columns:repeat(4,minmax(0,1fr))}}
202217
.pz-h{display:flex;flex-wrap:wrap;align-items:baseline;gap:4px 14px;margin:2px 0 10px;font-family:var(--mono);font-size:12px;font-weight:600;letter-spacing:.08em;text-transform:uppercase;color:var(--gs-c)}
203218
/* today's progress (hidden on the home page's copy, which doesn't run the script that fills it) and the way to the Daily Puzzles page */
204219
.pz-today{color:var(--ink-2);letter-spacing:.04em;text-transform:none}
205220
.pz-h a{margin-left:auto;color:var(--gs-c);text-underline-offset:3px}
206-
.pz-grid{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:10px}
207-
@media (max-width:1100px){.pz-grid{grid-template-columns:repeat(4,minmax(0,1fr))}}
208-
@media (max-width:879px){.pz-grid{grid-template-columns:repeat(3,minmax(0,1fr))}}
209-
@media (max-width:560px){.pz-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}}
221+
/* even rows here too (layout.js): with a search on, fewer tiles share the row or one or two tiles stretch */
222+
.pz-grid{--ev-max:6;display:grid;grid-template-columns:repeat(var(--ev-cols,var(--ev-max)),minmax(0,1fr));gap:10px}
223+
@media (max-width:1100px){.pz-grid{--ev-max:4}}
224+
@media (max-width:879px){.pz-grid{--ev-max:3}}
225+
@media (max-width:560px){.pz-grid{--ev-max:2;gap:8px}}
226+
.pz-grid[data-ev] > .pz[data-ev-w]{grid-column:span 2}
210227
.br-games .pz{min-width:0;margin:0}
211228
.br-games .pz a{display:flex;align-items:center;gap:9px;height:100%;min-height:58px;padding:6px 8px 6px 6px;border-radius:12px;text-decoration:none;color:var(--ink);background:var(--panel);border:1px solid color-mix(in srgb,var(--line) 80%,transparent);box-shadow:var(--gc-shadow);transition:transform .15s ease,border-color .15s ease}
212229
.br-games .pz img{flex:none;width:58px;height:44px;border-radius:8px;object-fit:cover;background:var(--tape)}

‎e63334287a3deaa3/holiday.js‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@
4949
'html.tv-on h1{font-size:clamp(22px,4.6vw,50px)!important;line-height:1.25!important}'+
5050
'html.tv-on h2{font-size:clamp(13px,1.9vw,19px)!important;line-height:1.35!important}'+
5151
'html.tv-on h3{font-size:12px!important;line-height:1.4!important}'+
52-
'html.tv-on .br-games .gc.wide h3,html.tv-on .br-games .gc-daily h3{font-size:15px!important}'+
52+
'html.tv-on .br-games .gc-grid:not([data-ev]) > .gc.wide h3,html.tv-on .br-games .gc[data-ev-w] h3,html.tv-on .br-games .gc-daily h3{font-size:15px!important}'+
5353
'html.tv-on .br-games .pz h3{font-family:"Pixelify Sans",monospace!important;font-size:11px!important;text-transform:uppercase}'+
5454
'html.tv-on .gs-nb b{font-family:"Press Start 2P",monospace;font-size:11px;letter-spacing:0}'+
5555
'@media (max-width:719px){html.tv-on .gs-nb b{font-family:"Pixelify Sans",sans-serif;font-size:12px}html.tv-on #lists .tile strong{font-size:17px}}'+

‎e63334287a3deaa3/index.html‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ <h1>The Back Room</h1>
5555
<a class="gs-nb gs-parkour" href="#gs-parkour" data-go="gs-parkour"><svg viewBox="0 0 24 24" width="20" height="20" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><circle cx="15.5" cy="4.5" r="2"/><path d="M9.5 9.2l4.2-1.7 2.6 3.6 3 1.2"/><path d="M13.7 7.5l-2.2 6.3 3.6 2.6-.9 5.1"/><path d="M11.5 13.8l-3.3 2.4-3.4-.9"/><path d="M9.5 9.2L7 12"/></svg><b>Parkour</b><small>8 games</small></a>
5656
<a class="gs-nb gs-partygames" href="#gs-partygames" data-go="gs-partygames"><svg viewBox="0 0 24 24" width="20" height="20" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><circle cx="9" cy="8" r="3.2"/><path d="M3 19c0-3.3 2.7-5.6 6-5.6s6 2.3 6 5.6"/><circle cx="17" cy="9" r="2.6"/><path d="M15.8 13.6c2.9-.3 5.2 1.7 5.2 4.6"/></svg><b>Party</b><small>5 games</small></a>
5757
<a class="gs-nb gs-puzzles" href="#gs-puzzles" data-go="gs-puzzles"><svg viewBox="0 0 24 24" width="20" height="20" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M6 11h3V8a2 2 0 1 1 4 0v3h3v3a2 2 0 1 0 0 4v2H6v-3a2 2 0 1 0 0-4z"/></svg><b>Puzzles</b><small>12 puzzles</small></a>
58-
<a class="gs-nb gs-arcade" href="#gs-arcade" data-go="gs-arcade"><svg viewBox="0 0 24 24" width="20" height="20" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M7 7h10a5 5 0 0 1 5 5v1a4 4 0 0 1-7.2 2.4L14 14h-4l-.8 1.4A4 4 0 0 1 2 13v-1a5 5 0 0 1 5-5z"/><path d="M7 10v3M5.5 11.5h3"/><circle cx="16" cy="10.6" r=".9"/><circle cx="18" cy="12.6" r=".9"/></svg><b>Arcade</b><small>7 games</small></a>
58+
<a class="gs-nb gs-arcade" href="#gs-arcade" data-go="gs-arcade"><svg viewBox="0 0 24 24" width="20" height="20" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M7 7h10a5 5 0 0 1 5 5v1a4 4 0 0 1-7.2 2.4L14 14h-4l-.8 1.4A4 4 0 0 1 2 13v-1a5 5 0 0 1 5-5z"/><path d="M7 10v3M5.5 11.5h3"/><circle cx="16" cy="10.6" r=".9"/><circle cx="18" cy="12.6" r=".9"/></svg><b>Arcade</b><small>9 games</small></a>
5959
</nav>
6060
<section class="gs gs-cars" aria-labelledby="gs-cars">
6161
<div class="gs-head">
@@ -1142,6 +1142,10 @@ <h3>Leaf Sweep</h3>
11421142
</details>
11431143
<div class="actions">
11441144
<a class="btn primary" href="/e63334287a3deaa3/windrow/">▶ Play</a>
1145+
</div>
1146+
</div>
1147+
</article>
1148+
<article class="project gc">
11451149
<a class="shot" href="/e63334287a3deaa3/ebbwork/" aria-label="Open Flood Crew" tabindex="-1">
11461150
<img src="/e63334287a3deaa3/ebbwork/preview.jpg" alt="Flood Crew in play, seen through the player's eyes in a flooded back yard in low evening sun: brown flood water lies over the paving with the brick house, its windows and the sky mirrored in it, and a pale line where the water meets the ground. A copper pipe runs along the house wall, autumn trees and a wooden fence stand behind, and a rake is held out in gloved hands. A single bar at the top reads 85% water left, and one line at the bottom says Find the drain under the leaves." width="1920" height="1200" loading="lazy">
11471151
<span class="gc-genre"><b style="margin:0 6px 0 -4px;padding:1px 6px;border-radius:999px;background:#2f8f9a;color:#fff;font-weight:700">New</b>Flood sim</span>

0 commit comments

Comments
 (0)