Skip to content

Commit 3b60ea7

Browse files
authored
Merge pull request #349 from ASCoding11/claude/phone-header-fit
Phone page: header no longer squeezed or overlapping
2 parents 1f13639 + 1935de0 commit 3b60ea7

2 files changed

Lines changed: 28 additions & 5 deletions

File tree

‎e63334287a3deaa3/m/index.html‎

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -69,8 +69,13 @@
6969
body{padding:calc(18px + env(safe-area-inset-top,0px)) calc(16px + env(safe-area-inset-right,0px)) calc(28px + env(safe-area-inset-bottom,0px)) calc(16px + env(safe-area-inset-left,0px))}
7070
.wrap{max-width:760px;margin:0 auto}
7171
header{display:flex;flex-wrap:wrap;align-items:flex-end;justify-content:space-between;gap:0 12px;margin-bottom:18px}
72-
/* the title takes the room left of the Main site link, and the Turkey Week switch gets a line of its own under them (no height while it is hidden) */
73-
header>div:first-child{flex:1 1 0;min-width:0}
72+
/* the title takes the room left of the theme, language and Main site buttons (.hbtns), but never less than 264px, enough
73+
for "ASCoding" on a line and the count line in at most two lines; where that room isn't there (a phone held upright)
74+
the title gets a line of its own and the buttons go on the next line, under it on the left, wrapping if even they
75+
don't fit on one line (their margin-top only shows then: next to the title, the title is taller).
76+
The Turkey Week switch gets a line of its own under them (no height while it is hidden) */
77+
header>div:first-child{flex:1 1 0;min-width:min(100%,264px)}
78+
header>.hbtns{display:flex;flex-wrap:wrap;align-items:flex-end;gap:10px 12px;margin-top:12px}
7479
header>.tkrow{flex:0 0 100%;order:1}
7580
header>[data-school]{flex:0 0 100%;order:2;max-width:none}
7681
h1{font-family:var(--f-d);font-weight:800;font-size:44px;line-height:.9;letter-spacing:.01em;margin:0;text-transform:uppercase}
@@ -152,9 +157,12 @@
152157
<h1><span data-door>ASC</span>oding <span>games</span></h1>
153158
<p class="count" id="count"></p>
154159
</div>
155-
<div data-theme-switch></div> <!-- Auto / Light / Dark (theme.js fills it in) -->
156-
<div data-lang-toggle></div> <!-- English / Español (lang.js fills it in) -->
157-
<a class="full" href="/" target="_top">Main site</a>
160+
<!-- The buttons, kept together: right of the title when there is room, else on a line of their own under it -->
161+
<div class="hbtns">
162+
<div data-theme-switch></div> <!-- Auto / Light / Dark (theme.js fills it in) -->
163+
<div data-lang-toggle></div> <!-- English / Español (lang.js fills it in) -->
164+
<a class="full" href="/" target="_top">Main site</a>
165+
</div>
158166
<!-- The one Turkey Week switch for every game (events.js fills it in and shows it only during the event; see README). It is inside the header so the panels other scripts add under the header come after it. -->
159167
<div class="tkrow"><button type="button" data-turkey-switch hidden></button></div>
160168
<!-- Your school (school.js fills it in; see README). Inside the header too, so the panels added under the header come after it. -->
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{
2+
"kind": "fix",
3+
"title": "Tidier top of the phone page",
4+
"tags": ["Phone"],
5+
"items": [
6+
"On a phone held upright, the games count now sits right under the ASCoding Games title on one or two lines, instead of in a thin column with one word per line.",
7+
"The theme, language and Main site buttons now go on their own line under the title, so nothing at the top overlaps any more, in English or Spanish."
8+
],
9+
"es": {
10+
"Tidier top of the phone page": "La parte de arriba de la página para teléfonos, más ordenada",
11+
"Phone": "Teléfono",
12+
"On a phone held upright, the games count now sits right under the ASCoding Games title on one or two lines, instead of in a thin column with one word per line.": "Con el teléfono en vertical, el número de juegos ahora aparece justo debajo del título ASCoding Juegos en una o dos líneas, en vez de en una columna estrecha con una palabra por línea.",
13+
"The theme, language and Main site buttons now go on their own line under the title, so nothing at the top overlaps any more, in English or Spanish.": "Los botones de tema, idioma y Sitio principal ahora van en su propia línea debajo del título, así que ya nada se encima en la parte de arriba, en inglés o en español."
14+
}
15+
}

0 commit comments

Comments
 (0)