]> BookStack Code Mirror - bookstack/commitdiff
Updated header design
authorDan Brown <redacted>
Sat, 19 Aug 2017 14:33:22 +0000 (15:33 +0100)
committerDan Brown <redacted>
Sat, 19 Aug 2017 14:33:22 +0000 (15:33 +0100)
public/logo.png
resources/assets/sass/_buttons.scss
resources/assets/sass/_forms.scss
resources/assets/sass/_header.scss
resources/views/base.blade.php
resources/views/books/show.blade.php
resources/views/chapters/show.blade.php
resources/views/components/image-picker.blade.php
resources/views/partials/custom-styles.blade.php

index 1803feebf53414a98b6d670e4d6746a40b444ddb..585f8895b4f26c872ac9369bd4229811e725b252 100644 (file)
Binary files a/public/logo.png and b/public/logo.png differ
index 8ee7f596a2379fd2bd4c236662bd19fec102d8f8..202eb935b3b2d45336d92aefb55b62d3cc7462fb 100644 (file)
@@ -64,6 +64,7 @@ $button-border-radius: 2px;
   padding: 0;
   margin: 0;
   border: none;
+  user-select: none;
   &:focus, &:active {
     outline: 0;
   }
index cf7ea083e66f8ed7d5b1220bf5e12986ceb9da8f..d372359cc928c86d3cee5141f92478ca4e0c3681 100644 (file)
@@ -248,15 +248,14 @@ div[editor-type="markdown"] .title-input.page-title input[type="text"] {
     border: none;
     color: $primary;
     padding: 0;
-    margin: 0;
     cursor: pointer;
-    margin-left: $-s;
-  }
-  button[type="submit"] {
-    margin-left: -$-l;
+    position: absolute;
+    left: 7px;
+    top: 7px;
   }
   input {
-    padding-right: $-l;
+    display: block;
+    padding-left: $-l;
     width: 300px;
     max-width: 100%;
   }
index ae8dd3ff51937b67f6bb62e15fb4b3ca7e260502..49bd74b07e56e411db0f38ffc9776db610516895 100644 (file)
@@ -12,7 +12,6 @@ header {
     padding: $-m;
   }
   border-bottom: 1px solid #DDD;
-  //margin-bottom: $-l;
   .links {
     display: inline-block;
     vertical-align: top;
@@ -23,26 +22,27 @@ header {
   }
   .links a {
     display: inline-block;
-    padding: $-l;
+    padding: $-m $-l;
     color: #FFF;
     &:last-child {
       padding-right: 0;
     }
     @include smaller-than($screen-md) {
-      padding: $-l $-s;
+      padding: $-m $-s;
     }
   }
   .avatar, .user-name {
     display: inline-block;
   }
   .avatar {
-    //margin-top: (45px/2);
     width: 30px;
     height: 30px;
   }
   .user-name {
     vertical-align: top;
-    padding-top: $-l;
+    padding-top: $-m;
+    position: relative;
+    top: -3px;
     display: inline-block;
     cursor: pointer;
     > * {
@@ -66,53 +66,57 @@ header {
       }
     }
   }
-  @include smaller-than($screen-md) {
+  @include smaller-than($screen-sm) {
     text-align: center;
     .float.right {
       float: none;
     }
-  }
-  @include smaller-than($screen-sm) {
     .links a {
       padding: $-s;
     }
-    form.search-box {
-      margin-top: 0;
-    }
     .user-name {
       padding-top: $-s;
     }
   }
-  .dropdown-container {
-    font-size: 0.9em;
-  }
 }
 
-form.search-box {
-  margin-top: $-l *0.9;
+.header-search {
+  display: inline-block;
+}
+header .search-box {
   display: inline-block;
-  position: relative;
-  text-align: left;
+  margin-top: $-s;
   input {
-    background-color: transparent;
-    border-radius: 24px;
-    border: 2px solid #EEE;
+    background-color: rgba(0, 0, 0, 0.2);
+    border: 1px solid rgba(255, 255, 255, 0.3);
     color: #EEE;
-    padding-left: $-m;
-    padding-right: $-l;
-    outline: 0;
   }
   button {
-    vertical-align: top;
-    margin-left: -$-l;
-    color: #FFF;
-    top: 6px;
-    right: 4px;
-    display: inline-block;
-    position: absolute;
-    &:hover {
-      color: #FFF;
-    }
+    color: #EEE;
+  }
+  ::-webkit-input-placeholder { /* Chrome/Opera/Safari */
+    color: #DDD;
+  }
+  ::-moz-placeholder { /* Firefox 19+ */
+    color: #DDD;
+  }
+  :-ms-input-placeholder { /* IE 10+ */
+    color: #DDD;
+  }
+  :-moz-placeholder { /* Firefox 18- */
+    color: #DDD;
+  }
+  @include smaller-than($screen-lg) {
+    max-width: 250px;
+  }
+  @include smaller-than($l) {
+    max-width: 200px;
+  }
+}
+
+@include smaller-than($s) {
+  .header-search {
+    display: block;
   }
 }
 
@@ -128,12 +132,12 @@ form.search-box {
   font-size: 1.8em;
   color: #fff;
   font-weight: 400;
-  padding: $-l $-l $-l 0;
+  padding: 14px $-l 14px 0;
   vertical-align: top;
   line-height: 1;
 }
 .logo-image {
-  margin: $-m $-s $-m 0;
+  margin: $-xs $-s $-xs 0;
   vertical-align: top;
   height: 43px;
 }
@@ -227,4 +231,7 @@ form.search-box {
       border-bottom: 2px solid $primary;
     }
   }
+}
+.faded-small .nav-tabs a {
+  padding: $-s $-m;
 }
\ No newline at end of file
index b1cacf08ca334bc3d06618f7f6f3dc851205c0ce..1c972e4fb82ae216926fa859907cde50df8cbe85 100644 (file)
@@ -36,7 +36,7 @@
     <header id="header">
         <div class="container">
             <div class="row">
-                <div class="col-lg-4 col-sm-4" ng-non-bindable>
+                <div class="col-sm-4" ng-non-bindable>
                     <a href="{{ baseUrl('/') }}" class="logo">
                         @if(setting('app-logo', '') !== 'none')
                             <img class="logo-image" src="{{ setting('app-logo', '') === '' ? baseUrl('/logo.png') : baseUrl(setting('app-logo', '')) }}" alt="Logo">
                         @endif
                     </a>
                 </div>
-                <div class="col-lg-4 col-sm-3 text-center">
-                    <form action="{{ baseUrl('/search') }}" method="GET" class="search-box">
-                        <input id="header-search-box-input" type="text" name="term" tabindex="2" value="{{ isset($searchTerm) ? $searchTerm : '' }}">
-                        <button id="header-search-box-button" type="submit" class="text-button"><i class="zmdi zmdi-search"></i></button>
-                    </form>
-                </div>
-                <div class="col-lg-4 col-sm-5">
+                <div class="col-sm-8">
                     <div class="float right">
+                        <div class="header-search">
+                            <form action="{{ baseUrl('/search') }}" method="GET" class="search-box">
+                                <button id="header-search-box-button" type="submit"><i class="zmdi zmdi-search"></i> </button>
+                                <input id="header-search-box-input" type="text" name="term" tabindex="2" placeholder="{{ trans('common.search') }}" value="{{ isset($searchTerm) ? $searchTerm : '' }}">
+                            </form>
+                        </div>
                         <div class="links text-center">
                             <a href="{{ baseUrl('/books') }}"><i class="zmdi zmdi-book"></i>{{ trans('entities.books') }}</a>
                             @if(signedInUser() && userCan('settings-manage'))
index 3d50bcef832f0ca51ddcc5f66b13338d862272cb..97942ee6707fcc720d76be41fdf9568668f6f569 100644 (file)
                     </p>
                 @endif
 
-                <div class="search-box">
-                    <form v-on:submit.prevent="searchBook">
-                        <input v-model="searchTerm" v-on:change="checkSearchForm()" type="text" name="term" placeholder="{{ trans('entities.books_search_this') }}">
-                        <button type="submit"><i class="zmdi zmdi-search"></i></button>
-                        <button v-if="searching" v-cloak class="text-neg" v-on:click="clearSearch()" type="button"><i class="zmdi zmdi-close"></i></button>
-                    </form>
-                </div>
+                <form v-on:submit.prevent="searchBook" class="search-box">
+                    <input v-model="searchTerm" v-on:change="checkSearchForm()" type="text" name="term" placeholder="{{ trans('entities.books_search_this') }}">
+                    <button type="submit"><i class="zmdi zmdi-search"></i></button>
+                    <button v-if="searching" v-cloak class="text-neg" v-on:click="clearSearch()" type="button"><i class="zmdi zmdi-close"></i></button>
+                </form>
 
                 <div class="activity">
                     <h3>{{ trans('entities.recent_activity') }}</h3>
index f0fa40a8428ef3938853548db14d06f215aa1407..62a7eaa744d8ef7b5047e88bc78b0520c284c7cd 100644 (file)
                     </div>
                 @endif
 
-                <div class="search-box">
-                    <form v-on:submit.prevent="searchBook">
-                        <input v-model="searchTerm" v-on:change="checkSearchForm()" type="text" name="term" placeholder="{{ trans('entities.chapters_search_this') }}">
-                        <button type="submit"><i class="zmdi zmdi-search"></i></button>
-                        <button v-if="searching" v-cloak class="text-neg" v-on:click="clearSearch()" type="button"><i class="zmdi zmdi-close"></i></button>
-                    </form>
-                </div>
+                <form v-on:submit.prevent="searchBook" class="search-box">
+                    <input v-model="searchTerm" v-on:change="checkSearchForm()" type="text" name="term" placeholder="{{ trans('entities.chapters_search_this') }}">
+                    <button type="submit"><i class="zmdi zmdi-search"></i></button>
+                    <button v-if="searching" v-cloak class="text-neg" v-on:click="clearSearch()" type="button"><i class="zmdi zmdi-close"></i></button>
+                </form>
 
                 @include('pages/sidebar-tree-list', ['book' => $book, 'sidebarTree' => $sidebarTree])
 
index 47fb2b8b7a26f615ec70b3721d6216a9bd48a9a8..228e8d230c6663009ed3431758d1007ab4a4ec38 100644 (file)
@@ -43,7 +43,7 @@
              }
 
              if (action === 'show-image-manager') {
-                 window.ImageManager.showExternal((image) => {
+                 window.ImageManager.show((image) => {
                      if (!resize) {
                          setImage(image);
                          return;
index c13051df4f3a363c8bbcfbf140bad183cffbca99..ffa39c50ac648c63c9a94b20662126a74dfe9f2d 100644 (file)
@@ -1,4 +1,5 @@
 <style id="custom-styles" data-color="{{ setting('app-color') }}" data-color-light="{{ setting('app-color-light') }}">
+    @if(setting('app-color'))
     header, [back-to-top], .primary-background {
         background-color: {{ setting('app-color') }} !important;
     }
@@ -17,4 +18,5 @@
     .text-primary, p.primary, p .primary, span.primary:hover, .text-primary:hover, a, a:hover, a:focus, .text-button, .text-button:hover, .text-button:focus {
         color: {{ setting('app-color') }};
     }
+    @endif
 </style>
\ No newline at end of file