]> BookStack Code Mirror - bookstack/blob - resources/assets/sass/_lists.scss
Converted books view setting to user setting
[bookstack] / resources / assets / sass / _lists.scss
1 .page-list {
2   h4 {
3     margin: $-l 0 $-xs 0;
4     font-size: 1.666em;
5   }
6   a.chapter {
7     color: $color-chapter;
8   }
9   .inset-list {
10     display: none;
11     overflow: hidden;
12   }
13   h5 {
14     display: block;
15     margin: $-s 0 0 0;
16     border-left: 5px solid $color-page;
17     padding: $-xs 0 $-xs $-m;
18     font-size: 1.1em;
19     font-weight: normal;
20     &.draft {
21       border-left-color: $color-page-draft;
22     }
23   }
24   .entity-list-item {
25     margin-bottom: $-m;
26   }
27   hr {
28     margin-top: 0;
29   }
30   .page, .chapter, .book {
31     padding-left: $-l;
32   }
33   .page {
34     border-left: 5px solid $color-page;
35   }
36   .page.draft {
37     border-left: 5px solid $color-page-draft;
38     .text-page {
39       color: $color-page-draft;
40     }
41   }
42   .chapter {
43     border-left: 5px solid $color-chapter;
44   }
45   .book {
46     border-left: 5px solid $color-book;
47   }
48   .meta {
49     margin-top: -$-m;
50     font-size: 0.95em;
51   }
52   .meta span {
53     margin-right: $-s;
54   }
55 }
56
57 .sidebar-page-nav {
58   $nav-indent: $-s;
59   list-style: none;
60   margin: $-s 0 $-m 2px;
61   border-left: 2px dotted #BBB;
62   li {
63     padding-left: $-s;
64     margin-bottom: 4px;
65     font-size: 0.95em;
66   }
67   .h1 {
68     margin-left: -2px;
69   }
70   .h2 {
71     margin-left: -2px;
72   }
73   .h3 {
74     margin-left: $nav-indent;
75   }
76   .h4 {
77     margin-left: $nav-indent*2;
78   }
79   .h5 {
80     margin-left: $nav-indent*3;
81   }
82   .h6 {
83     margin-left: $nav-indent*4;
84   }
85 }
86
87 // Sidebar list
88 .book-tree {
89   transition: ease-in-out 240ms;
90   transition-property: right, border;
91 }
92 .book-tree h4 {
93   padding: $-m $-s 0 $-s;
94   i {
95     padding-right: $-s;
96   }
97 }
98 .book-tree .sidebar-page-list {
99   list-style: none;
100   margin: $-xs 0 0;
101   padding-left: 0;
102   border-left: 5px solid $color-book;
103   li a {
104     display: block;
105     border-bottom: none;
106     padding: $-xs 0 $-xs $-s;
107     &:hover {
108       text-decoration: none;
109     }
110   }
111   li a i {
112     padding-right: $-xs + 2px;
113   }
114   li, a {
115     display: block;
116   }
117   a.bold {
118     color: #EEE !important;
119   }
120   ul {
121     list-style: none;
122     margin: 0;
123   }
124   .book {
125     color: $color-book !important;
126     &.selected {
127       background-color: rgba($color-book, 0.29);
128     }
129   }
130   .chapter {
131     color: $color-chapter !important;
132     &.selected {
133       background-color: rgba($color-chapter, 0.12);
134     }
135   }
136   [chapter-toggle] {
137     padding-left: $-s;
138   }
139   .list-item-chapter {
140     border-left: 5px solid $color-chapter;
141     margin: 10px 10px;
142     display: block;
143   }
144   .list-item-page {
145     border-bottom: none;
146     border-left: 5px solid $color-page;
147     margin: 10px 10px;
148   }
149   .page {
150     color: $color-page !important;
151     border-bottom: none;
152     &.selected {
153       background-color: rgba($color-page, 0.1);
154     }
155   }
156   .list-item-page.draft {
157     border-left: 5px solid $color-page-draft;
158   }
159   .page.draft .page, .list-item-page.draft a.page {
160     color: $color-page-draft !important;
161   }
162   .sub-menu {
163     display: none;
164     padding-left: 0;
165   }
166   .sub-menu.open {
167     display: block;
168   }
169 }
170
171 // Sortable Lists
172 .sortable-page-list, .sortable-page-list ul {
173   list-style: none;
174   background-color: #FFF;
175 }
176 .sort-box {
177   margin-bottom: $-m;
178   padding: 0 $-l 0 $-l;
179   border-left: 4px solid $color-book;
180 }
181 .sortable-page-list {
182   margin-left: 0;
183   > ul {
184     margin-left: 0;
185   }
186   ul {
187     margin-bottom: 0;
188     margin-top: 0;
189     box-shadow: 0 0 1px 0 rgba(0, 0, 0, 0.1);
190   }
191   li {
192     border: 1px solid #DDD;
193     padding: $-xs $-s;
194     margin-top: -1px;
195     min-height: 38px;
196     &.text-chapter {
197       border-left: 2px solid $color-chapter;
198     }
199     &.text-page {
200       border-left: 2px solid $color-page;
201     }
202   }
203   li:first-child {
204     margin-top: $-xs;
205   }
206 }
207 .sortable-page-list li.placeholder {
208   position: relative;
209 }
210 .sortable-page-list li.placeholder:before {
211   position: absolute;
212 }
213
214 .activity-list-item {
215   padding: $-s 0;
216   color: #888;
217   border-bottom: 1px solid #EEE;
218   font-size: 0.9em;
219   .left {
220     float: left;
221   }
222   .left + .right {
223     margin-left: 30px + $-s;
224   }
225   &:last-of-type {
226     border-bottom: 0;
227   }
228 }
229
230 ul.pagination {
231   display: inline-block;
232   list-style: none;
233   margin: $-m 0;
234   padding-left: 1px;
235   li {
236     float: left;
237   }
238   li:first-child {
239     a, span {
240       border-radius: 3px 0 0 3px;
241     }
242   }
243   li:last-child {
244     a, span {
245       border-radius: 0 3px 3px 0;
246     }
247   }
248   a, span {
249     display: block;
250     padding: $-xxs $-s;
251     border: 1px solid #CCC;
252     margin-left: -1px;
253     color: #888;
254     user-select: none;
255     &.disabled {
256       cursor: not-allowed;
257     }
258   }
259   li.active span {
260     background-color: rgba($primary, 0.8);
261     color: #EEE;
262     border-color: rgba($primary, 0.8);
263   }
264   a {
265     color: $primary;
266   }
267 }
268
269 .compact ul.pagination {
270   margin: 0;
271 }
272
273 .entity-list {
274   > div {
275     padding: $-m 0;
276   }
277   h4 {
278     margin: 0;
279   }
280   hr {
281     margin: 0;
282   }
283   .text-small.text-muted {
284     color: #AAA;
285     font-size: 0.75em;
286     margin-top: $-xs;
287   }
288   .text-muted p.text-muted {
289     margin-top: 0;
290   }
291   .page.draft .text-page {
292     color: $color-page-draft;
293   }
294 }
295
296 .card .entity-list-item, .card .activity-list-item {
297   padding-left: $-m;
298   padding-right: $-m;
299 }
300
301 .entity-list.compact {
302   font-size: 0.6em;
303   h4, a {
304     line-height: 1.2;
305   }
306   .entity-item-snippet {
307     display: none;
308   }
309   .entity-list-item p {
310     font-size: $fs-m * 0.8;
311     padding-top: $-xs;
312   }
313   p {
314     margin: 0;
315   }
316   > p.empty-text {
317     display: block;
318     font-size: $fs-m;
319   }
320   hr {
321     margin: 0;
322   }
323 }
324
325 .dropdown-container {
326   display: inline-block;
327   vertical-align: top;
328   position: relative;
329 }
330
331 .dropdown-container ul {
332   display: none;
333   position: absolute;
334   z-index: 999;
335   top: 0;
336   list-style: none;
337   right: 0;
338   margin: $-m 0;
339   background-color: #FFFFFF;
340   box-shadow: 0 0 2px 0 rgba(0, 0, 0, 0.1);
341   border-radius: 1px;
342   border: 1px solid #EEE;
343   min-width: 180px;
344   padding: $-xs 0;
345   color: #555;
346   text-align: left !important;
347   &.wide {
348     min-width: 220px;
349   }
350   .text-muted {
351     color: #999;
352   }
353   li.padded {
354     padding: $-xs $-m;
355     line-height: 1.2;
356   }
357   a {
358     display: block;
359     padding: $-xs $-m;
360     color: #555;
361     &:hover {
362       text-decoration: none;
363       background-color: #EEE;
364     }
365     i {
366       margin-right: $-s;
367       padding-right: 0;
368       display: inline-block;
369       width: 16px;
370     }
371   }
372   li.border-bottom {
373     border-bottom: 1px solid #DDD;
374   }
375 }
376
377 // Books grid view
378 .featured-image-container {
379   position: relative;
380   overflow: hidden;
381   background: #F2F2F2;
382   border: 1px solid #ddd;
383   border-bottom: 0;
384   img {
385     display: block;
386     max-width: 100%;
387     height: auto;
388     transition: all .5s ease;
389   }
390   img:hover {
391     transform: scale(1.15);
392     opacity: .5;
393   }
394 }
395
396 .book-grid-content {
397   padding: 30px;
398   border: 1px solid #ddd;
399   border-top: 0;
400   border-bottom-width: 2px;
401   h2 {
402     font-size: 1.5em;
403     margin: 0 0 10px;
404   }
405   h2 a {
406     display: block;
407     line-height: 1.2;
408     color: #009688;;
409     text-decoration: none;
410   }
411   p {
412     font-size: .85em;
413     margin: 0 0 10px;
414     line-height: 1.6em;
415   }
416   p.small {
417     font-size: .8em;
418   }
419 }
420
421 .book-grid-item {
422   margin-bottom : 20px;
423 }