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.

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