|
69 | 69 | 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))} |
70 | 70 | .wrap{max-width:760px;margin:0 auto} |
71 | 71 | 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} |
74 | 79 | header>.tkrow{flex:0 0 100%;order:1} |
75 | 80 | header>[data-school]{flex:0 0 100%;order:2;max-width:none} |
76 | 81 | h1{font-family:var(--f-d);font-weight:800;font-size:44px;line-height:.9;letter-spacing:.01em;margin:0;text-transform:uppercase} |
|
152 | 157 | <h1><span data-door>ASC</span>oding <span>games</span></h1> |
153 | 158 | <p class="count" id="count"></p> |
154 | 159 | </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> |
158 | 166 | <!-- 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. --> |
159 | 167 | <div class="tkrow"><button type="button" data-turkey-switch hidden></button></div> |
160 | 168 | <!-- Your school (school.js fills it in; see README). Inside the header too, so the panels added under the header come after it. --> |
|
0 commit comments