channel.css 11 KB

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