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