]> BookStack Code Mirror - bookstack/blobdiff - resources/assets/sass/styles.scss
Fixes #354, Adds the spellchecker option
[bookstack] / resources / assets / sass / styles.scss
index 68b1c012537ab4fb4bc172d9cbc7a57711395473..967aba76b755796c44c798f15ab94331c3c2fdd9 100644 (file)
@@ -1,5 +1,6 @@
 @import "reset";
 @import "variables";
+@import "fonts";
 @import "mixins";
 @import "html";
 @import "text";
 @import "tables";
 @import "animations";
 @import "tinymce";
-@import "image-manager";
+@import "highlightjs";
+@import "components";
+@import "header";
+@import "lists";
+@import "pages";
 
-header {
-  display: block;
-  z-index: 2;
-  top: 0;
-  background-color: $primary-dark;
-  color: #fff;
-  .padded {
-    padding: $-m;
-  }
-  border-bottom: 1px solid #DDD;
-  //margin-bottom: $-l;
-  .links {
-    display: inline-block;
-    vertical-align: top;
-    margin-right: $-xl;
-  }
-  .links a {
-    display: inline-block;
-    padding: $-l;
-    color: #FFF;
-    &:last-child {
-      padding-right: 0;
-    }
-  }
-  .search-box {
-    padding-top: $-l *0.8;
-  }
-  .avatar, .user-name {
-    display: inline-block;
-  }
-  .avatar {
-    margin-top: (45px/2);
-    width: 30px;
-    height: 30px;
-  }
-  .user-name {
-    vertical-align: top;
-    padding-top: 25.5px;
-    padding-left: $-m;
-    display: inline-block;
-    cursor: pointer;
-    i {
-      padding-left: $-xs;
-    }
-  }
-}
+[v-cloak], [v-show] {display: none;}
 
-#content {
-  display: block;
-  position: relative;
+[ng\:cloak], [ng-cloak], .ng-cloak {
+  display: none !important;
+  user-select: none;
 }
 
-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;
-  }
-}
-
-.logo {
-  display: inline-block;
-  font-size: 1.8em;
-  color: #fff;
-  font-weight: 400;
-  padding: $-l $-l $-l 0;
-  vertical-align: top;
-  line-height: 1;
-}
-
-.page-title input {
-  display: block;
-  width: 100%;
-  font-size: 1.4em;
-}
-
-.page-style {
-  padding: $-s $-xxl $-xxl $-xxl;
-  margin-bottom: $-xxl;
-  max-width: 100%;
+[ng-click] {
+  cursor: pointer;
 }
 
-.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;
-  }
-  a.chapter {
-    color: $color-chapter;
+// 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;
-  display: none;
-}
-
-.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;
-  display: none;
-  z-index: 95536;
-  width: 100%;
-  height: 100%;
-  min-width: 100%;
-  min-height: 100%;
-  top: 0;
-  left: 0;
-  right: 0;
-  bottom: 0;
-}
-
-// Link hooks & popovers
-a.link-hook {
-  position: absolute;
-  display: inline-block;
-  top: $-xs;
-  left: -$-l;
-  padding-bottom: 30px;
-  font-size: 20px;
-  line-height: 20px;
-  color: #BBB;
-  opacity: 0;
-  transform: translate3d(10px, 0, 0);
-  transition: all ease-in-out 240ms;
-  background-color: transparent;
-  &:hover {
-    color: $primary;
-  }
-}
-h1, h2, h3, h4, h5, h6 {
-  &:hover a.link-hook {
-    opacity: 1;
+// Loading icon
+$loadingSize: 10px;
+.loading-container {
+  position: relative;
+  display: block;
+  height: $loadingSize;
+  margin: $-xl auto;
+  > div {
+    width: $loadingSize;
+    height: $loadingSize;
+    border-radius: $loadingSize;
+    display: inline-block;
+    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;
   }
-}
-
-.breadcrumbs span.sep {
-  color: #aaa;
-  padding: 0 $-xs;
-}
-
-.faded {
-  a {
-    color: #666;
-    opacity: 0.5;
-    transition: all ease-in-out 120ms;
-    &:hover {
-      opacity: 1;
-      text-decoration: none;
-    }
+  > div:first-child {
+      left: -($loadingSize+$-xs);
+      background-color: $color-book;
+      animation-delay: 0s;
   }
-}
-
-.faded-small {
-  color: #000;
-  font-size: 0.9em;
-  background-color: rgba(21, 101, 192, 0.15);
-  a, span {
-    color: #000;
+  > div:last-child {
+    left: $loadingSize+$-xs;
+    background-color: $color-chapter;
+    animation-delay: 0.6s;
   }
 }
 
-.breadcrumbs a, .action-buttons a {
-  display: inline-block;
-  padding: $-s;
-  &:last-child {
-    padding-right: 0;
-  }
-}
-.action-buttons {
-  text-align: right;
-  &.text-left {
-    text-align: left;
-    a {
-      padding-right: $-m;
-      padding-left: 0;
-    }
-  }
-}
 
-.book-tree {
-  margin-top: $-xl;
-}
-.book-tree h4 {
-  padding: $-m $-s 0 $-s;
+// Search results
+.search-results > h3 a {
+  font-size: 0.66em;
+  color: $primary;
+  padding-left: $-m;
   i {
     padding-right: $-s;
   }
 }
 
-
-// Sidebar list
-.book-tree .sidebar-page-list {
-  list-style: none;
-  margin: 0;
-  margin-top: $-xs;
-  border-left: 5px solid $color-book;
-  li a {
-    display: block;
-    border-bottom: none;
-    padding-left: $-s;
-    padding: $-xs 0 $-xs $-s;
-    &:hover {
-      background-color: rgba(255, 255, 255, 0.2);
-      text-decoration: none;
+// 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;
+  z-index: 999;
+  overflow: hidden;
+  &:hover {
+    width: $btt-size*3.4;
+    opacity: 1 !important;
+    span {
+      display: inline-block;
     }
   }
-  li, a {
-    display: block;
-  }
-  a.bold {
-    color: #EEE !important;
+  .inner {
+    width: $btt-size*3.4;
   }
-  ul {
-    list-style: none;
+  i {
     margin: 0;
+    font-size: 28px;
+    padding: 0 $-s 0 0;
   }
-  .book {
-    color: $color-book !important;
-    &.selected {
-      background-color: rgba($color-book, 0.29);
-    }
+  span {
+    line-height: 12px;
+    position: relative;
+    top: -5px;
   }
-  .chapter {
-    color: $color-chapter !important;
-    &.selected {
-      background-color: rgba($color-chapter, 0.12);
+}
+
+.contained-search-box {
+  display: flex;
+  input, button {
+    border-radius: 0;
+    border: 1px solid #DDD;
+    margin-left: -1px;
+  }
+  input {
+    flex: 5;
+    &:focus, &:active {
+      outline: 0;
     }
   }
-  .list-item-chapter {
-    border-left: 5px solid $color-chapter;
-    margin: 10px 10px;
-    display: block;
+  button {
+    width: 60px;
   }
-  .list-item-page {
-    border-bottom: none;
+  button i {
+    padding: 0;
   }
-  .page {
-    color: $color-page !important;
-    border-left: 5px solid $color-page;
-    margin: 10px 10px;
-    border-bottom: none;
-    &.selected {
-      background-color: rgba($color-page, 0.1);
-    }
+  button.cancel.active {
+    background-color: $negative;
+    color: #EEE;
   }
 }
 
-// Sortable Lists
-.sortable-page-list, .sortable-page-list ul {
-  list-style: none;
-}
-.sortable-page-list {
-  margin-left: 0;
-  box-shadow: 0 0 1px 0 rgba(0, 0, 0, 0.1);
-  ul {
-    margin-bottom: 0;
-    margin-top: 0;
-    box-shadow: 0 0 1px 0 rgba(0, 0, 0, 0.1);
+.entity-selector {
+  border: 1px solid #DDD;
+  border-radius: 3px;
+  overflow: hidden;
+  font-size: 0.8em;
+  input[type="text"] {
+    width: 100%;
+    display: block;
+    border-radius: 0;
+    border: 0;
+    border-bottom: 1px solid #DDD;
+    font-size: 16px;
+    padding: $-s $-m;
   }
-  li {
-    border: 1px solid #DDD;
-    padding: $-xs $-s;
-    margin-top: -1px;
-    min-height: 38px;
-    &.text-chapter {
-      border-left: 2px solid $color-chapter;
-    }
-    &.text-page {
-      border-left: 2px solid $color-page;
-    }
+  .entity-list {
+    overflow-y: scroll;
+    height: 400px;
+    background-color: #EEEEEE;
   }
-  li:first-child {
-    margin-top: $-xs;
+  .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;
   }
 }
 
-// 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;
+.entity-list-item.selected {
+  h3, i, p ,a, span {
+    color: #EEE;
+  }
 }
 
 .center-box {
-  margin: 15vh auto 0 auto;
-  padding: $-m $-xxl $-xl*2 $-xxl;
-  max-width: 346px;
+  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%;
+  }
   &.login {
     background-color: #EEE;
     box-shadow: 0 0 2px 0 rgba(0, 0, 0, 0.1);
@@ -422,105 +270,10 @@ body.dragging, body.dragging * {
   }
 }
 
-.activity-list-item {
-  padding: $-s 0;
-  color: #888;
-  border-bottom: 1px solid #EEE;
-  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 {
-  text-align: center;
-  a {
-    padding: $-m;
-    display: inline-block;
-    //color: #666;
-    &.selected {
-      //color: $primary;
-      border-bottom: 2px solid $primary;
-    }
-  }
-}
 
-.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;
-  }
-}
\ No newline at end of file
+
+
+