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