diaspora/app/assets/stylesheets/mobile/header.scss

210 lines
3.7 KiB
SCSS

/* This file contains the CSS code corresponding to the header and the drawer (including the menu) of the mobile version */
$drawer-width: 400px;
$drawer-width-offset: $drawer-width + 50px;
$mobile-navbar-height: 46px;
#main-nav.navbar-fixed-top {
width: 100%;
height: $mobile-navbar-height !important;
min-height: $mobile-navbar-height !important;
max-height: $mobile-navbar-height !important;
.login {
color: $white;
float: right;
font-weight: bold;
padding: 13px;
}
.navbar {
margin: 0;
padding: 0;
border: none;
min-height: $mobile-navbar-height;
}
#header-title {
padding: 7px 15px;
margin: 0 0 0 -15px;
height: $mobile-navbar-height;
}
#nav-badges {
float: right;
margin: 0 -15px;
display: inline-flex;
li > a, li > button {
background-color: transparent;
&.badge-link {
font-size: 26px;
padding: 14px 6px;
text-align: center;
width: $mobile-navbar-height;
height: $mobile-navbar-height;
[class^="entypo-"], [class^="diaspora-custom-"] {
color: $white;
width: 100%;
padding: 0;
margin: 0;
&.entypo-bell, &.diaspora-custom-compose {
text-align: center;
font-size: 22px;
&:before {
position: relative;
top: -2px;
}
}
}
}
}
.navbar-toggle {
display: unset;
margin: 6px 15px;
}
.badge {
z-index: 3;
top: 6px;
right: 6px;
padding: 2px 6px;
position: absolute;
background-color: $red;
}
}
#header-title{
img {
height: 30px;
width: 30px;
}
}
}
#drawer {
position: fixed;
top: 0;
bottom: 0;
width: $drawer-width;
@media (max-width: $drawer-width-offset) {
width: 80%;
}
left: 100%;
background-color: #444;
box-shadow: none;
header {
width: 100%;
position: absolute;
height: $mobile-navbar-height;
background-color: $navbar-inverse-bg;
border-bottom: solid $navbar-inverse-border 1px;
#global-search {
form {
padding: 0 15px;
width: 100%;
input {
margin-top: 7px;
background-color: $navbar-inverse-bg;
font-size: 13px;
color: black;
&.active {
background-color: $white;
}
&:focus {
outline: none;
background-color: white;
}
&:placeholder { text-shadow: none; }
}
}
}
}
nav {
position: absolute;
top: $mobile-navbar-height;
bottom: 0;
overflow: auto;
width: 100%;
li {
font-size: 1.8rem;
line-height: 25px;
color: $light-grey;
border-bottom: solid $navbar-inverse-border 1px;
}
li:hover {
background-color: $link-grey;
}
.no-border {
padding: 0;
border-bottom: 0;
&:hover {
background-color: transparent;
}
> ul > li > a {
font-size: 14px;
padding: 8px 42px;
}
}
.hide {
display: none;
}
.avatar {
height: 35px;
width: 35px;
margin: -5px 5px;
float: right;
}
}
a {
display: block;
color: $light-grey;
text-decoration: none;
padding: 12px 25px;
}
ul {
list-style: none;
margin: 0;
padding: 0;
}
}
#main-nav, #drawer {
transition: all 0.25s ease;
z-index: 10;
}
/* This class is added when the user open the drawer */
#app.draw {
#main-nav, #drawer {
transform: translateX(-$drawer-width);
}
@media (max-width: $drawer-width-offset) {
#main-nav {
transform: translateX(-80%);
}
#drawer {
transform: translateX(-100%);
}
}
}