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