playlist.css 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549
  1. body {
  2. display: grid;
  3. grid-gap: 20px;
  4. grid-template-areas:
  5. "header"
  6. "main"
  7. "footer";
  8. /* Fix height */
  9. height: 100vh;
  10. grid-template-rows: auto 1fr auto;
  11. /* fix top and bottom */
  12. margin-left: 1rem;
  13. margin-right: 1rem;
  14. }
  15. img {
  16. width: 100%;
  17. height: auto;
  18. }
  19. a:link {
  20. color: var(--link);
  21. }
  22. a:visited {
  23. color: var(--link-visited);
  24. }
  25. input[type="text"],
  26. input[type="search"] {
  27. background: var(--background);
  28. border: 1px solid var(--button-border);
  29. padding: 0.4rem 0.4rem;
  30. font-size: 15px;
  31. color: var(--search-text);
  32. outline: none;
  33. box-shadow: none;
  34. }
  35. input[type='search'] {
  36. border-bottom: 1px solid var(--button-border);
  37. border-top: 0px;
  38. border-left: 0px;
  39. border-right: 0px;
  40. border-radius: 0px;
  41. }
  42. header {
  43. display: grid;
  44. grid-gap: 1px;
  45. grid-template-areas:
  46. "home"
  47. "form"
  48. "playlist";
  49. grid-area: header;
  50. }
  51. .home {
  52. grid-area: home;
  53. margin-left: auto;
  54. margin-right: auto;
  55. margin-bottom: 1rem;
  56. margin-top: 1rem;
  57. }
  58. .form {
  59. display: grid;
  60. grid-gap: 4px;
  61. grid-template-areas:
  62. "search-box"
  63. "search-button"
  64. "dropdown";
  65. grid-area: form;
  66. }
  67. .search-box {
  68. grid-area: search-box;
  69. }
  70. .search-button {
  71. grid-area: search-button;
  72. cursor: pointer;
  73. padding-bottom: 6px;
  74. padding-left: .75em;
  75. padding-right: .75em;
  76. padding-top: 6px;
  77. text-align: center;
  78. white-space: nowrap;
  79. background-color: var(--buttom);
  80. border: 1px solid var(--button-border);
  81. color: var(--buttom-text);
  82. border-radius: 5px;
  83. }
  84. .search-button:hover {
  85. background-color: var(--buttom-hover);
  86. }
  87. .dropdown {
  88. display: grid;
  89. grid-gap: 1px;
  90. grid-template-areas:
  91. "dropdown-label"
  92. "dropdown-content";
  93. grid-area: dropdown;
  94. }
  95. .dropdown-label {
  96. grid-area: dropdown-label;
  97. padding-bottom: 6px;
  98. padding-left: .75em;
  99. padding-right: .75em;
  100. padding-top: 6px;
  101. text-align: center;
  102. white-space: nowrap;
  103. background-color: var(--buttom);
  104. border: 1px solid var(--button-border);
  105. color: var(--buttom-text);
  106. border-radius: 5px;
  107. }
  108. .dropdown-label:hover {
  109. background-color: var(--buttom-hover);
  110. }
  111. /* playlist */
  112. .playlist {
  113. display: grid;
  114. grid-gap: 4px;
  115. grid-template-areas:
  116. "play-box"
  117. "play-hidden"
  118. "play-add"
  119. "play-clean";
  120. grid-area: playlist;
  121. }
  122. .play-box {
  123. grid-area: play-box;
  124. }
  125. .play-hidden {
  126. grid-area: play-hidden;
  127. }
  128. .play-add {
  129. grid-area: play-add;
  130. cursor: pointer;
  131. padding-bottom: 6px;
  132. padding-left: .75em;
  133. padding-right: .75em;
  134. padding-top: 6px;
  135. text-align: center;
  136. white-space: nowrap;
  137. background-color: var(--buttom);
  138. border: 1px solid var(--button-border);
  139. color: var(--buttom-text);
  140. border-radius: 5px;
  141. }
  142. .play-add:hover {
  143. background-color: var(--buttom-hover);
  144. }
  145. .play-clean {
  146. display: grid;
  147. grid-area: play-clean;
  148. }
  149. .play-clean > button {
  150. padding-bottom: 6px;
  151. padding-left: .75em;
  152. padding-right: .75em;
  153. padding-top: 6px;
  154. text-align: center;
  155. white-space: nowrap;
  156. background-color: var(--buttom);
  157. border: 1px solid var(--button-border);
  158. color: var(--buttom-text);
  159. border-radius: 5px;
  160. }
  161. .play-clean > button:hover {
  162. background-color: var(--buttom-hover);
  163. }
  164. /* /playlist */
  165. /* ------------- Menu Mobile sin JS ---------------- */
  166. /* input hidden */
  167. .opt-box {
  168. display: none;
  169. }
  170. .dropdown-content {
  171. display: none;
  172. grid-area: dropdown-content;
  173. }
  174. label[for=options-toggle-cbox] {
  175. cursor: pointer;
  176. -webkit-touch-callout: none;
  177. -webkit-user-select: none;
  178. -khtml-user-select: none;
  179. -moz-user-select: none;
  180. -ms-user-select: none;
  181. user-select: none;
  182. }
  183. #options-toggle-cbox:checked ~ .dropdown-content {
  184. display: block;
  185. white-space: nowrap;
  186. background: var(--secondary-background);
  187. padding: 0.5rem 1rem;
  188. }
  189. /*- ----------- End Menu Mobile sin JS ------------- */
  190. .main {
  191. grid-area: main;
  192. display: grid;
  193. grid-row-gap: 1rem;
  194. }
  195. /* fix hr when is children of grid */
  196. hr {
  197. width: 100%;
  198. }
  199. .playlist-metadata {
  200. display: grid;
  201. grid-template-columns: 1fr;
  202. margin: auto;
  203. grid-template-areas:
  204. "author"
  205. "summary"
  206. "playlist-stats";
  207. }
  208. .author {
  209. grid-area: author;
  210. display: grid;
  211. grid-template-columns: 100px 1fr;
  212. grid-column-gap: 1rem;
  213. align-items: center;
  214. justify-self: center;
  215. }
  216. .summary {
  217. grid-area: summary;
  218. justify-self: start;
  219. }
  220. .playlist-stats {
  221. grid-area: playlist-stats;
  222. justify-self: start;
  223. }
  224. /* Video list item */
  225. .video-container {
  226. display: grid;
  227. grid-row-gap: 0.5rem;
  228. }
  229. .item-box {
  230. display: grid;
  231. grid-template-columns: 1.9fr 0.1fr;
  232. grid-template-rows: 1fr;
  233. grid-gap: 1px;
  234. grid-template-areas:
  235. "item-video item-checkbox";
  236. }
  237. .item-video {
  238. grid-area: item-video;
  239. display: grid;
  240. grid-template-columns: auto;
  241. grid-template-rows: repeat(4, auto);
  242. grid-row-gap: 0.4rem;
  243. grid-template-areas:
  244. "thumbnail-box"
  245. "info-box";
  246. align-items: center;
  247. font-size: 0.7rem;
  248. }
  249. .item-video a {
  250. text-decoration: none;
  251. cursor: pointer;
  252. }
  253. .thumbnail-box {
  254. grid-area: thumbnail-box;
  255. position: relative;
  256. }
  257. .thumbnail {
  258. padding: 28.125%;
  259. position: relative;
  260. box-sizing: border-box;
  261. }
  262. .thumbnail-img {
  263. position: absolute;
  264. width: 100%;
  265. height: 100%;
  266. left: 0;
  267. top: 0;
  268. object-fit: cover;
  269. background-color: var(--thumb-background);
  270. }
  271. .length {
  272. position: absolute;
  273. background-color: rgba(35, 35, 35, 0.75);
  274. color: #fff;
  275. border-radius: 2px;
  276. padding: 2px;
  277. font-size: 16px;
  278. right: 0.25em;
  279. bottom: -0.75em;
  280. }
  281. .playlist-item .thumbnail-info {
  282. position: absolute;
  283. right: 0px;
  284. bottom: 0px;
  285. height: 100%;
  286. width: 50%;
  287. text-align: center;
  288. white-space: pre-line;
  289. opacity: .8;
  290. color: var(--text);
  291. font-size: 0.8125rem;
  292. background: var(--secondary-background);
  293. padding: 0;
  294. }
  295. .playlist-item .thumbnail-info span {
  296. position: absolute;
  297. top: 50%;
  298. transform: translate(-50%, -50%);
  299. text-transform: none;
  300. }
  301. .info-box {
  302. grid-area: info-box;
  303. display: grid;
  304. grid-template-columns: 1fr;
  305. grid-template-rows: auto auto auto auto auto;
  306. grid-gap: 1px;
  307. grid-template-areas:
  308. "."
  309. "."
  310. "."
  311. "."
  312. ".";
  313. }
  314. .title {
  315. font-size: 0.8rem;
  316. margin: 0px;
  317. font-weight: normal;
  318. overflow: hidden;
  319. text-overflow: ellipsis;
  320. }
  321. .info-box address {
  322. white-space: nowrap;
  323. overflow: hidden;
  324. text-overflow: ellipsis;
  325. }
  326. .thumbnail-info {
  327. background-color: var(--time-background);
  328. color: #fff;
  329. padding: 2px 5px;
  330. text-transform: uppercase;
  331. font-weight: 700;
  332. font-size: 12px;
  333. position: absolute;
  334. right: 0;
  335. bottom: .2rem;
  336. }
  337. .item-checkbox {
  338. grid-area: item-checkbox;
  339. justify-self: start;
  340. align-self: center;
  341. min-width: 30px;
  342. margin: 0px;
  343. }
  344. .stats {
  345. display: flex;
  346. justify-content: space-between;
  347. }
  348. .horizontal-stats {
  349. white-space: nowrap;
  350. overflow: hidden;
  351. text-overflow: ellipsis;
  352. }
  353. .horizontal-stats > li {
  354. display: inline;
  355. }
  356. .horizontal-stats > li:first-child::after {
  357. content: " | ";
  358. }
  359. /* pagination */
  360. .main .pagination-container {
  361. display: grid;
  362. justify-content: center;
  363. }
  364. .main .pagination-container .pagination-list {
  365. display: flex;
  366. flex-direction: row;
  367. flex-wrap: wrap;
  368. justify-content: center;
  369. }
  370. .main .pagination-container .pagination-list .page-link {
  371. border-style: none;
  372. font-weight: bold;
  373. text-align: center;
  374. background: var(--secondary-focus);
  375. text-decoration: none;
  376. align-self: center;
  377. padding: .5rem;
  378. margin: 0.2rem;
  379. width: 1rem;
  380. }
  381. .main .pagination-container .pagination-list .page-link.is-current {
  382. background: var(--secondary-background);
  383. }
  384. /* /video list item */
  385. .footer {
  386. grid-area: footer;
  387. display: grid;
  388. grid-template-columns: auto;
  389. align-items: center;
  390. justify-content: center;
  391. margin: auto;
  392. text-align: center;
  393. }
  394. .footer > p {
  395. text-align: center;
  396. }
  397. @media (min-width: 480px) {
  398. .item-video {
  399. font-size: 0.85rem;
  400. }
  401. .info-box {
  402. grid-gap: 2px;
  403. }
  404. .title {
  405. font-size: 1rem;
  406. }
  407. }
  408. @media (min-width: 600px) {
  409. .video-container {
  410. display: grid;
  411. grid-row-gap: 0.5rem;
  412. grid-template-columns: 1fr 1fr;
  413. }
  414. }
  415. @media (min-width: 992px) {
  416. body {
  417. display: grid;
  418. grid-template-columns: 0.3fr 2fr 1fr 0.3fr;
  419. grid-template-rows: auto 1fr auto;
  420. grid-template-areas:
  421. "header header header header"
  422. "main main main main"
  423. "footer footer footer footer";
  424. }
  425. .form {
  426. display: grid;
  427. grid-gap: 1px;
  428. grid-template-columns: 1fr 1.4fr 0.3fr 1.3fr;
  429. grid-template-areas: ". search-box search-button dropdown";
  430. grid-area: form;
  431. position: relative;
  432. }
  433. .dropdown {
  434. display: grid;
  435. grid-gap: 1px;
  436. grid-template-columns: 100px auto;
  437. grid-template-areas:
  438. "dropdown-label"
  439. "dropdown-content";
  440. grid-area: dropdown;
  441. position: absolute;
  442. z-index: 1;
  443. }
  444. #options-toggle-cbox:checked ~ .dropdown-content {
  445. width: calc(100% + 100px);
  446. max-height: 80vh;
  447. overflow-y: scroll;
  448. }
  449. .playlist-metadata {
  450. max-width: 50vw;
  451. }
  452. /* playlist */
  453. .playlist {
  454. display: grid;
  455. grid-gap: 1px;
  456. grid-template-columns: 1fr 1.4fr 0.3fr 1.3fr;
  457. grid-template-areas: ". play-box play-add play-clean";
  458. grid-area: playlist;
  459. }
  460. .play-clean {
  461. grid-template-columns: 100px auto;
  462. }
  463. .play-clean > button {
  464. padding-left: 0px;
  465. padding-right: 0px;
  466. padding-bottom: 6px;
  467. padding-top: 6px;
  468. text-align: center;
  469. white-space: nowrap;
  470. background-color: var(--buttom);
  471. color: var(--buttom-text);
  472. border-radius: 5px;
  473. cursor: pointer;
  474. }
  475. .video-container {
  476. display: grid;
  477. grid-template-columns: repeat(4, 1fr);
  478. grid-row-gap: 1rem;
  479. grid-column-gap: 1rem;
  480. }
  481. .footer {
  482. display: grid;
  483. grid-template-columns: repeat(3, 1fr);
  484. grid-column-gap: 2rem;
  485. align-items: center;
  486. justify-content: center;
  487. text-align: center;
  488. margin-top: 1rem;
  489. margin-bottom: 1rem;
  490. }
  491. }