Skip to content

Commit 6e08599

Browse files
authored
Merge pull request #102 from Lemoncode/#90--Add-responsive-design-for-app-and-static-pages
#90 add responsive design for app and static pages
2 parents c60f4c1 + 8fb0c98 commit 6e08599

2 files changed

Lines changed: 158 additions & 37 deletions

File tree

‎front/static/index.html‎

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -85,16 +85,16 @@ <h3 class="instructions__subtitle">How does it work?</h3>
8585
</div>
8686
<!-- / video / -->
8787
<section class="box-content border-bottom">
88-
<div>
88+
<div class="video-section-container">
8989
<h2 class="heading">Video tutorial</h2>
90-
<iframe
91-
width="720"
92-
height="405"
93-
src="https://www.youtube.com/embed/4sswp02n0Yg"
94-
frameborder="0"
95-
allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture"
96-
allowfullscreen
97-
></iframe>
90+
<div class="video-container">
91+
<iframe
92+
src="https://www.youtube.com/embed/4sswp02n0Yg"
93+
frameborder="0"
94+
allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture"
95+
allowfullscreen
96+
></iframe>
97+
</div>
9898
</div>
9999
</section>
100100

‎front/static/styles.css‎

Lines changed: 149 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,12 @@ ul {
7373
background-color: var(--color-grey-light);
7474
}
7575

76+
@media only screen and (max-width: 770px) {
77+
.container {
78+
width: 100%;
79+
}
80+
}
81+
7682
.container p,
7783
.container h3 {
7884
margin-bottom: 1.5rem;
@@ -96,15 +102,17 @@ ul {
96102
}
97103

98104
.navbar__logo {
99-
height: 6rem;
105+
min-height: 6rem;
106+
max-width: 17.5rem;
100107
margin-top: 0.6rem;
101-
margin-left: -2.4rem;
108+
margin-left: 3.8rem;
102109
fill: var(--color-dark);
103110
}
104111

105112
.navbar__list {
106113
display: flex;
107114
margin-left: auto;
115+
margin-right: none;
108116
justify-content: space-between;
109117
align-items: center;
110118
}
@@ -121,7 +129,6 @@ ul {
121129
font-weight: 300;
122130
text-transform: capitalize;
123131
letter-spacing: 1px;
124-
border: none;
125132
color: var(--color-alert);
126133
background-color: transparent;
127134
border: 2px solid var(--color-alert);
@@ -174,26 +181,85 @@ ul {
174181
}
175182

176183
@media only screen and (max-width: 770px) {
177-
.navbar__list__item:first-of-type {
178-
display: none;
184+
.navbar {
185+
background-image: none;
186+
background-color: var(--color-light);
179187
}
180188
}
181189

182-
@media only screen and (max-width: 578px) {
190+
@media only screen and (max-width: 728px) {
183191
.navbar {
184-
background-image: none;
185-
background-color: var(--color-light);
192+
flex-direction: column;
193+
align-items: center;
194+
justify-content: center;
195+
align-content: center;
196+
height: auto;
197+
}
198+
199+
.navbar__logo {
200+
height: 3rem;
201+
margin-left: 0;
202+
margin-top: 2rem;
203+
margin-bottom: 2rem;
204+
}
205+
206+
.navbar__list {
207+
margin-right: auto;
208+
margin-bottom: 2rem;
209+
}
210+
211+
.navbar__list__item:first-of-type {
212+
display: inline-block;
213+
}
214+
215+
.navbar__cta-button {
216+
padding: 0.5rem 1.2rem;
217+
color: var(--color-light);
218+
background-color: var(--color-alert);
219+
border: none;
220+
}
221+
222+
.navbar__cta-button:hover,
223+
.navbar__cta-button:active {
224+
background-color: var(--color-dark);
225+
}
226+
227+
.navbar__cta-button__icon {
228+
fill: var(--color-light);
229+
}
230+
231+
.navbar__list__item:last-of-type {
232+
margin-right: 0;
233+
}
234+
235+
.navbar__list__item:last-of-type a {
236+
margin-right: 0;
186237
}
187238
}
188239

189240
/* - - - - - top - - - - - */
190241
.top-container {
191242
display: flex;
192243
align-items: center;
193-
height: calc(100vh - 8.7rem);
244+
min-height: calc(100vh - 8.7rem);
194245
margin-top: 8.8rem;
195246
}
196247

248+
@media only screen and (max-width: 1250px) {
249+
.top-container {
250+
height: max-content;
251+
margin-top: 14rem;
252+
padding-bottom: 12rem;
253+
}
254+
}
255+
256+
@media only screen and (max-width: 728px) {
257+
.top-container {
258+
margin-top: 6rem;
259+
padding-bottom: 0rem;
260+
}
261+
}
262+
197263
/* - - - - - top - main button - - - - -*/
198264
.cta-button-container {
199265
display: flex;
@@ -238,6 +304,15 @@ ul {
238304
fill: var(--color-light);
239305
}
240306

307+
@media only screen and (max-width: 1250px) {
308+
.cta-button-container {
309+
display: none;
310+
}
311+
.cta-button {
312+
display: none;
313+
}
314+
}
315+
241316
/* - - - - - top - instructions - - - - - */
242317
.instructions-container {
243318
display: flex;
@@ -250,7 +325,7 @@ ul {
250325
width: 65%;
251326
margin-left: auto;
252327
padding: 3rem;
253-
border: 2px solid #ccc;
328+
border: 2px solid var(--color-grey-medium);
254329
}
255330

256331
.instructions__title {
@@ -295,6 +370,47 @@ ul {
295370
.instructions-container {
296371
width: 100%;
297372
}
373+
374+
.instructions {
375+
border: none;
376+
border-top: 2px solid var(--color-grey-medium);
377+
border-bottom: 2px solid var(--color-grey-medium);
378+
}
379+
}
380+
381+
@media only screen and (max-width: 728px) {
382+
.instructions {
383+
border: none;
384+
}
385+
}
386+
387+
/* - - - - - video - - - - - */
388+
.video-section-container {
389+
width: 70%;
390+
}
391+
392+
.video-container {
393+
position: relative;
394+
padding-bottom: 56.25%;
395+
padding-top: 30px;
396+
height: 0;
397+
overflow: hidden;
398+
}
399+
400+
.video-container iframe,
401+
.video-container object,
402+
.video-container embed {
403+
position: absolute;
404+
top: 0;
405+
left: 0;
406+
width: 100%;
407+
height: 100%;
408+
}
409+
410+
@media only screen and (max-width: 770px) {
411+
.video-section-container {
412+
width: 100%;
413+
}
298414
}
299415

300416
/* - - - - - credits - - - - - */
@@ -392,23 +508,22 @@ form textarea {
392508
display: flex;
393509
flex-direction: column;
394510
justify-content: space-between;
395-
height: 300px;
396-
padding: 20px 100px;
511+
height: 30rem;
512+
padding: 2rem 10rem;
397513
background-color: var(--color-dark);
398514
}
399515

400516
.footer__top-container {
401-
padding: 0 20px;
517+
padding: 0 2rem;
402518
display: flex;
403519
justify-content: space-between;
404-
height: 195px;
520+
height: 19.5rem;
405521
align-items: center;
406522
}
407523

408524
.footer__logo {
409-
height: 100px;
410-
width: 112px;
411-
/* margin-right: -95px; */
525+
height: 10rem;
526+
width: 11.2rem;
412527
}
413528

414529
.footer__list {
@@ -417,11 +532,11 @@ form textarea {
417532
list-style: none;
418533
}
419534
.footer__list__item {
420-
margin-top: 10px;
535+
margin-top: 1rem;
421536
}
422537

423538
.footer__list__item a {
424-
font-size: 17px;
539+
font-size: 1.7rem;
425540
color: var(--color-grey-light);
426541
text-decoration: none;
427542
font-weight: 300;
@@ -436,13 +551,13 @@ form textarea {
436551
justify-content: space-between;
437552
align-items: center;
438553
border-top: 1px solid #d9d900;
439-
padding-top: 10px;
554+
padding-top: 1rem;
440555
}
441556

442557
.footer__copyright {
443558
color: var(--color-grey-light);
444559
font-weight: 300;
445-
font-size: 14px;
560+
font-size: 1.4rem;
446561
}
447562

448563
.footer--logo-lemon-container:hover .footer--logo-lemon {
@@ -471,8 +586,8 @@ form textarea {
471586
}
472587

473588
.footer__icon {
474-
height: 24px;
475-
width: 24px;
589+
height: 2.4rem;
590+
width: 2.4rem;
476591
fill: var(--color-grey-light);
477592
}
478593

@@ -481,14 +596,20 @@ form textarea {
481596
}
482597

483598
.footer__icon-twitter {
484-
height: 35px;
485-
width: 35px;
486-
margin-top: 2px;
487-
margin-right: -6px;
488-
margin-left: -6px;
599+
height: 3.5rem;
600+
width: 3.5rem;
601+
margin-top: 0.2rem;
602+
margin-right: -0.6rem;
603+
margin-left: -0.6rem;
489604
fill: var(--color-grey-light);
490605
}
491606

492607
.footer__icon-twitter:hover {
493608
fill: var(--color-primary-main);
494609
}
610+
611+
@media only screen and (max-width: 578px) {
612+
.footer {
613+
padding: 2rem 2rem;
614+
}
615+
}

0 commit comments

Comments
 (0)