ldc-boutique-cnc-themes/sass/base/_layout.scss

231 lines
4.8 KiB
SCSS

@use "sass:color";
html,
body {
position: relative;
min-height: 100vh;
}
body {
background: $bg-body;
// * TITLES font
h1,
h2,
h3,
h4,
h5,
h6 {
font-family: $font-titles;
}
}
// * Menu nav bar
body > .navbar-main {
background: $bg-menu;
> nav {
position: relative;
height: $nav-height;
// * Menu dropdown content
> div {
// * LOGO
> .navbar-brand {
z-index: 1;
overflow: hidden;
width: 11rem;
height: $nav-height;
@include media-breakpoint-up(sm) {
width: 16rem;
}
}
// * Menu collapser button
> .navbar-toggler {
color: $color-menu-nav;
font-size: 2rem;
font-weight: bold;
@include media-breakpoint-up(lg) {
margin-left: 16rem;
}
// * Overload BS boxshadow
&:focus {
box-shadow: 0 0 0 0.2rem;
}
}
}
.navbar-brand > .img-fluid {
width: 100%;
}
}
// * Mobile user agent confition for fullscreen menu
&.mobile > nav > div > .navbar-toggler {
z-index: 221;
}
// * HEADER actions buttons
#basket-header-action {
.btn {
color: $color-menu-nav;
&:hover,
&:focus {
color: color.mix(#000, $color-menu-nav, $link-shade-percentage);
}
}
}
.btn-outline-header-action {
color: $color-menu-nav;
&:hover,
&:focus {
color: color.mix(#000, $color-menu-nav, $link-shade-percentage);
}
}
}
// * FOOTER
body > footer {
background-color: $bg-color-footer;
.footer-disclaimer {
color: $color-footer-disclaimer;
> a {
color: $color-footer-disclaimer;
&:hover {
color: color.mix(
#000,
$color-footer-disclaimer,
$link-shade-percentage
);
}
}
}
.footer-links li:not(:last-child) {
position: relative;
}
.footer-links li:not(:last-child) > a {
color: $color-footer-links;
&::before {
position: absolute;
left: calc(100% + 0.25rem);
display: none;
content: "-";
@include media-breakpoint-up(md) {
// >= 768px
display: block;
}
}
}
}
// * Menu collapser button (repris de mairet origin)
.navbar-toggler-icon {
width: 34px;
flex: 0 0 auto;
padding: 2px 0;
margin-right: 10px;
background-image: none;
color: $color-menu-nav;
cursor: pointer;
i {
position: relative;
display: block;
width: 100%;
height: 4px;
border-radius: 10px;
margin: 0 auto;
background: $color-menu-nav;
transform-origin: 50% 50%;
transition: all 0.3s;
}
i:nth-child(2) {
margin-top: 7px;
margin-bottom: 7px;
}
}
// * Menu collapser button (repris de mairet origin)
.navbar-toggler:not(.collapsed) .navbar-toggler-icon {
i:nth-child(2) {
transform: rotateY(90deg);
}
i:nth-child(1) {
transform: translate3d(0, 11px, 0) rotate(45deg);
}
i:nth-child(3) {
transform: translate3d(0, -11px, 0) rotate(-45deg);
}
}
#navbar-main-menu {
position: absolute;
z-index: 0;
top: calc(#{$nav-height} + 0.28rem);
width: 100%;
max-height: calc(100vh - #{$nav-height} + 0.28rem);
background-color: $color-menu-nav;
@include media-breakpoint-up(lg) {
// >= 990px
width: unset;
}
a,
li {
color: $color-menu;
text-decoration: none;
}
ol a {
display: flex;
align-items: center;
color: $color-white;
transition: all 0.3s ease-in-out;
&:hover {
color: color.mix(#000, $color-menu, $link-shade-percentage);
transform: translateX(10px);
}
&::before {
display: block;
width: 1rem;
height: 1rem;
margin-right: 10px;
// background-image: url("~@Theme/images/menu-arrow.png");
background-repeat: no-repeat;
background-size: contain;
content: "~";
}
}
}
// * Mobile user agent confition for fullscreen menu
body > .navbar-main.mobile #navbar-main-menu {
height: calc(100vh - #{$nav-height} + 0.28rem);
max-height: inherit;
margin-top: 0;
> ul {
height: 100vh;
justify-content: start !important;
}
}