diff --git a/app/Entity.php b/app/Entity.php index 2e047cbdb..7c08cee90 100644 --- a/app/Entity.php +++ b/app/Entity.php @@ -44,4 +44,21 @@ class Entity extends Model return $this->morphMany('Oxbow\Activity', 'entity')->orderBy('created_at', 'desc'); } + /** + * Allows checking of the exact class, Used to check entity type. + * Cleaner method for is_a. + * @param $type + * @return bool + */ + public function isA($type) + { + return $this->getName() === strtolower($type); + } + + public function getName() + { + $fullClassName = get_class($this); + return strtolower(array_slice(explode('\\', $fullClassName), -1, 1)[0]); + } + } diff --git a/public/images/bg-books.jpg b/public/images/bg-books.jpg deleted file mode 100644 index dbf77c6b0..000000000 Binary files a/public/images/bg-books.jpg and /dev/null differ diff --git a/resources/assets/sass/_animations.scss b/resources/assets/sass/_animations.scss index 5d7c64562..8d3336489 100644 --- a/resources/assets/sass/_animations.scss +++ b/resources/assets/sass/_animations.scss @@ -37,4 +37,18 @@ 100% { transform: translate3d(580px, 0, 0); } +} + +@keyframes menuIn { + from { opacity: 0;transform: scale3d(0, 0, 1);} + + to { opacity: 1; transform: scale3d(1, 1, 1);} +} + +.anim.menuIn { + transform-origin: 0% 0%; + animation-name: menuIn; + animation-duration: 120ms; + animation-delay: 0s; + animation-timing-function: cubic-bezier(.62,.28,.23,.99); } \ No newline at end of file diff --git a/resources/assets/sass/_forms.scss b/resources/assets/sass/_forms.scss index 1fb24cb4a..49716154f 100644 --- a/resources/assets/sass/_forms.scss +++ b/resources/assets/sass/_forms.scss @@ -80,7 +80,7 @@ input[type="text"], input[type="number"], input[type="email"], input[type="searc .title-input.page-title { font-size: 0.8em; .input { - border: 1px solid #BBB; + border: 0; margin-bottom: -1px; } input[type="text"] { diff --git a/resources/assets/sass/_html.scss b/resources/assets/sass/_html.scss index d8587aaf1..0eb945e1c 100644 --- a/resources/assets/sass/_html.scss +++ b/resources/assets/sass/_html.scss @@ -1,15 +1,16 @@ * { - box-sizing: border-box; + box-sizing: border-box; } html { - background-color: #FFFFFF; + background-color: #FFFFFF; + height: 100%; } body { - font-family: $text; - font-size: $fs-m; - line-height: 1.6; - color: #616161; - -webkit-font-smoothing: antialiased; + font-family: $text; + font-size: $fs-m; + line-height: 1.6; + color: #616161; + -webkit-font-smoothing: antialiased; } table { diff --git a/resources/assets/sass/_text.scss b/resources/assets/sass/_text.scss index c9eabf792..6a63f1e5e 100644 --- a/resources/assets/sass/_text.scss +++ b/resources/assets/sass/_text.scss @@ -192,6 +192,25 @@ p.secondary, p .secondary, span.secondary, .text-secondary { } } +.text-book { + color: $color-book; + &:hover { + color: $color-book; + } +} +.text-page { + color: $color-page; + &:hover { + color: $color-page; + } +} +.text-chapter { + color: $color-chapter; + &:hover { + color: $color-chapter; + } +} + /* * Lists */ diff --git a/resources/assets/sass/_tinymce.scss b/resources/assets/sass/_tinymce.scss index 8a19f24ea..44fb44c56 100644 --- a/resources/assets/sass/_tinymce.scss +++ b/resources/assets/sass/_tinymce.scss @@ -22,15 +22,6 @@ } - -.edit-area { - height: 100%; -} - -.page-style.editor { - height: 100%; -} - .mce-tinymce { .mce-panel { background-color: #FFF; @@ -38,4 +29,28 @@ .mce-btn { background-color: #FFF; } +} +.mce-tinymce.mce-container.mce-panel { + height: 100%; + max-height: 100%; + flex: 1; + display: flex !important; + flex-direction: column; + align-items: stretch; + margin: 0 -1px; + > .mce-container-body { + flex: 1; + display: flex !important; + flex-direction: column; + align-items: stretch; + > .mce-edit-area { + flex: 1; + display: flex !important; + flex-direction: column; + align-items: stretch; + iframe { + flex: 1; + } + } + } } \ No newline at end of file diff --git a/resources/assets/sass/_variables.scss b/resources/assets/sass/_variables.scss index d886dcfca..d3b75cd11 100644 --- a/resources/assets/sass/_variables.scss +++ b/resources/assets/sass/_variables.scss @@ -36,6 +36,11 @@ $secondary: #e27b41; $positive: #52A256; $negative: #D32F2F; +// Item Colors +$color-book: #009688; +$color-chapter: #EF6C00; +$color-page: $primary; + // Text colours $text-dark: #444; $text-light: #EEE; diff --git a/resources/assets/sass/styles.scss b/resources/assets/sass/styles.scss index 62d0e7ad1..33b82e006 100644 --- a/resources/assets/sass/styles.scss +++ b/resources/assets/sass/styles.scss @@ -23,6 +23,11 @@ header { } 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; @@ -38,12 +43,19 @@ header { display: inline-block; } .avatar { - margin-top: $-l*0.8; + margin-top: (45px/2); + width: 30px; + height: 30px; } .user-name { vertical-align: top; - padding-top: $-l*1.1; + padding-top: 25.5px; padding-left: $-m; + display: inline-block; + cursor: pointer; + i { + padding-left: $-xs; + } } } @@ -52,6 +64,40 @@ header { position: relative; } +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; @@ -101,6 +147,9 @@ header { h3 { margin: $-l 0; } + a.chapter { + color: $color-chapter; + } .inset-list { display: block; overflow: hidden; @@ -203,15 +252,9 @@ h1, h2, h3, h4, h5, h6 { } } -.breadcrumbs { - margin-top: $-s; - i { - padding-right: 4px; - } - span.sep { - color: #aaa; - padding: 0 $-xs; - } +.breadcrumbs span.sep { + color: #aaa; + padding: 0 $-xs; } .faded { @@ -235,13 +278,20 @@ h1, h2, h3, h4, h5, h6 { } } +.breadcrumbs a, .action-buttons a { + display: inline-block; + padding: $-s; + &:last-child { + padding-right: 0; + } +} .action-buttons { text-align: right; - a { - display: inline-block; - padding: $-s; - &:last-child { - padding-right: 0; + &.text-left { + text-align: left; + a { + padding-right: $-m; + padding-left: 0; } } } @@ -253,15 +303,19 @@ h1, h2, h3, h4, h5, h6 { padding-right: $-s; } } + + // Sidebar list .book-tree .sidebar-page-list { list-style: none; margin: 0; margin-top: $-xl; - border-left: 5px solid #7BD06E; + 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; @@ -277,23 +331,20 @@ h1, h2, h3, h4, h5, h6 { list-style: none; margin: 0; } - ul li a { - padding-left: $-xl; - } .book { - color: #7BD06E !important; + color: $color-book !important; &.selected { - background-color: rgba(123, 208, 110, 0.29); + background-color: rgba($color-book, 0.29); } } .chapter { - color: #D2A64B !important; + color: $color-chapter !important; &.selected { - background-color: rgba(239, 169, 42, 0.27); + background-color: rgba($color-chapter, 0.12); } } .list-item-chapter { - border-left: 5px solid #D2A64B; + border-left: 5px solid $color-chapter; margin: 10px 10px; display: block; } @@ -301,35 +352,42 @@ h1, h2, h3, h4, h5, h6 { border-bottom: none; } .page { - color: #4599DC !important; - border-left: 5px solid #4599DC; + color: $color-page !important; + border-left: 5px solid $color-page; margin: 10px 10px; border-bottom: none; &.selected { - background-color: rgba(118, 164, 202, 0.41); + background-color: rgba($color-page, 0.1); } } } +// Sortable Lists .sortable-page-list, .sortable-page-list ul { list-style: none; - //background-color: rgba(0, 0, 0, 0.04); } .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); } li { - border-bottom: 1px solid #BBB; - border-left: 1px solid #BBB; - border-right: 1px solid #BBB; + 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; + } } li:first-child { margin-top: $-xs; - border-top: 1px solid #BBB; } } @@ -351,61 +409,14 @@ body.dragging, body.dragging * { position: absolute; } -.image-cover { - height: 100vh; - width: 100%; - overflow: hidden; - background-size: cover; - &.login { - background-image: url('/images/bg-books.jpg'); - } -} - -.sidebar-bg { - background-image: url('/images/bg-books.jpg'); - background-size: cover; - background-position: 50% 50%; - position: absolute; - top: 0; - left: 0; - width: 100%; - height: 100%; - z-index: -1; - &:after{ - content: ''; - position: absolute; - top: 0; - left: 0; - width: 100%; - height: 100%; - z-index: -1; - background-color: rgba(0,0,0,0.85); - display: block; - } -} - -.image-cover #sidebar { - width: auto; - border: 0; - background-color: rgba(0, 0, 0, 0.38); -} - .center-box { - margin-top: 15vh; + margin: 15vh auto 0 auto; padding: $-m $-xxl $-xl*2 $-xxl; max-width: 346px; - h1, label { - color: #EEE; - } - h1 { - margin-bottom: $-m; - } - .button { - margin-top: $-xl; - } - input { - background-color: transparent; - color: #EEE; + &.login { + background-color: #EEE; + box-shadow: 0 0 2px 0 rgba(0, 0, 0, 0.1); + border: 1px solid #DDD; } } @@ -470,4 +481,44 @@ body.dragging, body.dragging * { 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 diff --git a/resources/views/auth/login.blade.php b/resources/views/auth/login.blade.php index dbf6db87b..5d738a7ad 100644 --- a/resources/views/auth/login.blade.php +++ b/resources/views/auth/login.blade.php @@ -1,42 +1,28 @@ @extends('public') -@section('body-class', 'image-cover login') - @section('sidebar') +