Skip to content

Commit 74d3961

Browse files
authored
Merge pull request #64 from UnicornDevCraft/responsive
Fix mobile responsiveness issues for menu and landing page (#58)
2 parents 4104901 + 3e7510d commit 74d3961

File tree

1 file changed

+81
-27
lines changed

1 file changed

+81
-27
lines changed

assets/sass/style.scss

Lines changed: 81 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ body {
3434
position: relative;
3535
padding: 0px;
3636
font-family: "Roboto", sans-serif;
37-
background-image: url("{{ "images/django-cake.png" | relURL }}");
37+
background-image: url('{{ "images/django-cake.png" | relURL }}');
3838
background-size: contain;
3939
background-repeat: no-repeat;
4040
background-position: top;
@@ -77,21 +77,37 @@ header {
7777
white-space: nowrap;
7878
}
7979

80+
a:hover, a:focus {
81+
color: $base-color-fg;
82+
text-decoration: underline;
83+
}
84+
8085
.nav-container {
8186
background-color: $theme-color-primary;
82-
margin-top: 100px;
87+
margin-top: 50px;
8388
border-width: 5px 0 5px 0;
8489
border-color: #000;
8590
border-style: solid;
86-
padding: 20px;
91+
padding: 10px;
92+
93+
@media only screen and (min-width: 800px) {
94+
margin-top: 100px;
95+
padding: 20px;
96+
}
8797
}
8898

8999
.logo-and-nav {
90100
display: flex;
91101
align-items: center;
92102
width: 100%;
93103
column-gap: 20px;
94-
font-size: 1.8em;
104+
font-size: 1.3em;
105+
106+
@media only screen and (min-width: 800px) {
107+
column-gap: 20px;
108+
font-size: 1.8em;
109+
}
110+
95111
.logo {
96112
margin: -70px 0;
97113
}
@@ -108,15 +124,14 @@ header {
108124
.logo {
109125
img {
110126
display: block;
111-
width: 150px;
112-
}
113-
}
127+
width: 100px;
128+
margin-right: -10px;
114129

115-
@media only screen and (max-width: 800px) {
116-
.logo img {
117-
margin-right: -20px; // This is empty space in the image
130+
@media screen and (min-width: 800px) {
131+
width: 150px;
132+
margin-right: -20px; // This is empty space in the image
133+
}
118134
}
119-
120135
}
121136
}
122137

@@ -132,18 +147,32 @@ header {
132147
}
133148

134149
h1 {
135-
font-size: 3.5em;
150+
font-size: 2.2em;
136151
margin: 20px 0;
152+
153+
@media only screen and (min-width: 800px) {
154+
font-size: 3.5em;
155+
}
137156
}
138157

139158
p.subtitle {
140-
font-size: 2.5em;
141-
margin-bottom: 40px;
159+
font-size: 1.5em;
160+
margin-bottom: 30px;
161+
162+
@media only screen and (min-width: 800px) {
163+
font-size: 2.5em;
164+
margin-bottom: 40px;
165+
}
142166
}
143167

144168
p.subsubtitle {
145-
font-size: 2em;
146-
margin-bottom: 40px;
169+
font-size: 1.2em;
170+
margin-bottom: 30px;
171+
172+
@media only screen and (min-width: 800px) {
173+
font-size: 2em;
174+
margin-bottom: 40px;
175+
}
147176
}
148177
}
149178

@@ -310,12 +339,32 @@ section.timeline {
310339

311340
article {
312341

313-
margin: 40px 0;
314-
font-size: 1.5em;
342+
margin: 30px 0;
343+
font-size: 1em;
344+
345+
@media only screen and (min-width: 800px) {
346+
margin: 40px 0;
347+
font-size: 1.5em;
348+
}
349+
350+
h1 {
351+
font-size: 1.3em;
352+
margin: 20px 0;
353+
354+
@media only screen and (min-width: 800px) {
355+
font-size: 2em;
356+
margin: 20px 0;
357+
}
358+
}
315359

316360
h2 {
317-
font-size: 2em;
361+
font-size: 1.5em;
318362
margin: 20px 0;
363+
364+
@media only screen and (min-width: 800px) {
365+
font-size: 2em;
366+
margin: 20px 0;
367+
}
319368
}
320369

321370
p {
@@ -344,11 +393,15 @@ article {
344393

345394
footer {
346395

347-
margin-top: 500px;
396+
margin-top: 300px;
348397
color: $base-color-fg;
349398
background: rgba(0, 0, 0, 0.8);
399+
font-size: 1em;
350400

351-
font-size: 1.4em;
401+
@media screen and (min-width: 800px) {
402+
margin-top: 500px;
403+
font-size: 1.4em;
404+
}
352405

353406
h5 {
354407
text-transform: uppercase;
@@ -394,27 +447,28 @@ footer {
394447
}
395448
}
396449
}
450+
397451
@media only screen and (max-width: 800px) {
398452
.footer-columns {
399453
display: block;
400454
padding: 0;
401455
column-gap: 0;
456+
402457
.logo {
403458
img {
404459
display: inline-block;
405460
width: 50%;
406461
}
407462
}
408-
.footer-column {
463+
464+
.footer-column {
409465
margin-top: 20px;
410466
width: auto;
411467
text-align: center;
412-
}
468+
padding: 0.5rem;
469+
}
413470
}
414-
415-
416-
}
417-
471+
}
418472
}
419473

420474
.event-table {

0 commit comments

Comments
 (0)