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