]> BookStack Code Mirror - bookstack/blob - resources/sass/_lists.scss
Add git to the apt-get install packages.
[bookstack] / resources / sass / _lists.scss
1
2 .book-contents .entity-list-item {
3   .icon {
4     width: 4px;
5     border-radius: 1px;
6     justify-self: stretch;
7     align-self: stretch;
8     height: auto;
9     margin-right: $-l;
10   }
11   .icon:after {
12     opacity: 0.5;
13   }
14   .icon svg {
15     display: none;
16   }
17   p {
18     margin-bottom: 0;
19   }
20   .inner-page {
21     padding-top: 0;
22     padding-bottom: 0;
23   }
24 }
25
26 .entity-list-item + .chapter-expansion {
27   display: flex;
28   padding: 0 $-m $-m $-m;
29   align-items: center;
30   border: 0;
31   width: 100%;
32   position: relative;
33   > .icon {
34     width: 4px;
35     height: auto;
36     border-radius: 0 0 1px 1px;
37     align-self: stretch;
38     flex-shrink: 0;
39     &:before {
40       position: absolute;
41       top: 0;
42       left: 0;
43       width: 100%;
44       height: 1px;
45       background-color: currentColor;
46       content: '';
47       opacity: 0.5;
48     }
49     &:after {
50       opacity: 0.5;
51     }
52   }
53   .icon svg {
54     display: none;
55   }
56   > .content {
57     flex: 1;
58   }
59   .chapter-expansion-toggle {
60     border-radius: 0 4px 4px 0;
61     padding: $-xs $-m;
62     width: 100%;
63     text-align: left;
64   }
65   .chapter-expansion-toggle:hover {
66     background-color: rgba(0, 0, 0, 0.06);
67   }
68 }
69
70 .entity-list-item.has-children {
71   padding-bottom: 0;
72   > .icon {
73     border-radius: 4px 4px 0 0;
74   }
75 }
76
77 .inset-list {
78   display: none;
79   .entity-list-item-name {
80     font-size: 1rem;
81   }
82   .entity-list-item-children {
83     padding-top: 0;
84     padding-bottom: 0;
85   }
86 }
87
88 .sidebar-page-nav {
89   $nav-indent: $-m;
90   list-style: none;
91   margin: $-s 0 $-m $-xs;
92   position: relative;
93   &:after {
94     content: '';
95     display: block;
96     position: absolute;
97     left: 0;
98     background-color: rgba(0, 0, 0, 0.2);
99     width: 2px;
100     top: 5px;
101     bottom: 5px;
102     z-index: 0;
103   }
104   li {
105     margin-bottom: 4px;
106     font-size: 0.95em;
107     position: relative;
108   }
109   .h1 {
110     padding-left: $nav-indent;
111   }
112   .h2 {
113     padding-left: $nav-indent * 1.5;
114   }
115   .h3 {
116     padding-left: $nav-indent * 2;
117   }
118   .h4 {
119     padding-left: $nav-indent * 2.5;
120   }
121   .h5 {
122     padding-left: $nav-indent*3;
123   }
124   .h6 {
125     padding-left: $nav-indent*3.5;
126   }
127   .current-heading {
128     font-weight: bold;
129   }
130   li:not(.current-heading) .sidebar-page-nav-bullet {
131     background-color: #BBB !important;
132   }
133   .sidebar-page-nav-bullet {
134     width: 6px;
135     height: 6px;
136     position: absolute;
137     left: -2px;
138     top: 30%;
139     border-radius: 50%;
140     box-shadow: 0 0 0 6px #F2F2F2;
141     z-index: 1;
142   }
143 }
144
145 // Sidebar list
146 .book-tree .sidebar-page-list  {
147   list-style: none;
148   margin: $-xs -$-s 0 -$-s;
149   padding-left: 0;
150   padding-right: 0;
151   position: relative;
152
153   &:after, .sub-menu:after {
154     content: '';
155     display: block;
156     position: absolute;
157     left: $-m;
158     top: 1rem;
159     bottom: 1rem;
160     border-left: 4px solid rgba(0, 0, 0, 0.1);
161     z-index: 0;
162   }
163
164   ul {
165     list-style: none;
166     padding-left: 1rem;
167     padding-right: 0;
168   }
169
170   .entity-list-item {
171     padding-top: $-xxs;
172     padding-bottom: $-xxs;
173     background-clip: content-box;
174     border-radius: 0 3px 3px 0;
175     .content {
176       padding-top: $-xs;
177       padding-bottom: $-xs;
178       max-width: calc(100% - 20px);
179     }
180   }
181   .entity-list-item.selected {
182     background-color: rgba(0, 0, 0, 0.08);
183   }
184   .entity-list-item.no-hover {
185     margin-top: -$-xs;
186     padding-right: 0;
187   }
188   .entity-list-item-name {
189     font-size: 1em;
190     margin: 0;
191   }
192   .chapter-child-menu {
193     font-size: .8rem;
194     margin-top: -.2rem;
195     margin-left: -1rem;
196   }
197   [chapter-toggle] {
198     padding-left: .7rem;
199     padding-bottom: .2rem;
200   }
201   .entity-list-item .icon {
202     z-index: 2;
203     width: 4px;
204     height: auto;
205     align-self: stretch;
206     flex-shrink: 0;
207     border-radius: 1px;
208     opacity: 0.6;
209   }
210   .entity-list-item .icon:after {
211     opacity: 1;
212   }
213   .entity-list-item .icon svg {
214     display: none;
215   }
216 }
217
218 .chapter-child-menu {
219   ul.sub-menu {
220     display: none;
221     padding-left: 0;
222     position: relative;
223   }
224   [chapter-toggle].open + .sub-menu {
225     display: block;
226   }
227 }
228
229 // Sortable Lists
230 .sortable-page-list, .sortable-page-list ul {
231   list-style: none;
232 }
233 .sort-box {
234   margin-bottom: $-m;
235   padding: $-m $-xl;
236   position: relative;
237   &::before {
238     pointer-events: none;
239     content: '';
240     border-radius: 4px;
241     opacity: 0.5;
242     border: 2px solid var(--color-book);
243     display: block;
244     top: 0;
245     bottom: 0;
246     left: 0;
247     right: 0;
248     position: absolute;
249   }
250 }
251 .sort-box-options {
252   display: flex;
253   flex-wrap: wrap;
254   justify-content: space-between;
255 }
256 .sort-box-options .button {
257   margin-left: 0;
258 }
259 .sortable-page-list {
260   margin-left: 0;
261   padding: 0;
262   .entity-list-item > span:first-child {
263     align-self: flex-start;
264   }
265   .entity-list-item > div {
266     display: block;
267     flex: 1;
268   }
269   > ul {
270     margin-left: 0;
271   }
272   ul {
273     margin-bottom: $-m;
274     margin-top: 0;
275     padding-left: $-m;
276   }
277   li {
278     border: 1px solid #DDD;
279     margin-top: -1px;
280     min-height: 38px;
281   }
282   li.text-page, li.text-chapter {
283     border-left: 2px solid currentColor;
284   }
285   li:first-child {
286     margin-top: $-xs;
287   }
288 }
289 .sortable-page-list li.placeholder {
290   position: relative;
291 }
292 .sortable-page-list li.placeholder:before {
293   position: absolute;
294 }
295
296 .activity-list-item {
297   padding: $-s 0;
298   display: grid;
299   grid-template-columns: min-content 1fr;
300   grid-column-gap: $-m;
301   font-size: 0.9em;
302 }
303 .card .activity-list-item {
304   padding: $-s $-m;
305 }
306
307 .user-list-item {
308   display: inline-grid;
309   padding: $-s;
310   grid-template-columns: min-content 1fr;
311   grid-column-gap: $-m;
312   font-size: 0.9em;
313   align-items: center;
314   > div:first-child {
315     line-height: 0;
316   }
317 }
318
319 ul.pagination {
320   display: inline-block;
321   list-style: none;
322   margin: $-m 0;
323   padding-left: 1px;
324   li {
325     float: left;
326   }
327   li:first-child {
328     a, span {
329       border-radius: 3px 0 0 3px;
330     }
331   }
332   li:last-child {
333     a, span {
334       border-radius: 0 3px 3px 0;
335     }
336   }
337   a, span {
338     display: block;
339     padding: $-xxs $-s;
340     border: 1px solid #CCC;
341     margin-left: -1px;
342     user-select: none;
343     &.disabled {
344       cursor: not-allowed;
345     }
346   }
347   li.active span {
348     color: #FFF;
349   }
350 }
351
352 .compact ul.pagination {
353   margin: 0;
354 }
355
356 .entity-list, .icon-list {
357   margin: 0 (-$-m);
358   h4 {
359     margin: 0;
360   }
361   hr {
362     margin: 0;
363   }
364   .text-small.text-muted {
365     color: #AAA;
366     font-size: 0.75em;
367     margin-top: $-xs;
368   }
369   .text-muted p.text-muted {
370     margin-top: 0;
371   }
372   .page.draft .text-page {
373     color: var(--color-page-draft);
374     fill: var(--color-page-draft);
375   }
376   > .dropdown-container {
377     display: block;
378   }
379 }
380
381 .icon-list hr {
382   margin: $-s $-m;
383   max-width: 140px;
384   opacity: 0.25;
385   height: 1.1px;
386 }
387
388 .icon-list hr + hr, .icon-list hr:first-child, .icon-list hr:last-child {
389   display: none;
390 }
391
392 .entity-list-item, .icon-list-item {
393   padding: $-s $-m;
394   display: flex;
395   align-items: center;
396   background-color: transparent;
397   border: 0;
398   width: 100%;
399   position: relative;
400   word-break: break-word;
401   h4 a {
402     color: #666;
403   }
404   > span:first-child {
405     margin-right: $-m;
406     flex-basis: 1.88em;
407     flex: none;
408   }
409   > span:last-child {
410     flex: 1;
411     text-align: left;
412   }
413   &:not(.no-hover) {
414     cursor: pointer;
415   }
416   &:not(.no-hover):hover {
417     text-decoration: none;
418     background-color: rgba(0, 0, 0, 0.1);
419     border-radius: 4px;
420   }
421   &.outline-hover {
422     border: 1px solid transparent;
423   }
424   &.outline-hover:hover {
425     background-color: transparent;
426     border-color: rgba(0, 0, 0, 0.1);
427   }
428   &:focus {
429     background-color: #eee;
430     outline: 1px dotted #666;
431     outline-offset: -2px;
432   }
433 }
434
435 .entity-list-item-path-sep {
436   display: inline-block;
437   vertical-align: top;
438   position: relative;
439   top: 1px;
440   svg {
441     margin-right: 0;
442   }
443 }
444
445 .card .entity-list-item:not(.no-hover):hover {
446   background-color: #F2F2F2;
447 }
448 .card .entity-list-item .entity-list-item:hover {
449   background-color: #EEEEEE;
450 }
451
452 .entity-list-item-children {
453   padding: $-m;
454   > div {
455     overflow: hidden;
456     padding: $-xs 0;
457     margin-top: -$-xs;
458   }
459   .entity-chip {
460     text-overflow: ellipsis;
461     height: 2.5em;
462     overflow: hidden;
463     text-align: left;
464     display: block;
465     white-space: nowrap;
466   }
467 }
468
469 .entity-list-item-image {
470   align-self: stretch;
471   width: 140px;
472   flex: none;
473   background-size: cover;
474   background-position: 50% 50%;
475   border-radius: 3px;
476   position: relative;
477   margin-right: $-l;
478
479   &.entity-list-item-image-wide {
480     width: 220px;
481   }
482
483   .svg-icon {
484     color: #FFF;
485     fill: #FFF;
486     font-size: 1.66rem;
487     margin-right: 0;
488     position: absolute;
489     bottom: $-xs;
490     left: $-xs;
491   }
492
493   @include smaller-than($m) {
494     width: 80px;
495   }
496 }
497
498 .chapter > .entity-list-item-image {
499   width: 60px;
500 }
501
502 .entity-list.compact {
503   font-size: 0.6 * $fs-m;
504   h4, a {
505     line-height: 1.2;
506   }
507   .entity-item-snippet {
508     display: none;
509   }
510   .entity-list-item p {
511     font-size: $fs-m * 0.8;
512     padding-top: $-xs;
513   }
514   p {
515     margin: 0;
516   }
517   > p.empty-text {
518     display: block;
519     font-size: $fs-m;
520   }
521   hr {
522     margin: 0;
523   }
524   @include smaller-than($m) {
525     h4 {
526       font-size: 1.666em;
527     }
528   }
529 }
530
531 .dropdown-container {
532   display: inline-block;
533   vertical-align: top;
534   position: relative;
535 }
536
537 .dropdown-menu {
538   display: none;
539   position: absolute;
540   z-index: 999;
541   top: 0;
542   list-style: none;
543   right: 0;
544   margin: $-m 0;
545   background-color: #FFFFFF;
546   box-shadow: 0 0 2px 0 rgba(0, 0, 0, 0.1);
547   border-radius: 1px;
548   border: 1px solid #EEE;
549   min-width: 180px;
550   padding: $-xs 0;
551   color: #555;
552   fill: #555;
553   text-align: left !important;
554   &.wide {
555     min-width: 220px;
556   }
557   .text-muted {
558     color: #999;
559     fill: #999;
560   }
561   li.active a {
562     font-weight: 600;
563   }
564   a, button {
565     display: block;
566     padding: $-xs $-m;
567     color: #555;
568     fill: currentColor;
569     white-space: nowrap;
570     &:hover, &:focus {
571       text-decoration: none;
572       background-color: var(--color-primary-light);
573       color: var(--color-primary);
574     }
575     &:focus {
576       outline: 1px solid var(--color-primary);
577       outline-offset: -2px;
578     }
579     svg {
580       margin-right: $-s;
581       display: inline-block;
582       width: 16px;
583     }
584   }
585   button {
586     width: 100%;
587     text-align: left;
588   }
589   li.border-bottom {
590     border-bottom: 1px solid #DDD;
591   }
592 }
593
594 // Books grid view
595 .featured-image-container {
596   position: relative;
597   overflow: hidden;
598   min-height: 140px;
599   background-size: cover;
600   background-position: 50% 50%;
601   transition: opacity ease-in-out 240ms;
602   a {
603     display: block;
604   }
605   img {
606     display: block;
607     width: 100%;
608     max-width: 100%;
609     height: auto;
610   }
611 }
612 .featured-image-container-wrap {
613   position: relative;
614   .svg-icon {
615     color: #FFF;
616     fill: #FFF;
617     font-size: 2rem;
618     margin-right: 0;
619     position: absolute;
620     bottom: 10px;
621     left: 6px;
622   }
623 }
624 .grid-card:hover .featured-image-container {
625   opacity: .5;
626 }
627
628 .action-link-list {
629   //padding: $-s 0;
630 }
631 .action-link {
632   background: transparent;
633   border: none;
634   color: currentColor;
635   padding: $-m 0;
636 }
637
638 .active-link-list {
639   a {
640     display: inline-block;
641     padding: $-s;
642   }
643   a:not(.active) {
644     color: #444;
645     fill: #444;
646   }
647   a:hover {
648     background-color: rgba(0, 0, 0, 0.05);
649     border-radius: 3px;
650     text-decoration: none;
651   }
652 }
Morty Proxy This is a proxified and sanitized view of the page, visit original site.