misuzu/assets/less/classes/header.less

301 lines
7.4 KiB
Text

.header {
flex: 0 0 auto;
margin-bottom: 4px;
&__background {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
mask-image: linear-gradient(0deg, transparent 10%, var(--background-colour) 100%);
-webkit-mask-image: linear-gradient(0deg, transparent 10%, var(--background-colour) 100%);
background: var(--background-pattern);
background-color: var(--accent-colour);
background-blend-mode: multiply;
}
&__wrapper {
margin: 0 auto;
display: flex;
align-items: center;
padding: 3px 1px;
max-width: var(--site-max-width);
@media (max-width: @site-mobile-width) {
flex-direction: column;
}
}
@media (max-width: @site-mobile-width) {
&__icons {
display: flex;
justify-content: space-between;
width: 100%;
}
}
&__icon {
display: none;
cursor: pointer;
width: 40px;
height: 40px;
&--menu {
font-size: 3em;
justify-content: center;
align-items: center;
}
@media (max-width: @site-mobile-width) {
display: inline-flex;
}
}
&__logo {
flex: 0 0 auto;
color: inherit;
text-decoration: none;
cursor: pointer;
display: block;
background: url('/images/logos/imouto-default.png') no-repeat center / cover;
background-image: url('/images/logos/imouto-halloween.png');
width: 60px;
height: 60px;
font-size: 0;
&--manage {
background-image: url('/images/logos/imouto-broom.png');
}
@media (max-width: @site-mobile-width) {
width: 40px;
height: 40px;
}
}
&__menu {
flex: 1 1 auto;
margin: 0 6px;
list-style: none;
display: flex;
&-toggle {
display: none;
}
@media (max-width: @site-mobile-width) {
display: none;
font-size: 1.6em;
line-height: 1.5em;
&-toggle:checked ~ .header__menu {
display: block;
}
}
@media (max-width: @site-mobile-width) {
width: 100%;
background: var(--accent-colour);
&__item:not(:last-child) {
border-bottom: 1px solid var(--accent-colour);
}
&__link {
width: 100%;
display: block;
padding: 4px 8px;
color: inherit;
text-decoration: none;
}
}
@media (min-width: @site-mobile-width) {
&__item {
text-align: center;
transition: background-color .2s;
&:hover {
background-color: var(--accent-colour);
.header__submenu {
transform: scaleY(1);
}
}
}
&__link {
font-size: 1.2em;
color: inherit;
text-decoration: none;
display: block;
padding: 6px 4px;
min-width: 100px;
cursor: pointer;
}
}
}
&__submenu {
list-style: none;
display: block;
@media (max-width: @site-mobile-width) {
&__link {
padding: 2px 16px;
display: block;
width: 100%;
color: inherit;
text-decoration: none;
}
}
@media (min-width: @site-mobile-width) {
position: absolute; // floating
transform: scaleY(0);
transform-origin: center top 0;
background: var(--accent-colour);
overflow: hidden;
z-index: 100;
text-align: left;
box-shadow: 0 1px 2px var(--accent-colour);
transition: transform .2s;
&:hover {
transform: scaleY(1);
}
&__link {
color: inherit;
text-decoration: none;
display: block;
padding: 2px 6px;
min-width: 100px;
}
}
}
&__user {
flex: 0 0 auto;
display: flex;
flex-direction: row-reverse;
order: 3;
&-toggle {
display: none;
}
@media (max-width: @site-mobile-width) {
display: none;
width: 100%;
background: var(--accent-colour);
font-size: 1.1em;
&-toggle:checked ~ .header__user {
display: flex;
}
}
&__avatar {
width: 60px;
height: 60px;
@media (max-width: @site-mobile-width) {
display: none;
}
}
&__info {
padding: 1px;
margin-right: 4px;
display: flex;
flex-direction: column;
align-items: flex-end;
justify-content: center;
@media (max-width: @site-mobile-width) {
margin: 0;
padding: 0;
display: block;
width: 100%;
}
}
&__name {
color: var(--user-colour);
text-shadow: 0 0 5px var(--user-colour);
font-size: 1.4em;
line-height: 1.4em;
text-decoration: none;
display: block;
text-align: right;
text-overflow: ellipsis;
max-width: 150px;
overflow: hidden;
white-space: nowrap;
@media (min-width: @site-mobile-width) {
&:hover {
text-decoration: underline;
}
}
@media (max-width: @site-mobile-width) {
max-width: 100%;
font-size: 1.6em;
line-height: 1.5em;
border-bottom: 1px solid var(--accent-colour);
padding: 4px 8px;
text-align: left;
}
}
&__actions {
display: flex;
flex-wrap: wrap;
justify-content: right;
list-style: none;
max-width: 100px;
font-size: .9em;
line-height: 1.4em;
@media (max-width: @site-mobile-width) {
font-size: 1.6em;
line-height: 1.5em;
max-width: initial;
width: 100%;
flex-direction: column;
}
}
&__action {
padding-left: 6px;
@media (max-width: @site-mobile-width) {
padding: 0;
&:not(:last-child) {
border-bottom: 1px solid var(--accent-colour);
}
}
}
&__link {
color: inherit;
text-decoration: none;
@media (max-width: @site-mobile-width) {
padding: 4px 8px;
display: block;
width: 100%;
}
@media (min-width: @site-mobile-width) {
&:hover {
text-decoration: underline;
}
}
}
}
}