]> BookStack Code Mirror - bookstack/commitdiff
Moved page tags to sidebar
authorDan Brown <redacted>
Sun, 27 Nov 2016 19:37:57 +0000 (19:37 +0000)
committerDan Brown <redacted>
Sun, 27 Nov 2016 19:37:57 +0000 (19:37 +0000)
Fixed #238

resources/assets/sass/_blocks.scss
resources/assets/sass/_lists.scss
resources/assets/sass/_pages.scss
resources/views/pages/page-display.blade.php
resources/views/pages/show.blade.php
resources/views/pages/sidebar-tree-list.blade.php

index 727633f757f6a98fa6e97b5aa8b2e41ea1557d78..7eb595d3611a5dc705d486416ca708344174080c 100644 (file)
   border-left: 3px solid #BBB;
   background-color: #EEE;
   padding: $-s;
-  display: flex;
+  display: block;
+  > * {
+    display: inline-block;
+  }
   &:before {
     font-family: 'Material-Design-Iconic-Font';
     padding-right: $-s;
index 54fd55dff6f075637a2d943a431e05a05a6458fc..e98e5bfcdf7bd27a4050a123bdf5636659004381 100644 (file)
   border-left: 0px solid #FFF;
   background-color: #FFF;
   &.fixed {
+    background-color: #FFF;
+    z-index: 5;
     position: fixed;
     top: 0;
     padding-left: $-l;
index 880a9fdcc1e4816e6bd5428d3a70fafaff514b8d..0052a3319fd4f47cace364dc638e5fd1651b0366 100755 (executable)
 }
 
 .tag-display {
-  margin: $-xl $-m;
-  border: 1px solid #DDD;
-  min-width: 180px;
-  max-width: 320px;
-  opacity: 0.7;
-  z-index: 5;
+  width: 100%;
+  //opacity: 0.7;
   position: relative;
   table {
     width: 100%;
     margin: 0;
     padding: 0;
   }
+  tr:first-child td {
+    padding-top: 0;
+  }
   .heading th {
     padding: $-xs $-s;
-    color: #333;
+    color: rgba(100, 100, 100, 0.7);
+    border: 0;
     font-weight: 400;
   }
   td {
     border: 0;
-    border-bottom: 1px solid #DDD;
+    border-bottom: 1px solid #EEE;
     padding: $-xs $-s;
     color: #444;
   }
+  tr td:first-child {
+    padding-left:0;
+  }
   .tag-value {
     color: #888;
   }
index 6ffe4b50237209d6f07e5683be265a1e3f4fd0ce..fb6ca30451e35df171ac5b843612d1d347a5b102 100644 (file)
@@ -2,26 +2,6 @@
 
     <h1 id="bkmrk-page-title" class="float left">{{$page->name}}</h1>
 
-    @if(count($page->tags) > 0)
-        <div class="tag-display float right">
-            <table>
-                <thead>
-                    <tr class="text-left heading primary-background-light">
-                        <th colspan="2">Page Tags</th>
-                    </tr>
-                </thead>
-                <tbody>
-                    @foreach($page->tags as $tag)
-                        <tr class="tag">
-                            <td @if(!$tag->value) colspan="2" @endif><a href="{{ baseUrl('/search/all?term=%5B' . urlencode($tag->name) .'%5D') }}">{{ $tag->name }}</a></td>
-                            @if($tag->value) <td class="tag-value"><a href="{{ baseUrl('/search/all?term=%5B' . urlencode($tag->name) .'%3D' . urlencode($tag->value) . '%5D') }}">{{$tag->value}}</a></td> @endif
-                        </tr>
-                    @endforeach
-                </tbody>
-            </table>
-        </div>
-    @endif
-
     <div style="clear:left;"></div>
 
     @if (isset($diff) && $diff)
index af85075a204981b84e2644d5f93ea6eec1a3046b..50c6f5d2c2eb4da7bdf90d9649a756551546971c 100644 (file)
                     </div>
                 @endif
 
+
+
                 @include('pages/sidebar-tree-list', ['book' => $book, 'sidebarTree' => $sidebarTree, 'pageNav' => $pageNav])
             </div>
 
index 09d9b77f970a0abf18ece1b3c61a9363f7b7ae9f..5309cb7748aa452f0651a7a03ae0332100f78cdf 100644 (file)
@@ -1,6 +1,22 @@
 
 <div class="book-tree" ng-non-bindable>
 
+    @if(isset($page) && $page->tags->count() > 0)
+        <div class="tag-display">
+            <h6 class="text-muted">Page Tags</h6>
+            <table>
+                <tbody>
+                @foreach($page->tags as $tag)
+                    <tr class="tag">
+                        <td @if(!$tag->value) colspan="2" @endif><a href="{{ baseUrl('/search/all?term=%5B' . urlencode($tag->name) .'%5D') }}">{{ $tag->name }}</a></td>
+                        @if($tag->value) <td class="tag-value"><a href="{{ baseUrl('/search/all?term=%5B' . urlencode($tag->name) .'%3D' . urlencode($tag->value) . '%5D') }}">{{$tag->value}}</a></td> @endif
+                    </tr>
+                @endforeach
+                </tbody>
+            </table>
+        </div>
+    @endif
+
     @if (isset($page) && $page->attachments->count() > 0)
         <h6 class="text-muted">Attachments</h6>
         @foreach($page->attachments as $attachment)