attachments.css 6.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371
  1. .hidden {
  2. display: none;
  3. }
  4. .attachment-upload {
  5. text-align: center;
  6. font-weight: bold;
  7. }
  8. .attachment-gallery {
  9. display: flex;
  10. flex-direction: column;
  11. }
  12. .attachment-item {
  13. display: flex;
  14. flex-direction: row;
  15. align-items: center;
  16. margin-top: 16px;
  17. }
  18. .attachment-item:hover {
  19. background: #e0e0e0;
  20. }
  21. .attachment-thumbnail-container {
  22. display: block;
  23. width: 150px;
  24. min-width: 150px;
  25. max-height: 150px;
  26. padding-right: 16px;
  27. }
  28. .attachment-thumbnail {
  29. max-width: 150px;
  30. max-height: 150px;
  31. min-height: 2em;
  32. cursor: pointer;
  33. }
  34. .attachment-thumbnail-text {
  35. min-height: 2em;
  36. display: flex;
  37. align-items: center;
  38. justify-content: center;
  39. font-size: 2em;
  40. cursor: pointer;
  41. border: 1px solid #ccc;
  42. border-radius: 5px;
  43. }
  44. .attachment-details-container {
  45. display: block;
  46. flex-grow: 1;
  47. }
  48. .attachment-details {
  49. display: flex;
  50. justify-content: space-between;
  51. margin-right: 25px; /* Make sure the icons are not to far to the right */
  52. }
  53. .attachment-actions {
  54. display: flex;
  55. flex-direction: row;
  56. align-items: center;
  57. }
  58. .add-attachment {
  59. display: flex;
  60. align-items: center;
  61. justify-content: center;
  62. border: 1px dashed #555;
  63. border-radius: 5px;
  64. padding: 10px;
  65. cursor: pointer;
  66. margin-top: 16px;
  67. }
  68. .icon {
  69. font-size: 1.5em;
  70. cursor: pointer;
  71. margin-left: 10px;
  72. }
  73. .icon:hover {
  74. color: #666;
  75. }
  76. #viewer-overlay {
  77. width: 100%;
  78. height: 100vh;
  79. position: fixed;
  80. top: 0;
  81. left: 0;
  82. z-index: 9999 !important;
  83. background: rgba(13, 13, 13, 0.95);
  84. }
  85. #viewer-container {
  86. display: flex;
  87. flex-direction: row;
  88. justify-content: space-between;
  89. height: 100%;
  90. }
  91. #viewer-top-bar {
  92. display: flex;
  93. flex-direction: row;
  94. justify-content: space-between;
  95. width: 100%;
  96. padding: 16px;
  97. }
  98. #attachment-name {
  99. color: white;
  100. font-size: 1.5em;
  101. max-width: calc(
  102. 100% - 50px
  103. ); /* Make sure the name does not overlap the close button */
  104. }
  105. #viewer-close {
  106. color: white;
  107. cursor: pointer;
  108. font-size: 4em;
  109. }
  110. /* Upload progress indicators for drag-and-drop uploads */
  111. .minicard-upload-progress,
  112. .card-details-upload-progress {
  113. background: #f8f9fa;
  114. border: 1px solid #e9ecef;
  115. border-radius: 4px;
  116. padding: 12px;
  117. margin: 8px 0;
  118. font-size: 14px;
  119. }
  120. .upload-progress-header {
  121. display: flex;
  122. align-items: center;
  123. margin-bottom: 8px;
  124. font-weight: bold;
  125. color: #495057;
  126. }
  127. .upload-progress-header i {
  128. margin-right: 8px;
  129. color: #007bff;
  130. }
  131. .upload-progress-item {
  132. display: flex;
  133. flex-direction: column;
  134. margin-bottom: 8px;
  135. padding: 8px;
  136. background: white;
  137. border-radius: 3px;
  138. border: 1px solid #dee2e6;
  139. }
  140. .upload-progress-item.upload-error {
  141. border-color: #dc3545;
  142. background: #f8d7da;
  143. }
  144. .upload-progress-filename {
  145. font-weight: 500;
  146. margin-bottom: 4px;
  147. color: #495057;
  148. word-break: break-all;
  149. }
  150. .upload-progress-bar {
  151. width: 100%;
  152. height: 6px;
  153. background: #e9ecef;
  154. border-radius: 3px;
  155. overflow: hidden;
  156. margin-bottom: 4px;
  157. }
  158. .upload-progress-fill {
  159. height: 100%;
  160. background: linear-gradient(90deg, #007bff, #0056b3);
  161. transition: width 0.3s ease;
  162. border-radius: 3px;
  163. }
  164. .upload-progress-item.upload-error .upload-progress-fill {
  165. background: #dc3545;
  166. }
  167. .upload-progress-error,
  168. .upload-progress-success {
  169. display: flex;
  170. align-items: center;
  171. font-size: 12px;
  172. font-weight: 500;
  173. }
  174. .upload-progress-error {
  175. color: #dc3545;
  176. }
  177. .upload-progress-success {
  178. color: #28a745;
  179. }
  180. .upload-progress-error i,
  181. .upload-progress-success i {
  182. margin-right: 4px;
  183. }
  184. /* Minicard specific styles */
  185. .minicard-upload-progress {
  186. margin: 4px 0;
  187. padding: 8px;
  188. font-size: 12px;
  189. }
  190. .minicard-upload-progress .upload-progress-item {
  191. padding: 6px;
  192. margin-bottom: 6px;
  193. }
  194. .minicard-upload-progress .upload-progress-filename {
  195. font-size: 11px;
  196. }
  197. /* Card details specific styles */
  198. .card-details-upload-progress {
  199. margin: 12px 0;
  200. padding: 16px;
  201. }
  202. .card-details-upload-progress .upload-progress-header {
  203. font-size: 16px;
  204. margin-bottom: 12px;
  205. }
  206. .card-details-upload-progress .upload-progress-item {
  207. padding: 12px;
  208. margin-bottom: 10px;
  209. }
  210. .card-details-upload-progress .upload-progress-filename {
  211. font-size: 14px;
  212. }
  213. /* Drag over state for minicards */
  214. .minicard.is-dragging-over {
  215. border: 2px dashed #007bff !important;
  216. background: rgba(0, 123, 255, 0.1) !important;
  217. }
  218. /* Drag over state for card details */
  219. .js-card-details.is-dragging-over {
  220. border: 2px dashed #007bff !important;
  221. background: rgba(0, 123, 255, 0.05) !important;
  222. }
  223. top: 0;
  224. right: 8px;
  225. position: absolute;
  226. }
  227. .attachment-arrow {
  228. font-size: 4em;
  229. color: white;
  230. cursor: pointer;
  231. align-self: center;
  232. margin: 0 20px;
  233. }
  234. #viewer-content {
  235. display: flex;
  236. justify-content: center;
  237. align-items: center;
  238. width: 100%;
  239. height: calc(100% - 50px);
  240. }
  241. #image-viewer {
  242. background: repeating-conic-gradient(#808080 0% 25%, transparent 0% 50%) 50% /
  243. 20px 20px; /* Checkerboard background for transparent images */
  244. max-width: 100%;
  245. max-height: 100%;
  246. }
  247. #pdf-viewer {
  248. width: 40vw;
  249. height: 100%;
  250. }
  251. #txt-viewer {
  252. background-color: white;
  253. width: 40vw;
  254. height: 100%;
  255. }
  256. .pdf-preview-error {
  257. margin-top: 20vh;
  258. display: block;
  259. font-size: 2em;
  260. color: white;
  261. }
  262. @media screen and (max-width: 1600px) {
  263. #pdf-viewer {
  264. width: 60vw;
  265. }
  266. }
  267. @media screen and (max-width: 800px) {
  268. #viewer-container {
  269. display: block;
  270. }
  271. .attachment-arrow {
  272. position: absolute;
  273. bottom: 2.2em;
  274. font-size: 1.6em;
  275. padding: 16px;
  276. }
  277. #prev-attachment {
  278. left: 0;
  279. }
  280. #next-attachment {
  281. right: 0;
  282. }
  283. #pdf-viewer {
  284. width: 100%;
  285. height: calc(
  286. 100vh - 155px
  287. ); /* Full height - height of top and bottom bars */
  288. }
  289. #txt-viewer {
  290. width: 100%;
  291. height: calc(
  292. 100vh - 155px
  293. ); /* Full height - height of top and bottom bars */
  294. }
  295. #audio-viewer {
  296. margin-top: 20%;
  297. width: 100%;
  298. }
  299. .attachment-thumbnail-container {
  300. width: 100px;
  301. min-width: 100px;
  302. }
  303. .attachment-thumbnail {
  304. max-width: 100px;
  305. }
  306. .attachment-details {
  307. flex-direction: column;
  308. margin-right: 0px;
  309. }
  310. .attachment-actions {
  311. flex-direction: row;
  312. margin-top: 10px;
  313. }
  314. }
  315. /* Attachment migration styles */
  316. .attachment-item.migrating {
  317. position: relative;
  318. opacity: 0.7;
  319. }
  320. .attachment-migration-overlay {
  321. position: absolute;
  322. top: 0;
  323. left: 0;
  324. right: 0;
  325. bottom: 0;
  326. background: rgba(255, 255, 255, 0.9);
  327. display: flex;
  328. flex-direction: column;
  329. align-items: center;
  330. justify-content: center;
  331. z-index: 10;
  332. border-radius: 4px;
  333. }
  334. .migration-spinner {
  335. font-size: 24px;
  336. color: #007cba;
  337. margin-bottom: 8px;
  338. }
  339. .migration-text {
  340. font-size: 12px;
  341. color: #666;
  342. text-align: center;
  343. }