X-Git-Url: http://source.bookstackapp.com/bookstack/blobdiff_plain/1e2f5ded38e03a4e429dba4d68e5ebdc134dfe84..refs/pull/360/head:/resources/assets/sass/styles.scss diff --git a/resources/assets/sass/styles.scss b/resources/assets/sass/styles.scss index 9667eab03..967aba76b 100644 --- a/resources/assets/sass/styles.scss +++ b/resources/assets/sass/styles.scss @@ -1,5 +1,6 @@ @import "reset"; @import "variables"; +@import "fonts"; @import "mixins"; @import "html"; @import "text"; @@ -7,363 +8,272 @@ @import "blocks"; @import "buttons"; @import "forms"; +@import "tables"; +@import "animations"; @import "tinymce"; +@import "highlightjs"; +@import "components"; +@import "header"; +@import "lists"; +@import "pages"; -header { - display: block; - z-index: 2; - top: 0; - .padded { - padding: $-m; - } - //margin-bottom: $-l; -} - -#sidebar { - position: fixed; - background-color: #444; - color: #EEE; - height: 100%; - top: 0; - z-index: 1; - //padding-top: $-m; - width: 300px; - border-right: 1px solid #DDD; - h4, li, p, a { - color: #CCC; - } -} - -#content { - //margin-top: 63px; - margin-left: 300px; - display: block; - position: relative; - padding: 0 16px; -} - -.logo { - font-size: 2em; - padding: $-xl $-s; - font-weight: bold; - color: #CCC; -} - -.search-box { - input { - width: 100%; - border-radius: 0; - padding: $-s $-m; - background-color: rgba(0, 0, 0, 0.1); - border: none; - border-top: 1px solid #333; - border-bottom: 1px solid #333; - } -} +[v-cloak], [v-show] {display: none;} -ul.menu { - list-style: none; - margin: 0; - li a { - padding: $-m; - display: block; - border-bottom: 1px solid #3A3939; - } +[ng\:cloak], [ng-cloak], .ng-cloak { + display: none !important; + user-select: none; } -.page-title input { - display: block; - width: 100%; - font-size: 1.4em; +[ng-click] { + cursor: pointer; } -.page-style { - padding: $-s $-xxl $-xxl $-xxl; - margin-bottom: $-xxl; - max-width: 100%; -} - -.page-style.editor { - padding: 0 !important; +// Jquery Sortable Styles +.dragged { + position: absolute; + opacity: 0.5; + z-index: 2000; } - -.page-content { - @extend .page-style; - min-height: 70vh; - max-width: 840px; - margin-left: auto; - margin-right: auto; - &.right { - float: right; - } - &.left { - float: left; - } - img { - max-width: 100%; - height:auto; - } +body.dragging, body.dragging * { + cursor: move !important; } -.page-list { - h3 { - margin: $-l 0; +// User Avatar Images +.avatar { + border-radius: 100%; + background-color: #EEE; + width: 30px; + height: 30px; + &.med { + width: 40px; + height: 40px; } - .inset-list { - display: block; - overflow: hidden; - padding-left: $-l*2; - border-top: 3px dotted #EEE; + &.large { + width: 80px; + height: 80px; } - h4 { - display: block; - margin: $-m 0; + &.huge { + width: 120px; + height: 120px; } - hr { - margin-top: 0; + &.square { + border-radius: 3px; } } -.side-nav { +// System wide notifications +.notification { position: fixed; - padding-left: $-m; - opacity: 0.8; - margin-top: $-xxl; - margin-left: 0; - max-width: 240px; -} - -.page-nav-list { - $nav-indent: $-s; - margin-left: 2px; - list-style: none; - 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; + top: 0; + right: 0; + margin: $-xl*2 $-xl; + padding: $-l $-xl; + background-color: #EEE; + border-radius: 3px; + box-shadow: $bs-med; + z-index: 999999; + display: block; + cursor: pointer; + max-width: 480px; + i, span { + display: table-cell; } - .nav-H2 { - margin-left: $nav-indent; - font-size: 0.95em; + i { + font-size: 2em; + padding-right: $-l; } - .nav-H3 { - margin-left: $nav-indent*2; - font-size: 0.90em + span { + vertical-align: middle; } - .nav-H4 { - margin-left: $nav-indent*3; - font-size: 0.85em + &.pos { + background-color: $positive; + color: #EEE; } - .nav-H5 { - margin-left: $nav-indent*4; - font-size: 0.80em + &.neg { + background-color: $negative; + color: #EEE; } - .nav-H6 { - margin-left: $nav-indent*5; - font-size: 0.75em + &.warning { + background-color: $secondary; + color: #EEE; } } - - -.overlay { - background-color: rgba(0, 0, 0, 0.2); - position: fixed; +// Loading icon +$loadingSize: 10px; +.loading-container { + position: relative; display: block; - z-index: 95536; - width: 100%; - height: 100%; - min-width: 100%; - min-height: 100%; - top: 0; - left: 0; - right: 0; - bottom: 0; -} -#image-manager { - background-color: #EEE; - max-width: 90%; - max-height: 90%; - width: 90%; - height: 90%; - margin: 2% 5%; - //border: 2px solid $primary; - border-radius: 4px; - box-shadow: 0 0 15px 0 rgba(0, 0, 0, 0.3); - overflow: hidden; - .image-manager-display img { - width: 150px; - height: 150px; + height: $loadingSize; + margin: $-xl auto; + > div { + width: $loadingSize; + height: $loadingSize; + border-radius: $loadingSize; display: inline-block; - margin: $-s 0 0 $-s; - cursor: pointer; - } -} -.image-manager-left { - background-color: #FFF; - height: 100%; - width: 100%; - text-align: left; - .image-manager-display { - height: 75%; - width: 100%; - text-align: left; - overflow-y: scroll; + vertical-align: top; + transform: translate3d(0, 0, 0); + animation-name: loadingBob; + animation-duration: 1.4s; + animation-iteration-count: infinite; + animation-timing-function: cubic-bezier(.62, .28, .23, .99); + margin-right: 4px; + background-color: $color-page; + animation-delay: 0.3s; + } + > div:first-child { + left: -($loadingSize+$-xs); + background-color: $color-book; + animation-delay: 0s; + } + > div:last-child { + left: $loadingSize+$-xs; + background-color: $color-chapter; + animation-delay: 0.6s; } } -.image-manager-title { - font-size: 2em; - text-align: left; - margin: 0 $-m; - padding: $-xl $-m; - color: #666; - border-bottom: 1px solid #DDD; -} -.image-manager-dropzone { - background-color: lighten($primary, 40%); - height: 25%; - text-align: center; - font-size: 2em; - line-height: 2em; - padding-top: $-xl*1.2; - color: #666; - border-top: 2px solid $primary; +// Search results +.search-results > h3 a { + font-size: 0.66em; + color: $primary; + padding-left: $-m; + i { + padding-right: $-s; + } } -// Link hooks & popovers -a.link-hook { - position: absolute; - display: inline-block; - top: $-xs; - left: -$-xl+2px; - font-size: 20px; - line-height: 20px; - color: #BBB; +// Back to top link +$btt-size: 40px; +#back-to-top { + background-color: $primary; + position: fixed; + bottom: $-m; + right: $-l; + padding: $-xs $-s; + cursor: pointer; + color: #FFF; + width: $btt-size; + height: $btt-size; + border-radius: $btt-size; + transition: all ease-in-out 180ms; opacity: 0; -} -h1, h2, h3, h4, h5, h6 { - &:hover a.link-hook { - opacity: 1; + z-index: 999; + overflow: hidden; + &:hover { + width: $btt-size*3.4; + opacity: 1 !important; + span { + display: inline-block; + } + } + .inner { + width: $btt-size*3.4; } -} - -.breadcrumbs { - margin-top: $-s; i { - padding-right: 4px; + margin: 0; + font-size: 28px; + padding: 0 $-s 0 0; } - span.sep { - color: #aaa; - padding: 0 $-xs; + span { + line-height: 12px; + position: relative; + top: -5px; } } -.faded { - a { - color: #666; - opacity: 0.5; - transition: all ease-in-out 120ms; - &:hover { - opacity: 1; - text-decoration: none; +.contained-search-box { + display: flex; + input, button { + border-radius: 0; + border: 1px solid #DDD; + margin-left: -1px; + } + input { + flex: 5; + &:focus, &:active { + outline: 0; } } -} - -.faded-small { - color: #666; - font-size: 0.9em; - a, span { - color: #666; + button { + width: 60px; } -} - -.action-buttons { - text-align: right; - a { - display: inline-block; - padding: $-s; + button i { + padding: 0; } -} - - -.book-tree h4 { - padding: $-m $-s 0 $-s; - i { - padding-right: $-s; + button.cancel.active { + background-color: $negative; + color: #EEE; } } -// Sidebar list -.book-tree .sidebar-page-list { - list-style: none; - margin: 0; - li a { + +.entity-selector { + border: 1px solid #DDD; + border-radius: 3px; + overflow: hidden; + font-size: 0.8em; + input[type="text"] { + width: 100%; display: block; - border-bottom: 1px solid #3A3939; - } - a.bold { - color: #EEE !important; - } - ul { - list-style: none; - margin: 0; - } - ul li a { - padding-left: $-xl; - } - .book { - color: #7BD06E !important; - } - .chapter { - color: #D2A64B !important; + border-radius: 0; + border: 0; + border-bottom: 1px solid #DDD; + font-size: 16px; + padding: $-s $-m; } - .page { - color: #4599DC !important; + .entity-list { + overflow-y: scroll; + height: 400px; + background-color: #EEEEEE; + } + .loading { + height: 400px; + padding-top: $-l; + } + .entity-list > p { + text-align: center; + padding-top: $-l; + font-size: 1.333em; + } + .entity-list > div { + padding-left: $-m; + padding-right: $-m; + background-color: #FFF; + transition: all ease-in-out 120ms; + cursor: pointer; } } -.sortable-page-list, .sortable-page-list ul { - list-style: none; - //background-color: rgba(0, 0, 0, 0.04); -} -.sortable-page-list { - margin-left: 0; - ul { - margin-bottom: 0; - margin-top: 0; +.entity-list-item.selected { + h3, i, p ,a, span { + color: #EEE; } - li { - border-bottom: 1px solid #BBB; - border-left: 1px solid #BBB; - border-right: 1px solid #BBB; - padding: $-xs $-s; +} + +.center-box { + margin: $-xl auto 0 auto; + padding: $-m $-xxl $-xl $-xxl; + width: 420px; + max-width: 100%; + display: inline-block; + text-align: left; + vertical-align: top; + //border: 1px solid #DDD; + input { + width: 100%; } - li:first-child { - margin-top: $-xs; - border-top: 1px solid #BBB; + &.login { + background-color: #EEE; + box-shadow: 0 0 2px 0 rgba(0, 0, 0, 0.1); + border: 1px solid #DDD; } } -// 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; -} + + + + +