vikunja-frontend/src/styles/theme/navigation.scss

421 lines
7.5 KiB
SCSS
Raw Normal View History

2019-12-19 23:09:23 +01:00
.navbar {
z-index: 2;
2018-12-25 16:03:51 +01:00
2019-12-19 23:09:23 +01:00
@each $name, $pair in $colors {
$color: nth($pair, 1);
$color-invert: nth($pair, 2);
2018-12-25 16:03:51 +01:00
2019-12-19 23:09:23 +01:00
&.is-#{$name} {
border-color: darken($color, 5);
}
}
2019-12-19 23:09:23 +01:00
.navbar-dropdown {
box-shadow: $navbar-dropdown-boxed-shadow;
top: 101%;
2018-12-25 16:03:51 +01:00
}
2020-06-25 23:56:41 +02:00
.navbar-brand {
display: flex;
align-items: center;
}
2018-12-25 16:03:51 +01:00
}
2019-12-19 23:09:23 +01:00
.navbar.main-theme {
background: $light-background;
z-index: 5 !important;
justify-content: space-between;
align-items: center;
.title {
margin: 0;
font-size: 1.75rem;
2020-06-12 19:32:37 +02:00
text-overflow: ellipsis;
overflow: hidden;
white-space: nowrap;
}
.navbar-end {
margin-left: 0;
}
2019-12-19 23:09:23 +01:00
@media screen and (max-width: $desktop) {
display: flex;
justify-content: space-between;
@media screen and (max-width: $tablet) {
.navbar-brand {
2020-06-12 19:32:37 +02:00
display: none;
2019-12-19 23:09:23 +01:00
}
.user {
2020-06-12 19:32:37 +02:00
width: $user-dropdown-width-mobile;
2020-06-12 19:07:42 +02:00
display: flex;
align-items: center;
.dropdown-trigger {
line-height: 1;
.button {
padding: 0 0.25rem;
height: 1rem;
.icon {
width: .5rem;
}
}
}
2019-12-19 23:09:23 +01:00
.username {
display: none;
}
}
}
}
2018-12-25 16:03:51 +01:00
}
2019-12-19 23:09:23 +01:00
.hero {
.navbar {
border: none;
box-shadow: none;
}
2019-12-19 23:09:23 +01:00
@each $name, $pair in $colors {
$color: nth($pair, 1);
$color-invert: nth($pair, 2);
&.is-#{$name} {
.navbar {
box-shadow: none;
}
}
}
@include touch {
.navbar-menu {
box-shadow: none;
}
}
2018-12-25 16:03:51 +01:00
}
.navbar-menu .navbar-item .icon {
2018-12-25 16:03:51 +01:00
margin: 0 0.5em;
}
.navbar {
2018-12-25 16:03:51 +01:00
z-index: 4 !important;
}
2019-12-19 23:09:23 +01:00
.app-container {
.namespace-container {
2019-04-23 21:50:37 +02:00
background: $vikunja-nav-background;
2019-05-19 18:19:22 +02:00
z-index: 6;
2019-04-23 21:50:37 +02:00
color: $vikunja-nav-color;
2018-12-25 16:03:51 +01:00
padding: 0;
transition: all $transition;
position: fixed;
bottom: 0;
2020-06-12 19:32:37 +02:00
top: $navbar-height;
2018-12-25 16:03:51 +01:00
overflow-x: auto;
width: 17vw;
2020-06-25 23:56:41 +02:00
padding: 0 0 1em;
left: -147vw;
bottom: 0;
2018-12-25 16:03:51 +01:00
@media screen and (max-width: $tablet) {
top: 0;
width: 70vw;
2020-06-25 23:56:41 +02:00
}
&.is-active {
left: 0;
}
2018-12-25 16:03:51 +01:00
2020-06-25 23:56:41 +02:00
.collapse-menu-button {
font-size: .75rem;
color: $grey;
text-align: center;
display: block;
width: 100%;
margin: $navbar-padding / 2 0 $navbar-padding;
cursor: pointer;
@media screen and (max-width: $tablet) {
display: none;
2018-12-25 16:03:51 +01:00
}
}
.menu {
2018-12-25 16:03:51 +01:00
.menu-label {
font-size: 1em;
2019-04-23 21:50:37 +02:00
font-weight: 700;
font-weight: bold;
font-family: $vikunja-font;
color: $grey;
font-weight: 500;
2018-12-25 16:03:51 +01:00
min-height: 2.5em;
padding-top: $navbar-padding * 0.3;
padding-left: $navbar-padding;
2018-12-25 16:03:51 +01:00
display: block;
2018-12-25 16:03:51 +01:00
white-space: nowrap;
text-overflow: ellipsis;
overflow: hidden;
}
.menu-label, .menu-list a {
display: flex;
align-items: center;
justify-content: space-between;
span.name:not(.icon) {
overflow: hidden;
text-overflow: ellipsis;
.color-bubble {
display: inline-block;
vertical-align: initial;
width: 12px;
height: 12px;
border-radius: 100%;
margin-right: 2px;
}
}
}
.menu-label {
.color-bubble {
width: 14px !important;
height: 14px !important;
}
.is-archived {
min-width: 85px;
}
}
.nsettings {
2018-12-25 16:03:51 +01:00
float: right;
padding: 10px 0.3em 0;
2018-12-25 16:03:51 +01:00
}
.menu-label, .nsettings, .menu-list a {
2019-04-23 21:50:37 +02:00
color: $vikunja-nav-color;
2018-12-25 16:03:51 +01:00
}
.checkinput {
display: none;
}
.checkinput:checked + .more-container {
.menu-list.can-be-hidden {
opacity: 1;
height: auto;
}
}
.checkinput:not(:checked) + .more-container .hidden-hint {
opacity: 1;
height: auto;
}
.hidden-hint {
display: block;
opacity: 0;
height: 0;
text-align: center;
2019-04-23 21:50:37 +02:00
color: $grey;
cursor: pointer;
font-size: 0.8em;
2018-12-25 16:03:51 +01:00
}
.menu-list {
&.can-be-hidden {
transition: all $transition;
height: 0;
overflow: hidden;
opacity: 0;
}
2018-12-25 16:03:51 +01:00
li {
2019-04-23 21:50:37 +02:00
height: 44px;
2018-12-25 16:03:51 +01:00
}
a {
padding: 0.75em .5em 0.75em $navbar-padding * 1.5;
2018-12-25 16:03:51 +01:00
transition: all 0.2s ease;
2019-04-23 21:50:37 +02:00
-webkit-border-radius: 0;
-moz-border-radius: 0;
border-radius: 0;
2018-12-25 16:03:51 +01:00
white-space: nowrap;
text-overflow: ellipsis;
overflow: hidden;
width: 100%;
2019-04-23 21:50:37 +02:00
border-left: $vikunja-nav-selected-width solid transparent;
2018-12-25 16:03:51 +01:00
.icon {
2019-04-23 21:50:37 +02:00
color: lighten($vikunja-nav-color, 20);
2018-12-25 16:03:51 +01:00
height: 1rem;
vertical-align: middle;
padding-bottom: 4px;
padding-right: 0.5em;
}
&.router-link-exact-active {
2019-04-23 21:50:37 +02:00
color: $primary;
border-left: $vikunja-nav-selected-width solid darken($primary, 5%);
2019-04-23 21:50:37 +02:00
.icon {
color: $primary;
}
2018-12-25 16:03:51 +01:00
}
&:hover {
2019-04-23 21:50:37 +02:00
background: $white;
border-left: $vikunja-nav-selected-width solid darken($primary, 3%);
2018-12-25 16:03:51 +01:00
}
2018-12-25 16:03:51 +01:00
}
}
.logo {
display: none;
@media screen and (max-width: $tablet) {
display: block;
}
}
2018-12-25 16:03:51 +01:00
}
.top-menu {
2020-06-25 23:56:41 +02:00
margin-top: $navbar-padding / 2;
2018-12-25 16:03:51 +01:00
2019-04-23 21:50:37 +02:00
.menu-list {
li {
font-weight: 500;
font-family: $vikunja-font;
}
a {
padding-left: 2em;
display: inline-block;
2019-04-23 21:50:37 +02:00
}
2018-12-25 16:03:51 +01:00
}
}
}
}
.navbar .user {
2019-04-23 21:50:37 +02:00
span {
font-family: $vikunja-font;
}
.avatar {
-webkit-border-radius: 100%;
-moz-border-radius: 100%;
border-radius: 100%;
vertical-align: middle;
height: 40px;
}
.logout-icon {
color: lighten($black, 10);
.icon {
vertical-align: middle;
}
}
.dropdown-trigger .button {
background: none;
&:focus:not(:active), &:active {
2019-04-23 21:50:37 +02:00
outline: none !important;
-webkit-box-shadow: none !important;
-moz-box-shadow: none !important;
box-shadow: none !important;
}
}
.dropdown-menu {
.dropdown-content {
box-shadow: 0.3em 0.3em 0.8em darken($light, 6);
}
}
}
2020-06-25 23:56:41 +02:00
.menu-hide-button, .menu-show-button {
2018-12-25 16:03:51 +01:00
display: none;
2019-05-19 18:19:22 +02:00
z-index: 31;
2018-12-25 16:03:51 +01:00
font-weight: bold;
font-size: 2em;
2019-05-19 18:19:22 +02:00
color: $dark;
2020-06-12 18:59:54 +02:00
line-height: 1;
&:hover, &:focus {
2019-05-19 18:19:22 +02:00
color: darken($dark, 20);
2018-12-25 16:03:51 +01:00
}
}
2020-06-25 23:56:41 +02:00
.menu-hide-button {
2020-06-12 19:32:37 +02:00
position: fixed;
&:hover, &:focus {
2018-12-25 16:03:51 +01:00
color: $dark;
}
}
.mobile-overlay {
2018-12-25 16:03:51 +01:00
display: none;
position: fixed;
top: 0;
bottom: 0;
left: 0;
right: 0;
background: rgba(250, 250, 250, 0.8);
2019-05-19 18:19:22 +02:00
z-index: 5;
2018-12-25 16:03:51 +01:00
opacity: 0;
transition: all $transition;
}
@media screen and (max-width: $tablet) {
2020-06-25 23:56:41 +02:00
.menu-hide-button {
2018-12-25 16:03:51 +01:00
display: block;
2020-06-12 19:32:37 +02:00
top: $hamburger-menu-icon-spacing;
right: $hamburger-menu-icon-spacing;
2018-12-25 16:03:51 +01:00
}
2020-06-25 23:56:41 +02:00
.menu-show-button {
2018-12-25 16:03:51 +01:00
display: block;
2020-06-12 19:32:37 +02:00
margin-left: $hamburger-menu-icon-spacing;
2018-12-25 16:03:51 +01:00
}
.mobile-overlay {
2018-12-25 16:03:51 +01:00
display: block;
opacity: 1;
}
.navbar.is-dark .navbar-brand > .navbar-item {
2018-12-25 16:03:51 +01:00
margin: 0 auto;
}
}
2020-06-25 23:56:41 +02:00
.menu-show-button.is-visible {
display: block;
}
2018-12-25 16:03:51 +01:00
.logout-icon {
margin-right: 0.85em !important;
}
.menu-bottom-link {
width: 100%;
color: $grey-light;
text-align: center;
display: block;
margin: 1em 0;
font-size: .8em;
}