attachments.css 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202
  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. top: 0;
  110. right: 8px;
  111. position: absolute;
  112. }
  113. .attachment-arrow {
  114. font-size: 4em;
  115. color: white;
  116. cursor: pointer;
  117. align-self: center;
  118. margin: 0 20px;
  119. }
  120. #viewer-content {
  121. display: flex;
  122. justify-content: center;
  123. align-items: center;
  124. width: 100%;
  125. height: calc(100% - 50px);
  126. }
  127. #image-viewer {
  128. background: repeating-conic-gradient(#808080 0% 25%, transparent 0% 50%) 50% /
  129. 20px 20px; /* Checkerboard background for transparent images */
  130. max-width: 100%;
  131. max-height: 100%;
  132. }
  133. #pdf-viewer {
  134. width: 40vw;
  135. height: 100%;
  136. }
  137. #txt-viewer {
  138. background-color: white;
  139. width: 40vw;
  140. height: 100%;
  141. }
  142. .pdf-preview-error {
  143. margin-top: 20vh;
  144. display: block;
  145. font-size: 2em;
  146. color: white;
  147. }
  148. @media screen and (max-width: 1600px) {
  149. #pdf-viewer {
  150. width: 60vw;
  151. }
  152. }
  153. @media screen and (max-width: 800px) {
  154. #viewer-container {
  155. display: block;
  156. }
  157. .attachment-arrow {
  158. position: absolute;
  159. bottom: 2.2em;
  160. font-size: 1.6em;
  161. padding: 16px;
  162. }
  163. #prev-attachment {
  164. left: 0;
  165. }
  166. #next-attachment {
  167. right: 0;
  168. }
  169. #pdf-viewer {
  170. width: 100%;
  171. height: calc(
  172. 100vh - 155px
  173. ); /* Full height - height of top and bottom bars */
  174. }
  175. #txt-viewer {
  176. width: 100%;
  177. height: calc(
  178. 100vh - 155px
  179. ); /* Full height - height of top and bottom bars */
  180. }
  181. #audio-viewer {
  182. margin-top: 20%;
  183. width: 100%;
  184. }
  185. .attachment-thumbnail-container {
  186. width: 100px;
  187. min-width: 100px;
  188. }
  189. .attachment-thumbnail {
  190. max-width: 100px;
  191. }
  192. .attachment-details {
  193. flex-direction: column;
  194. margin-right: 0px;
  195. }
  196. .attachment-actions {
  197. flex-direction: row;
  198. margin-top: 10px;
  199. }
  200. }