]> BookStack Code Mirror - bookstack/blob - resources/assets/sass/_components.scss
Updated version for v0.15.3
[bookstack] / resources / assets / sass / _components.scss
1 .overlay {
2   background-color: rgba(0, 0, 0, 0.333);
3   position: fixed;
4   z-index: 95536;
5   width: 100%;
6   height: 100%;
7   min-width: 100%;
8   min-height: 100%;
9   top: 0;
10   left: 0;
11   right: 0;
12   bottom: 0;
13   display: flex;
14   align-items: center;
15   justify-content: center;
16   display: none;
17 }
18
19 .popup-body-wrap {
20   display: flex;
21 }
22
23 .popup-body {
24   background-color: #FFF;
25   max-height: 90%;
26   width: 1200px;
27   height: auto;
28   margin: 2% 5%;
29   border-radius: 4px;
30   box-shadow: 0 0 15px 0 rgba(0, 0, 0, 0.3);
31   overflow: hidden;
32   z-index: 999;
33   display: flex;
34   flex-direction: column;
35   &.small {
36     margin: 2% auto;
37     width: 800px;
38     max-width: 90%;
39   }
40   &:before {
41     display: flex;
42     align-self: flex-start;
43   }
44 }
45
46 .corner-button {
47   position: absolute;
48   top: 0;
49   right: 0;
50   margin: 0;
51   height: 40px;
52   border-radius: 0;
53   box-shadow: none;
54 }
55
56 .popup-header, .popup-footer {
57   display: block !important;
58   position: relative;
59   height: 40px;
60   flex: none !important;
61   .popup-title {
62     color: #FFF;
63     padding: 8px $-m;
64   }
65 }
66 body.flexbox-support #entity-selector-wrap .popup-body .form-group {
67   height: 444px;
68   min-height: 444px;
69 }
70 #entity-selector-wrap .popup-body .form-group {
71   margin: 0;
72 }
73
74 .image-manager-body {
75   min-height: 70vh;
76 }
77
78 .dropzone-container {
79   position: relative;
80   border: 3px dashed #DDD;
81 }
82
83 .image-manager-list .image {
84   display: block;
85   position: relative;
86   border-radius: 0;
87   float: left;
88   margin: 0;
89   cursor: pointer;
90   width: (100%/6);
91   height: auto;
92   border: 1px solid #DDD;
93   box-shadow: 0 0 0 0 rgba(0, 0, 0, 0);
94   transition: all cubic-bezier(.4, 0, 1, 1) 160ms;
95   overflow: hidden;
96   &.selected {
97     transform: scale3d(0.92, 0.92, 0.92);
98     border: 1px solid #444;
99     box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.2);
100   }
101   img {
102     width: 100%;
103     max-width: 100%;
104     display: block;
105   }
106   .image-meta {
107     position: absolute;
108     width: 100%;
109     bottom: 0;
110     left: 0;
111     color: #EEE;
112     background-color: rgba(0, 0, 0, 0.4);
113     font-size: 10px;
114     padding: 3px 4px;
115     span {
116       display: block;
117     }
118   }
119   @include smaller-than($xl) {
120     width: (100%/4);
121   }
122   @include smaller-than($m) {
123     .image-meta {
124       display: none;
125     }
126   }
127 }
128
129 #image-manager .load-more {
130   display: block;
131   text-align: center;
132   background-color: #EEE;
133   padding: $-s $-m;
134   color: #AAA;
135   clear: both;
136   font-size: 20px;
137   cursor: pointer;
138   font-style: italic;
139 }
140
141 .image-manager-sidebar {
142   width: 300px;
143   margin-left: 1px;
144   padding: $-m $-l;
145   overflow-y: auto;
146   border-left: 1px solid #DDD;
147   .dropzone-container {
148     margin-top: $-m;
149   }
150 }
151
152 .image-manager-list {
153   overflow-y: scroll;
154   flex: 1;
155 }
156
157 .image-manager-content {
158   display: flex;
159   flex-direction: column;
160   flex: 1;
161   .container {
162     width: 100%;
163   }
164   .full-tab {
165     text-align: center;
166   }
167 }
168
169 // Dropzone
170 /*
171  * The MIT License
172  * Copyright (c) 2012 Matias Meno <[email protected]>
173  */
174 .dz-message {
175   font-size: 1.2em;
176   line-height: 1.1;
177   font-style: italic;
178   color: #aaa;
179   text-align: center;
180   cursor: pointer;
181   padding: $-l $-m;
182   transition: all ease-in-out 120ms;
183 }
184
185 .dz-drag-hover .dz-message {
186   background-color: rgb(16, 126, 210);
187   color: #EEE;
188 }
189
190 @keyframes passing-through {
191   0% {
192     opacity: 0;
193     transform: translateY(40px);
194   }
195   30%, 70% {
196     opacity: 1;
197     transform: translateY(0px);
198   }
199   100% {
200     opacity: 0;
201     transform: translateY(-40px);
202   }
203 }
204
205 @keyframes slide-in {
206   0% {
207     opacity: 0;
208     transform: translateY(40px);
209   }
210   30% {
211     opacity: 1;
212     transform: translateY(0px);
213   }
214 }
215
216 @keyframes pulse {
217   0% {
218     transform: scale(1);
219   }
220   10% {
221     transform: scale(1.1);
222   }
223   20% {
224     transform: scale(1);
225   }
226 }
227
228 .dropzone, .dropzone * {
229   box-sizing: border-box;
230 }
231
232 .dz-preview {
233   position: relative;
234   display: inline-block;
235   vertical-align: top;
236   margin: 12px;
237   min-height: 80px;
238 }
239
240 .dz-preview:hover {
241   z-index: 1000;
242 }
243
244 .dz-preview:hover .dz-details {
245   opacity: 1;
246 }
247
248 .dz-preview.dz-file-preview .dz-image {
249   border-radius: 4px;
250   background: #999;
251   background: linear-gradient(to bottom, #eee, #ddd);
252 }
253
254 .dz-preview.dz-file-preview .dz-details {
255   opacity: 1;
256 }
257
258 .dz-preview.dz-image-preview {
259   background: white;
260 }
261
262 .dz-preview.dz-image-preview .dz-details {
263   transition: opacity 0.2s linear;
264 }
265
266 .dz-preview .dz-remove {
267   font-size: 14px;
268   text-align: center;
269   display: block;
270   cursor: pointer;
271   border: none;
272 }
273
274 .dz-preview .dz-remove:hover {
275   text-decoration: underline;
276 }
277
278 .dz-preview:hover .dz-details {
279   opacity: 1;
280 }
281
282 .dz-preview .dz-details {
283   z-index: 20;
284   position: absolute;
285   top: 0;
286   left: 0;
287   opacity: 0;
288   font-size: 10px;
289   min-width: 100%;
290   max-width: 100%;
291   padding: 6px 3px;
292   text-align: center;
293   color: rgba(0, 0, 0, 0.9);
294   line-height: 150%;
295 }
296
297 .dz-preview .dz-details .dz-size {
298   margin-bottom: 0.5em;
299   font-size: 12px;
300 }
301
302 .dz-preview .dz-details .dz-filename {
303   white-space: nowrap;
304 }
305
306 .dz-preview .dz-details .dz-filename:hover span {
307   border: 1px solid rgba(200, 200, 200, 0.8);
308   background-color: rgba(255, 255, 255, 0.8);
309 }
310
311 .dz-preview .dz-details .dz-filename:not(:hover) {
312   overflow: hidden;
313   text-overflow: ellipsis;
314 }
315
316 .dz-preview .dz-details .dz-filename:not(:hover) span {
317   border: 1px solid transparent;
318 }
319
320 .dz-preview .dz-details .dz-filename span, .dz-preview .dz-details .dz-size span {
321   background-color: rgba(255, 255, 255, 0.4);
322   padding: 0 0.4em;
323   border-radius: 3px;
324 }
325
326 .dz-preview:hover .dz-image img {
327   filter: blur(8px);
328 }
329
330 .dz-preview .dz-image {
331   border-radius: 4px;
332   overflow: hidden;
333   width: 80px;
334   height: 80px;
335   position: relative;
336   display: block;
337   z-index: 10;
338 }
339
340 .dz-preview .dz-image img {
341   display: block;
342 }
343
344 .dz-preview.dz-success .dz-success-mark {
345   animation: passing-through 3s cubic-bezier(0.77, 0, 0.175, 1);
346 }
347
348 .dz-preview.dz-error .dz-error-mark {
349   opacity: 1;
350   animation: slide-in 3s cubic-bezier(0.77, 0, 0.175, 1);
351 }
352
353 .dz-preview .dz-success-mark, .dz-preview .dz-error-mark {
354   pointer-events: none;
355   opacity: 0;
356   z-index: 500;
357   position: absolute;
358   display: block;
359   top: 50%;
360   left: 50%;
361   margin-left: -27px;
362   margin-top: -27px;
363 }
364
365 .dz-preview .dz-success-mark svg, .dz-preview .dz-error-mark svg {
366   display: block;
367   width: 54px;
368   height: 54px;
369 }
370
371 .dz-preview.dz-processing .dz-progress {
372   opacity: 1;
373   transition: all 0.2s linear;
374 }
375
376 .dz-preview.dz-complete .dz-progress {
377   opacity: 0;
378   transition: opacity 0.4s ease-in;
379 }
380
381 .dz-preview:not(.dz-processing) .dz-progress {
382   animation: pulse 6s ease infinite;
383 }
384
385 .dz-preview .dz-progress {
386   opacity: 1;
387   z-index: 1000;
388   pointer-events: none;
389   position: absolute;
390   height: 16px;
391   left: 50%;
392   top: 50%;
393   margin-top: -8px;
394   width: 80px;
395   margin-left: -40px;
396   background: rgba(255, 255, 255, 0.9);
397   transform: scale(1);
398   border-radius: 8px;
399   overflow: hidden;
400 }
401
402 .dz-preview .dz-progress .dz-upload {
403   background: #333;
404   background: linear-gradient(to bottom, #666, #444);
405   position: absolute;
406   top: 0;
407   left: 0;
408   bottom: 0;
409   width: 0;
410   transition: width 300ms ease-in-out;
411 }
412
413 .dz-preview.dz-error .dz-error-message {
414   display: block;
415 }
416
417 .dz-preview.dz-error:hover .dz-error-message {
418   opacity: 1;
419   pointer-events: auto;
420 }
421
422 .dz-preview .dz-error-message {
423   pointer-events: none;
424   z-index: 1000;
425   position: absolute;
426   display: block;
427   display: none;
428   opacity: 0;
429   transition: opacity 0.3s ease;
430   border-radius: 4px;
431   font-size: 11.5px;
432   line-height: 1.2;
433   top: 88px;
434   left: -26px;
435   width: 148px;
436   background: $negative;
437   padding: $-xs;
438   color: white;
439 }
440
441 .dz-preview .dz-error-message:after {
442   content: '';
443   position: absolute;
444   top: -6px;
445   left: 64px;
446   width: 0;
447   height: 0;
448   border-left: 6px solid transparent;
449   border-right: 6px solid transparent;
450   border-bottom: 6px solid $negative;
451 }
452
453
454 [tab-container] .nav-tabs {
455   text-align: left;
456   border-bottom: 1px solid #DDD;
457   margin-bottom: $-m;
458   .tab-item {
459     padding: $-s;
460     color: #666;
461     &.selected {
462       border-bottom-width: 3px;
463     }
464   }
465 }
466
467 .image-picker .none {
468   display: none;
469 }