Skip to content

Commit 911bdda

Browse files
author
rakeshAlgo
committed
Fix mobile menu nav style
1 parent 10f176f commit 911bdda

File tree

7 files changed

+98
-46
lines changed

7 files changed

+98
-46
lines changed

src/css/body.css

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,8 @@ aside.toc.sidebar {
3333
width: var(--width-toc);
3434
}
3535

36-
@media screen and (min-width: 769px) {
36+
/* Make layout in full screen */
37+
@media screen and (min-width: 993px) {
3738
div.body {
3839
min-height: var(--height-min-body);
3940
}

src/css/header.css

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -243,6 +243,16 @@
243243
}
244244
}
245245

246+
@media screen and (max-width: 992px) {
247+
.navbar {
248+
padding: 0.8rem 0;
249+
}
250+
251+
.primary-action {
252+
top: -100%;
253+
}
254+
}
255+
246256
@media screen and (max-width: 767px) {
247257
.header {
248258
border-bottom: 1px solid var(--color-brand-blue);

src/css/main.css

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ main p {
5656
border-radius: 3px;
5757
font-family: "Open Sans", sans-serif;
5858
font-weight: var(--weight-normal);
59+
flex-wrap: wrap;
5960
}
6061

6162
.article-banner p {
@@ -64,8 +65,9 @@ main p {
6465
color: var(--color-brand-blue-secondary);
6566
}
6667

67-
.article-banner p svg {
68+
.article-banner svg {
6869
margin-right: 10px;
70+
margin-bottom: 10px;
6971
font-size: var(--heading-h3);
7072
}
7173

src/css/nav.css

Lines changed: 74 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -38,29 +38,6 @@
3838
}
3939
} */
4040

41-
@media screen and (min-width: 769px) {
42-
.left-sidebar-menu {
43-
top: var(--height-to-body);
44-
margin-bottom: 1.5rem;
45-
height: 100%;
46-
/* height: var(--height-nav); */
47-
z-index: var(--z-index-nav);
48-
/* border-left: 2px solid #eee; */
49-
}
50-
51-
.left-sidebar-menu::before {
52-
position: absolute;
53-
content: '';
54-
display: inline-block;
55-
width: 1000%;
56-
height: 100%;
57-
background: var(--color-brand-gray7);
58-
top: 0;
59-
z-index: 1;
60-
left: -1000%;
61-
}
62-
}
63-
6441
.nav-menu .nav-link,
6542
.nav-menu .nav-text {
6643
display: block;
@@ -146,12 +123,12 @@
146123
/* border-left: 1px solid var(--color-brand-gray5); */
147124
}
148125

149-
/* .nav-menu .nav-item.is-active.is-active-depth-2[data-depth='0'] > .nav-list {
126+
/* .nav-menu .nav-item.is-active.is-active-depth-2[data-depth='0'] > .nav-list {
150127
margin-left: 1.875rem;
151128
border-left: none;
152129
} */
153130

154-
/* .nav-menu .nav-item.is-active.is-active-depth-2[data-depth='0'] > .nav-line {
131+
/* .nav-menu .nav-item.is-active.is-active-depth-2[data-depth='0'] > .nav-line {
155132
display: none;
156133
} */
157134

@@ -176,7 +153,7 @@
176153
margin-top: 0.5em;
177154
} */
178155

179-
/* .nav-item[data-depth="0"] > .nav-line {
156+
/* .nav-item[data-depth="0"] > .nav-line {
180157
text-transform: uppercase;
181158
} */
182159

@@ -216,7 +193,7 @@
216193
color: var(--color-brand-blue);
217194
}
218195

219-
/* .nav-menu .nav-item.is-current-page > .nav-line > a.nav-link {
196+
/* .nav-menu .nav-item.is-current-page > .nav-line > a.nav-link {
220197
color: var(--color-text);
221198
font-weight: var(--weight-semibold);
222199
} */
@@ -234,7 +211,7 @@
234211
transform: rotate(90deg);
235212
}
236213

237-
/* .nav-menu .nav-item.is-active[data-depth='2'] > .nav-line .nav-link {
214+
/* .nav-menu .nav-item.is-active[data-depth='2'] > .nav-line .nav-link {
238215
color: var(--color-brand-black);
239216
font-weight: var(--weight-semibold);
240217
} */
@@ -360,7 +337,7 @@ html.is-clipped--nav {
360337
color: var(--color-brand-gray1);
361338
}
362339

363-
/* .is-active[data-depth='1'] > .nav-line[data-depth="1"] .in-toggle {
340+
/* .is-active[data-depth='1'] > .nav-line[data-depth="1"] .in-toggle {
364341
transform: rotate(90deg);
365342
} */
366343

@@ -372,7 +349,7 @@ html.is-clipped--nav {
372349
margin-bottom: 8px;
373350
} */
374351

375-
/* .nav-menu .nav-item.is-active[data-depth='1'] > .nav-line .nav-link {
352+
/* .nav-menu .nav-item.is-active[data-depth='1'] > .nav-line .nav-link {
376353
color: var(--color-brand-blue);
377354
} */
378355

@@ -455,6 +432,12 @@ a.menu-expand-toggle {
455432
border-radius: 50%;
456433
}
457434

435+
a.menu-expand-toggle span,
436+
a.menu-expand-toggle .fa-times-circle,
437+
a.collapse-menu span {
438+
display: none;
439+
}
440+
458441
/* Responsive CSS */
459442

460443
@media screen and (min-width: 993px) {
@@ -492,7 +475,21 @@ a.menu-expand-toggle {
492475
.left-sidebar-menu {
493476
top: var(--height-to-body);
494477
margin-bottom: 1.5rem;
478+
height: 100%;
495479
/* height: var(--height-nav); */
480+
z-index: var(--z-index-nav);
481+
}
482+
483+
.left-sidebar-menu::before {
484+
position: absolute;
485+
content: '';
486+
display: inline-block;
487+
width: 1000%;
488+
height: 100%;
489+
background: var(--color-brand-gray7);
490+
top: 0;
491+
z-index: 1;
492+
left: -1000%;
496493
}
497494

498495
.nav-control {
@@ -503,23 +500,25 @@ a.menu-expand-toggle {
503500
@media screen and (max-width: 992px) {
504501
.left-sidebar-menu {
505502
left: 0;
503+
top: auto;
506504
z-index: 9;
507505
transform: translate(-100%, 0);
508506
}
509507

510508
.nav.collapse-menu a.menu-expand-toggle {
511-
transform: rotate(0deg);
512-
right: -1rem;
509+
right: -0.8rem;
513510
opacity: 1;
514-
color: var(--color-brand-blue-secondary);
511+
background-color: transparent;
512+
border-radius: 0;
513+
top: -3px;
515514
}
516515

517-
nav.nav a.menu-expand-toggle {
516+
/* nav.nav a.menu-expand-toggle {
518517
transform: rotate(180deg);
519518
right: -1.35rem;
520519
opacity: 1;
521520
color: var(--color-brand-blue-secondary);
522-
}
521+
} */
523522

524523
.nav.collapse-menu .left-sidebar-menu {
525524
transform: translate(0, 0);
@@ -528,4 +527,44 @@ a.menu-expand-toggle {
528527
.nav-menu {
529528
height: calc(100vh - 8.5rem) !important;
530529
}
530+
531+
nav.nav a.menu-expand-toggle {
532+
transform: rotate(90deg);
533+
right: -4.8rem;
534+
opacity: 1;
535+
color: #fff;
536+
background-color: var(--color-brand-blue-secondary);
537+
border-radius: 0;
538+
top: 60px;
539+
font-size: 18px;
540+
padding: 6px 14px;
541+
text-decoration: none;
542+
}
543+
544+
.nav a.menu-expand-toggle .fa-chevron-circle-left {
545+
display: none;
546+
}
547+
548+
a.menu-expand-toggle span {
549+
display: inline-block;
550+
}
551+
552+
.collapse-menu a.menu-expand-toggle .fa-times-circle {
553+
display: inline-block;
554+
font-size: 26px;
555+
color: #ea2328;
556+
}
557+
558+
.collapse-menu a.menu-expand-toggle span {
559+
display: none;
560+
}
561+
}
562+
563+
@media screen and (min-width: 767px) {
564+
nav.nav a.menu-expand-toggle {
565+
right: -3.8rem;
566+
top: 60px;
567+
font-size: 14px;
568+
padding: 4px 10px;
569+
}
531570
}

src/partials/main.hbs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,15 @@
33
{{#with (latest-page-url)}}
44
<div class="article-banner">
55
{{#if (and @root.page.componentVersion.prerelease (not @root.page.latest.prerelease))}}
6-
<p> <i class="fas fa-file-alt"></i> You are viewing the documentation for a prerelease version.</p>
6+
<i class="fas fa-file-alt"></i> <p> You are viewing the documentation for a prerelease version.</p>
77
{{else}}
8-
<p><i class="fas fa-file-alt"></i> A newer version of this documentation is available.</p>
8+
<i class="fas fa-file-alt"></i> <p> A newer version of this documentation is available.</p>
99
{{/if}}
1010
<a class="btn" href="{{relativize this}}">View Latest</a>
1111
</div>
1212
{{else if (and page.componentVersion.prerelease (not page.latest.prerelease))}}
1313
<div class="article-banner">
14-
<p>You are viewing the documentation for a prerelease version.</p>
14+
<i class="fas fa-file-alt"></i> <p>You are viewing the documentation for a prerelease version.</p>
1515
</div>
1616
{{/with}}
1717
{{/unless}}

src/partials/nav-menu.hbs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,5 @@
33
<div class="nav-menu">
44
{{> nav-tree navigation=page.navigation level=0 crumbLevel=0 crumbAtLevel=(lookup page.breadcrumbs 0)}}
55
</div>
6-
<a href="#" class="menu-expand-toggle"><i class="fas fa-chevron-circle-left"></i></a>
6+
<a href="#" class="menu-expand-toggle"> <span>Navigation</span> <i class="fas fa-times-circle"></i> <i class="fas fa-chevron-circle-left"></i></a>
77
</div>

src/partials/tutorials-filter.hbs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
<label for="devOps">DevOps</label>
2525

2626
</li>
27-
27+
2828
{{!-- <li>
2929
<input type="checkbox" id="architect" class="check-mark" name="role" value="architect" />
3030
<label for="architect">Architect</label>
@@ -45,7 +45,7 @@
4545
<input type="checkbox" id="node" class="check-mark" name="language" value="nodejs" />
4646
<label for="node">Node.js</label>
4747

48-
</li>
48+
</li>
4949
<li>
5050
<input type="checkbox" id="C#" class="check-mark" name="language" value="C#" />
5151
<label for="C#">C#</label>
@@ -58,12 +58,12 @@
5858
<input type="checkbox" id="android" class="check-mark" name="language" value="android" />
5959
<label for="android">Android</label>
6060

61-
</li>
61+
</li>
6262
<li>
6363
<input type="checkbox" id="swift" class="check-mark" name="language" value="swift" />
6464
<label for="swift">Swift</label>
6565

66-
</li>
66+
</li>
6767
</ul>
6868
</li>
6969
{{!-- <li><a href="#" class="nav-link"> <span class="arrow-right arrow"></span> Frameworks</a></li> --}}
@@ -92,6 +92,6 @@
9292
</ul>
9393
</div>
9494
<!-- Collapse expand button -->
95-
<a href="#" class="menu-expand-toggle"><i class="fas fa-chevron-circle-left"></i></a>
95+
<a href="#" class="menu-expand-toggle"> <span>Navigation</span> <i class="fas fa-times-circle"></i> <i class="fas fa-chevron-circle-left"></i></a>
9696
</div>
9797
</nav>

0 commit comments

Comments
 (0)