logo

pleroma-fe

My custom branche(s) on git.pleroma.social/pleroma/pleroma-fe git clone https://hacktivis.me/git/pleroma-fe.git

attachment.scss (4225B)


  1. .Attachment {
  2. display: inline-flex;
  3. flex-direction: column;
  4. position: relative;
  5. align-self: flex-start;
  6. line-height: 0;
  7. height: 100%;
  8. border-style: solid;
  9. border-width: 1px;
  10. border-radius: var(--roundness);
  11. border-color: var(--border);
  12. .attachment-wrapper {
  13. flex: 1 1 auto;
  14. height: 100%;
  15. position: relative;
  16. overflow: hidden;
  17. }
  18. .description-container {
  19. flex: 0 1 0;
  20. display: flex;
  21. padding-top: 0.5em;
  22. z-index: 1;
  23. p {
  24. flex: 1;
  25. text-align: center;
  26. line-height: 1.5;
  27. padding: 0.5em;
  28. margin: 0;
  29. white-space: nowrap;
  30. text-overflow: ellipsis;
  31. overflow: hidden;
  32. }
  33. &.-static {
  34. position: absolute;
  35. left: 0;
  36. right: 0;
  37. bottom: 0;
  38. padding-top: 0;
  39. background: var(--popover);
  40. box-shadow: var(--popupShadow);
  41. }
  42. }
  43. .description-field {
  44. flex: 1;
  45. min-width: 0;
  46. }
  47. & .placeholder-container,
  48. & .image-container,
  49. & .audio-container,
  50. & .video-container,
  51. & .flash-container,
  52. & .oembed-container {
  53. display: flex;
  54. justify-content: center;
  55. width: 100%;
  56. height: 100%;
  57. }
  58. .image-container {
  59. .image {
  60. width: 100%;
  61. height: 100%;
  62. }
  63. }
  64. & .flash-container,
  65. & .video-container {
  66. & .flash,
  67. & video {
  68. width: 100%;
  69. height: 100%;
  70. object-fit: contain;
  71. align-self: center;
  72. }
  73. }
  74. .video-container {
  75. border: none;
  76. outline: none;
  77. color: inherit;
  78. background: transparent;
  79. }
  80. .audio-container {
  81. display: flex;
  82. align-items: flex-end;
  83. audio {
  84. width: 100%;
  85. height: 100%;
  86. }
  87. }
  88. .placeholder-container {
  89. display: flex;
  90. flex-direction: column;
  91. align-items: center;
  92. justify-content: center;
  93. padding-top: 0.5em;
  94. }
  95. .play-icon {
  96. position: absolute;
  97. font-size: 64px;
  98. top: calc(50% - 32px);
  99. left: calc(50% - 32px);
  100. color: rgb(255 255 255 / 75%);
  101. text-shadow: 0 0 2px rgb(0 0 0 / 40%);
  102. &::before {
  103. margin: 0;
  104. }
  105. }
  106. .attachment-buttons {
  107. display: flex;
  108. position: absolute;
  109. right: 0;
  110. top: 0;
  111. margin-top: 0.5em;
  112. margin-right: 0.5em;
  113. z-index: 1;
  114. .attachment-button {
  115. padding: 0;
  116. border-radius: var(--roundness);
  117. text-align: center;
  118. width: 2em;
  119. height: 2em;
  120. margin-left: 0.5em;
  121. font-size: 1.25em;
  122. }
  123. }
  124. &.-contain-fit {
  125. img,
  126. canvas {
  127. object-fit: contain;
  128. }
  129. }
  130. &.-cover-fit {
  131. img,
  132. canvas {
  133. object-fit: cover;
  134. }
  135. }
  136. .oembed-container {
  137. line-height: 1.2em;
  138. flex: 1 0 100%;
  139. width: 100%;
  140. margin-right: 15px;
  141. display: flex;
  142. img {
  143. width: 100%;
  144. }
  145. .image {
  146. flex: 1;
  147. img {
  148. border: 0;
  149. border-radius: 5px;
  150. height: 100%;
  151. object-fit: cover;
  152. }
  153. }
  154. .text {
  155. flex: 2;
  156. margin: 8px;
  157. word-break: break-all;
  158. h1 {
  159. font-size: 1rem;
  160. margin: 0;
  161. }
  162. }
  163. }
  164. &.-size-small {
  165. .play-icon {
  166. zoom: 0.5;
  167. opacity: 0.7;
  168. }
  169. .attachment-buttons {
  170. zoom: 0.7;
  171. opacity: 0.5;
  172. }
  173. }
  174. &.-editable {
  175. padding: 0.5em;
  176. & .description-container,
  177. & .attachment-buttons {
  178. margin: 0;
  179. }
  180. }
  181. &.-placeholder {
  182. display: inline-block;
  183. color: var(--link);
  184. overflow: hidden;
  185. white-space: nowrap;
  186. height: auto;
  187. line-height: 1.5;
  188. &:not(.-editable) {
  189. border: none;
  190. }
  191. &.-editable {
  192. display: flex;
  193. flex-direction: row;
  194. align-items: baseline;
  195. & .description-container,
  196. & .attachment-buttons {
  197. margin: 0;
  198. padding: 0;
  199. position: relative;
  200. }
  201. .description-container {
  202. flex: 1;
  203. padding-left: 0.5em;
  204. }
  205. .attachment-buttons {
  206. order: 99;
  207. align-self: center;
  208. }
  209. }
  210. a {
  211. display: inline-block;
  212. max-width: 100%;
  213. overflow: hidden;
  214. text-overflow: ellipsis;
  215. }
  216. svg {
  217. color: inherit;
  218. }
  219. }
  220. &.-loading {
  221. cursor: progress;
  222. }
  223. &.-compact {
  224. .placeholder-container {
  225. padding-bottom: 0.5em;
  226. }
  227. }
  228. }