Skip to content

Commit 62cd906

Browse files
committed
Improve mobile layout — fix nav wrap, tighten post list, center header
- Fix selector bug: #primary-nav ul li → li (nav items were breaking to 2 lines) - Compact post list: halved padding, dates small/grey above titles - Center header stack: logo → tagline → nav - Post page: reorder date above title via flexbox, scale title from 2.667em → 1.75em - Center tagline on mobile
1 parent 2f72bf4 commit 62cd906

2 files changed

Lines changed: 105 additions & 4 deletions

File tree

_includes/css/main-new.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

_includes/css/main-new.scss

Lines changed: 104 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -287,11 +287,112 @@ blockquote
287287
.todos ul { padding-left: 0; list-style: none;}
288288

289289
/* ==========================================================================
290-
Media Queries
291-
========================================================================== */
290+
Media Queries
291+
========================================================================== */
292292

293-
@media only screen and (min-width: 35em) {
293+
@media only screen and (max-width: 35em) {
294+
#page-header, #page-content, #page-footer {
295+
width: 92%;
296+
padding: 0;
297+
}
298+
299+
#page-header {
300+
padding: 1em 0;
301+
text-align: center;
302+
h1 {
303+
float: none;
304+
display: block;
305+
width: 100%;
306+
text-align: center;
307+
margin-bottom: 0.15em;
308+
}
309+
}
310+
311+
#subtext {
312+
float: none;
313+
text-align: center;
314+
display: block;
315+
clear: none;
316+
margin-top: 0;
317+
font-size: 0.72em;
318+
}
319+
320+
#primary-nav {
321+
float: none;
322+
text-align: center;
323+
margin-top: 0.4em;
324+
li {
325+
display: inline;
326+
margin: 0 0.6em;
327+
}
328+
}
329+
330+
.article-summary {
331+
padding: 0.8em 0;
332+
border-bottom: 1px dotted #d0d0d0;
333+
h2 {
334+
float: none;
335+
display: block;
336+
width: auto;
337+
margin: 0 0 0.15em;
338+
font-size: 0.7em;
339+
color: #999;
340+
}
341+
h1 {
342+
margin: 0;
343+
font-size: 1.35em;
344+
line-height: 1.2em;
345+
}
346+
}
294347

348+
#article-body {
349+
header {
350+
display: flex;
351+
flex-direction: column;
352+
h1 {
353+
font-size: 1.75em;
354+
order: 2;
355+
}
356+
}
357+
aside {
358+
position: static;
359+
display: block;
360+
margin: 0 0 0.5em;
361+
padding: 0;
362+
font-size: 0.8em;
363+
color: #999;
364+
order: 1;
365+
}
366+
}
367+
368+
#share, #copyright {
369+
float: none;
370+
display: block;
371+
text-align: center;
372+
}
373+
374+
pre {
375+
overflow-x: auto;
376+
-webkit-overflow-scrolling: touch;
377+
width: 100%;
378+
max-width: 100%;
379+
box-sizing: border-box;
380+
}
381+
382+
code {
383+
font-size: 0.55em;
384+
}
385+
386+
#review-tools {
387+
display: none;
388+
}
389+
}
390+
391+
@media only screen and (min-width: 35em) {
392+
#page-header, #page-content, #page-footer {
393+
width: 90%;
394+
max-width: 47.845em - 6.854em;
395+
}
295396
}
296397

297398
@media only screen and (-webkit-min-device-pixel-ratio: 1.5),

0 commit comments

Comments
 (0)