|
| 1 | +.afb_file_container .afb_upload_container { |
| 2 | + margin: 0; |
| 3 | + padding: 0; |
| 4 | +} |
| 5 | + |
1 | 6 | .afb_file_container .afb_dropzone {
|
2 |
| - width: 100%; |
3 |
| - border: dashed 1px #acacac; |
4 |
| - min-height: 80px; |
| 7 | + padding: 20px; |
5 | 8 | text-align: center;
|
| 9 | + cursor: pointer; |
| 10 | + border: 2px dashed #EBEDF3; |
| 11 | + border-radius: 0.42rem; |
| 12 | +} |
| 13 | + |
| 14 | +.afb_file_container .afb_dropzone { |
| 15 | + text-align: center; |
| 16 | + cursor: pointer; |
| 17 | + border: 2px dashed #EBEDF3; |
| 18 | + border-radius: 0.42rem; |
6 | 19 | vertical-align: middle;
|
7 |
| - line-height: 80px; |
| 20 | +} |
| 21 | + |
| 22 | +.afb_file_container ul { |
| 23 | + list-style-type: none; |
| 24 | +} |
| 25 | + |
| 26 | +.afb_file_container .afb_dropzone .afb_dropzone-title { |
| 27 | + margin: 2em 0; |
| 28 | + font-size: 1rem; |
| 29 | + font-weight: 400; |
8 | 30 | }
|
9 | 31 |
|
10 | 32 | .afb_file_container .afb_dropzone.hover {
|
11 | 33 | border-color: #000;
|
12 | 34 | cursor: copy;
|
13 | 35 | }
|
14 |
| -.afb_file_container .afb_dropzone > label { |
15 |
| - display: block; |
16 |
| -} |
| 36 | + |
17 | 37 | .afb_file_container .afb_dropzone .afb_file_input {
|
18 | 38 | display: none;
|
19 | 39 | }
|
20 | 40 |
|
21 |
| -.afb_file_container .afb_upload_container { |
22 |
| - margin: 20px 0 0; |
23 |
| - padding: 0; |
24 |
| - list-style: none; |
| 41 | + |
| 42 | +/*without preview option*/ |
| 43 | + |
| 44 | +.afb_file_container .afb_upload_container.afb_no_preview .afb_item { |
| 45 | + display: flex; |
| 46 | + justify-content: flex-start; |
| 47 | + margin-top: .75rem; |
| 48 | + border-radius: .42rem; |
| 49 | + padding: .5rem 1rem; |
| 50 | + background-color: #f3f6f9; |
| 51 | +} |
| 52 | + |
| 53 | + |
| 54 | +.afb_file_container .afb_upload_container.afb_no_preview .afb_filename { |
| 55 | + flex: 1; |
25 | 56 | overflow: hidden;
|
| 57 | + text-overflow: ellipsis; |
| 58 | + margin-top: auto; |
| 59 | + margin-bottom: auto; |
26 | 60 | }
|
27 | 61 |
|
28 |
| -.afb_file_container .afb_upload_container .afb_item { |
29 |
| - display: block; |
30 |
| - margin-bottom: 20px; |
| 62 | +.afb_file_container .afb_upload_container.afb_no_preview .afb_remove_file { |
| 63 | + text-align: center; |
| 64 | + width: 25px; |
| 65 | + height: 25px; |
| 66 | + border-radius: 50%; |
| 67 | + line-height: 25px; |
| 68 | + margin: auto; |
31 | 69 | }
|
32 | 70 |
|
33 |
| -.afb_file_container .upload-details { |
34 |
| - min-height: 25px; |
35 |
| - overflow: hidden; |
| 71 | +.afb_file_container .afb_upload_container.afb_no_preview .afb_file_progress { |
| 72 | + width: 100px; |
| 73 | + margin-left: 10px; |
| 74 | +} |
| 75 | + |
| 76 | +.afb_file_container .afb_upload_container.afb_no_preview .afb_file_progress > div { |
| 77 | + width: 0; |
| 78 | + height: 100%; |
| 79 | + background: #ffb822; |
| 80 | +} |
| 81 | + |
| 82 | +.afb_file_container .afb_upload_container.afb_no_preview .afb_item.afb_upload_complete .afb_file_progress > div { |
| 83 | + background: #26b89a; |
| 84 | + transition: background 1s ease; |
| 85 | +} |
| 86 | + |
| 87 | +/*with preview option*/ |
| 88 | + |
| 89 | +.afb_file_container .afb_dropzone-preview .afb_item { |
| 90 | + position: relative; |
36 | 91 | display: inline-block;
|
| 92 | + vertical-align: top; |
| 93 | + margin: 16px; |
| 94 | + min-height: 100px; |
| 95 | +} |
| 96 | + |
| 97 | +.afb_file_container .afb_dropzone-preview .afb_filename { |
| 98 | + position: absolute; |
| 99 | + top: 40%; |
| 100 | + left: 0; |
| 101 | + opacity: 0; |
| 102 | + font-size: 13px; |
| 103 | + min-width: 100%; |
| 104 | + max-width: 100%; |
| 105 | + text-align: center; |
| 106 | + color: rgba(0, 0, 0, 0.9); |
| 107 | + line-height: 150%; |
37 | 108 | }
|
38 | 109 |
|
39 |
| -.afb_file_container .afb_upload_preview .upload-details { |
| 110 | +.afb_file_container .afb_dropzone-preview .afb_file_preview { |
| 111 | + border-radius: 0.42rem; |
| 112 | + overflow: hidden; |
| 113 | + width: 120px; |
| 114 | + height: 120px; |
| 115 | + position: relative; |
40 | 116 | display: block;
|
| 117 | + z-index: 10; |
41 | 118 | }
|
42 | 119 |
|
43 |
| -.afb_file_container .afb_filename { |
44 |
| - width: 30%; |
| 120 | +.afb_file_container .afb_dropzone-preview .afb_file_preview img { |
| 121 | + width: 100%; |
| 122 | + height: 100%; |
| 123 | + object-fit: cover; |
45 | 124 | }
|
46 |
| -.afb_file_container .afb_upload_preview .afb_filename { |
47 |
| - width: auto; |
| 125 | + |
| 126 | +.afb_file_container .afb_dropzone-preview .afb_item:hover img { |
| 127 | + transform: scale(1.05, 1.05); |
| 128 | + filter: blur(8px); |
48 | 129 | }
|
49 | 130 |
|
50 |
| -.afb_file_container .afb_file_progress { |
51 |
| - border: 1px solid #ccc; |
52 |
| - height: 25px; |
53 |
| - width: 30%; |
| 131 | +.afb_file_container .afb_dropzone-preview .afb_item:hover .afb_filename { |
| 132 | + opacity: 1; |
| 133 | + z-index: 51; |
54 | 134 | }
|
55 | 135 |
|
56 |
| -.afb_file_container .afb_upload_preview .afb_file_progress { |
57 |
| - width: auto; |
| 136 | +.afb_file_container .afb_dropzone-preview .afb_filename:not(:hover) { |
| 137 | + overflow: hidden; |
| 138 | + text-overflow: ellipsis; |
| 139 | + white-space: nowrap; |
58 | 140 | }
|
59 | 141 |
|
60 |
| -.afb_file_container .afb_file_progress > div { |
61 |
| - width: 0; |
62 |
| - height: 100%; |
63 |
| - background: #ffb822; |
| 142 | +.afb_file_container .afb_dropzone-preview .afb_item .afb_filename span { |
| 143 | + background-color: rgba(255, 255, 255, .8); |
| 144 | + padding: 0 0.4em; |
| 145 | + border-radius: 3px; |
| 146 | + white-space: nowrap; |
64 | 147 | }
|
65 |
| -.afb_file_container .afb_file_progress.afb_file_upload_success > div { |
66 |
| - background: #26b89a; |
| 148 | + |
| 149 | +.afb_file_container .afb_dropzone-preview.dz-complete .afb_file_progress { |
| 150 | + opacity: 0; |
| 151 | + transition: opacity 0.4s ease-in; |
| 152 | +} |
| 153 | + |
| 154 | +.afb_file_container .afb_dropzone-preview .afb_file_progress { |
| 155 | + opacity: 1; |
| 156 | + z-index: 100; |
| 157 | + pointer-events: none; |
| 158 | + position: absolute; |
| 159 | + height: 16px; |
| 160 | + left: 50%; |
| 161 | + top: 50%; |
| 162 | + margin-top: -8px; |
| 163 | + width: 80px; |
| 164 | + margin-left: -40px; |
| 165 | + background: rgba(255, 255, 255, 0.9); |
| 166 | + border-radius: 8px; |
| 167 | + overflow: hidden; |
67 | 168 | }
|
68 |
| -.afb_file_container .afb_file_progress.afb_file_upload_error > div { |
69 |
| - background: #b83041; |
| 169 | + |
| 170 | +.afb_file_container .afb_dropzone-preview .afb_file_progress > div { |
| 171 | + background: #333; |
| 172 | + background: linear-gradient(to bottom, #666, #444); |
| 173 | + position: absolute; |
| 174 | + top: 0; |
| 175 | + left: 0; |
| 176 | + bottom: 0; |
| 177 | + width: 0; |
| 178 | + transition: width 300ms ease-in-out; |
70 | 179 | }
|
71 |
| -.afb_file_container .afb_upload_preview .afb_remove_file.upload-details { |
72 |
| - display: block; |
| 180 | + |
| 181 | +.afb_file_container .afb_dropzone-preview .afb_upload_complete .afb_file_progress { |
| 182 | + opacity: 0; |
| 183 | + transition: opacity 0.4s ease-in; |
73 | 184 | }
|
74 |
| -.afb_file_container .afb_remove_file.upload-details { |
75 |
| - text-align: center; |
76 |
| - width: 25px; |
77 |
| - height: 25px; |
78 |
| - background: #eee; |
79 |
| - border-radius: 50%; |
80 |
| - line-height: 25px; |
81 |
| - margin: auto; |
| 185 | + |
| 186 | +.afb_file_container .afb_dropzone-preview .afb_upload_progressing .afb_file_progress { |
| 187 | + opacity: 1; |
| 188 | + transition: all 0.2s linear; |
82 | 189 | }
|
83 | 190 |
|
84 |
| -.afb_file_container .afb_preview_item { |
| 191 | +.afb_file_container .afb_dropzone-preview .afb_file_success-mark, |
| 192 | +.afb_file_container .afb_dropzone-preview .afb_file_error-mark { |
| 193 | + pointer-events: none; |
| 194 | + opacity: 0; |
| 195 | + z-index: 50; |
| 196 | + position: absolute; |
85 | 197 | display: block;
|
86 |
| - float: left; |
87 |
| - width: 33%; |
88 |
| - text-align: center; |
| 198 | + top: 50%; |
| 199 | + left: 50%; |
| 200 | + margin-left: -27px; |
| 201 | + margin-top: -27px; |
89 | 202 | }
|
90 | 203 |
|
91 |
| -.afb_file_container .afb_preview_item img { |
92 |
| - width: 100%; |
93 |
| - height: auto; |
| 204 | +.afb_file_container .afb_dropzone-preview .afb_upload_complete .afb_file_success-mark { |
| 205 | + opacity: 1; |
| 206 | + animation: slide-in 3s cubic-bezier(0.77, 0, 0.175, 1); |
94 | 207 | }
|
95 | 208 |
|
| 209 | +.afb_file_container .afb_dropzone-preview .afb_remove_file { |
| 210 | + position: absolute; |
| 211 | + top: -12.5px; |
| 212 | + right: -12.5px; |
| 213 | + background-color: #fff; |
| 214 | + border-radius: 50%; |
| 215 | + box-shadow: 0 0 13px 0 rgba(0, 0, 0, .1); |
| 216 | + width: 22px; |
| 217 | + height: 22px; |
| 218 | + z-index: 20; |
| 219 | + cursor: pointer; |
| 220 | + display: flex; |
| 221 | + align-items: center; |
| 222 | + justify-content: center; |
| 223 | +} |
96 | 224 |
|
| 225 | +.afb_file_container .afb_dropzone-preview.afb_dropzone-started .afb_dropzone-title { |
| 226 | + display: none; |
| 227 | +} |
0 commit comments