misuzu/assets/less/mio/classes/header.less

288 lines
6.9 KiB
Text
Raw Normal View History

2018-04-16 00:33:54 +00:00
.header {
flex: 0 0 auto;
background: linear-gradient(0deg, transparent, #c2affe) repeat-x;
2018-03-22 02:56:41 +00:00
&__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;
}
2018-03-22 02:56:41 +00:00
}
@media (max-width: @site-mobile-width) {
&__icons {
display: flex;
justify-content: space-between;
width: 100%;
}
}
2018-03-22 02:56:41 +00:00
&__icon {
display: none;
cursor: pointer;
width: 40px;
height: 40px;
&--menu {
background-image: url('https://static.flash.moe/images/mobile-menu.png');
background-size: 40px;
}
@media (max-width: @site-mobile-width) {
2018-03-22 02:56:41 +00:00
display: block;
}
}
2018-03-22 02:56:41 +00:00
&__logo {
flex: 0 0 auto;
color: inherit;
text-decoration: none;
cursor: pointer;
display: block;
background: url('https://static.flash.moe/images/imouto-transparent.png') no-repeat center / cover;
width: 60px;
height: 60px;
font-size: 0;
2018-03-22 02:56:41 +00:00
&--manage {
background-image: url('https://static.flash.moe/images/imouto-broom.png');
}
@media (max-width: @site-mobile-width) {
width: 40px;
height: 40px;
2018-03-22 02:56:41 +00:00
}
}
&__menu {
flex: 1 1 auto;
margin: 0 6px;
font-family: @mio-font-heading;
list-style: none;
2018-03-22 02:56:41 +00:00
display: flex;
2018-08-14 19:46:20 +00:00
&-toggle {
display: none;
}
@media (max-width: @site-mobile-width) {
display: none;
2018-08-14 19:46:20 +00:00
font-size: 1.6em;
line-height: 1.5em;
2018-08-14 19:46:20 +00:00
&-toggle:checked ~ .header__menu {
display: block;
}
}
2018-03-22 02:56:41 +00:00
@media (max-width: @site-mobile-width) {
2018-03-22 02:56:41 +00:00
width: 100%;
2018-08-14 19:46:20 +00:00
background: #c2affe;
2018-08-14 19:46:20 +00:00
&__item:not(:last-child) {
border-bottom: 1px solid #9475b2;
}
&__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: #c2affe;
.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;
}
2018-03-22 02:56:41 +00:00
}
}
&__submenu {
list-style: none;
display: block;
2018-03-22 02:56:41 +00:00
@media (max-width: @site-mobile-width) {
&__link {
padding: 2px 16px;
display: block;
width: 100%;
color: inherit;
text-decoration: none;
}
2018-03-22 02:56:41 +00:00
}
@media (min-width: @site-mobile-width) {
position: absolute; // floating
transform: scaleY(0);
transform-origin: center top 0;
background: #c2affe;
overflow: hidden;
z-index: 100;
text-align: left;
box-shadow: 0 1px 2px #9475b2;
transition: transform .2s;
&:hover {
transform: scaleY(1);
}
&__link {
color: inherit;
text-decoration: none;
display: block;
padding: 2px 6px;
min-width: 100px;
}
2018-03-22 02:56:41 +00:00
}
}
2018-03-22 02:56:41 +00:00
&__user {
flex: 0 0 auto;
display: flex;
flex-direction: row-reverse;
order: 3;
2018-08-14 19:46:20 +00:00
&-toggle {
display: none;
}
2018-03-22 02:56:41 +00:00
@media (max-width: @site-mobile-width) {
display: none;
2018-08-14 19:46:20 +00:00
width: 100%;
background: #c2affe;
font-size: 1.1em;
2018-08-14 19:46:20 +00:00
&-toggle:checked ~ .header__user {
display: flex;
2018-03-22 02:56:41 +00:00
}
}
&__avatar {
width: 60px;
height: 60px;
2018-03-22 02:56:41 +00:00
@media (max-width: @site-mobile-width) {
display: none;
2018-03-22 02:56:41 +00:00
}
}
&__info {
padding: 1px;
margin-right: 4px;
display: flex;
flex-direction: column;
align-items: flex-end;
justify-content: center;
2018-08-14 19:46:20 +00:00
@media (max-width: @site-mobile-width) {
2018-08-14 19:46:20 +00:00
margin: 0;
padding: 0;
display: block;
width: 100%;
}
}
&__name {
2018-03-22 02:56:41 +00:00
color: inherit;
font-size: 1.4em;
line-height: 1.4em;
font-family: @mio-font-heading;
2018-03-22 02:56:41 +00:00
text-decoration: none;
display: block;
2018-08-14 19:46:20 +00:00
text-align: right;
2018-08-16 02:02:27 +00:00
text-overflow: ellipsis;
max-width: 150px;
overflow: hidden;
white-space: nowrap;
2018-03-22 02:56:41 +00:00
@media (min-width: @site-mobile-width) {
2018-08-14 19:46:20 +00:00
&:hover {
text-decoration: underline;
}
}
@media (max-width: @site-mobile-width) {
max-width: 100%;
2018-08-14 19:46:20 +00:00
font-size: 1.6em;
line-height: 1.5em;
border-bottom: 1px solid #9475b2;
padding: 4px 8px;
text-align: left;
2018-03-22 02:56:41 +00:00
}
}
&__actions {
display: flex;
flex-wrap: wrap;
justify-content: right;
list-style: none;
max-width: 100px;
font-size: .9em;
line-height: 1.4em;
2018-08-14 19:46:20 +00:00
@media (max-width: @site-mobile-width) {
2018-08-14 19:46:20 +00:00
font-size: 1.6em;
line-height: 1.5em;
max-width: initial;
width: 100%;
flex-direction: column;
}
}
&__action {
padding-left: 6px;
2018-08-14 19:46:20 +00:00
@media (max-width: @site-mobile-width) {
2018-08-14 19:46:20 +00:00
padding: 0;
&:not(:last-child) {
border-bottom: 1px solid #9475b2;
}
}
}
&__link {
color: inherit;
text-decoration: none;
@media (max-width: @site-mobile-width) {
2018-08-14 19:46:20 +00:00
padding: 4px 8px;
display: block;
width: 100%;
}
@media (min-width: @site-mobile-width) {
2018-08-14 19:46:20 +00:00
&:hover {
text-decoration: underline;
}
}
2018-03-22 02:56:41 +00:00
}
}
}