Files
nhgooi.nl/resources/assets/sass/components/_menu.scss

463 lines
8.7 KiB
SCSS
Vendored

@use "../abstracts/variables" as *;
@use "../abstracts/mixin" as *;
.menu_container {
@media (min-width: 767px) {
height: 75px;
background-image: linear-gradient(to right, #0102b0, #4090e3);
}
nav {
display: flex;
> div {
height: 30px;
background: white;
flex-grow: 1;
border: 1px solid white;
}
}
.menu {
@include reset-list;
overflow: hidden;
position: relative;
z-index: 0;
margin: 0px -1px;
width: 1170px;
margin: 0 auto;
> li {
float: left;
margin: 0px -1px;
&.has_submenu {
position: relative;
}
ul {
display: none;
}
a {
display: block;
font-family: Nunito, serif;
color: $text-color;
font-weight: $nav-text-weight;
font-size: $nav-text-size;
text-align: center;
padding: 5px 20px 5px 40px;
text-decoration: none;
background: white;
text-transform: uppercase
}
&.selected a, &:hover a, &.hover a {
color: white;
background: transparent;
position: relative;
&:before {
content: '';
display: block;
width: 33px;
height: 25px;
-webkit-mask-image: URL("/images/menu-corner-1.svg");
mask-image: URL("/images/menu-corner-1.svg");
background-color: white;
position: absolute;
top: 0;
left: 0;
z-index: 1;
}
&:after {
content: '';
display: block;
width: 12px;
height: 15px;
-webkit-mask-image: URL("/images/menu-corner-2.svg");
mask-image: URL("/images/menu-corner-2.svg");
background-color: white;
position: absolute;
bottom: 0;
right: -1px;
z-index: 1;
}
}
&:last-child {
margin-left: 10px;
&:after {
content: '\a0';
z-index: -1;
background: white;
position: absolute;
top: 0;
width: 100%;
height: 100%;
margin-left: -10px;
}
}
}
}
}
.top_menu_container, .menu_mobile_container {
height: 50px;
@include container;
overflow: hidden;
ul.right_menu {
float: right;
@include reset-list;
li {
float: left;
padding: 3px 19px;
margin: 8px;
border-right: 1px solid rgba(255, 255, 255, 0.2);
line-height: 2;
height: 28px;
&.collapsed {
padding: 3px 9px 3px 6px;
margin: 8px auto;
}
&.search {
border: none;
line-height: 1;
}
/*&:nth-child(2) {
padding: 0 19px;
}*/
a {
float: left;
font-family: Nunito, serif;
font-size: 14px;
font-weight: bold;
text-align: right;
color: $text-inverted-color;
text-decoration: none;
text-transform: uppercase;
display: flex;
span {
overflow: hidden;
display: block;
height: 28px;
}
&.with_svg_icon {
position: relative;
margin-right: 30px;
}
svg {
fill: $text-inverted-color;
height: 20px;
width: 20px;
position: absolute;
right: -25px;
top: 2px;
}
i {
font-size: 18px;
position: relative;
top: 2px;
margin-left: 5px;
}
}
.search_form {
float: left;
overflow: hidden;
height: 34px;
margin-right: 10px;
.search_input {
border: 1px solid #efefef;
border-radius: 3px;
background-color: $element-bg;
height: 26px;
font-family: Montserrat, serif;
font-size: 16px;
line-height: 1.25;
color: $text-color;
}
.search_submit {
float: right;
margin: 4px;
}
}
.search_button {
margin-top: 6px;
}
}
}
}
.menu_mobile_container {
height: 46px;
padding: 12px 0;
background-color: #10229c;
.mobile_menu_button a {
display: block;
width: 20px;
height: 21px;
padding: 4px 10px 4px 11px;
margin-right: 12px;
i {
color: white;
font-size: 19px;
}
}
.logo_mobile {
height: 100%;
img {
height: 100%;
}
}
.right_menu_container {
background-color: #10229c;
margin-left: 12px;
border-top-left-radius: 3px;
border-bottom-left-radius: 3px;
flex-grow: 1;
ul.right_menu {
li {
padding: 0 10px;
margin: 0;
a.with_svg_icon {
margin-right: 10px;
}
a {
svg {
position: static;
}
}
.search_form {
height: 25px;
.search_input {
height: 18px;
width: 80px;
}
.search_submit {
margin: 0 6px;
}
}
.search_button {
margin: 0;
}
}
}
}
}
.menu-submenu, .mobile_menu_container {
position: absolute;
> a {
display: block;
height: 30px;
}
ul {
@include reset-list;
a {
display: block;
font-family: Nunito, serif;
font-size: 14px;
font-weight: bold;
color: $text-color;
text-decoration: none;
padding: 15px 0;
border-bottom: 1px solid #f8f8f8;
text-transform: uppercase;
}
li:last-child a {
border-bottom: none;
}
}
> ul {
padding: 20px;
border-radius: 3px;
box-shadow: 0 0 15px 0 rgba(35, 31, 32, 0.1);
background-color: $element-bg;
margin-left: 20px;
width: max-content;
display: none;
li {
ul {
display: none;
li {
padding-left: 10px;
}
}
}
li.has_submenu {
position: relative;
&:after {
-webkit-font-smoothing: antialiased;
display: var(--fa-display, inline-block);
font-style: normal;
font-variant: normal;
line-height: 1;
text-rendering: auto;
font-family: "Font Awesome 6 Free";
font-weight: 900;
content: "\f0d7";
position: absolute;
right: 0;
top: 15px;
-webkit-transform: rotate(270deg);
transform: rotate(270deg);
transition: 0.6s ease;
}
&.opened:after {
-webkit-transform: rotate(0deg);
transform: rotate(0deg);
}
}
}
}
.mobile_menu_container {
display: none;
position: fixed;
z-index: 15;
top: 0;
left: 0;
width: 100vw;
height: 100vh;
background-color: rgba(0, 0, 0, 0.8);
nav {
background: white;
width: fit-content;
height: 100vh;
padding: 20px;
min-width: 70vw;
max-width: 100vw;
overflow-x: hidden;
overflow-y: auto;
ul, li, li a {
width: 100%;
}
ul > li > ul > li {
padding-left: 20px;
width: CALC(100% - 20px);
}
.submenu {
display: none;
}
li.has_submenu {
position: relative;
&:after {
-webkit-font-smoothing: antialiased;
display: var(--fa-display, inline-block);
font-style: normal;
font-variant: normal;
line-height: 1;
text-rendering: auto;
font-family: "Font Awesome 6 Free";
font-weight: 900;
content: "\f0d7";
position: absolute;
right: 0;
top: 15px;
-webkit-transform: rotate(270deg);
transform: rotate(270deg);
}
&.opened:after {
-webkit-transform: rotate(0deg);
transform: rotate(0deg);
}
}
}
}
.logo_close_button {
display: flex;
height: 42px;
margin-bottom: 37px;
.logo {
flex-grow: 1;
height: 42px;
a {
height: 100%;
padding: 0;
border-bottom: none;
img {
height: 100%;
}
}
}
.mobile_close_menu_button {
height: 30px;
width: 22.5px;
padding: 4px;
a {
font-size: 30px;
color: #1d2bb2;
padding: 0;
border-bottom: none;
}
}
}
.mobile_menu_container nav li.has_submenu {
&:after {
content: "\f054";
-webkit-transform: rotate(0);
transform: rotate(0);
transition: 0.6s ease;
}
&.opened:after {
-webkit-transform: rotate(90deg);
transform: rotate(90deg);
}
}
.slogan {
width: 190px;
margin: 8px 0;
}
.grey_background {
nav {
> div {
background: $container-bg;
border-color: $container-bg;
}
}
.menu {
> li {
a {
background: $container-bg;
}
&.selected a, &:hover a, &.hover a {
&:before, &:after {
background-color: $container-bg;
}
}
&:last-child {
&:after {
background: $container-bg;
}
}
}
}
}