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