Skip to content

Commit 990749e

Browse files
author
rakeshAlgo
committed
Level one menu Style fixes
1 parent 1bfc9a2 commit 990749e

File tree

8 files changed

+90
-50
lines changed

8 files changed

+90
-50
lines changed

src/css/component-frame.css

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
.component-frame {
22
/* rgba(87, 160, 255, 1) */
3-
/* background: rgba(var(--color-blue-rgb), 0.07); */
3+
background: var(--color-brand-gray6);
44
padding: 12px 30px 12px 15px;
55
display: flex;
66
align-items: center;
7+
justify-content: center;
78
}
89

910
.frame-body {
@@ -13,7 +14,8 @@
1314

1415
.frame-body .title {
1516
margin: 0;
16-
font-size: 1.25rem;
17+
font-size: 1.125rem;
18+
line-height: 1.5rem;
1719
font-weight: var(--weight-semibold);
1820
color: var(--color-brand-gray1);
1921
}

src/css/contributor.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
.contributor-list-box {
2-
display: flex;
2+
/* display: flex; */
33
align-items: center;
44
flex-wrap: wrap;
55
margin: 15px 0 0;

src/css/main.css

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,7 @@ main p {
133133

134134
.article-header {
135135
margin-bottom: 0;
136+
margin-top: var(--base-space);
136137
align-items: flex-start;
137138
}
138139
}

src/css/nav.css

Lines changed: 67 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
background-color: var(--color-brand-gray7);
33
position: fixed;
44
width: inherit;
5-
overflow-y: scroll;
5+
overflow-y: auto;
66
font-size: 1rem;
77
line-height: 24px;
88
}
@@ -23,6 +23,8 @@
2323
margin-bottom: 1.5rem;
2424
height: var(--height-nav);
2525
z-index: var(--z-index-nav);
26+
border-left: 2px solid var(--color-brand-gray7);
27+
border-right: 2px solid var(--color-brand-gray7);
2628
}
2729
}
2830

@@ -43,18 +45,21 @@
4345
display: flex;
4446
word-break: break-all;
4547
align-items: center;
48+
font-size: 20px;
49+
line-height: 28px;
50+
font-family: "Open Sans", sans-serif;
51+
color: var(--color-brand-gray1);
52+
font-weight: var(--weight-semibold);
4653
}
4754

4855
.nav-line .fas {
4956
color: var(--color-brand-gray3);
50-
}
51-
52-
.nav-item.is-active .nav-line[data-depth="0"] .fas {
53-
color: var(--color-brand-blue);
57+
display: none;
5458
}
5559

5660
.nav-menu .nav-text {
57-
margin-left: 0.75rem;
61+
/* margin-left: 0.75rem; */
62+
margin-left: 0;
5863
}
5964

6065
.nav-menu a.nav-link {
@@ -73,6 +78,15 @@
7378
padding: 0;
7479
}
7580

81+
.nav-menu .nav-list .nav-list .nav-line[data-depth="1"] {
82+
padding-left: 1.65rem;
83+
}
84+
85+
.nav-menu .nav-list li a {
86+
font-size: 0.875rem;
87+
font-weight: var(--weight-normal);
88+
}
89+
7690
.nav-menu > .nav-list {
7791
/* margin: 1rem 1.875rem; */
7892
margin: 1.5rem 0;
@@ -84,8 +98,8 @@
8498
margin-bottom: 0.625rem;
8599
*/
86100
margin-bottom: 0.75rem;
87-
margin-left: 3.6875rem;
88-
border-left: 1px solid var(--color-brand-gray5);
101+
/* margin-left: 1rem; */
102+
/* border-left: 1px solid var(--color-brand-gray5); */
89103
}
90104

91105
/* .nav-menu .nav-item.is-active.is-active-depth-2[data-depth='0'] > .nav-list {
@@ -123,25 +137,44 @@
123137
} */
124138

125139
.nav-line[data-depth="0"] {
126-
padding: 0.625rem 1.875rem;
140+
padding: 0.625rem 1.25rem;
127141
color: var(--brand-color-gray2);
128142
}
129143

130-
.nav-item.is-active .nav-line[data-depth="0"] {
131-
background: rgba(var(--color-gray-rgb), 0.06);
144+
/* .nav-item.is-active .nav-line[data-depth="0"] {
145+
background: #4287D60F;
146+
margin-bottom: 0.625rem;
147+
border-right: 4px solid rgba(66, 135, 214, 0.44);
148+
} */
149+
150+
/* .nav-item.is-active > .nav-line[data-depth="0"], */
151+
.nav-item.open > .nav-line[data-depth="0"],
152+
.nav-item.is-current-path.is-active-depth-2:not(.is-active) > .nav-line,
153+
.nav-item.is-current-page > .nav-line {
154+
background: #4287d60f;
132155
margin-bottom: 0.625rem;
156+
border-right: 4px solid rgba(66, 135, 214, 0.44);
133157
}
134158

135159
.nav-item.is-active .nav-line[data-depth="0"] .nav-text {
136-
color: var(--color-brand-blue);
160+
/* color: var(--color-brand-blue); */
137161
font-weight: var(--weight-semibold);
138162
}
139163

164+
.nav-item.is-active .nav-line[data-depth="0"] .fas {
165+
color: var(--color-brand-blue);
166+
}
167+
140168
.nav-menu .nav-item.is-current-page > .nav-line > a.nav-link {
141169
color: var(--color-text);
142170
font-weight: var(--weight-medium);
143171
}
144172

173+
.nav-menu .nav-item.is-active[data-depth='2'] > .nav-line .nav-link {
174+
/* color: var(--color-brand-blue); */
175+
font-weight: var(--weight-semibold);
176+
}
177+
145178
.nav-menu .nav-toggle {
146179
background: none;
147180
border: 0;
@@ -190,24 +223,29 @@ html.is-clipped--nav {
190223
}
191224

192225
.main-nav-parent {
193-
font-size: 16px;
226+
font-size: var(--font-small);
194227
line-height: 20px;
195-
color: var(--color-brand-gray2);
228+
color: var(--color-brand-blue);
196229
display: flex;
197-
margin: 10px 0;
230+
margin: 15px 0 -20px;
198231
text-decoration: none;
199232
align-items: center;
200233
flex-wrap: wrap;
201-
background: rgba(var(--color-blue-rgb), 0.06);
234+
/* background: rgba(var(--color-blue-rgb), 0.06);
202235
padding: 10px 0;
203236
border-top: 1px solid var(--color-brand-gray5);
204-
border-bottom: 2px solid var(--color-brand-gray5);
237+
border-bottom: 2px solid var(--color-brand-gray5); */
205238
}
206239

207240
.main-nav-parent .back-to-menu {
208-
padding: 0 40px;
241+
padding: 0 22px;
209242
width: 100%;
210-
background: url(../img/back-arrow.png) no-repeat 20px center;
243+
/* background: url(../img/back-arrow.png) no-repeat 20px center; */
244+
cursor: pointer;
245+
}
246+
247+
.main-nav-parent .back-to-menu .fas{
248+
margin-right: 8px;
211249
}
212250

213251
.main-nav-parent .nav-text {
@@ -237,12 +275,16 @@ html.is-clipped--nav {
237275
.nav-line[data-depth="2"] {
238276
display: flex;
239277
justify-content: flex-end;
240-
padding: 0.625rem 1rem;
278+
padding: 0.625rem 1.375rem;
241279
flex-direction: row-reverse;
242280
}
243281

244282
.nav-line[data-depth="1"] .nav-link {
245-
color: var(--color-brand-gray4);
283+
/* color: var(--color-brand-gray4); */
284+
color: var(--color-brand-black);
285+
font-size: var(--font-base);
286+
line-height: var(--line-height-base);
287+
font-weight: var(--weight-semibold);
246288
}
247289

248290
.is-active[data-depth='0'] .is-active > .nav-line[data-depth="1"] {
@@ -258,12 +300,13 @@ html.is-clipped--nav {
258300
transform: rotate(90deg);
259301
} */
260302

261-
.nav-menu .nav-item.is-active[data-depth='1'] .nav-list {
303+
/* .nav-menu .nav-item.is-active[data-depth='1'] .nav-list {
262304
margin-left: 1.5rem;
263-
}
305+
} */
264306

265307
.nav-menu .nav-item[data-depth='2'] {
266-
margin: 0 8px 8px 0;
308+
/* margin: 0px 0px 8px 0px; */
309+
margin-bottom: 8px;
267310
}
268311

269312
.nav-menu .nav-item.is-active[data-depth='1'] > .nav-line .nav-link {
@@ -274,11 +317,6 @@ html.is-clipped--nav {
274317
color: var(--color-brand-gray1);
275318
}
276319

277-
.nav-menu .nav-item.is-active[data-depth='2'] > .nav-line .nav-link {
278-
color: var(--color-brand-blue);
279-
font-weight: 900;
280-
}
281-
282320
.nav-item[data-depth='1'] .in-toggle {
283321
background: url(../img/back-arrow.png) no-repeat center center;
284322
transform: rotate(180deg);

src/css/vars.css

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,8 +64,8 @@
6464
--hljs-string: #295d1e;
6565
--hljs-number: #0711ba;
6666
/* --height-navbar: 4rem; */
67-
--height-spacer: 1.3rem;
68-
--height-navbar: 6.09rem;
67+
--height-spacer: 1rem;
68+
--height-navbar: 6rem;
6969
--height-to-body: calc(var(--height-navbar) + var(--height-spacer));
7070
--height-min-body: calc(100vh - var(--height-to-body));
7171
--height-nav: calc(var(--height-min-body) + var(--height-spacer));
@@ -97,6 +97,7 @@
9797
/* New design font style */
9898

9999
--font-base: 1rem; /* ~16px */
100+
--font-small: 0.875rem; /* ~14px */
100101
--labels-font-size: 0.75rem; /* ~12px */
101102
--labels-line-height: 1;
102103

src/js/01-nav.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,7 @@
9797
otherNavs[i].classList.add('is-inactive')
9898
}
9999
}
100+
this.classList.toggle('open')
100101
this.classList.toggle('is-active')
101102
}
102103

src/js/11-page-customize.js

Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,14 @@
1-
;
2-
(function ($) {
3-
'use strict'
4-
// for label edition/statuses
5-
var $labels = $('.edition').find('a')
6-
7-
console.log($labels.length)
8-
9-
for (var i = 0; i < $labels.length; i++) {
1+
; (function ($) {
2+
'use strict'
3+
// for label edition/statuses
4+
var $labels = $('.edition').find('a')
5+
console.log($labels.length)
6+
for (var i = 0; i < $labels.length; i++) {
107
console.log(i, 445, $labels[i])
118
if ($labels[i].text.toLocaleLowerCase().indexOf('community') !== -1) {
12-
$labels[i].parentNode.classList.add('page-edition')
9+
$labels[i].parentNode.classList.add('page-edition')
1310
}
14-
}
11+
}
1512

16-
/*eslint-env jquery*/
13+
/*eslint-env jquery*/
1714
})(jQuery)

src/partials/nav-tree.hbs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,21 @@
11
{{#if navigation}}
22
{{#each navigation}}
33
{{#if (eq ../crumbAtLevel this)}}
4-
{{#if ( eq ../crumbLevel 0 or eq ../crumbLevel 1 or eq ../crumbLevel 2)}}
4+
{{#if ( eq ../crumbLevel 0 or eq ../crumbLevel 1 or eq ../crumbLevel 2)}}
55
<div class="main-nav-parent new">
6-
<span class="back-to-menu">Main Menu </span>
6+
<span class="back-to-menu"><i class="fas fa-chevron-left"></i> Main Menu </span>
77
{{!-- <span class="nav-text">{{{./content}}}</span> --}}
88
</div>
99
{{/if}}
1010
{{/if}}
1111
{{/each}}
1212
<ul class="nav-list">
1313
{{!-- {{log ../crumbAtLevel this 'log output'}} --}}
14-
{{#each navigation}}
14+
{{#each navigation}}
1515
<li class="nav-item{{#if (eq ../crumbAtLevel this)}}
1616
{{~#if (eq this (last @root.page.breadcrumbs))}} is-current-page{{~else}} is-current-path{{/if}} is-active
1717
{{~else if (eq ../level 0)}} {{!--is-active--}} is-inactive{{/if}}{{#if (eq ../crumbAtLevel this (and eq ../level 2))}} is-active-depth-2 {{/if}} " data-depth="{{../level}}">
18-
18+
1919
{{#if ./content}}
2020
<span class="nav-line " data-depth="{{../level}}">
2121
{{#if ./items}}

0 commit comments

Comments
 (0)