1
0
mirror of https://github.com/BookStackApp/BookStack.git synced 2024-10-31 08:02:42 +01:00
BookStack/resources/assets/sass/styles.scss

540 lines
8.5 KiB
SCSS
Raw Normal View History

2015-07-12 21:01:42 +02:00
@import "reset";
@import "variables";
@import "mixins";
@import "html";
@import "text";
@import "grid";
@import "blocks";
@import "buttons";
@import "forms";
2015-08-08 21:05:30 +02:00
@import "tables";
2015-08-16 01:18:22 +02:00
@import "animations";
2015-07-15 23:55:49 +02:00
@import "tinymce";
@import "image-manager";
2015-07-15 23:55:49 +02:00
header {
display: block;
2015-07-21 23:11:30 +02:00
z-index: 2;
top: 0;
2015-08-30 18:53:30 +02:00
background-color: $primary-dark;
color: #fff;
2015-07-21 23:11:30 +02:00
.padded {
padding: $-m;
}
2015-08-30 18:53:30 +02:00
border-bottom: 1px solid #DDD;
//margin-bottom: $-l;
2015-08-31 12:43:28 +02:00
.links {
display: inline-block;
vertical-align: top;
margin-right: $-xl;
}
2015-08-30 18:53:30 +02:00
.links a {
display: inline-block;
padding: $-l;
color: #FFF;
&:last-child {
padding-right: 0;
}
}
2015-08-30 18:53:30 +02:00
.avatar, .user-name {
display: inline-block;
}
.avatar {
2015-08-31 12:43:28 +02:00
margin-top: (45px/2);
width: 30px;
height: 30px;
2015-08-05 21:59:39 +02:00
}
2015-08-23 14:41:35 +02:00
.user-name {
vertical-align: top;
2015-08-31 12:43:28 +02:00
padding-top: 25.5px;
2015-08-30 18:53:30 +02:00
padding-left: $-m;
2015-08-31 12:43:28 +02:00
display: inline-block;
cursor: pointer;
i {
padding-left: $-xs;
}
2015-08-23 14:41:35 +02:00
}
}
form.search-box {
padding-top: $-l *0.9;
display: inline-block;
input {
background-color: transparent;
border-radius: 0;
border: none;
border-bottom: 2px solid #EEE;
color: #EEE;
padding-left: $-l;
outline: 0;
}
i {
margin-right: -$-l;
}
}
2015-08-30 18:53:30 +02:00
#content {
display: block;
position: relative;
2015-07-12 21:01:42 +02:00
}
2015-08-31 12:43:28 +02:00
body.flexbox {
display: flex;
flex-direction: column;
align-items: stretch;
height: 100%;
min-height: 100%;
max-height: 100%;
overflow: hidden;
#content {
flex: 1;
display: flex;
}
}
.flex-fill {
display: flex;
align-items: stretch;
.flex, &.flex {
flex: 1;
}
}
.page-editor {
display: flex;
flex-direction: column;
align-items: stretch;
.faded-small {
height: auto;
}
.edit-area {
flex: 1;
flex-direction: column;
}
}
2015-08-30 18:53:30 +02:00
.logo {
display: inline-block;
font-size: 1.8em;
color: #fff;
font-weight: 400;
padding: $-l $-l $-l 0;
vertical-align: top;
line-height: 1;
2015-07-12 22:31:15 +02:00
}
.page-title input {
display: block;
width: 100%;
font-size: 1.4em;
2015-07-14 23:34:31 +02:00
}
2015-07-15 23:55:49 +02:00
.page-style {
padding: $-s $-xxl $-xxl $-xxl;
margin-bottom: $-xxl;
max-width: 100%;
}
.page-style.editor {
padding: 0 !important;
}
.page-content {
@extend .page-style;
min-height: 70vh;
2015-07-21 23:11:30 +02:00
max-width: 840px;
margin-left: auto;
margin-right: auto;
2015-07-15 23:55:49 +02:00
&.right {
float: right;
}
&.left {
float: left;
}
2015-07-30 23:42:05 +02:00
img {
max-width: 100%;
height:auto;
2015-07-30 23:42:05 +02:00
}
2015-07-15 23:55:49 +02:00
}
.page-list {
h3 {
margin: $-l 0;
}
2015-08-31 12:43:28 +02:00
a.chapter {
color: $color-chapter;
}
.inset-list {
2015-07-15 23:55:49 +02:00
display: block;
overflow: hidden;
padding-left: $-l*2;
border-top: 3px dotted #EEE;
}
h4 {
display: block;
margin: $-m 0;
}
hr {
margin-top: 0;
2015-07-15 23:55:49 +02:00
}
}
.side-nav {
position: fixed;
padding-left: $-m;
opacity: 0.8;
margin-top: $-xxl;
margin-left: 0;
max-width: 240px;
display: none;
2015-07-15 23:55:49 +02:00
}
.page-nav-list {
$nav-indent: $-s;
margin-left: 2px;
list-style: none;
2015-07-15 23:55:49 +02:00
li {
//border-left: 1px solid rgba(0, 0, 0, 0.1);
padding-left: $-xs;
border-left: 2px solid #888;
margin-bottom: 4px;
}
li a {
color: #555;
2015-07-15 23:55:49 +02:00
}
.nav-H2 {
margin-left: $nav-indent;
font-size: 0.95em;
}
.nav-H3 {
margin-left: $nav-indent*2;
font-size: 0.90em
}
.nav-H4 {
margin-left: $nav-indent*3;
font-size: 0.85em
}
.nav-H5 {
margin-left: $nav-indent*4;
font-size: 0.80em
}
.nav-H6 {
margin-left: $nav-indent*5;
font-size: 0.75em
}
}
2015-07-16 20:15:22 +02:00
2015-07-14 23:34:31 +02:00
.overlay {
background-color: rgba(0, 0, 0, 0.2);
position: fixed;
2015-08-13 00:42:42 +02:00
display: none;
2015-07-14 23:34:31 +02:00
z-index: 95536;
width: 100%;
height: 100%;
min-width: 100%;
min-height: 100%;
top: 0;
left: 0;
right: 0;
bottom: 0;
}
2015-07-16 20:15:22 +02:00
// Link hooks & popovers
a.link-hook {
position: absolute;
display: inline-block;
top: $-xs;
2015-07-31 00:43:18 +02:00
left: -$-l;
padding-bottom: 30px;
2015-07-16 20:15:22 +02:00
font-size: 20px;
line-height: 20px;
color: #BBB;
opacity: 0;
2015-07-31 00:43:18 +02:00
transform: translate3d(10px, 0, 0);
transition: all ease-in-out 240ms;
background-color: transparent;
&:hover {
color: $primary;
}
2015-07-16 20:15:22 +02:00
}
h1, h2, h3, h4, h5, h6 {
&:hover a.link-hook {
opacity: 1;
2015-07-31 00:43:18 +02:00
transform: translate3d(0, 0, 0);
2015-07-16 20:15:22 +02:00
}
2015-07-20 23:05:26 +02:00
}
2015-08-31 12:43:28 +02:00
.breadcrumbs span.sep {
color: #aaa;
padding: 0 $-xs;
2015-07-20 23:05:26 +02:00
}
.faded {
a {
color: #666;
opacity: 0.5;
transition: all ease-in-out 120ms;
&:hover {
opacity: 1;
text-decoration: none;
}
}
}
.faded-small {
2015-08-30 18:53:30 +02:00
color: #000;
font-size: 0.9em;
2015-08-30 18:53:30 +02:00
background-color: rgba(21, 101, 192, 0.15);
a, span {
2015-08-30 18:53:30 +02:00
color: #000;
}
}
2015-08-31 12:43:28 +02:00
.breadcrumbs a, .action-buttons a {
display: inline-block;
padding: $-s;
&:last-child {
padding-right: 0;
}
}
.action-buttons {
text-align: right;
2015-08-31 12:43:28 +02:00
&.text-left {
text-align: left;
a {
padding-right: $-m;
padding-left: 0;
2015-08-30 18:53:30 +02:00
}
}
}
2015-08-31 18:59:45 +02:00
.book-tree {
margin-top: $-xl;
}
.book-tree h4 {
padding: $-m $-s 0 $-s;
i {
padding-right: $-s;
}
}
2015-08-31 12:43:28 +02:00
// Sidebar list
.book-tree .sidebar-page-list {
list-style: none;
margin: 0;
2015-08-31 18:59:45 +02:00
margin-top: $-xs;
2015-08-31 12:43:28 +02:00
border-left: 5px solid $color-book;
li a {
display: block;
border-bottom: none;
2015-08-31 12:43:28 +02:00
padding-left: $-s;
padding: $-xs 0 $-xs $-s;
&:hover {
background-color: rgba(255, 255, 255, 0.2);
text-decoration: none;
}
}
2015-08-16 01:50:27 +02:00
li, a {
display: block;
}
a.bold {
color: #EEE !important;
}
ul {
list-style: none;
margin: 0;
}
.book {
2015-08-31 12:43:28 +02:00
color: $color-book !important;
&.selected {
2015-08-31 12:43:28 +02:00
background-color: rgba($color-book, 0.29);
}
}
.chapter {
2015-08-31 12:43:28 +02:00
color: $color-chapter !important;
&.selected {
2015-08-31 12:43:28 +02:00
background-color: rgba($color-chapter, 0.12);
}
}
2015-08-16 01:50:27 +02:00
.list-item-chapter {
2015-08-31 12:43:28 +02:00
border-left: 5px solid $color-chapter;
2015-08-16 01:50:27 +02:00
margin: 10px 10px;
display: block;
}
.list-item-page {
border-bottom: none;
}
.page {
2015-08-31 12:43:28 +02:00
color: $color-page !important;
border-left: 5px solid $color-page;
2015-08-16 01:50:27 +02:00
margin: 10px 10px;
border-bottom: none;
&.selected {
2015-08-31 12:43:28 +02:00
background-color: rgba($color-page, 0.1);
}
}
}
2015-08-31 12:43:28 +02:00
// Sortable Lists
2015-07-21 21:13:29 +02:00
.sortable-page-list, .sortable-page-list ul {
list-style: none;
}
.sortable-page-list {
margin-left: 0;
2015-08-31 12:43:28 +02:00
box-shadow: 0 0 1px 0 rgba(0, 0, 0, 0.1);
2015-07-21 21:13:29 +02:00
ul {
margin-bottom: 0;
margin-top: 0;
2015-08-31 12:43:28 +02:00
box-shadow: 0 0 1px 0 rgba(0, 0, 0, 0.1);
2015-07-21 21:13:29 +02:00
}
li {
2015-08-31 12:43:28 +02:00
border: 1px solid #DDD;
2015-07-21 21:13:29 +02:00
padding: $-xs $-s;
2015-08-31 12:43:28 +02:00
margin-top: -1px;
min-height: 38px;
&.text-chapter {
border-left: 2px solid $color-chapter;
}
&.text-page {
border-left: 2px solid $color-page;
}
2015-07-21 21:13:29 +02:00
}
li:first-child {
margin-top: $-xs;
}
}
// Jquery Sortable Styles
.dragged {
position: absolute;
opacity: 0.5;
z-index: 2000;
}
body.dragging, body.dragging * {
cursor: move !important;
}
.sortable-page-list li.placeholder {
position: relative;
}
.sortable-page-list li.placeholder:before {
position: absolute;
}
2015-08-05 21:59:39 +02:00
.center-box {
2015-08-31 12:43:28 +02:00
margin: 15vh auto 0 auto;
2015-08-05 21:59:39 +02:00
padding: $-m $-xxl $-xl*2 $-xxl;
max-width: 346px;
2015-08-31 12:43:28 +02:00
&.login {
background-color: #EEE;
box-shadow: 0 0 2px 0 rgba(0, 0, 0, 0.1);
border: 1px solid #DDD;
2015-08-05 21:59:39 +02:00
}
}
.activity-list-item {
padding: $-s 0;
color: #888;
border-bottom: 1px solid #EEE;
2015-08-23 14:41:35 +02:00
font-size: 0.9em;
.left {
float: left;
}
.left + .right {
margin-left: 30px + $-s;
}
}
.avatar {
border-radius: 100%;
}
.notification {
position: fixed;
top: 0;
right: 0;
margin: $-xl*2 $-xl;
padding: $-l $-xl;
background-color: #EEE;
border-radius: 3px;
box-shadow: $bs-med;
z-index: 99999999;
display: table;
cursor: pointer;
max-width: 480px;
i, span {
display: table-cell;
}
i {
font-size: 2em;
padding-right: $-l;
}
span {
vertical-align: middle;
}
&.pos {
background-color: $positive;
color: #EEE;
}
&.neg {
background-color: $negative;
color: #EEE;
}
}
.setting-nav {
2015-08-30 18:53:30 +02:00
text-align: center;
a {
padding: $-m;
display: inline-block;
//color: #666;
&.selected {
//color: $primary;
2015-08-30 18:53:30 +02:00
border-bottom: 2px solid $primary;
}
}
2015-08-31 12:43:28 +02:00
}
.dropdown-container {
display: inline-block;
vertical-align: top;
position: relative;
}
ul.dropdown {
display: none;
position: absolute;
z-index: 999;
top: 0;
left: 0;
margin: $-m 0;
background-color: #FFFFFF;
list-style: none;
box-shadow: 0 0 2px 0 rgba(0, 0, 0, 0.1);
border-radius: 1px;
border: 1px solid #EEE;
min-width: 180px;
padding: $-xs 0;
color: #555;
a {
display: block;
padding: $-xs $-m;
color: #555;
&:hover {
text-decoration: none;
background-color: #EEE;
}
i {
margin-right: $-m;
padding-right: 0;
display: inline;
width: 22px;
}
}
li.border-bottom {
border-bottom: 1px solid #DDD;
}
2015-08-05 21:59:39 +02:00
}