]> BookStack Code Mirror - bookstack/blob - resources/assets/sass/_components.scss
switch spaces to tabs
[bookstack] / resources / assets / sass / _components.scss
1 // System wide notifications
2 [notification] {
3   position: fixed;
4   top: 0;
5   right: 0;
6   margin: $-xl*2 $-xl;
7   padding: $-m $-l;
8   background-color: #EEE;
9   border-radius: 3px;
10   box-shadow: $bs-card;
11   z-index: 999999;
12   cursor: pointer;
13   max-width: 360px;
14   transition: transform ease-in-out 280ms;
15   transform: translateX(580px);
16   display: grid;
17   grid-template-columns: 42px 1fr;
18   color: #FFF;
19   span, svg {
20     vertical-align: middle;
21     justify-self: center;
22     align-self: center;
23   }
24   svg {
25     fill: #EEEEEE;
26     width: 2.8rem;
27     height: 2.8rem;
28     padding-right: $-s;
29   }
30   span {
31     vertical-align: middle;
32     line-height: 1.3;
33   }
34   &.pos {
35     background-color: $positive;
36   }
37   &.neg {
38     background-color: $negative;
39   }
40   &.warning {
41     background-color: $secondary;
42   }
43   &.showing {
44     transform: translateX(0);
45   }
46   &.showing:hover {
47     transform: translate3d(0, -2px, 0);
48   }
49 }
50
51 [chapter-toggle] {
52   cursor: pointer;
53   margin: 0;
54   transition: all ease-in-out 180ms;
55   user-select: none;
56   svg[data-icon="caret-right"] {
57     transition: all ease-in-out 180ms;
58     transform: rotate(0deg);
59     transform-origin: 25% 50%;
60   }
61   &.open svg[data-icon="caret-right"] {
62     transform: rotate(90deg);
63   }
64 }
65
66 [overlay] {
67   background-color: rgba(0, 0, 0, 0.333);
68   position: fixed;
69   z-index: 95536;
70   width: 100%;
71   height: 100%;
72   min-width: 100%;
73   min-height: 100%;
74   top: 0;
75   left: 0;
76   right: 0;
77   bottom: 0;
78   align-items: center;
79   justify-content: center;
80   display: none;
81 }
82
83 .popup-body-wrap {
84   display: flex;
85 }
86
87 .popup-body {
88   background-color: #FFF;
89   max-height: 90%;
90   width: 1200px;
91   height: auto;
92   margin: 2% 5%;
93   border-radius: 4px;
94   box-shadow: 0 0 15px 0 rgba(0, 0, 0, 0.3);
95   overflow: hidden;
96   z-index: 999;
97   display: flex;
98   flex-direction: column;
99   &.small {
100     margin: 2% auto;
101     width: 800px;
102     max-width: 90%;
103   }
104   &:before {
105     display: flex;
106     align-self: flex-start;
107   }
108   .popup-content {
109     overflow-y: auto;
110   }
111 }
112
113 .corner-button {
114   position: absolute;
115   top: 0;
116   right: 0;
117   margin: 0;
118   height: 40px;
119   border-radius: 0;
120   box-shadow: none;
121 }
122
123 .popup-header, .popup-footer {
124   display: block !important;
125   position: relative;
126   height: 40px;
127   flex: none !important;
128   .popup-title {
129     color: #FFF;
130     padding: 8px $-m;
131   }
132 }
133 body.flexbox-support #entity-selector-wrap .popup-body .form-group {
134   height: 444px;
135   min-height: 444px;
136 }
137 #entity-selector-wrap .popup-body .form-group {
138   margin: 0;
139 }
140
141 .image-manager-body {
142   min-height: 70vh;
143 }
144
145 .dropzone-container {
146   position: relative;
147   background-color: #EEE;
148   background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='4' height='4' viewBox='0 0 4 4'%3E%3Cpath fill='%23a9a9a9' fill-opacity='0.52' d='M1 3h1v1H1V3zm2-2h1v1H3V1z'%3E%3C/path%3E%3C/svg%3E");
149 }
150
151 .image-manager-list .image {
152   display: block;
153   position: relative;
154   border-radius: 0;
155   float: left;
156   margin: 0;
157   cursor: pointer;
158   width: (100%/6);
159   height: auto;
160   border: 1px solid #DDD;
161   box-shadow: 0 0 0 0 rgba(0, 0, 0, 0);
162   transition: all cubic-bezier(.4, 0, 1, 1) 160ms;
163   overflow: hidden;
164   &.selected {
165     //transform: scale3d(0.92, 0.92, 0.92);
166     border: 4px solid #FFF;
167     overflow: hidden;
168     border-radius: 8px;
169     box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.2);
170   }
171   img {
172     width: 100%;
173     max-width: 100%;
174     display: block;
175   }
176   .image-meta {
177     position: absolute;
178     width: 100%;
179     bottom: 0;
180     left: 0;
181     color: #EEE;
182     background-color: rgba(0, 0, 0, 0.4);
183     font-size: 10px;
184     padding: 3px 4px;
185     span {
186       display: block;
187     }
188   }
189   @include smaller-than($xl) {
190     width: (100%/4);
191   }
192   @include smaller-than($m) {
193     .image-meta {
194       display: none;
195     }
196   }
197 }
198
199 #image-manager .load-more {
200   display: block;
201   text-align: center;
202   background-color: #EEE;
203   padding: $-s $-m;
204   color: #AAA;
205   clear: both;
206   font-size: 20px;
207   cursor: pointer;
208   font-style: italic;
209 }
210
211 .image-manager-sidebar {
212   width: 300px;
213   margin-left: 1px;
214   overflow-y: auto;
215   overflow-x: hidden;
216   border-left: 1px solid #DDD;
217   .inner {
218     padding: $-m;
219   }
220   img {
221     max-width: 100%;
222     max-height: 180px;
223     display: block;
224     margin: 0 auto $-m auto;
225     box-shadow: 0 1px 21px 1px rgba(76, 76, 76, 0.3);
226   }
227   .image-manager-viewer {
228     height: 196px;
229     display: flex;
230     align-items: center;
231     justify-content: center;
232     a {
233       display: inline-block;
234     }
235   }
236   .dropzone-container {
237     border-bottom: 1px solid #DDD;
238   }
239 }
240
241 .image-manager-list {
242   overflow-y: scroll;
243   flex: 1;
244 }
245
246 .image-manager-content {
247   display: flex;
248   flex-direction: column;
249   flex: 1;
250   .container {
251     width: 100%;
252   }
253   .full-tab {
254     text-align: center;
255   }
256 }
257
258 // Dropzone
259 /*
260  * The MIT License
261  * Copyright (c) 2012 Matias Meno <[email protected]>
262  */
263 .dz-message {
264   font-size: 1em;
265   line-height: 2.35;
266   font-style: italic;
267   color: #888;
268   text-align: center;
269   cursor: pointer;
270   padding: $-l $-m;
271   transition: all ease-in-out 120ms;
272 }
273
274 .dz-drag-hover .dz-message {
275   background-color: rgb(16, 126, 210);
276   color: #EEE;
277 }
278
279 @keyframes passing-through {
280   0% {
281     opacity: 0;
282     transform: translateY(40px);
283   }
284   30%, 70% {
285     opacity: 1;
286     transform: translateY(0px);
287   }
288   100% {
289     opacity: 0;
290     transform: translateY(-40px);
291   }
292 }
293
294 @keyframes slide-in {
295   0% {
296     opacity: 0;
297     transform: translateY(40px);
298   }
299   30% {
300     opacity: 1;
301     transform: translateY(0px);
302   }
303 }
304
305 @keyframes pulse {
306   0% {
307     transform: scale(1);
308   }
309   10% {
310     transform: scale(1.1);
311   }
312   20% {
313     transform: scale(1);
314   }
315 }
316
317 .dropzone, .dropzone * {
318   box-sizing: border-box;
319 }
320
321 .dz-preview {
322   position: relative;
323   display: inline-block;
324   vertical-align: top;
325   margin: 12px;
326   min-height: 80px;
327 }
328
329 .dz-preview:hover {
330   z-index: 1000;
331 }
332
333 .dz-preview:hover .dz-details {
334   opacity: 1;
335 }
336
337 .dz-preview.dz-file-preview .dz-image {
338   border-radius: 4px;
339   background: #e9e9e9;
340 }
341
342 .dz-preview.dz-file-preview .dz-details {
343   opacity: 1;
344 }
345
346 .dz-preview.dz-image-preview {
347   background: white;
348 }
349
350 .dz-preview.dz-image-preview .dz-details {
351   transition: opacity 0.2s linear;
352 }
353
354 .dz-preview .dz-remove {
355   font-size: 13px;
356   text-align: center;
357   display: block;
358   cursor: pointer;
359   border: none;
360   margin-top: 3px;
361 }
362
363 .dz-preview .dz-remove:hover {
364   text-decoration: underline;
365 }
366
367 .dz-preview:hover .dz-details {
368   opacity: 1;
369 }
370
371 .dz-preview .dz-details {
372   z-index: 20;
373   position: absolute;
374   top: 0;
375   left: 0;
376   opacity: 0;
377   font-size: 10px;
378   min-width: 100%;
379   max-width: 100%;
380   padding: 6px 3px;
381   text-align: center;
382   color: rgba(0, 0, 0, 0.9);
383   line-height: 150%;
384 }
385
386 .dz-preview .dz-details .dz-size {
387   margin-bottom: 0.5em;
388   font-size: 12px;
389 }
390
391 .dz-preview .dz-details .dz-filename {
392   white-space: nowrap;
393 }
394
395 .dz-preview .dz-details .dz-filename:hover span {
396   border: 1px solid rgba(200, 200, 200, 0.8);
397   background-color: rgba(255, 255, 255, 0.8);
398 }
399
400 .dz-preview .dz-details .dz-filename:not(:hover) {
401   overflow: hidden;
402   text-overflow: ellipsis;
403 }
404
405 .dz-preview .dz-details .dz-filename:not(:hover) span {
406   border: 1px solid transparent;
407 }
408
409 .dz-preview .dz-details .dz-filename span {
410   background-color: rgba(255, 255, 255, 0.4);
411   padding: 0 0.4em;
412   border-radius: 3px;
413 }
414
415 .dz-preview:hover .dz-image img {
416   filter: blur(8px);
417 }
418
419 .dz-preview .dz-image {
420   border-radius: 4px;
421   overflow: hidden;
422   width: 80px;
423   height: 80px;
424   position: relative;
425   display: block;
426   z-index: 10;
427 }
428
429 .dz-preview .dz-image img {
430   display: block;
431 }
432
433 .dz-preview.dz-success .dz-success-mark {
434   animation: passing-through 3s cubic-bezier(0.77, 0, 0.175, 1);
435 }
436
437 .dz-preview.dz-error .dz-error-mark {
438   opacity: 1;
439   animation: slide-in 3s cubic-bezier(0.77, 0, 0.175, 1);
440 }
441
442 .dz-preview .dz-success-mark, .dz-preview .dz-error-mark {
443   pointer-events: none;
444   opacity: 0;
445   z-index: 1001;
446   position: absolute;
447   display: block;
448   top: 50%;
449   left: 50%;
450   margin-left: -27px;
451   margin-top: -35px;
452 }
453
454 .dz-preview .dz-success-mark svg, .dz-preview .dz-error-mark svg {
455   display: block;
456   width: 54px;
457   height: 54px;
458 }
459
460 .dz-preview.dz-processing .dz-progress {
461   opacity: 1;
462   transition: all 0.2s linear;
463 }
464
465 .dz-preview.dz-complete .dz-progress {
466   opacity: 0;
467   transition: opacity 0.4s ease-in;
468 }
469
470 .dz-preview:not(.dz-processing) .dz-progress {
471   animation: pulse 6s ease infinite;
472 }
473
474 .dz-preview .dz-progress {
475   opacity: 1;
476   z-index: 1000;
477   pointer-events: none;
478   position: absolute;
479   height: 16px;
480   left: 50%;
481   top: 50%;
482   margin-top: -8px;
483   width: 80px;
484   margin-left: -40px;
485   background: rgba(255, 255, 255, 0.9);
486   transform: scale(1);
487   border-radius: 8px;
488   overflow: hidden;
489 }
490
491 .dz-preview .dz-progress .dz-upload {
492   background: #333;
493   background: linear-gradient(to bottom, #666, #444);
494   position: absolute;
495   top: 0;
496   left: 0;
497   bottom: 0;
498   width: 0;
499   transition: width 300ms ease-in-out;
500 }
501
502 .dz-preview.dz-error .dz-error-message {
503   display: block;
504 }
505
506 .dz-preview.dz-error {
507   .dz-image, .dz-details {
508     &:hover ~ .dz-error-message {
509       opacity: 1;
510       pointer-events: auto;
511     }
512   }
513 }
514
515 .dz-preview .dz-error-message {
516   pointer-events: none;
517   z-index: 1000;
518   position: absolute;
519   display: block;
520   display: none;
521   opacity: 0;
522   transition: opacity 0.3s ease;
523   border-radius: 4px;
524   font-size: 12px;
525   line-height: 1.2;
526   top: 88px;
527   left: -26px;
528   width: 148px;
529   background: $negative;
530   padding: $-xs;
531   color: white;
532 }
533
534 .dz-preview .dz-error-message:after {
535   content: '';
536   position: absolute;
537   top: -6px;
538   left: 64px;
539   width: 0;
540   height: 0;
541   border-left: 6px solid transparent;
542   border-right: 6px solid transparent;
543   border-bottom: 6px solid $negative;
544 }
545
546
547 .tab-container .nav-tabs {
548   text-align: left;
549   border-bottom: 1px solid #DDD;
550   margin-bottom: $-m;
551   .tab-item {
552     padding: $-s;
553     color: #666;
554     &.selected {
555       border-bottom-width: 3px;
556     }
557   }
558 }
559
560 .image-picker .none {
561   display: none;
562 }
563
564 #code-editor .CodeMirror {
565   height: 400px;
566 }
567
568 #code-editor .lang-options {
569   max-width: 400px;
570   margin-bottom: $-s;
571   a {
572     margin-right: $-xs;
573     text-decoration: underline;
574   }
575 }
576
577 @include smaller-than($m) {
578   #code-editor .lang-options {
579     max-width: 100%;
580   }
581   #code-editor .CodeMirror {
582     height: 200px;
583   }
584 }
585
586 .comment-box {
587   clear: left;
588   border: 1px solid #DDD;
589   margin-bottom: $-s;
590   border-radius: 3px;
591   .content {
592     padding: $-s;
593     font-size: 0.666em;
594     p, ul, ol {
595       font-size: $fs-m;
596       margin: .5em 0;
597     }
598   }
599   .reply-row {
600     padding: $-xs $-s;
601   }
602 }
603
604 .comment-box .header {
605   padding: $-xs $-s;
606   background-color: #f8f8f8;
607   border-bottom: 1px solid #DDD;
608   .meta {
609     img, a, span {
610       display: inline-block;
611       vertical-align: top;
612     }
613     a, span {
614       padding: $-xxs 0 $-xxs 0;
615       line-height: 1.6;
616     }
617     a { color: #666; }
618     span {
619       color: #888;
620       padding-left: $-xxs;
621     }
622   }
623   .text-muted {
624     color: #999;
625   }
626 }
627
628 #tag-manager .drag-card {
629   max-width: 500px;
630 }