zuck.css 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646
  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. color: white;
  264. opacity: 1;
  265. }
  266. #zuck-modal-content .story-viewer .head .right .close,
  267. #zuck-modal-content .story-viewer .head .back {
  268. font-size: 42px;
  269. width: 48px;
  270. height: 48px;
  271. line-height: 48px;
  272. cursor: pointer;
  273. text-align: center;
  274. }
  275. #zuck-modal-content .story-viewer .head .left .back {
  276. display: none;
  277. width: 24px;
  278. margin: -9px -6px 0 -6px;
  279. }
  280. #zuck-modal-content .story-viewer .head .right .time {
  281. display: none;
  282. }
  283. #zuck-modal-content .story-viewer .head .loading {
  284. display: none;
  285. border-radius: 50%;
  286. width: 30px;
  287. height: 30px;
  288. margin: 9px 0;
  289. border: 4px solid rgba(255, 255, 255, 0.2);
  290. box-sizing: border-box;
  291. border-top-color: #fff;
  292. -webkit-animation: zuckLoading 1s infinite linear;
  293. animation: zuckLoading 1s infinite linear;
  294. }
  295. #zuck-modal-content .story-viewer .head,
  296. #zuck-modal-content .story-viewer .slides-pointers,
  297. #zuck-modal-content .story-viewer .tip {
  298. -webkit-transition: opacity 0.5s;
  299. transition: opacity 0.5s;
  300. }
  301. #zuck-modal-content .story-viewer .slides .item {
  302. display: none;
  303. overflow: hidden;
  304. background: #000;
  305. }
  306. #zuck-modal-content .story-viewer .slides .item:before {
  307. z-index: 4;
  308. background: transparent;
  309. content: '';
  310. position: absolute;
  311. left: 0;
  312. right: 0;
  313. bottom: 0;
  314. top: 0;
  315. }
  316. #zuck-modal-content .story-viewer .slides .item > .media {
  317. height: 100%;
  318. position: absolute;
  319. left: 50%;
  320. -webkit-transform: translateX(-50%);
  321. transform: translateX(-50%);
  322. margin: auto;
  323. }
  324. #zuck-modal-content .story-viewer .slides .item.active,
  325. #zuck-modal-content .story-viewer .slides .item.active .tip.link {
  326. display: block;
  327. }
  328. #zuck-modal-content .story-viewer .tip {
  329. z-index: 5;
  330. text-decoration: none;
  331. display: none;
  332. border-radius: 24px;
  333. background: rgba(0, 0, 0, 0.5);
  334. font-size: 16px;
  335. position: absolute;
  336. bottom: 24px;
  337. left: 50%;
  338. transform: translateX(-50%);
  339. z-index: 1000;
  340. color: #fff;
  341. text-align: center;
  342. text-transform: uppercase;
  343. font-weight: 500;
  344. padding: 12px 24px;
  345. }
  346. #zuck-modal.rtl {
  347. direction: rtl;
  348. left: auto;
  349. right: 0;
  350. }
  351. #zuck-modal.rtl.with-effects {
  352. transform-origin: top right;
  353. }
  354. #zuck-modal.rtl.with-effects.animated {
  355. margin-left: auto !important;
  356. margin-right: 0 !important;
  357. }
  358. #zuck-modal.rtl .slider {
  359. left: auto;
  360. right: -100vw;
  361. }
  362. #zuck-modal.rtl .slider > .previous {
  363. left: auto;
  364. right: 0;
  365. transform: rotateY(-270deg) translateX(50%);
  366. }
  367. #zuck-modal.rtl .slider > .viewing {
  368. left: auto;
  369. right: 100vw;
  370. }
  371. #zuck-modal.rtl .slider > .next {
  372. left: auto;
  373. right: 200vw;
  374. }
  375. #zuck-modal.rtl.with-cube .slider > .previous {
  376. left: auto;
  377. right: 100vw;
  378. transform-origin: center right;
  379. }
  380. #zuck-modal.rtl.with-cube .slider > .viewing {
  381. left: auto;
  382. right: 100vw;
  383. transform: translateZ(50vw);
  384. }
  385. #zuck-modal.rtl.with-cube .slider > .next {
  386. left: auto;
  387. right: 100vw;
  388. transform-origin: top left;
  389. transform: rotateY(270deg) translateX(-50%);
  390. }
  391. #zuck-modal.rtl #zuck-modal-content .story-viewer .slides-pagination .previous {
  392. left: auto;
  393. right: 0;
  394. }
  395. #zuck-modal.rtl #zuck-modal-content .story-viewer .slides-pagination .next {
  396. right: auto;
  397. left: 0;
  398. }
  399. #zuck-modal.rtl #zuck-modal-content .story-viewer .head .item-preview {
  400. margin-right: auto;
  401. margin-left: 9px;
  402. }
  403. #zuck-modal.rtl #zuck-modal-content .story-viewer .head .right {
  404. float: left;
  405. }
  406. #zuck-modal.rtl #zuck-modal-content .story-viewer .tip {
  407. left: auto;
  408. right: 50%;
  409. transform: translateX(50%);
  410. }
  411. @media (max-width: 1024px) {
  412. #zuck-modal-content .story-viewer .head {
  413. top: 3px;
  414. }
  415. #zuck-modal-content .story-viewer .head .loading {
  416. width: 24px;
  417. height: 24px;
  418. margin: 6px 0;
  419. }
  420. #zuck-modal-content .story-viewer .head .item-preview {
  421. width: 30px;
  422. height: 30px;
  423. margin-right: 9px;
  424. }
  425. #zuck-modal-content .story-viewer .head .left {
  426. font-size: 15px;
  427. margin: 15px 0;
  428. }
  429. #zuck-modal-content .story-viewer .head .left > div {
  430. line-height: 30px;
  431. }
  432. #zuck-modal-content .story-viewer .head .right .time {
  433. display: block;
  434. white-space: nowrap;
  435. font-size: 15px;
  436. margin: 15px 0;
  437. line-height: 30px;
  438. }
  439. #zuck-modal-content .story-viewer .head .left > .back {
  440. display: none;
  441. background: transparent;
  442. z-index: 20;
  443. visibility: visible;
  444. position: absolute;
  445. height: 42px;
  446. width: 24px;
  447. line-height: 36px;
  448. text-align: left;
  449. vertical-align: top;
  450. text-shadow: none;
  451. }
  452. #zuck-modal-content .story-viewer.with-back-button .head .left > .back {
  453. display: block;
  454. }
  455. #zuck-modal-content .story-viewer.with-back-button .head .left .item-preview {
  456. margin-left: 18px;
  457. }
  458. #zuck-modal-content .story-viewer .slides-pointers {
  459. width: 100vw;
  460. left: 0;
  461. right: 0;
  462. }
  463. #zuck-modal-content .story-viewer .tip {
  464. font-size: 14px;
  465. padding: 6px 12px;
  466. }
  467. #zuck-modal-content .story-viewer .head .left .time,
  468. #zuck-modal-content .story-viewer .head .right .close {
  469. display: none;
  470. }
  471. #zuck-modal.rtl #zuck-modal-content .story-viewer .head .item-preview {
  472. margin-right: auto;
  473. margin-left: 9px;
  474. }
  475. #zuck-modal.rtl #zuck-modal-content .story-viewer .head .left > .back {
  476. text-align: right;
  477. }
  478. #zuck-modal.rtl #zuck-modal-content .story-viewer.with-back-button .head .left .item-preview {
  479. margin-left: auto;
  480. margin-right: 18px;
  481. }
  482. }
  483. .stories.carousel {
  484. white-space: nowrap;
  485. overflow: auto;
  486. -webkit-overflow-scrolling: touch;
  487. overflow-scrolling: touch;
  488. }
  489. .stories.carousel::-webkit-scrollbar {
  490. width: 0px;
  491. background: transparent;
  492. }
  493. .stories.carousel .story {
  494. display: inline-block;
  495. width: 18vw;
  496. max-width: 90px;
  497. margin: 0 6px;
  498. vertical-align: top;
  499. }
  500. .stories.carousel .story:first-child {
  501. margin-left: 0;
  502. }
  503. .stories.carousel .story:last-child {
  504. margin-right: 0;
  505. }
  506. .stories.carousel .story > .item-link {
  507. text-align: center;
  508. display: block;
  509. }
  510. .stories.carousel .story > .item-link:active > .item-preview {
  511. transform: scale(0.9);
  512. }
  513. .stories.carousel .story > .item-link > .item-preview {
  514. display: block;
  515. box-sizing: border-box;
  516. font-size: 0;
  517. max-height: 90px;
  518. height: 18vw;
  519. overflow: hidden;
  520. transition: transform 0.2s;
  521. }
  522. .stories.carousel .story > .item-link > .item-preview img {
  523. display: block;
  524. box-sizing: border-box;
  525. height: 100%;
  526. width: 100%;
  527. background-size: cover;
  528. background-position: center;
  529. object-fit: cover;
  530. }
  531. .stories.carousel .story > .item-link > .info {
  532. display: inline-block;
  533. margin-top: 0.5em;
  534. line-height: 1.2em;
  535. width: 100%;
  536. overflow: hidden;
  537. text-overflow: ellipsis;
  538. }
  539. .stories.carousel .story > .item-link > .info .name {
  540. font-weight: 300;
  541. }
  542. .stories.carousel .story > .item-link > .info .time {
  543. display: none;
  544. }
  545. .stories.carousel .story > .items {
  546. display: none;
  547. }
  548. .stories.list {
  549. white-space: nowrap;
  550. overflow: auto;
  551. }
  552. .stories.list .story {
  553. display: block;
  554. width: auto;
  555. margin: 6px;
  556. padding-bottom: 6px;
  557. }
  558. .stories.list .story > .item-link {
  559. text-align: left;
  560. display: block;
  561. }
  562. .stories.list .story > .item-link > .item-preview {
  563. height: 42px;
  564. width: 42px;
  565. max-width: 42px;
  566. margin-right: 12px;
  567. vertical-align: top;
  568. display: inline-block;
  569. box-sizing: border-box;
  570. font-size: 0;
  571. overflow: hidden;
  572. }
  573. .stories.list .story > .item-link > .item-preview img {
  574. display: block;
  575. box-sizing: border-box;
  576. height: 100%;
  577. width: 100%;
  578. background-size: cover;
  579. background-position: center;
  580. }
  581. .stories.list .story > .item-link > .info {
  582. display: inline-block;
  583. line-height: 1.6em;
  584. overflow: hidden;
  585. text-overflow: ellipsis;
  586. vertical-align: top;
  587. }
  588. .stories.list .story > .item-link > .info .name {
  589. font-weight: 500;
  590. display: block;
  591. }
  592. .stories.list .story > .item-link > .info .time {
  593. display: inline-block;
  594. }
  595. .stories.list .story > .items {
  596. display: none;
  597. }
  598. .stories.rtl {
  599. direction: rtl;
  600. }
  601. .stories.rtl.carousel .story:first-child {
  602. margin-left: auto;
  603. margin-right: 0;
  604. }
  605. .stories.rtl.carousel .story:last-child {
  606. margin-right: auto;
  607. margin-left: 0;
  608. }
  609. .stories.rtl.list .story > .item-link {
  610. text-align: right;
  611. }
  612. .stories.rtl.list .story > .item-link > .item-preview {
  613. margin-right: auto;
  614. margin-left: 12px;
  615. }
  616. /*
  617. zuck.js
  618. https://github.com/ramon82/zuck.js
  619. MIT License
  620. */