Skip to content

Commit 6f31c04

Browse files
Merge pull request #320 from jenweber/mobile-friendlier
Mobile friendlier header, footer, and code blocks
2 parents 61339a8 + e2031b1 commit 6f31c04

File tree

8 files changed

+29
-37
lines changed

8 files changed

+29
-37
lines changed

app/styles/app.scss

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,10 @@ body {
1212
width: 100%;
1313
}
1414

15-
.header {
16-
z-index: 2;
17-
}
18-
@include media($medium-large-screen-up) {
15+
@include media($large-screen-up) {
1916
.header {
2017
top: 0;
2118
width: 100%;
22-
position: fixed;
2319
}
2420

2521
main.container {
@@ -29,7 +25,6 @@ body {
2925
main.container .content {
3026
position: relative;
3127
margin-right: 0;
32-
margin-top: $top-spacing;
3328
margin-bottom: 0;
3429
overflow:auto;
3530
padding: $base-spacing;

app/styles/components/_article.scss

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,6 @@ article {
9393
@media (max-width: $medium-screen) {
9494
table {
9595
td,th {
96-
display: block;
9796
border: 0;
9897
}
9998

app/styles/components/_footer.scss

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@
1414
border-bottom: none;
1515
}
1616

17-
@media screen and (max-width: 53.75rem) {
18-
.responsive .footer .container {
17+
@media screen and (max-width: $medium-screen) {
18+
.responsive.footer .container {
1919
padding: 2rem 1rem;
2020

2121
.footer-info {
@@ -60,8 +60,8 @@
6060
display: flex
6161
}
6262

63-
@media screen and (max-width: 53.75rem) {
64-
.responsive .footer .container {
63+
@media screen and (max-width: $large-screen) {
64+
.responsive.footer .container {
6565
text-align: center;
6666
display: block;
6767
}
@@ -82,16 +82,16 @@
8282
text-align: left
8383
}
8484

85-
@media screen and (max-width: 53.75rem) {
86-
.responsive .footer .footer-info {
85+
@media screen and (max-width: $large-screen) {
86+
.responsive.footer .footer-info {
8787
text-align: center;
8888
}
8989

90-
.responsive .footer .footer-statement {
90+
.responsive.footer .footer-statement {
9191
text-align: center;
9292
}
9393

94-
.responsive .footer .footer-tagline {
94+
.responsive.footer .footer-tagline {
9595
padding-left: 2em;
9696
padding-right: 2em;
9797
}
@@ -130,7 +130,7 @@
130130
max-height: 45px;
131131
}
132132

133-
@media screen and (min-width: 53.75rem) {
133+
@media screen and (min-width: $large-screen) {
134134
.footer .footer-contributions {
135135
display: flex;
136136
flex:0 0 21em;
@@ -152,7 +152,7 @@
152152
}
153153
}
154154

155-
@media screen and (max-width: 53.75rem) {
155+
@media screen and (max-width: $large-screen) {
156156
.footer .footer-social a:first-child {
157157
margin-left: 0;
158158
}

app/styles/components/_header.scss

Lines changed: 12 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,8 @@ $white: white;
4343
display: -webkit-flex;
4444
}
4545

46-
@media screen and (max-width: 53.75rem) {
47-
.responsive .header .container {
46+
@media screen and (max-width: $large-screen) {
47+
.responsive.header .container {
4848
display: block;
4949
}
5050
}
@@ -55,8 +55,8 @@ $white: white;
5555
justify-content: space-between;
5656
height: 2.8rem;
5757
}
58-
@media screen and (max-width: 53.75rem) {
59-
.responsive .header .header-nav {
58+
@media screen and (max-width: $large-screen) {
59+
.responsive.header .header-nav {
6060
height: auto;
6161
}
6262
}
@@ -69,8 +69,8 @@ $white: white;
6969
width: 100%;
7070
}
7171

72-
@media screen and (max-width: 53.75rem) {
73-
.responsive .header a {
72+
@media screen and (max-width: $large-screen) {
73+
.responsive.header a {
7474
line-height: 24px; //do we need this
7575
}
7676
}
@@ -90,12 +90,12 @@ $white: white;
9090
text-align: center;
9191
}
9292

93-
@media screen and (max-width: 53.75em) {
93+
@media screen and (max-width: $large-screen) {
9494
.responsive .header-nav li {
9595
display: inherit;
9696
}
9797
}
98-
@media screen and (max-width: 53.75em) {
98+
@media screen and (max-width: $large-screen) {
9999
.responsive .header-nav li:not(.header-logo):not(.header-search) {
100100
width: 32%;
101101
display: inline-block;
@@ -106,8 +106,6 @@ $white: white;
106106
.header-nav li:not(.header-logo):not(.header-search) {
107107
width: auto;
108108
}
109-
@media screen and (min-width: 53.75rem) {
110-
}
111109

112110
.header-nav .header-logo {
113111
-webkit-box-flex: 1.5;
@@ -119,7 +117,7 @@ $white: white;
119117
flex: 1.5 0 0;
120118
}
121119

122-
@media screen and (min-width: 53.75rem) {
120+
@media screen and (min-width: $large-screen) {
123121
}
124122

125123
.header-nav .header-search {
@@ -132,7 +130,7 @@ $white: white;
132130
flex: 2 0 0;
133131
}
134132

135-
@media screen and (max-width: 53.75rem) {
133+
@media screen and (max-width: $large-screen) {
136134
.responsive .header-nav .header-search {
137135
display: block;
138136
}
@@ -147,7 +145,7 @@ $white: white;
147145
display: block;
148146
}
149147

150-
@media screen and (max-width: 53.75rem) {
148+
@media screen and (max-width: $large-screen) {
151149
.responsive .header-logo a {
152150
margin: 0 auto;
153151
}
@@ -193,7 +191,7 @@ $white: white;
193191
color: white;
194192
}
195193
}
196-
@media screen and (max-width: 53.75rem) {
194+
@media screen and (max-width: $large-screen) {
197195
.responsive .header-search {
198196
margin-left: 0;
199197
}

app/styles/components/_highlight.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@
4242
margin: 0;
4343
table-layout: auto;
4444
width: 100%;
45+
z-index: auto;
4546

4647
tr,
4748
th,

app/styles/components/_sidebar.scss

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,14 @@
55
z-index: 1;
66
padding: $small-spacing 0;
77

8-
@include media($medium-large-screen-up) {
8+
@include media($large-screen-up) {
99
// fixed sidebar, full height
1010
@include span-columns(3.5);
1111
margin-right: 0;
1212
width: 19em;
1313
border-bottom: 0;
1414
border-right: $base-border;
1515
padding: $small-spacing $base-spacing $base-spacing * 1.5;
16-
margin-top: 5em;
1716

1817
&::before {
1918
@include position(absolute, 0 0 0 -100vw);

app/templates/application.hbs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<header class="header">
1+
<header class="header responsive">
22
<nav role="navigation" aria-label="main">
33
<ul class="header-nav container">
44
<li class="header-logo">
@@ -20,4 +20,4 @@
2020
<main class="container">
2121
{{outlet}}
2222
</main>
23-
{{main-footer}}
23+
{{main-footer}}

app/templates/components/main-footer.hbs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<div class="footer">
1+
<div class="footer responsive">
22
<div class="container">
33
<div class="footer-info">
44
Copyright {{currentYear}}
@@ -42,4 +42,4 @@
4242
</div>
4343

4444
</div>
45-
</div>
45+
</div>

0 commit comments

Comments
 (0)