Skip to content

Commit 286f9b0

Browse files
committed
Moved page tags to sidebar
Fixed #238
1 parent c403d05 commit 286f9b0

File tree

6 files changed

+35
-29
lines changed

6 files changed

+35
-29
lines changed

resources/assets/sass/_blocks.scss

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,10 @@
135135
border-left: 3px solid #BBB;
136136
background-color: #EEE;
137137
padding: $-s;
138-
display: flex;
138+
display: block;
139+
> * {
140+
display: inline-block;
141+
}
139142
&:before {
140143
font-family: 'Material-Design-Iconic-Font';
141144
padding-right: $-s;

resources/assets/sass/_lists.scss

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,8 @@
110110
border-left: 0px solid #FFF;
111111
background-color: #FFF;
112112
&.fixed {
113+
background-color: #FFF;
114+
z-index: 5;
113115
position: fixed;
114116
top: 0;
115117
padding-left: $-l;

resources/assets/sass/_pages.scss

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -248,29 +248,32 @@
248248
}
249249

250250
.tag-display {
251-
margin: $-xl $-m;
252-
border: 1px solid #DDD;
253-
min-width: 180px;
254-
max-width: 320px;
255-
opacity: 0.7;
256-
z-index: 5;
251+
width: 100%;
252+
//opacity: 0.7;
257253
position: relative;
258254
table {
259255
width: 100%;
260256
margin: 0;
261257
padding: 0;
262258
}
259+
tr:first-child td {
260+
padding-top: 0;
261+
}
263262
.heading th {
264263
padding: $-xs $-s;
265-
color: #333;
264+
color: rgba(100, 100, 100, 0.7);
265+
border: 0;
266266
font-weight: 400;
267267
}
268268
td {
269269
border: 0;
270-
border-bottom: 1px solid #DDD;
270+
border-bottom: 1px solid #EEE;
271271
padding: $-xs $-s;
272272
color: #444;
273273
}
274+
tr td:first-child {
275+
padding-left:0;
276+
}
274277
.tag-value {
275278
color: #888;
276279
}

resources/views/pages/page-display.blade.php

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -2,26 +2,6 @@
22

33
<h1 id="bkmrk-page-title" class="float left">{{$page->name}}</h1>
44

5-
@if(count($page->tags) > 0)
6-
<div class="tag-display float right">
7-
<table>
8-
<thead>
9-
<tr class="text-left heading primary-background-light">
10-
<th colspan="2">Page Tags</th>
11-
</tr>
12-
</thead>
13-
<tbody>
14-
@foreach($page->tags as $tag)
15-
<tr class="tag">
16-
<td @if(!$tag->value) colspan="2" @endif><a href="{{ baseUrl('/search/all?term=%5B' . urlencode($tag->name) .'%5D') }}">{{ $tag->name }}</a></td>
17-
@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
18-
</tr>
19-
@endforeach
20-
</tbody>
21-
</table>
22-
</div>
23-
@endif
24-
255
<div style="clear:left;"></div>
266

277
@if (isset($diff) && $diff)

resources/views/pages/show.blade.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,8 @@
115115
</div>
116116
@endif
117117

118+
119+
118120
@include('pages/sidebar-tree-list', ['book' => $book, 'sidebarTree' => $sidebarTree, 'pageNav' => $pageNav])
119121
</div>
120122

resources/views/pages/sidebar-tree-list.blade.php

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,22 @@
11

22
<div class="book-tree" ng-non-bindable>
33

4+
@if(isset($page) && $page->tags->count() > 0)
5+
<div class="tag-display">
6+
<h6 class="text-muted">Page Tags</h6>
7+
<table>
8+
<tbody>
9+
@foreach($page->tags as $tag)
10+
<tr class="tag">
11+
<td @if(!$tag->value) colspan="2" @endif><a href="{{ baseUrl('/search/all?term=%5B' . urlencode($tag->name) .'%5D') }}">{{ $tag->name }}</a></td>
12+
@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
13+
</tr>
14+
@endforeach
15+
</tbody>
16+
</table>
17+
</div>
18+
@endif
19+
420
@if (isset($page) && $page->attachments->count() > 0)
521
<h6 class="text-muted">Attachments</h6>
622
@foreach($page->attachments as $attachment)

0 commit comments

Comments
 (0)