]> BookStack Code Mirror - bookstack/blob - resources/assets/sass/_lists.scss
Rolled out new design further
[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   position: relative;
90   right: 0;
91   top: 0;
92   transition: ease-in-out 240ms;
93   transition-property: right, border;
94   &.fixed {
95     z-index: 5;
96     position: fixed;
97     top: 0;
98     padding-right: $-l + 5px;
99     width: 30%;
100     left: 0;
101     height: 100%;
102     overflow-y: scroll;
103     -ms-overflow-style: none;
104     //background-color: $primary-faded;
105     border-left: 1px solid #DDD;
106     &::-webkit-scrollbar { width: 0 !important }
107   }
108 }
109 .book-tree h4 {
110   padding: $-m $-s 0 $-s;
111   i {
112     padding-right: $-s;
113   }
114 }
115 .book-tree .sidebar-page-list {
116   list-style: none;
117   margin: $-xs 0 0;
118   padding-left: 0;
119   border-left: 5px solid $color-book;
120   li a {
121     display: block;
122     border-bottom: none;
123     padding: $-xs 0 $-xs $-s;
124     &:hover {
125       text-decoration: none;
126     }
127   }
128   li a i {
129     padding-right: $-xs + 2px;
130   }
131   li, a {
132     display: block;
133   }
134   a.bold {
135     color: #EEE !important;
136   }
137   ul {
138     list-style: none;
139     margin: 0;
140   }
141   .book {
142     color: $color-book !important;
143     &.selected {
144       background-color: rgba($color-book, 0.29);
145     }
146   }
147   .chapter {
148     color: $color-chapter !important;
149     &.selected {
150       background-color: rgba($color-chapter, 0.12);
151     }
152   }
153   [chapter-toggle] {
154     padding-left: $-s;
155   }
156   .list-item-chapter {
157     border-left: 5px solid $color-chapter;
158     margin: 10px 10px;
159     display: block;
160   }
161   .list-item-page {
162     border-bottom: none;
163     border-left: 5px solid $color-page;
164     margin: 10px 10px;
165   }
166   .page {
167     color: $color-page !important;
168     border-bottom: none;
169     &.selected {
170       background-color: rgba($color-page, 0.1);
171     }
172   }
173   .list-item-page.draft {
174     border-left: 5px solid $color-page-draft;
175   }
176   .page.draft .page, .list-item-page.draft a.page {
177     color: $color-page-draft !important;
178   }
179   .sub-menu {
180     display: none;
181     padding-left: 0;
182   }
183   .sub-menu.open {
184     display: block;
185   }
186 }
187
188 // Sortable Lists
189 .sortable-page-list, .sortable-page-list ul {
190   list-style: none;
191   background-color: #FFF;
192 }
193 .sort-box {
194   margin-bottom: $-m;
195   padding: 0 $-l 0 $-l;
196   border-left: 4px solid $color-book;
197 }
198 .sortable-page-list {
199   margin-left: 0;
200   > ul {
201     margin-left: 0;
202   }
203   ul {
204     margin-bottom: 0;
205     margin-top: 0;
206     box-shadow: 0 0 1px 0 rgba(0, 0, 0, 0.1);
207   }
208   li {
209     border: 1px solid #DDD;
210     padding: $-xs $-s;
211     margin-top: -1px;
212     min-height: 38px;
213     &.text-chapter {
214       border-left: 2px solid $color-chapter;
215     }
216     &.text-page {
217       border-left: 2px solid $color-page;
218     }
219   }
220   li:first-child {
221     margin-top: $-xs;
222   }
223 }
224 .sortable-page-list li.placeholder {
225   position: relative;
226 }
227 .sortable-page-list li.placeholder:before {
228   position: absolute;
229 }
230
231 .activity-list-item {
232   padding: $-s 0;
233   color: #888;
234   border-bottom: 1px solid #EEE;
235   font-size: 0.9em;
236   .left {
237     float: left;
238   }
239   .left + .right {
240     margin-left: 30px + $-s;
241   }
242 }
243
244 ul.pagination {
245   display: inline-block;
246   list-style: none;
247   margin: $-m 0;
248   padding-left: 1px;
249   li {
250     float: left;
251   }
252   li:first-child {
253     a, span {
254       border-radius: 3px 0 0 3px;
255     }
256   }
257   li:last-child {
258     a, span {
259       border-radius: 0 3px 3px 0;
260     }
261   }
262   a, span {
263     display: block;
264     padding: $-xxs $-s;
265     border: 1px solid #CCC;
266     margin-left: -1px;
267     color: #888;
268     user-select: none;
269     &.disabled {
270       cursor: not-allowed;
271     }
272   }
273   li.active span {
274     background-color: rgba($primary, 0.8);
275     color: #EEE;
276     border-color: rgba($primary, 0.8);
277   }
278   a {
279     color: $primary;
280   }
281 }
282
283 .compact ul.pagination {
284   margin: 0;
285 }
286
287 .entity-list {
288   > div {
289     padding: $-m 0;
290   }
291   h4 {
292     margin: 0;
293   }
294   p {
295     margin: $-xs 0 0 0;
296   }
297   hr {
298     margin: 0;
299   }
300   .text-small.text-muted {
301     color: #AAA;
302     font-size: 0.75em;
303     margin-top: $-xs;
304   }
305   .text-muted p.text-muted {
306     margin-top: 0;
307   }
308   .page.draft .text-page {
309     color: $color-page-draft;
310   }
311 }
312
313 .card .entity-list-item {
314   padding-left: $-m;
315   padding-right: $-m;
316 }
317
318 .entity-list.compact {
319   font-size: 0.6em;
320   h4, a {
321     line-height: 1.2;
322   }
323   .entity-item-snippet {
324     display: none;
325   }
326   p {
327     font-size: $fs-m * 0.8;
328     padding-top: $-xs;
329     margin: 0;
330   }
331   > p.empty-text {
332     display: block;
333     font-size: $fs-m;
334   }
335   hr {
336     margin: 0;
337   }
338 }
339
340 .dropdown-container {
341   display: inline-block;
342   vertical-align: top;
343   position: relative;
344 }
345
346 .dropdown-container ul {
347   display: none;
348   position: absolute;
349   z-index: 999;
350   top: 0;
351   list-style: none;
352   right: 0;
353   margin: $-m 0;
354   background-color: #FFFFFF;
355   box-shadow: 0 0 2px 0 rgba(0, 0, 0, 0.1);
356   border-radius: 1px;
357   border: 1px solid #EEE;
358   min-width: 180px;
359   padding: $-xs 0;
360   color: #555;
361   text-align: left !important;
362   &.wide {
363     min-width: 220px;
364   }
365   .text-muted {
366     color: #999;
367   }
368   li.padded {
369     padding: $-xs $-m;
370   }
371   a {
372     display: block;
373     padding: $-xs $-m;
374     color: #555;
375     &:hover {
376       text-decoration: none;
377       background-color: #EEE;
378     }
379     i {
380       margin-right: $-s;
381       padding-right: 0;
382       display: inline-block;
383       width: 16px;
384     }
385   }
386   li.border-bottom {
387     border-bottom: 1px solid #DDD;
388   }
389 }