Skip to content

Commit a201c6a

Browse files
tibi2303vengador
andauthored
OEL-4068: Cleanup and improved styles for new header. (#694)
* OEL-4068: Cleanup and improved styles for new header. * OEL-4068: Updated styles. * OEL-4068: Border radius for toggler. * OEL-4068: Last style update. --------- Co-authored-by: Moisés Rodríguez Carmona <moises@rodriguezcarmona.es>
1 parent 701c510 commit a201c6a

File tree

4 files changed

+34
-86
lines changed

4 files changed

+34
-86
lines changed

src/themes/default/src/icons/icons.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ module.exports = [
5656
"exclamation-lg.svg",
5757
"question-lg.svg",
5858
"info-lg.svg",
59+
"x.svg",
5960
"x-lg.svg",
6061
"plus-lg.svg",
6162
"dash-lg.svg",
@@ -115,6 +116,7 @@ module.exports = [
115116
"trash.svg",
116117
"trash-fill.svg",
117118
"link.svg",
119+
"list.svg",
118120

119121
// Social.svg
120122
"skype.svg",

src/themes/default/src/scss/_header.scss

Lines changed: 24 additions & 80 deletions
Original file line numberDiff line numberDiff line change
@@ -4,25 +4,37 @@ $header-background-start: #039 !default;
44
$header-background-end: #1b4ac3 !default;
55
$header-link-active-background: #003776 !default;
66

7-
.bcl-header__project {
8-
background: linear-gradient(
9-
90deg,
10-
$header-background-start 0%,
11-
$header-background-end 100%
12-
);
13-
}
14-
157
.bcl-header .nav-link {
168
color: $eu-blue;
179
display: flex;
1810
align-items: center;
1911
}
2012

13+
.bcl-navbar-toggler {
14+
background: transparent;
15+
border: none;
16+
border-radius: var(--bs-border-radius-sm);
17+
padding: map-get($spacers, "1-5") map-get($spacers, "2-5");
18+
color: $link-color;
19+
line-height: 1;
20+
@extend .rounded-2;
21+
.active-icon {
22+
display: none;
23+
}
24+
&[aria-expanded="true"] {
25+
background-color: $primary;
26+
color: $white;
27+
.active-icon {
28+
display: block;
29+
}
30+
.default-icon {
31+
display: none;
32+
}
33+
}
34+
}
35+
2136
.bcl-header--ec,
2237
.ec__header {
23-
.bcl-header__project {
24-
background: $header-background;
25-
}
2638
/* stylelint-disable-next-line no-descending-specificity */
2739
.nav-link {
2840
color: $ec-blue;
@@ -33,21 +45,7 @@ $header-link-active-background: #003776 !default;
3345
align-items: flex-end;
3446
}
3547

36-
.bcl-header--neutral {
37-
.bcl-header__project {
38-
background: $gray-700;
39-
}
40-
}
41-
42-
.bcl-header:not(.bcl-header--neutral) .bcl-header__project {
43-
padding-top: map-get($spacers, 3);
44-
}
45-
4648
.bcl-header {
47-
.navbar-brand img {
48-
width: 100px;
49-
}
50-
5149
.notification {
5250
position: relative;
5351
padding-right: 0;
@@ -64,16 +62,6 @@ $header-link-active-background: #003776 !default;
6462
}
6563
}
6664

67-
.bcl-header__project .bcl-header__site-name {
68-
display: inline-block;
69-
margin-bottom: 0;
70-
font-size: 1.3rem;
71-
font-weight: 300;
72-
color: $white;
73-
vertical-align: middle;
74-
max-width: 80%;
75-
}
76-
7765
.bcl-header__navbar.navbar {
7866
padding: 0;
7967
.dropdown-toggle,
@@ -87,12 +75,6 @@ $header-link-active-background: #003776 !default;
8775
}
8876
}
8977

90-
@media only screen and (max-width: 400px) {
91-
.bcl-header--neutral .bcl-header__project-logo {
92-
display: none;
93-
}
94-
}
95-
9678
@include media-breakpoint-up(md) {
9779
.bcl-header--ec,
9880
.ec__header {
@@ -124,23 +106,8 @@ $header-link-active-background: #003776 !default;
124106
}
125107
}
126108

127-
.bcl-header__project {
128-
padding: map-get($spacers, 3) 0;
129-
}
130-
131109
.bcl-header {
132-
.bcl-header__project {
133-
z-index: 1040; // Make sure project bar is above the mega menu
134-
position: relative;
135-
box-shadow: var(--bs-box-shadow);
136-
flex-shrink: 0;
137-
}
138-
}
139-
140-
.bcl-header:not(:has(.bcl-header__project)) {
141-
> .navbar:first-child {
142-
box-shadow: var(--bs-box-shadow);
143-
}
110+
box-shadow: var(--bs-box-shadow);
144111
}
145112

146113
.bcl-header nav + nav {
@@ -225,12 +192,6 @@ $header-link-active-background: #003776 !default;
225192
}
226193

227194
@include media-breakpoint-up(lg) {
228-
.bcl-header__project.light,
229-
.bcl-header--ec .bcl-header__project.light,
230-
.ec__header .bcl-header__project.light {
231-
background: $white;
232-
}
233-
234195
.bcl-header__navbar {
235196
background: linear-gradient(
236197
90deg,
@@ -256,33 +217,16 @@ $header-link-active-background: #003776 !default;
256217
}
257218
}
258219

259-
.bcl-header__site-name {
260-
margin-left: map-get($spacers, 4);
261-
font-weight: 500;
262-
}
263-
264-
.bcl-header__project.light .bcl-header__site-name {
265-
color: $black;
266-
}
267-
268220
.bcl-header .navbar-toggler {
269221
position: relative;
270222
right: 0;
271223
bottom: 0;
272224
}
273225

274-
.bcl-header .navbar-brand img {
275-
width: auto;
276-
}
277-
278226
.bcl-header__navbar .bcl-mega-menu {
279227
--bcl-mega-menu-zindex: 1050; // Make sure dropdown overlaps the search offcanvas
280228
}
281229

282-
.bcl-header:not(.bcl-header--neutral) .bcl-header__project {
283-
padding-bottom: map-get($spacers, 3);
284-
}
285-
286230
.bcl-header__navbar.collapse {
287231
display: block;
288232
}

src/themes/default/src/scss/base/_utilities.scss

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,14 @@ svg {
154154
border-color: $gray-300;
155155
}
156156

157+
.border-top-subtle {
158+
border-top: 1px solid $primary-border-subtle;
159+
}
160+
161+
.border-bottom-subtle {
162+
border-bottom: 1px solid $primary-border-subtle;
163+
}
164+
157165
.grid-3-9 {
158166
grid-template-columns: 25% 75%;
159167
}

src/themes/ucpkn/src/scss/_header.scss

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,3 @@
22
left: auto;
33
right: 14px;
44
}
5-
6-
@include media-breakpoint-down(lg) {
7-
.bcl-header__site-name {
8-
margin-left: 0;
9-
}
10-
}

0 commit comments

Comments
 (0)