LoveIt/assets/css/_partial/_header.scss

157 lines
3.4 KiB
SCSS
Raw Normal View History

2020-02-13 18:30:33 +01:00
header.desktop {
2019-08-24 13:32:41 +02:00
display: block;
position: fixed;
width: 100%;
z-index: 100;
height: 4rem;
line-height: 4rem;
2020-02-13 18:30:33 +01:00
background-color: $header-background-color;
2019-08-11 19:36:19 +02:00
2019-08-24 13:32:41 +02:00
.dark-theme & {
2020-02-13 18:30:33 +01:00
background-color: $header-background-color-dark;
2019-08-11 19:36:19 +02:00
}
2020-02-13 18:30:33 +01:00
.header-wrapper {
2019-08-24 13:32:41 +02:00
width: auto;
text-align: center;
2020-02-02 14:07:38 +01:00
margin: 0 4rem;
2019-08-24 13:32:41 +02:00
display: flex;
justify-content: space-between;
2019-08-11 19:36:19 +02:00
2020-02-13 18:30:33 +01:00
.header-title a {
2019-08-24 13:32:41 +02:00
padding: 0 8px;
2020-02-13 18:30:33 +01:00
font-size: 1.25rem;
2019-08-11 19:36:19 +02:00
2019-08-24 13:32:41 +02:00
i {
2020-02-13 18:30:33 +01:00
line-height: 2rem;
2019-08-24 13:32:41 +02:00
}
}
2019-08-11 19:36:19 +02:00
2020-02-13 18:30:33 +01:00
.menu a {
2019-08-24 13:32:41 +02:00
padding: 0 8px;
&.active {
font-weight: 900;
2020-02-13 18:30:33 +01:00
color: $header-hover-color;
2019-08-24 13:32:41 +02:00
.dark-theme & {
2020-02-13 18:30:33 +01:00
color: $header-hover-color-dark;
2019-08-24 13:32:41 +02:00
}
}
}
2019-08-11 19:36:19 +02:00
}
}
2020-02-13 18:30:33 +01:00
header.mobile {
2019-08-24 13:32:41 +02:00
display: none;
position: fixed;
width: 100%;
z-index: 100;
transition: all 0.3s ease 0s;
2020-02-13 18:30:33 +01:00
.header-wrapper {
2019-08-24 13:32:41 +02:00
padding: 0;
margin: 0;
2020-02-13 18:30:33 +01:00
height: 4.5rem;
line-height: 4.5rem;
2019-08-24 13:32:41 +02:00
background: $global-background-color;
2020-02-13 18:30:33 +01:00
.header-container {
2019-08-24 13:32:41 +02:00
display: flex;
justify-content: space-between;
align-items: center;
width: 100%;
2020-02-13 18:30:33 +01:00
font-size: 1.125rem;
padding-right: 1rem;
padding-left: 1rem;
2019-08-24 13:32:41 +02:00
box-sizing: border-box;
2020-02-13 18:30:33 +01:00
.header-title {
font-size: 1.25rem;
}
2019-08-24 13:32:41 +02:00
.menu-toggle {
cursor: pointer;
2020-02-13 18:30:33 +01:00
line-height: 4.5rem;
2019-08-24 13:32:41 +02:00
span {
display: block;
background: #000;
width: 24px;
2019-08-24 13:32:41 +02:00
height: 2px;
-webkit-border-radius: 3px;
-moz-border-radius: 3px;
border-radius: 3px;
-webkit-transition: .2s margin .2s, .2s transform;
-moz-transition: .2s margin .2s, .2s transform;
transition: .2s margin .2s, .2s transform;
.dark-theme & {
background: $global-font-color-dark;
}
}
2019-08-11 19:36:19 +02:00
2019-08-24 13:32:41 +02:00
span:nth-child(1) {
margin-bottom: 8px;
}
span:nth-child(3) {
margin-top: 8px;
}
&.active {
span {
-webkit-transition: .2s margin, .2s transform .2s;
-moz-transition: .2s margin, .2s transform .2s;
transition: .2s margin, .2s transform .2s;
}
span:nth-child(1) {
-moz-transform: rotate(45deg) translate(4px, 6px);
-ms-transform: rotate(45deg) translate(4px, 6px);
-webkit-transform: rotate(45deg) translate(4px, 6px);
transform: rotate(45deg) translate(4px, 6px);
}
span:nth-child(2) {
opacity: 0
}
span:nth-child(3) {
-moz-transform: rotate(-45deg) translate(8px, -10px);
-ms-transform: rotate(-45deg) translate(8px, -10px);
-webkit-transform: rotate(-45deg) translate(8px, -10px);
transform: rotate(-45deg) translate(8px, -10px);
}
}
}
}
2020-02-13 18:30:33 +01:00
.menu {
2019-08-24 13:32:41 +02:00
text-align: center;
background: $global-background-color;
border-top: 2px solid $global-font-color;
display: none;
box-shadow: 0px 2px 4px rgba(0, 0, 0, 0.1), 0px 4px 8px rgba(0, 0, 0, 0.1);
a {
display: block;
2020-02-13 18:30:33 +01:00
line-height: 2.5rem;
2019-08-24 13:32:41 +02:00
}
&.active {
display: block;
}
.dark-theme & {
background: $global-background-color-dark;
border-top: 2px solid $global-font-color-dark;
}
}
.dark-theme & {
background: $global-background-color-dark;
}
}
2019-08-11 19:36:19 +02:00
}