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.

531 lines
8.5 KiB

  1. .video-error-cover {
  2. align-items: center;
  3. background: $base-overlay-background;
  4. color: $primary-text-color;
  5. cursor: pointer;
  6. display: flex;
  7. flex-direction: column;
  8. height: 100%;
  9. justify-content: center;
  10. margin-top: 8px;
  11. position: relative;
  12. text-align: center;
  13. z-index: 100;
  14. }
  15. .media-spoiler {
  16. background: $base-overlay-background;
  17. color: $darker-text-color;
  18. border: 0;
  19. width: 100%;
  20. height: 100%;
  21. &:hover,
  22. &:active,
  23. &:focus {
  24. color: lighten($darker-text-color, 8%);
  25. }
  26. .status__content > & {
  27. margin-top: 15px; // Add margin when used bare for NSFW video player
  28. }
  29. @include fullwidth-gallery;
  30. }
  31. .media-spoiler__warning {
  32. display: block;
  33. font-size: 14px;
  34. }
  35. .media-spoiler__trigger {
  36. display: block;
  37. font-size: 11px;
  38. font-weight: 500;
  39. }
  40. .media-gallery__gifv__label {
  41. display: block;
  42. position: absolute;
  43. color: $primary-text-color;
  44. background: rgba($base-overlay-background, 0.5);
  45. bottom: 6px;
  46. left: 6px;
  47. padding: 2px 6px;
  48. border-radius: 2px;
  49. font-size: 11px;
  50. font-weight: 600;
  51. z-index: 1;
  52. pointer-events: none;
  53. opacity: 0.9;
  54. transition: opacity 0.1s ease;
  55. }
  56. .media-gallery__gifv {
  57. &.autoplay {
  58. .media-gallery__gifv__label {
  59. display: none;
  60. }
  61. }
  62. &:hover {
  63. .media-gallery__gifv__label {
  64. opacity: 1;
  65. }
  66. }
  67. }
  68. .media-gallery {
  69. box-sizing: border-box;
  70. margin-top: 8px;
  71. overflow: hidden;
  72. position: relative;
  73. background: $base-shadow-color;
  74. width: 100%;
  75. height: 110px;
  76. .detailed-status & {
  77. margin-left: -14px;
  78. width: calc(100% + 28px);
  79. height: 250px;
  80. }
  81. @include fullwidth-gallery;
  82. }
  83. .media-gallery__item {
  84. border: none;
  85. box-sizing: border-box;
  86. display: block;
  87. float: left;
  88. position: relative;
  89. &.standalone {
  90. .media-gallery__item-gifv-thumbnail {
  91. transform: none;
  92. top: 0;
  93. }
  94. }
  95. }
  96. .media-gallery__item-thumbnail {
  97. cursor: zoom-in;
  98. display: block;
  99. text-decoration: none;
  100. height: 100%;
  101. line-height: 0;
  102. &,
  103. img {
  104. height: 100%;
  105. width: 100%;
  106. object-fit: contain;
  107. &:not(.letterbox) {
  108. height: 100%;
  109. object-fit: cover;
  110. }
  111. }
  112. }
  113. .media-gallery__gifv {
  114. height: 100%;
  115. overflow: hidden;
  116. position: relative;
  117. width: 100%;
  118. display: flex;
  119. justify-content: center;
  120. }
  121. .media-gallery__item-gifv-thumbnail {
  122. cursor: zoom-in;
  123. height: 100%;
  124. width: 100%;
  125. position: relative;
  126. z-index: 1;
  127. object-fit: contain;
  128. &:not(.letterbox) {
  129. height: 100%;
  130. object-fit: cover;
  131. }
  132. }
  133. .media-gallery__item-thumbnail-label {
  134. clip: rect(1px 1px 1px 1px); /* IE6, IE7 */
  135. clip: rect(1px, 1px, 1px, 1px);
  136. overflow: hidden;
  137. position: absolute;
  138. }
  139. .video-modal {
  140. max-width: 100vw;
  141. max-height: 100vh;
  142. position: relative;
  143. }
  144. .media-modal {
  145. width: 100%;
  146. height: 100%;
  147. position: relative;
  148. .extended-video-player {
  149. width: 100%;
  150. height: 100%;
  151. display: flex;
  152. align-items: center;
  153. justify-content: center;
  154. video {
  155. max-width: $media-modal-media-max-width;
  156. max-height: $media-modal-media-max-height;
  157. }
  158. }
  159. }
  160. .media-modal__closer {
  161. position: absolute;
  162. top: 0;
  163. left: 0;
  164. right: 0;
  165. bottom: 0;
  166. }
  167. .media-modal__navigation {
  168. position: absolute;
  169. top: 0;
  170. left: 0;
  171. right: 0;
  172. bottom: 0;
  173. pointer-events: none;
  174. transition: opacity 0.3s linear;
  175. will-change: opacity;
  176. * {
  177. pointer-events: auto;
  178. }
  179. &.media-modal__navigation--hidden {
  180. opacity: 0;
  181. * {
  182. pointer-events: none;
  183. }
  184. }
  185. }
  186. .media-modal__nav {
  187. background: rgba($base-overlay-background, 0.5);
  188. box-sizing: border-box;
  189. border: 0;
  190. color: $primary-text-color;
  191. cursor: pointer;
  192. display: flex;
  193. align-items: center;
  194. font-size: 24px;
  195. height: 20vmax;
  196. margin: auto 0;
  197. padding: 30px 15px;
  198. position: absolute;
  199. top: 0;
  200. bottom: 0;
  201. }
  202. .media-modal__nav--left {
  203. left: 0;
  204. }
  205. .media-modal__nav--right {
  206. right: 0;
  207. }
  208. .media-modal__pagination {
  209. width: 100%;
  210. text-align: center;
  211. position: absolute;
  212. left: 0;
  213. bottom: 20px;
  214. pointer-events: none;
  215. }
  216. .media-modal__page-dot {
  217. display: inline-block;
  218. }
  219. .media-modal__button {
  220. background-color: $white;
  221. height: 12px;
  222. width: 12px;
  223. border-radius: 6px;
  224. margin: 10px;
  225. padding: 0;
  226. border: 0;
  227. font-size: 0;
  228. }
  229. .media-modal__button--active {
  230. background-color: $ui-highlight-color;
  231. }
  232. .media-modal__close {
  233. position: absolute;
  234. right: 8px;
  235. top: 8px;
  236. z-index: 100;
  237. }
  238. .video-player {
  239. overflow: hidden;
  240. position: relative;
  241. background: $base-shadow-color;
  242. max-width: 100%;
  243. .detailed-status & {
  244. width: 100%;
  245. height: 100%;
  246. }
  247. @include fullwidth-gallery;
  248. video {
  249. max-width: 100vw;
  250. max-height: 80vh;
  251. z-index: 1;
  252. object-fit: cover;
  253. position: relative;
  254. }
  255. &.fullscreen {
  256. width: 100% !important;
  257. height: 100% !important;
  258. margin: 0;
  259. video {
  260. max-width: 100% !important;
  261. max-height: 100% !important;
  262. width: 100% !important;
  263. height: 100% !important;
  264. }
  265. }
  266. &.inline {
  267. video {
  268. object-fit: contain;
  269. position: relative;
  270. top: 50%;
  271. transform: translateY(-50%);
  272. }
  273. }
  274. &__controls {
  275. position: absolute;
  276. z-index: 2;
  277. bottom: 0;
  278. left: 0;
  279. right: 0;
  280. box-sizing: border-box;
  281. background: linear-gradient(0deg, rgba($base-shadow-color, 0.85) 0, rgba($base-shadow-color, 0.45) 60%, transparent);
  282. padding: 0 15px;
  283. opacity: 0;
  284. transition: opacity .1s ease;
  285. &.active {
  286. opacity: 1;
  287. }
  288. }
  289. &.inactive {
  290. video,
  291. .video-player__controls {
  292. visibility: hidden;
  293. }
  294. }
  295. &__spoiler {
  296. display: none;
  297. position: absolute;
  298. top: 0;
  299. left: 0;
  300. width: 100%;
  301. height: 100%;
  302. z-index: 4;
  303. border: 0;
  304. background: $base-shadow-color;
  305. color: $darker-text-color;
  306. transition: none;
  307. pointer-events: none;
  308. &.active {
  309. display: block;
  310. pointer-events: auto;
  311. &:hover,
  312. &:active,
  313. &:focus {
  314. color: lighten($darker-text-color, 7%);
  315. }
  316. }
  317. &__title {
  318. display: block;
  319. font-size: 14px;
  320. }
  321. &__subtitle {
  322. display: block;
  323. font-size: 11px;
  324. font-weight: 500;
  325. }
  326. }
  327. &__buttons-bar {
  328. display: flex;
  329. justify-content: space-between;
  330. padding-bottom: 10px;
  331. }
  332. &__buttons {
  333. font-size: 16px;
  334. white-space: nowrap;
  335. overflow: hidden;
  336. text-overflow: ellipsis;
  337. &.left {
  338. button {
  339. padding-left: 0;
  340. }
  341. }
  342. &.right {
  343. button {
  344. padding-right: 0;
  345. }
  346. }
  347. button {
  348. background: transparent;
  349. padding: 2px 10px;
  350. font-size: 16px;
  351. border: 0;
  352. color: rgba($white, 0.75);
  353. &:active,
  354. &:hover,
  355. &:focus {
  356. color: $white;
  357. }
  358. }
  359. }
  360. &__time-sep,
  361. &__time-total,
  362. &__time-current {
  363. font-size: 14px;
  364. font-weight: 500;
  365. }
  366. &__time-current {
  367. color: $white;
  368. margin-left: 10px;
  369. }
  370. &__time-sep {
  371. display: inline-block;
  372. margin: 0 6px;
  373. }
  374. &__time-sep,
  375. &__time-total {
  376. color: $white;
  377. }
  378. &__seek {
  379. cursor: pointer;
  380. height: 24px;
  381. position: relative;
  382. &::before {
  383. content: "";
  384. width: 100%;
  385. background: rgba($white, 0.35);
  386. border-radius: 4px;
  387. display: block;
  388. position: absolute;
  389. height: 4px;
  390. top: 10px;
  391. }
  392. &__progress,
  393. &__buffer {
  394. display: block;
  395. position: absolute;
  396. height: 4px;
  397. border-radius: 4px;
  398. top: 10px;
  399. background: lighten($ui-highlight-color, 8%);
  400. }
  401. &__buffer {
  402. background: rgba($white, 0.2);
  403. }
  404. &__handle {
  405. position: absolute;
  406. z-index: 3;
  407. opacity: 0;
  408. border-radius: 50%;
  409. width: 12px;
  410. height: 12px;
  411. top: 6px;
  412. margin-left: -6px;
  413. transition: opacity .1s ease;
  414. background: lighten($ui-highlight-color, 8%);
  415. box-shadow: 1px 2px 6px rgba($base-shadow-color, 0.2);
  416. pointer-events: none;
  417. &.active {
  418. opacity: 1;
  419. }
  420. }
  421. &:hover {
  422. .video-player__seek__handle {
  423. opacity: 1;
  424. }
  425. }
  426. }
  427. &.detailed,
  428. &.fullscreen {
  429. .video-player__buttons {
  430. button {
  431. padding-top: 10px;
  432. padding-bottom: 10px;
  433. }
  434. }
  435. }
  436. }
  437. .media-spoiler-video {
  438. background-size: cover;
  439. background-repeat: no-repeat;
  440. background-position: center;
  441. cursor: pointer;
  442. margin-top: 8px;
  443. position: relative;
  444. @include fullwidth-gallery;
  445. border: 0;
  446. display: block;
  447. }
  448. .media-spoiler-video-play-icon {
  449. border-radius: 100px;
  450. color: rgba($primary-text-color, 0.8);
  451. font-size: 36px;
  452. left: 50%;
  453. padding: 5px;
  454. position: absolute;
  455. top: 50%;
  456. transform: translate(-50%, -50%);
  457. }