mirror of
https://github.com/BookStackApp/BookStack.git
synced 2024-10-01 01:36:00 -04:00
88dfb40c63
- Homepage toggle especially useful for not-logged-in users since they do not have a dropdown.
392 lines
6.9 KiB
SCSS
392 lines
6.9 KiB
SCSS
/**
|
|
* Includes the main navigation header and the faded toolbar.
|
|
*/
|
|
|
|
header .grid {
|
|
grid-template-columns: auto min-content auto;
|
|
}
|
|
|
|
@include smaller-than($l) {
|
|
header .grid {
|
|
grid-template-columns: 1fr;
|
|
grid-row-gap: 0;
|
|
}
|
|
}
|
|
|
|
header {
|
|
position: relative;
|
|
display: block;
|
|
z-index: 11;
|
|
top: 0;
|
|
color: rgb(250, 250, 250);
|
|
border-bottom: 1px solid #DDD;
|
|
box-shadow: $bs-card;
|
|
padding: $-xxs 0;
|
|
@include lightDark(border-bottom-color, #DDD, #000);
|
|
@include whenDark {
|
|
filter: saturate(0.6) brightness(0.8);
|
|
}
|
|
.links {
|
|
display: inline-block;
|
|
vertical-align: top;
|
|
}
|
|
.links a {
|
|
display: inline-block;
|
|
padding: $-m;
|
|
color: #FFF;
|
|
}
|
|
.dropdown-container {
|
|
padding-inline-start: $-m;
|
|
padding-inline-end: 0;
|
|
}
|
|
.avatar, .user-name {
|
|
display: inline-block;
|
|
}
|
|
.avatar {
|
|
width: 30px;
|
|
height: 30px;
|
|
}
|
|
.user-name {
|
|
vertical-align: top;
|
|
position: relative;
|
|
display: inline-block;
|
|
cursor: pointer;
|
|
> * {
|
|
vertical-align: top;
|
|
}
|
|
> span {
|
|
padding-inline-start: $-xs;
|
|
display: inline-block;
|
|
padding-top: $-xxs;
|
|
}
|
|
> svg {
|
|
padding-top: 4px;
|
|
font-size: 18px;
|
|
}
|
|
@include between($l, $xl) {
|
|
padding-inline-start: $-xs;
|
|
.name {
|
|
display: none;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
.header *, .primary-background * {
|
|
outline-color: #FFF;
|
|
}
|
|
|
|
|
|
.header-search {
|
|
display: inline-block;
|
|
}
|
|
header .search-box {
|
|
display: inline-block;
|
|
margin-top: 10px;
|
|
input {
|
|
background-color: rgba(0, 0, 0, 0.2);
|
|
border: 1px solid rgba(255, 255, 255, 0.2);
|
|
border-radius: 40px;
|
|
color: #EEE;
|
|
z-index: 2;
|
|
padding-inline-start: 40px;
|
|
&:focus {
|
|
outline: none;
|
|
border: 1px solid rgba(255, 255, 255, 0.6);
|
|
}
|
|
}
|
|
button {
|
|
z-index: 1;
|
|
left: 16px;
|
|
@include lightDark(color, rgba(255, 255, 255, 0.8), #AAA);
|
|
@include rtl {
|
|
left: auto;
|
|
right: 16px;
|
|
}
|
|
svg {
|
|
margin-block-end: 0;
|
|
}
|
|
}
|
|
::-webkit-input-placeholder { /* Chrome/Opera/Safari */
|
|
color: #DDD;
|
|
}
|
|
::-moz-placeholder { /* Firefox 19+ */
|
|
color: #DDD;
|
|
}
|
|
@include between($l, $xl) {
|
|
max-width: 200px;
|
|
}
|
|
}
|
|
|
|
.logo {
|
|
display: inline-block;
|
|
&:hover {
|
|
color: #FFF;
|
|
text-decoration: none;
|
|
}
|
|
}
|
|
.logo-text {
|
|
display: inline-block;
|
|
font-size: 1.8em;
|
|
color: #fff;
|
|
font-weight: 400;
|
|
@include padding(14px, $-l, 14px, 0);
|
|
vertical-align: top;
|
|
line-height: 1;
|
|
}
|
|
.logo-image {
|
|
@include margin($-xs, $-s, $-xs, 0);
|
|
vertical-align: top;
|
|
height: 43px;
|
|
}
|
|
|
|
.mobile-menu-toggle {
|
|
color: #FFF;
|
|
fill: #FFF;
|
|
font-size: 2em;
|
|
border: 2px solid rgba(255, 255, 255, 0.8);
|
|
border-radius: 4px;
|
|
padding: 0 $-xs;
|
|
position: absolute;
|
|
right: $-m;
|
|
top: 13px;
|
|
line-height: 1;
|
|
cursor: pointer;
|
|
user-select: none;
|
|
svg {
|
|
margin: 0;
|
|
bottom: -2px;
|
|
}
|
|
@include rtl() {
|
|
left: $-m;
|
|
right: auto;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
@include smaller-than($l) {
|
|
header .header-links {
|
|
@include lightDark(background-color, #fff, #333);
|
|
display: none;
|
|
z-index: 10;
|
|
right: $-m;
|
|
border-radius: 4px;
|
|
overflow: hidden;
|
|
position: absolute;
|
|
box-shadow: $bs-hover;
|
|
margin-top: -$-xs;
|
|
&.show {
|
|
display: block;
|
|
}
|
|
}
|
|
header .links a, header .dropdown-container ul li a, header .dropdown-container ul li button {
|
|
text-align: start;
|
|
display: block;
|
|
padding: $-s $-m;
|
|
color: $text-dark;
|
|
@include lightDark(color, $text-dark, #eee);
|
|
svg {
|
|
margin-inline-end: $-s;
|
|
}
|
|
&:hover {
|
|
@include lightDark(background-color, #eee, #333);
|
|
@include lightDark(color, #000, #fff);
|
|
text-decoration: none;
|
|
}
|
|
}
|
|
header .dropdown-container {
|
|
display: block;
|
|
padding-inline-start: 0;
|
|
}
|
|
header .links {
|
|
display: block;
|
|
}
|
|
header .dropdown-container ul {
|
|
display: block !important;
|
|
position: relative;
|
|
background-color: transparent;
|
|
border: 0;
|
|
padding: 0;
|
|
margin: 0;
|
|
box-shadow: none;
|
|
}
|
|
}
|
|
|
|
.tri-layout-mobile-tabs {
|
|
position: sticky;
|
|
top: 0;
|
|
z-index: 5;
|
|
background-color: #FFF;
|
|
border-bottom: 1px solid #DDD;
|
|
box-shadow: $bs-card;
|
|
}
|
|
.tri-layout-mobile-tab {
|
|
text-align: center;
|
|
border-bottom: 3px solid #BBB;
|
|
cursor: pointer;
|
|
&:first-child {
|
|
border-inline-end: 1px solid #DDD;
|
|
}
|
|
&.active {
|
|
border-bottom-color: currentColor;
|
|
}
|
|
}
|
|
|
|
.breadcrumbs {
|
|
display: flex;
|
|
flex-direction: row;
|
|
align-items: center;
|
|
justify-content: flex-start;
|
|
flex-wrap: wrap;
|
|
opacity: 0.7;
|
|
.icon-list-item {
|
|
width: auto;
|
|
padding-top: $-xs;
|
|
padding-bottom: $-xs;
|
|
}
|
|
.separator {
|
|
display: inline-block;
|
|
fill: #aaa;
|
|
font-size: 1.6em;
|
|
line-height: 0.8;
|
|
margin: -2px 0 0;
|
|
}
|
|
&:hover, &:focus-within {
|
|
opacity: 1;
|
|
}
|
|
}
|
|
|
|
@include smaller-than($l) {
|
|
.breadcrumbs .icon-list-item {
|
|
padding: $-xs;
|
|
> span + span {
|
|
display: none;
|
|
}
|
|
> span:first-child {
|
|
margin-inline-end: 0;
|
|
}
|
|
}
|
|
}
|
|
|
|
.breadcrumb-listing {
|
|
position: relative;
|
|
.breadcrumb-listing-toggle {
|
|
padding: 6px;
|
|
border: 1px solid transparent;
|
|
border-radius: 4px;
|
|
&:hover {
|
|
border-color: #DDD;
|
|
}
|
|
}
|
|
.svg-icon {
|
|
margin-inline-end: 0;
|
|
}
|
|
}
|
|
|
|
.breadcrumb-listing-dropdown {
|
|
box-shadow: $bs-med;
|
|
overflow: hidden;
|
|
min-height: 100px;
|
|
width: 240px;
|
|
display: none;
|
|
position: absolute;
|
|
z-index: 80;
|
|
right: -$-m;
|
|
@include rtl {
|
|
right: auto;
|
|
left: -$-m;
|
|
}
|
|
.breadcrumb-listing-search .svg-icon {
|
|
position: absolute;
|
|
left: $-s;
|
|
@include rtl {
|
|
right: $-s;
|
|
left: auto;
|
|
}
|
|
top: 11px;
|
|
fill: #888;
|
|
pointer-events: none;
|
|
}
|
|
.breadcrumb-listing-entity-list {
|
|
max-height: 400px;
|
|
overflow-y: scroll;
|
|
text-align: start;
|
|
}
|
|
input {
|
|
padding-inline-start: $-xl;
|
|
border-radius: 0;
|
|
border: 0;
|
|
border-bottom: 1px solid #DDD;
|
|
}
|
|
}
|
|
|
|
@include smaller-than($m) {
|
|
.breadcrumb-listing-dropdown {
|
|
position: fixed;
|
|
right: auto;
|
|
left: $-m;
|
|
}
|
|
.breadcrumb-listing-dropdown .breadcrumb-listing-entity-list {
|
|
max-height: 240px;
|
|
}
|
|
}
|
|
|
|
.faded {
|
|
a, button, span, span > div {
|
|
color: #666;
|
|
fill: #666;
|
|
}
|
|
.text-button {
|
|
opacity: 0.5;
|
|
transition: all ease-in-out 120ms;
|
|
&:hover {
|
|
opacity: 1;
|
|
text-decoration: none;
|
|
}
|
|
}
|
|
}
|
|
|
|
.faded span.faded-text {
|
|
display: inline-block;
|
|
padding: $-s;
|
|
}
|
|
|
|
.action-buttons .text-button {
|
|
display: inline-block;
|
|
padding: $-xs $-s;
|
|
&:last-child {
|
|
padding-inline-end: 0;
|
|
}
|
|
&:first-child {
|
|
padding-inline-start: 0;
|
|
}
|
|
}
|
|
|
|
|
|
.action-buttons .dropdown-container:last-child a {
|
|
padding-inline-end: 0;
|
|
padding-inline-start: $-s;
|
|
}
|
|
.action-buttons {
|
|
text-align: end;
|
|
&.text-left {
|
|
text-align: start;
|
|
.text-button {
|
|
padding-inline-end: $-m;
|
|
padding-inline-start: 0;
|
|
}
|
|
}
|
|
&.text-center {
|
|
text-align: center;
|
|
}
|
|
}
|
|
|
|
@include smaller-than($m) {
|
|
.action-buttons .text-button {
|
|
padding: $-xs $-xs;
|
|
}
|
|
.action-buttons .dropdown-container:last-child a {
|
|
padding-inline-start: $-xs;
|
|
}
|
|
} |