_dropzone.scss 6.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306
  1. /* The MIT License */
  2. $preview-width: 200px;
  3. $preview-height: 150px;
  4. .pagemedia-field {
  5. .form-label {
  6. display: flex;
  7. justify-content: space-between;
  8. margin-right: 1.5rem;
  9. align-items: center;
  10. label {
  11. cursor: pointer;
  12. flex: 1;
  13. }
  14. }
  15. input[type="range"] {
  16. &::-webkit-slider-runnable-track {
  17. background: inherit !important;
  18. border: none !important;
  19. }
  20. }
  21. }
  22. .dropzone {
  23. position: relative;
  24. border-radius: $form-border-radius;
  25. min-height: 4rem;
  26. &.dz-clickable {
  27. cursor: pointer;
  28. }
  29. &.dz-drag-hover {
  30. border-color: rgba(0,0,0,0.15);
  31. background: rgba(0,0,0,0.04);
  32. }
  33. &.dz-started .dz-message {
  34. display: none;
  35. }
  36. .dz-message {
  37. opacity: 1;
  38. -ms-filter: none;
  39. filter: none;
  40. }
  41. .dz-preview {
  42. position: relative;
  43. display: inline-block;
  44. margin: 1rem 1rem 1.5rem 1rem;
  45. vertical-align: top;
  46. &.dz-file-preview [data-dz-thumbnail] {
  47. display: none;
  48. }
  49. &.dz-error .dz-error-mark {
  50. display: block;
  51. }
  52. &.dz-success .dz-success-mark {
  53. display: block;
  54. }
  55. .dz-success-mark, .dz-error-mark {
  56. font-family: FontAwesome;
  57. display: none;
  58. position: absolute;
  59. width: 22px;
  60. height: 22px;
  61. font-size: 18px;
  62. line-height: 25px;
  63. border-radius: 100%;
  64. text-align: center;
  65. right: 2px;
  66. top: 2px;
  67. span {
  68. display: none;
  69. }
  70. }
  71. &:hover {
  72. .dz-success-mark, .dz-error-mark {
  73. display: none;
  74. }
  75. }
  76. .dz-success-mark {
  77. &::after {
  78. content: '\f00c';
  79. }
  80. }
  81. .dz-error-mark {
  82. &::after {
  83. content: '\f12a';
  84. }
  85. }
  86. .dz-progress {
  87. position: absolute;
  88. bottom: auto;
  89. left: 0px;
  90. right: 0px;
  91. height: 4px;
  92. display: none;
  93. .dz-upload {
  94. display: block;
  95. position: absolute;
  96. top: 0;
  97. bottom: 0;
  98. left: 0;
  99. width: 0%;
  100. }
  101. }
  102. .dz-error-message {
  103. display: none;
  104. position: absolute;
  105. top: 0;
  106. left: 0;
  107. right: 0;
  108. font-size: 0.9rem;
  109. line-height: 1.2;
  110. padding: 8px 10px;
  111. z-index: 500;
  112. }
  113. &.dz-processing .dz-progress {
  114. display: block;
  115. }
  116. &:hover {
  117. .dz-remove, .dz-unset, .dz-view, .dz-insert, .dz-metadata {
  118. display: block;
  119. }
  120. }
  121. &.dz-processing {
  122. &:hover {
  123. .dz-unset {
  124. display: none;
  125. }
  126. }
  127. }
  128. &:hover.dz-error .dz-error-message {
  129. display: block;
  130. }
  131. //.dz-remove, .dz-unset, .dz-insert {
  132. // display: none;
  133. //}
  134. .dz-filename {
  135. position: absolute;
  136. z-index: 1;
  137. bottom: 0;
  138. width: 100%;
  139. padding: 0 5px;
  140. background: rgba(0,0,0,0.3);
  141. color: #fff;
  142. text-align: center;
  143. white-space: nowrap;
  144. overflow: hidden;
  145. text-overflow: ellipsis;
  146. }
  147. .dz-remove, .dz-unset, .dz-view, .dz-insert, .dz-metadata {
  148. display: none;
  149. position: absolute;
  150. width: 25px;
  151. height: 25px;
  152. right: -26px;
  153. font-size: 0;
  154. cursor: pointer;
  155. &:hover {
  156. &:after {
  157. color: #fff;
  158. }
  159. }
  160. &:after {
  161. text-align: center;
  162. display: block;
  163. color: #999;
  164. font-family: FontAwesome;
  165. font-size: 18px;
  166. line-height: 25px;
  167. }
  168. }
  169. .dz-insert {
  170. top: -1px;
  171. border-top-right-radius: 4px;
  172. &:after {
  173. content: '\f055';
  174. }
  175. }
  176. .dz-view {
  177. top: 24px;
  178. &:after {
  179. content: '\f06e';
  180. }
  181. }
  182. .dz-remove {
  183. top: 72px;
  184. &:after {
  185. content: '\f1f8';
  186. }
  187. }
  188. .dz-unset {
  189. top: 96px;
  190. border-bottom-right-radius: 4px;
  191. &:after {
  192. content: '\f00d';
  193. }
  194. }
  195. .dz-metadata {
  196. top: 49px;
  197. &:after {
  198. content: '\f05a';
  199. }
  200. }
  201. &.dz-no-editor {
  202. .dz-view {
  203. top: -1px;
  204. border-top-right-radius: 4px;
  205. }
  206. .dz-remove {
  207. top: 24px;
  208. }
  209. .dz-unset {
  210. top: 72px;
  211. }
  212. }
  213. &:hover .dz-remove, &:hover .dz-unset {
  214. &.file-thumbnail-remove {
  215. display: block;
  216. }
  217. &:not(.file-thumbnail-remove) {
  218. border-left: 0;
  219. }
  220. }
  221. &.dz-processing {
  222. .dz-details {
  223. overflow: hidden;
  224. }
  225. }
  226. .dz-details {
  227. width: $preview-width;
  228. height: $preview-height;
  229. position: relative;
  230. font-size: 0.8rem;
  231. background-image: url('../images/transparent.png');
  232. img {
  233. position: absolute;
  234. object-fit: contain;
  235. top: 0;
  236. left: 0;
  237. width: $preview-width;
  238. height: $preview-height;
  239. }
  240. .dz-size {
  241. position: absolute;
  242. bottom: -28px;
  243. left: 0;
  244. right: 0;
  245. text-align: center;
  246. font-size: 0.8rem;
  247. height: 28px;
  248. line-height: 28px;
  249. }
  250. }
  251. }
  252. &.dz-clickable {
  253. .dz-message, .dz-message span {
  254. cursor: pointer;
  255. text-align: center;
  256. font-size: 1.2rem;
  257. line-height: 1.4;
  258. margin: 1rem 0;
  259. }
  260. }
  261. * {
  262. cursor: default;
  263. }
  264. }