zuck.css 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642
  1. @keyframes zuckSlideTime {
  2. 0% {
  3. max-width: 0;
  4. }
  5. 100% {
  6. max-width: 100%;
  7. }
  8. }
  9. @keyframes zuckLoading {
  10. 0% {
  11. transform: rotate(0deg);
  12. }
  13. 100% {
  14. transform: rotate(360deg);
  15. }
  16. }
  17. #zuck-modal {
  18. outline: 0 !important;
  19. overflow: hidden;
  20. position: fixed;
  21. top: 0;
  22. left: 0;
  23. width: 100vw;
  24. height: 100%;
  25. background: rgba(0, 0, 0, 0.75);
  26. z-index: 100000;
  27. font-size: 14px;
  28. font-family: inherit;
  29. }
  30. #zuck-modal-content,
  31. #zuck-modal-content .story-viewer,
  32. #zuck-modal-content .story-viewer > .slides,
  33. #zuck-modal-content .story-viewer > .slides > * {
  34. width: 100vw;
  35. height: 100%;
  36. top: 0;
  37. bottom: 0;
  38. position: absolute;
  39. overflow: hidden;
  40. }
  41. #zuck-modal * {
  42. user-select: none;
  43. outline: 0;
  44. }
  45. #zuck-modal.with-effects {
  46. transform: scale(0.01);
  47. transform-origin: top left;
  48. transition: 0.25s;
  49. }
  50. #zuck-modal.with-effects.animated {
  51. transform: scale(1);
  52. border-radius: 0;
  53. margin-top: 0 !important;
  54. margin-left: 0 !important;
  55. }
  56. #zuck-modal.with-effects.closed {
  57. transform: translateY(100%);
  58. }
  59. #zuck-modal .slider {
  60. width: 300vw;
  61. height: 100%;
  62. top: 0;
  63. bottom: 0;
  64. left: -100vw;
  65. position: absolute;
  66. }
  67. #zuck-modal .slider > * {
  68. width: 100vw;
  69. height: 100%;
  70. top: 0;
  71. bottom: 0;
  72. position: absolute;
  73. }
  74. #zuck-modal .slider > .previous {
  75. left: 0;
  76. }
  77. #zuck-modal .slider > .viewing {
  78. left: 100vw;
  79. }
  80. #zuck-modal .slider > .next {
  81. left: 200vw;
  82. }
  83. #zuck-modal .slider.animated {
  84. -webkit-transition: -webkit-transform 0.25s linear;
  85. transition: -webkit-transform 0.25s linear;
  86. transition: transform 0.25s linear;
  87. transition: transform 0.25s linear, -webkit-transform 0.25s linear;
  88. }
  89. #zuck-modal.with-cube #zuck-modal-content {
  90. perspective: 1000vw;
  91. transform: scale(0.95);
  92. perspective-origin: 50% 50%;
  93. overflow: visible;
  94. transition: 0.3s;
  95. }
  96. #zuck-modal.with-cube .slider {
  97. transform-style: preserve-3d;
  98. transform: rotateY(0deg);
  99. }
  100. #zuck-modal.with-cube .slider > .previous {
  101. backface-visibility: hidden;
  102. left: 100vw;
  103. transform: rotateY(270deg) translateX(-50%);
  104. transform-origin: center left;
  105. }
  106. #zuck-modal.with-cube .slider > .viewing {
  107. backface-visibility: hidden;
  108. left: 100vw;
  109. transform: translateZ(50vw);
  110. }
  111. #zuck-modal.with-cube .slider > .next {
  112. backface-visibility: hidden;
  113. left: 100vw;
  114. transform: rotateY(-270deg) translateX(50%);
  115. transform-origin: top right;
  116. }
  117. #zuck-modal-content .story-viewer.paused.longPress .head,
  118. #zuck-modal-content .story-viewer.paused.longPress .slides-pointers,
  119. #zuck-modal-content .story-viewer.paused.longPress .tip {
  120. opacity: 0;
  121. }
  122. #zuck-modal-content .story-viewer.viewing:not(.paused):not(.stopped) .slides-pointers > * > .active > b {
  123. -webkit-animation-play-state: running;
  124. animation-play-state: running;
  125. }
  126. #zuck-modal-content .story-viewer.next {
  127. z-index: 10;
  128. }
  129. #zuck-modal-content .story-viewer.viewing {
  130. z-index: 5;
  131. }
  132. #zuck-modal-content .story-viewer.previous {
  133. z-index: 0;
  134. }
  135. #zuck-modal-content .story-viewer.muted .tip.muted,
  136. #zuck-modal-content .story-viewer.loading .head .loading {
  137. display: block;
  138. }
  139. #zuck-modal-content .story-viewer.loading .head .right .time,
  140. #zuck-modal-content .story-viewer.loading .head .right .close {
  141. display: none;
  142. }
  143. #zuck-modal-content .story-viewer .slides-pagination span {
  144. position: absolute;
  145. top: 50vh;
  146. font-size: 48px;
  147. color: #fff;
  148. line-height: 48px;
  149. width: 48px;
  150. margin: 6px;
  151. transform: translateY(-50%);
  152. z-index: 1;
  153. text-align: center;
  154. }
  155. #zuck-modal-content .story-viewer .slides-pagination .previous {
  156. left: 0;
  157. }
  158. #zuck-modal-content .story-viewer .slides-pagination .next {
  159. right: 0;
  160. }
  161. #zuck-modal-content .story-viewer .slides-pointers {
  162. display: table;
  163. table-layout: fixed;
  164. border-spacing: 6px;
  165. border-collapse: separate;
  166. position: absolute;
  167. width: 100vh;
  168. top: 0;
  169. left: calc(50vw - 50vh);
  170. right: calc(50vw - 50vh);
  171. z-index: 100020;
  172. }
  173. #zuck-modal-content .story-viewer .slides-pointers > * {
  174. display: table-row;
  175. }
  176. #zuck-modal-content .story-viewer .slides-pointers > * > * {
  177. display: table-cell;
  178. background: rgba(255, 255, 255, 0.5);
  179. border-radius: 2px;
  180. }
  181. #zuck-modal-content .story-viewer .slides-pointers > * > .seen {
  182. background: #fff;
  183. }
  184. #zuck-modal-content .story-viewer .slides-pointers > * > * > b {
  185. background: #fff;
  186. width: auto;
  187. max-width: 0;
  188. height: 2px;
  189. display: block;
  190. -webkit-animation-fill-mode: forwards;
  191. animation-fill-mode: forwards;
  192. -webkit-animation-play-state: paused;
  193. animation-play-state: paused;
  194. border-radius: 2px;
  195. }
  196. #zuck-modal-content .story-viewer .slides-pointers > * > .active > b {
  197. -webkit-animation-name: zuckSlideTime;
  198. animation-name: zuckSlideTime;
  199. -webkit-animation-timing-function: linear;
  200. animation-timing-function: linear;
  201. }
  202. #zuck-modal-content .story-viewer .head {
  203. position: absolute;
  204. height: 56px;
  205. left: 0;
  206. right: 0;
  207. line-height: 56px;
  208. z-index: 100010;
  209. color: #fff;
  210. font-size: 14px;
  211. text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.35), 1px 0 1px rgba(0, 0, 0, 0.35);
  212. padding: 6px 12px;
  213. }
  214. #zuck-modal-content .story-viewer .head .item-preview {
  215. overflow: hidden;
  216. vertical-align: top;
  217. background-size: cover;
  218. width: 42px;
  219. height: 42px;
  220. display: inline-block;
  221. margin-right: 9px;
  222. border-radius: 50%;
  223. vertical-align: middle;
  224. background-repeat: no-repeat;
  225. background-position: center;
  226. }
  227. #zuck-modal-content .story-viewer .head .item-preview img {
  228. display: block;
  229. box-sizing: border-box;
  230. height: 100%;
  231. width: 100%;
  232. background-size: cover;
  233. background-position: center;
  234. object-fit: cover;
  235. }
  236. #zuck-modal-content .story-viewer .head .time {
  237. opacity: 0.75;
  238. font-weight: 500;
  239. font-size: 13px;
  240. }
  241. #zuck-modal-content .story-viewer .head .left {
  242. line-height: 1 !important;
  243. display: inline-block;
  244. margin: 6px 0;
  245. }
  246. #zuck-modal-content .story-viewer .head .left .info {
  247. display: inline-block;
  248. max-width: 30vw;
  249. vertical-align: middle;
  250. }
  251. #zuck-modal-content .story-viewer .head .left .info > * {
  252. width: 100%;
  253. display: inline-block;
  254. line-height: 21px;
  255. }
  256. #zuck-modal-content .story-viewer .head .left .info .name {
  257. font-weight: 500;
  258. }
  259. #zuck-modal-content .story-viewer .head .right {
  260. float: right;
  261. }
  262. #zuck-modal-content .story-viewer .head .right .close,
  263. #zuck-modal-content .story-viewer .head .back {
  264. font-size: 42px;
  265. width: 48px;
  266. height: 48px;
  267. line-height: 48px;
  268. cursor: pointer;
  269. text-align: center;
  270. }
  271. #zuck-modal-content .story-viewer .head .left .back {
  272. display: none;
  273. width: 24px;
  274. margin: -9px -6px 0 -6px;
  275. }
  276. #zuck-modal-content .story-viewer .head .right .time {
  277. display: none;
  278. }
  279. #zuck-modal-content .story-viewer .head .loading {
  280. display: none;
  281. border-radius: 50%;
  282. width: 30px;
  283. height: 30px;
  284. margin: 9px 0;
  285. border: 4px solid rgba(255, 255, 255, 0.2);
  286. box-sizing: border-box;
  287. border-top-color: #fff;
  288. -webkit-animation: zuckLoading 1s infinite linear;
  289. animation: zuckLoading 1s infinite linear;
  290. }
  291. #zuck-modal-content .story-viewer .head,
  292. #zuck-modal-content .story-viewer .slides-pointers,
  293. #zuck-modal-content .story-viewer .tip {
  294. -webkit-transition: opacity 0.5s;
  295. transition: opacity 0.5s;
  296. }
  297. #zuck-modal-content .story-viewer .slides .item {
  298. display: none;
  299. overflow: hidden;
  300. background: #000;
  301. }
  302. #zuck-modal-content .story-viewer .slides .item:before {
  303. z-index: 4;
  304. background: transparent;
  305. content: '';
  306. position: absolute;
  307. left: 0;
  308. right: 0;
  309. bottom: 0;
  310. top: 0;
  311. }
  312. #zuck-modal-content .story-viewer .slides .item > .media {
  313. height: 100%;
  314. position: absolute;
  315. left: 50%;
  316. -webkit-transform: translateX(-50%);
  317. transform: translateX(-50%);
  318. margin: auto;
  319. }
  320. #zuck-modal-content .story-viewer .slides .item.active,
  321. #zuck-modal-content .story-viewer .slides .item.active .tip.link {
  322. display: block;
  323. }
  324. #zuck-modal-content .story-viewer .tip {
  325. z-index: 5;
  326. text-decoration: none;
  327. display: none;
  328. border-radius: 24px;
  329. background: rgba(0, 0, 0, 0.5);
  330. font-size: 16px;
  331. position: absolute;
  332. bottom: 24px;
  333. left: 50%;
  334. transform: translateX(-50%);
  335. z-index: 1000;
  336. color: #fff;
  337. text-align: center;
  338. text-transform: uppercase;
  339. font-weight: 500;
  340. padding: 12px 24px;
  341. }
  342. #zuck-modal.rtl {
  343. direction: rtl;
  344. left: auto;
  345. right: 0;
  346. }
  347. #zuck-modal.rtl.with-effects {
  348. transform-origin: top right;
  349. }
  350. #zuck-modal.rtl.with-effects.animated {
  351. margin-left: auto !important;
  352. margin-right: 0 !important;
  353. }
  354. #zuck-modal.rtl .slider {
  355. left: auto;
  356. right: -100vw;
  357. }
  358. #zuck-modal.rtl .slider > .previous {
  359. left: auto;
  360. right: 0;
  361. transform: rotateY(-270deg) translateX(50%);
  362. }
  363. #zuck-modal.rtl .slider > .viewing {
  364. left: auto;
  365. right: 100vw;
  366. }
  367. #zuck-modal.rtl .slider > .next {
  368. left: auto;
  369. right: 200vw;
  370. }
  371. #zuck-modal.rtl.with-cube .slider > .previous {
  372. left: auto;
  373. right: 100vw;
  374. transform-origin: center right;
  375. }
  376. #zuck-modal.rtl.with-cube .slider > .viewing {
  377. left: auto;
  378. right: 100vw;
  379. transform: translateZ(50vw);
  380. }
  381. #zuck-modal.rtl.with-cube .slider > .next {
  382. left: auto;
  383. right: 100vw;
  384. transform-origin: top left;
  385. transform: rotateY(270deg) translateX(-50%);
  386. }
  387. #zuck-modal.rtl #zuck-modal-content .story-viewer .slides-pagination .previous {
  388. left: auto;
  389. right: 0;
  390. }
  391. #zuck-modal.rtl #zuck-modal-content .story-viewer .slides-pagination .next {
  392. right: auto;
  393. left: 0;
  394. }
  395. #zuck-modal.rtl #zuck-modal-content .story-viewer .head .item-preview {
  396. margin-right: auto;
  397. margin-left: 9px;
  398. }
  399. #zuck-modal.rtl #zuck-modal-content .story-viewer .head .right {
  400. float: left;
  401. }
  402. #zuck-modal.rtl #zuck-modal-content .story-viewer .tip {
  403. left: auto;
  404. right: 50%;
  405. transform: translateX(50%);
  406. }
  407. @media (max-width: 1024px) {
  408. #zuck-modal-content .story-viewer .head {
  409. top: 3px;
  410. }
  411. #zuck-modal-content .story-viewer .head .loading {
  412. width: 24px;
  413. height: 24px;
  414. margin: 6px 0;
  415. }
  416. #zuck-modal-content .story-viewer .head .item-preview {
  417. width: 30px;
  418. height: 30px;
  419. margin-right: 9px;
  420. }
  421. #zuck-modal-content .story-viewer .head .left {
  422. font-size: 15px;
  423. margin: 15px 0;
  424. }
  425. #zuck-modal-content .story-viewer .head .left > div {
  426. line-height: 30px;
  427. }
  428. #zuck-modal-content .story-viewer .head .right .time {
  429. display: block;
  430. white-space: nowrap;
  431. font-size: 15px;
  432. margin: 15px 0;
  433. line-height: 30px;
  434. }
  435. #zuck-modal-content .story-viewer .head .left > .back {
  436. display: none;
  437. background: transparent;
  438. z-index: 20;
  439. visibility: visible;
  440. position: absolute;
  441. height: 42px;
  442. width: 24px;
  443. line-height: 36px;
  444. text-align: left;
  445. vertical-align: top;
  446. text-shadow: none;
  447. }
  448. #zuck-modal-content .story-viewer.with-back-button .head .left > .back {
  449. display: block;
  450. }
  451. #zuck-modal-content .story-viewer.with-back-button .head .left .item-preview {
  452. margin-left: 18px;
  453. }
  454. #zuck-modal-content .story-viewer .slides-pointers {
  455. width: 100vw;
  456. left: 0;
  457. right: 0;
  458. }
  459. #zuck-modal-content .story-viewer .tip {
  460. font-size: 14px;
  461. padding: 6px 12px;
  462. }
  463. #zuck-modal-content .story-viewer .head .left .time,
  464. #zuck-modal-content .story-viewer .head .right .close {
  465. display: none;
  466. }
  467. #zuck-modal.rtl #zuck-modal-content .story-viewer .head .item-preview {
  468. margin-right: auto;
  469. margin-left: 9px;
  470. }
  471. #zuck-modal.rtl #zuck-modal-content .story-viewer .head .left > .back {
  472. text-align: right;
  473. }
  474. #zuck-modal.rtl #zuck-modal-content .story-viewer.with-back-button .head .left .item-preview {
  475. margin-left: auto;
  476. margin-right: 18px;
  477. }
  478. }
  479. .stories.carousel {
  480. white-space: nowrap;
  481. overflow: auto;
  482. -webkit-overflow-scrolling: touch;
  483. overflow-scrolling: touch;
  484. }
  485. .stories.carousel::-webkit-scrollbar {
  486. width: 0px;
  487. background: transparent;
  488. }
  489. .stories.carousel .story {
  490. display: inline-block;
  491. width: 18vw;
  492. max-width: 90px;
  493. margin: 0 6px;
  494. vertical-align: top;
  495. }
  496. .stories.carousel .story:first-child {
  497. margin-left: 0;
  498. }
  499. .stories.carousel .story:last-child {
  500. margin-right: 0;
  501. }
  502. .stories.carousel .story > .item-link {
  503. text-align: center;
  504. display: block;
  505. }
  506. .stories.carousel .story > .item-link:active > .item-preview {
  507. transform: scale(0.9);
  508. }
  509. .stories.carousel .story > .item-link > .item-preview {
  510. display: block;
  511. box-sizing: border-box;
  512. font-size: 0;
  513. max-height: 90px;
  514. height: 18vw;
  515. overflow: hidden;
  516. transition: transform 0.2s;
  517. }
  518. .stories.carousel .story > .item-link > .item-preview img {
  519. display: block;
  520. box-sizing: border-box;
  521. height: 100%;
  522. width: 100%;
  523. background-size: cover;
  524. background-position: center;
  525. object-fit: cover;
  526. }
  527. .stories.carousel .story > .item-link > .info {
  528. display: inline-block;
  529. margin-top: 0.5em;
  530. line-height: 1.2em;
  531. width: 100%;
  532. overflow: hidden;
  533. text-overflow: ellipsis;
  534. }
  535. .stories.carousel .story > .item-link > .info .name {
  536. font-weight: 300;
  537. }
  538. .stories.carousel .story > .item-link > .info .time {
  539. display: none;
  540. }
  541. .stories.carousel .story > .items {
  542. display: none;
  543. }
  544. .stories.list {
  545. white-space: nowrap;
  546. overflow: auto;
  547. }
  548. .stories.list .story {
  549. display: block;
  550. width: auto;
  551. margin: 6px;
  552. padding-bottom: 6px;
  553. }
  554. .stories.list .story > .item-link {
  555. text-align: left;
  556. display: block;
  557. }
  558. .stories.list .story > .item-link > .item-preview {
  559. height: 42px;
  560. width: 42px;
  561. max-width: 42px;
  562. margin-right: 12px;
  563. vertical-align: top;
  564. display: inline-block;
  565. box-sizing: border-box;
  566. font-size: 0;
  567. overflow: hidden;
  568. }
  569. .stories.list .story > .item-link > .item-preview img {
  570. display: block;
  571. box-sizing: border-box;
  572. height: 100%;
  573. width: 100%;
  574. background-size: cover;
  575. background-position: center;
  576. }
  577. .stories.list .story > .item-link > .info {
  578. display: inline-block;
  579. line-height: 1.6em;
  580. overflow: hidden;
  581. text-overflow: ellipsis;
  582. vertical-align: top;
  583. }
  584. .stories.list .story > .item-link > .info .name {
  585. font-weight: 500;
  586. display: block;
  587. }
  588. .stories.list .story > .item-link > .info .time {
  589. display: inline-block;
  590. }
  591. .stories.list .story > .items {
  592. display: none;
  593. }
  594. .stories.rtl {
  595. direction: rtl;
  596. }
  597. .stories.rtl.carousel .story:first-child {
  598. margin-left: auto;
  599. margin-right: 0;
  600. }
  601. .stories.rtl.carousel .story:last-child {
  602. margin-right: auto;
  603. margin-left: 0;
  604. }
  605. .stories.rtl.list .story > .item-link {
  606. text-align: right;
  607. }
  608. .stories.rtl.list .story > .item-link > .item-preview {
  609. margin-right: auto;
  610. margin-left: 12px;
  611. }
  612. /*
  613. zuck.js
  614. https://github.com/ramon82/zuck.js
  615. MIT License
  616. */