Skip to content

Commit 74782c1

Browse files
authored
Chore: Fix layout issues on narrow screens (konveyor#65)
* Chore: Fix layout issues on narrow screens Signed-off-by: thisisobate <obasiuche62@gmail.com> * chore: nit fix Signed-off-by: thisisobate <obasiuche62@gmail.com> * chore: nit fix 2 Signed-off-by: thisisobate <obasiuche62@gmail.com> * chore: add top margin to privacy policy doc Signed-off-by: thisisobate <obasiuche62@gmail.com> --------- Signed-off-by: thisisobate <obasiuche62@gmail.com>
1 parent cc01eef commit 74782c1

File tree

3 files changed

+54
-15
lines changed

3 files changed

+54
-15
lines changed

assets/scss/_styles_project.scss

Lines changed: 50 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -113,12 +113,22 @@
113113
display: flex;
114114
justify-content: space-between;
115115
align-items: center;
116+
@include media-breakpoint-down(sm) {
117+
flex-direction: column;
118+
align-items: center;
119+
}
116120
}
117121

118122
.text-center {
119123
text-align: center;
120124
}
121125

126+
.text-center--mobile {
127+
@include media-breakpoint-down(lg) {
128+
text-align: center;
129+
}
130+
}
131+
122132
.line-height-1 {
123133
line-height: 1;
124134
}
@@ -251,7 +261,7 @@
251261
.max-w-400px {
252262
max-width: 400px;
253263
@include media-breakpoint-down(lg) {
254-
width: 80%;
264+
max-width: 100%;
255265
}
256266
}
257267

@@ -287,12 +297,19 @@
287297
gap: 4rem;
288298
}
289299

300+
.gap-3xl--mobile {
301+
@include media-breakpoint-down(lg) {
302+
gap: 6rem;
303+
}
304+
}
305+
290306
.feature-image {
291307
width: 500px;
292308
height: 300px;
293309
@include media-breakpoint-down(lg) {
294-
width: 80%;
310+
width: 100%;
295311
height: auto;
312+
padding-bottom: 1rem;
296313
}
297314
img {
298315
width: 100%;
@@ -303,17 +320,20 @@
303320

304321
.cncf-banner {
305322
max-width: fit-content;
306-
padding: 2rem 7rem 1rem 7rem;
323+
padding: 2rem 7rem;
307324
background-color: #AC945D;
308325
color: #fff;
309326
margin: 0 auto;
327+
text-align: center;
310328
border-radius: 10px;
311329
@include media-breakpoint-down(md) {
312330
padding: 1rem 2rem;
331+
max-width: 100%;
313332
}
314333

315334
& p {
316335
font-size: 1.5rem;
336+
margin-bottom: 0px;
317337
@include media-breakpoint-down(md) {
318338
font-size: 1rem;
319339
}
@@ -322,10 +342,15 @@
322342

323343
.cncf-banner-image {
324344
padding: 0 1rem;
345+
@include media-breakpoint-down(md) {
346+
display: flex;
347+
justify-content: center;
348+
padding: 0.5rem;
349+
}
325350
img {
326351
width: 300px;
327352
@include media-breakpoint-down(md) {
328-
width: 150px;
353+
width: 200px;
329354
}
330355
}
331356
}
@@ -450,6 +475,9 @@
450475
.cta-group {
451476
display: flex;
452477
gap: 0.5rem;
478+
@include media-breakpoint-down(lg) {
479+
justify-content: center;
480+
}
453481
@media (max-width: 400px) {
454482
flex-direction: column;
455483
}
@@ -484,15 +512,16 @@
484512
}
485513
}
486514

487-
.sub-menu {
488-
@include media-breakpoint-down(sm) {
489-
margin-right: 55px;
490-
}
491-
}
492-
493515
.td-navbar .navbar-nav {
494516
@include media-breakpoint-down(lg) {
495-
padding-bottom: 3rem;
517+
position: absolute;
518+
left: 0;
519+
right: 0;
520+
margin-inline: auto;
521+
width: fit-content;
522+
z-index: 10000;
523+
overflow-x: unset;
524+
font-size: 0.8rem;
496525
}
497526
}
498527

@@ -502,6 +531,12 @@
502531
}
503532
}
504533

534+
.td-sidebar {
535+
@include media-breakpoint-down(lg) {
536+
padding-top: 1rem;
537+
}
538+
}
539+
505540
.fancy {
506541
line-height: 0.5;
507542
text-align: center;
@@ -545,4 +580,8 @@
545580
@include media-breakpoint-down(md) {
546581
display: none;
547582
}
583+
}
584+
585+
#scope-of-this-notice {
586+
margin-top: 4rem;
548587
}

layouts/home.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ <h1 class="max-w-700px text-6xl line-height-1 -text-primary m-auto">Accelerate a
1414
</div>
1515
</section>
1616
<h2 class="fancy text-center font-medium -text-primary"><span>Key components of Konveyor</span></h2>
17-
<section class="max-w-1000px m-auto">
17+
<section class="max-w-1000px m-auto text-center--mobile">
1818
{{ range $index, $component := site.Params.components }}
1919
{{ if not (modBool $index 2) }}
2020
<div class="flex flex-col--mobile flex-reverse align-center--mobile space-between py-120">
@@ -61,7 +61,7 @@ <h2 class="fancy -text-primary"><span>Community Supporters</span></h2>
6161
</section>
6262
<section class="max-w-1000px m-auto">
6363
<h2 class="fancy mb-5 -text-primary text-center"><span>Recent Posts</span></h2>
64-
<div class="flex flex-wrap gap-sm m-auto space-between--tablet">
64+
<div class="flex flex-wrap gap-sm gap-3xl--mobile m-auto space-between--tablet">
6565
{{ range first 3 (where .Site.RegularPages "Type" "in" (slice "blog")) }}
6666
{{ if .Params.featured }}
6767
<div>

layouts/partials/navbar.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,11 +30,11 @@
3030
{{ $activeMenu := $p.HasMenuCurrent "main" . -}}
3131
<li class="nav-item sub-menu{{if $activeMenu }} active{{end}} dropdown">
3232
<div class="dropdown">
33-
<a class="nav-link dropdown-toggle" href="#" id="navbarDropdown" role="button" data-bs-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
33+
<a class="nav-link dropdown-toggle" href="#" id="navbarDropdown" role="button" data-bs-toggle="dropdown" data-bs-display="static" aria-haspopup="true" aria-expanded="false">
3434
{{ .Pre }}
3535
<span>{{ .Name }}</span>
3636
</a>
37-
<ul class="dropdown-menu dropdown-menu-end -bg-primary">
37+
<ul class="dropdown-menu dropdown-menu-lg-end -bg-primary">
3838
{{ range .Children }}
3939
<li><a class="dropdown-item" href="{{ .URL }}">{{ .Name }}</a></li>
4040
{{ end }}

0 commit comments

Comments
 (0)