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

181 lines
3.2 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;
header {
position: fixed;
height: 45px;
top: 0px;
z-index: 10;
@include header-gradient($header-background-color);
box-shadow: 0 1px 2px #333;
border-bottom: 1px solid darken($header-background-color, 8%);
}
#main_nav {
width: 100%;
#header_title {
display: inline-block;
width: 45px;
height: 100%;
padding: 7px;
}
#nav_badges {
float: right;
margin: 7px 0;
display: inline-block;
.badge {
display: inline;
margin: 0 4px;
padding: 10px 6px;
font-weight: bold;
font-size: smaller;
background-color: transparent;
}
.badge_count {
border-radius: 2px;
z-index: 3;
position: absolute;
top: 3px;
padding: 1px 3px;
background-color: $red;
margin-left: -8px;
}
#conversation_icon {
height: 18px;
}
}
#nav_badges, #header_title{
img {
height: 30px;
width: 30px;
}
}
}
#drawer {
position: fixed;
top: 0;
bottom: 0;
width: $drawer-width;
@media (max-width: $drawer-width-offset) {
width: 100%;
.avatar{ display: none; }
}
left: 100%;
background-color: #444;
box-shadow: none;
header {
position: static;
left: 100%;
right: -80%;
#global_search {
position: relative;
@media (max-width: $drawer-width-offset) { width: 80%; }
form {
position: absolute;
left: 0;
right: 22%;
padding: 0 15px;
width: 100%;
input {
box-shadow: 0 1px 1px #444;
border-radius: 15px;
width: 100%;
margin-top: 5px;
background-color: #444;
border: 1px solid #222;
font-size: 13px;
padding: 6px;
color: black;
&.active {
background-color: rgba(160,160,160,0.6);
}
&:focus {
outline: none;
background-color: white;
}
&:placeholder { text-shadow: none; }
}
}
}
}
nav {
position: absolute;
top: 45px;
bottom: 0px;
overflow: auto;
width: 100%;
li {
font-size: 25px;
line-height: 25px;
font-weight: bold;
color: $light-grey;
border-bottom: solid rgb(53, 53, 53) 2px;
}
li:hover {
background-color: $link-grey;
}
.no_border {
padding: 0px;
border-bottom: 0px;
&: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;
}
}
/* This class is added when the user open the drawer */
#app.draw > * {
transform: translateX(-$drawer-width);
@media (max-width: $drawer-width-offset) { transform: translateX(-80%); }
}