闭社主体 forked from https://github.com/tootsuite/mastodon
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

406 lines
6.9 KiB

  1. .activity-stream {
  2. clear: both;
  3. box-shadow: 0 0 15px rgba($base-shadow-color, 0.2);
  4. .entry {
  5. background: $simple-background-color;
  6. .detailed-status.light,
  7. .status.light {
  8. border-bottom: 1px solid $ui-secondary-color;
  9. }
  10. &:last-child {
  11. &,
  12. .detailed-status.light,
  13. .status.light {
  14. border-bottom: 0;
  15. border-radius: 0 0 4px 4px;
  16. }
  17. }
  18. &:first-child {
  19. &,
  20. .detailed-status.light,
  21. .status.light {
  22. border-radius: 4px 4px 0 0;
  23. }
  24. &:last-child {
  25. &,
  26. .detailed-status.light,
  27. .status.light {
  28. border-radius: 4px;
  29. }
  30. }
  31. }
  32. }
  33. &.with-header {
  34. .entry {
  35. &:first-child {
  36. &,
  37. .detailed-status.light,
  38. .status.light {
  39. border-radius: 0;
  40. }
  41. }
  42. }
  43. }
  44. .status.light {
  45. padding: 14px 14px 14px (48px + 14px * 2);
  46. position: relative;
  47. min-height: 48px;
  48. cursor: default;
  49. .status__header {
  50. font-size: 15px;
  51. .status__meta {
  52. float: right;
  53. font-size: 14px;
  54. .status__relative-time {
  55. color: $ui-primary-color;
  56. }
  57. }
  58. }
  59. .status__display-name {
  60. display: block;
  61. max-width: 100%;
  62. padding-right: 25px;
  63. color: $ui-base-color;
  64. }
  65. .status__avatar {
  66. position: absolute;
  67. left: 14px;
  68. top: 14px;
  69. width: 48px;
  70. height: 48px;
  71. & > div {
  72. width: 48px;
  73. height: 48px;
  74. }
  75. img {
  76. display: block;
  77. border-radius: 4px;
  78. }
  79. }
  80. .display-name {
  81. display: block;
  82. max-width: 100%;
  83. overflow: hidden;
  84. white-space: nowrap;
  85. text-overflow: ellipsis;
  86. strong {
  87. font-weight: 500;
  88. color: $ui-base-color;
  89. }
  90. span {
  91. font-size: 14px;
  92. color: $ui-primary-color;
  93. }
  94. }
  95. .status__content {
  96. color: $ui-base-color;
  97. a {
  98. color: $ui-highlight-color;
  99. }
  100. a.status__content__spoiler-link {
  101. color: $primary-text-color;
  102. background: $ui-primary-color;
  103. &:hover {
  104. background: lighten($ui-primary-color, 8%);
  105. }
  106. }
  107. }
  108. .status__attachments {
  109. margin-top: 8px;
  110. overflow: hidden;
  111. width: 100%;
  112. box-sizing: border-box;
  113. position: relative;
  114. .status__attachments__inner {
  115. display: flex;
  116. height: 214px;
  117. }
  118. }
  119. }
  120. .detailed-status.light {
  121. padding: 14px;
  122. background: $simple-background-color;
  123. cursor: default;
  124. .detailed-status__display-name {
  125. display: block;
  126. overflow: hidden;
  127. margin-bottom: 15px;
  128. & > div {
  129. float: left;
  130. margin-right: 10px;
  131. }
  132. .display-name {
  133. display: block;
  134. max-width: 100%;
  135. overflow: hidden;
  136. white-space: nowrap;
  137. text-overflow: ellipsis;
  138. strong {
  139. font-weight: 500;
  140. color: $ui-base-color;
  141. }
  142. span {
  143. font-size: 14px;
  144. color: $ui-primary-color;
  145. }
  146. }
  147. }
  148. .avatar {
  149. width: 48px;
  150. height: 48px;
  151. img {
  152. display: block;
  153. border-radius: 4px;
  154. }
  155. }
  156. .status__content {
  157. color: $ui-base-color;
  158. a {
  159. color: $ui-highlight-color;
  160. }
  161. a.status__content__spoiler-link {
  162. color: $primary-text-color;
  163. background: $ui-primary-color;
  164. &:hover {
  165. background: lighten($ui-primary-color, 8%);
  166. }
  167. }
  168. }
  169. .detailed-status__meta {
  170. margin-top: 15px;
  171. color: $ui-primary-color;
  172. font-size: 14px;
  173. line-height: 18px;
  174. a {
  175. color: inherit;
  176. }
  177. span > span {
  178. font-weight: 500;
  179. font-size: 12px;
  180. margin-left: 6px;
  181. display: inline-block;
  182. }
  183. }
  184. .detailed-status__attachments {
  185. margin-top: 8px;
  186. overflow: hidden;
  187. width: 100%;
  188. box-sizing: border-box;
  189. position: relative;
  190. .status__attachments__inner {
  191. display: flex;
  192. height: 360px;
  193. }
  194. }
  195. .video-player {
  196. margin-top: 8px;
  197. height: 300px;
  198. overflow: hidden;
  199. position: relative;
  200. video {
  201. position: relative;
  202. z-index: 1;
  203. width: 100%;
  204. height: 100%;
  205. object-fit: cover;
  206. top: 50%;
  207. transform: translateY(-50%);
  208. }
  209. }
  210. }
  211. .media-item,
  212. .video-item {
  213. box-sizing: border-box;
  214. position: relative;
  215. left: auto;
  216. top: auto;
  217. right: auto;
  218. bottom: auto;
  219. float: left;
  220. border: medium none;
  221. display: block;
  222. flex: 1 1 auto;
  223. width: 100%;
  224. height: 100%;
  225. overflow: hidden;
  226. margin-right: 2px;
  227. &:last-child {
  228. margin-right: 0;
  229. }
  230. a {
  231. display: block;
  232. width: 100%;
  233. height: 100%;
  234. background: no-repeat scroll center center / cover;
  235. text-decoration: none;
  236. cursor: zoom-in;
  237. }
  238. video {
  239. position: relative;
  240. z-index: 1;
  241. width: 100%;
  242. height: 100%;
  243. object-fit: cover;
  244. top: 50%;
  245. transform: translateY(-50%);
  246. }
  247. }
  248. .video-item {
  249. a {
  250. cursor: pointer;
  251. }
  252. .video-item__play {
  253. position: absolute;
  254. top: 50%;
  255. left: 50%;
  256. font-size: 36px;
  257. transform: translate(-50%, -50%);
  258. padding: 5px;
  259. border-radius: 100px;
  260. color: rgba($primary-text-color, 0.8);
  261. z-index: 1;
  262. }
  263. }
  264. .media-spoiler {
  265. background: $ui-primary-color;
  266. width: 100%;
  267. height: 100%;
  268. cursor: pointer;
  269. position: absolute;
  270. top: 0;
  271. left: 0;
  272. display: flex;
  273. align-items: center;
  274. justify-content: center;
  275. flex-direction: column;
  276. text-align: center;
  277. transition: all 100ms linear;
  278. z-index: 2;
  279. &:hover {
  280. background: darken($ui-primary-color, 5%);
  281. }
  282. span {
  283. display: block;
  284. &:first-child {
  285. font-size: 14px;
  286. }
  287. &:last-child {
  288. font-size: 11px;
  289. font-weight: 500;
  290. }
  291. }
  292. }
  293. .media-spoiler-wrapper {
  294. &.media-spoiler-wrapper__visible {
  295. .media-spoiler {
  296. display: none;
  297. }
  298. .spoiler-button {
  299. display: block;
  300. }
  301. }
  302. }
  303. .pre-header {
  304. padding: 14px 0;
  305. padding-left: (48px + 14px * 2);
  306. padding-bottom: 0;
  307. margin-bottom: -4px;
  308. color: $ui-primary-color;
  309. font-size: 14px;
  310. position: relative;
  311. .pre-header__icon {
  312. position: absolute;
  313. left: (48px + 14px * 2 - 30px);
  314. }
  315. .status__display-name.muted strong {
  316. color: $ui-primary-color;
  317. }
  318. }
  319. .open-in-web-link {
  320. text-decoration: none;
  321. &:hover {
  322. text-decoration: underline;
  323. }
  324. }
  325. }
  326. .embed {
  327. .activity-stream {
  328. border-radius: 4px;
  329. box-shadow: none;
  330. .entry {
  331. &:last-child {
  332. border-radius: 0 0 4px 4px;
  333. }
  334. &:first-child {
  335. border-radius: 4px 4px 0 0;
  336. &:last-child {
  337. border-radius: 4px;
  338. }
  339. }
  340. }
  341. }
  342. }