search.css 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523
  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. .result-info {
  200. justify-self: center;
  201. }
  202. /* pagination */
  203. .main .pagination-container {
  204. display: grid;
  205. justify-content: center;
  206. }
  207. .main .pagination-container .pagination-list {
  208. display: flex;
  209. flex-direction: row;
  210. flex-wrap: wrap;
  211. justify-content: center;
  212. }
  213. .main .pagination-container .pagination-list .page-link {
  214. border-style: none;
  215. font-weight: bold;
  216. text-align: center;
  217. background: var(--secondary-focus);
  218. text-decoration: none;
  219. align-self: center;
  220. padding: .5rem;
  221. margin: 0.2rem;
  222. width: 1rem;
  223. }
  224. .main .pagination-container .pagination-list .page-link.is-current {
  225. background: var(--secondary-background);
  226. }
  227. /* Video list item */
  228. .video-container {
  229. display: grid;
  230. grid-gap: 0.5rem;
  231. }
  232. .length {
  233. position: absolute;
  234. background-color: rgba(35, 35, 35, 0.75);
  235. color: #fff;
  236. border-radius: 2px;
  237. padding: 2px;
  238. font-size: 16px;
  239. right: 0.25em;
  240. bottom: -0.75em;
  241. }
  242. .item-box {
  243. display: grid;
  244. grid-template-columns: 1.9fr 0.1fr;
  245. grid-template-rows: 1fr;
  246. grid-gap: 1px;
  247. grid-template-areas:
  248. "item-video item-checkbox";
  249. }
  250. .item-video {
  251. grid-area: item-video;
  252. display: grid;
  253. grid-template-columns: auto;
  254. grid-template-rows: repeat(4, auto);
  255. grid-row-gap: 0.4rem;
  256. grid-template-areas:
  257. "thumbnail-box"
  258. "info-box";
  259. align-items: center;
  260. font-size: 0.7rem;
  261. }
  262. .item-video a {
  263. text-decoration: none;
  264. cursor: pointer;
  265. }
  266. .item-video address {
  267. white-space: nowrap;
  268. overflow: hidden;
  269. text-overflow: ellipsis;
  270. }
  271. .item-video.channel-item .thumbnail.channel {
  272. display: flex;
  273. justify-content: center;
  274. align-items: center;
  275. padding: 0px;
  276. text-align: center;
  277. }
  278. .item-video.channel-item .thumbnail-img.channel {
  279. width: 56.25%;
  280. position: relative;
  281. }
  282. .thumbnail-box {
  283. grid-area: thumbnail-box;
  284. position: relative;
  285. }
  286. .playlist-item .thumbnail-info {
  287. position: absolute;
  288. right: 0px;
  289. bottom: 0px;
  290. height: 100%;
  291. width: 50%;
  292. text-align: center;
  293. white-space: pre-line;
  294. opacity: .8;
  295. color: var(--text);
  296. font-size: 0.8125rem;
  297. background: var(--secondary-background);
  298. padding: 0;
  299. }
  300. .playlist-item .thumbnail-info span {
  301. position: absolute;
  302. top: 50%;
  303. transform: translate(-50%, -50%);
  304. text-transform: none;
  305. }
  306. .thumbnail {
  307. padding: 28.125%;
  308. position: relative;
  309. box-sizing: border-box;
  310. }
  311. .thumbnail-img {
  312. position: absolute;
  313. width: 100%;
  314. height: 100%;
  315. left: 0;
  316. top: 0;
  317. object-fit: cover;
  318. background-color: var(--thumb-background);
  319. }
  320. .title {
  321. font-size: 0.8rem;
  322. margin: 0px;
  323. font-weight: normal;
  324. overflow: hidden;
  325. text-overflow: ellipsis;
  326. }
  327. .info-box address {
  328. white-space: nowrap;
  329. overflow: hidden;
  330. text-overflow: ellipsis;
  331. }
  332. .thumbnail-info {
  333. background-color: var(--time-background);
  334. color: #fff;
  335. padding: 2px 5px;
  336. text-transform: uppercase;
  337. font-weight: 700;
  338. font-size: 12px;
  339. position: absolute;
  340. right: 0;
  341. bottom: .2rem;
  342. }
  343. .item-checkbox {
  344. grid-area: item-checkbox;
  345. justify-self: start;
  346. align-self: center;
  347. min-width: 30px;
  348. margin: 0px;
  349. }
  350. .stats {
  351. display: flex;
  352. justify-content: space-between;
  353. }
  354. .horizontal-stats > li {
  355. display: inline;
  356. }
  357. .horizontal-stats > li:first-child::after {
  358. content: " | ";
  359. }
  360. /* /video list item */
  361. .footer {
  362. grid-area: footer;
  363. display: grid;
  364. grid-template-columns: auto;
  365. align-items: center;
  366. justify-content: center;
  367. margin: auto;
  368. text-align: center;
  369. }
  370. .footer > p {
  371. text-align: center;
  372. }
  373. @media (min-width: 480px) {
  374. .item-video {
  375. font-size: 0.85rem;
  376. }
  377. .info-box {
  378. grid-gap: 2px;
  379. }
  380. .title {
  381. font-size: 1rem;
  382. }
  383. }
  384. @media (min-width: 600px) {
  385. .video-container {
  386. display: grid;
  387. grid-gap: 0.5rem;
  388. grid-template-columns: 1fr 1fr;
  389. }
  390. }
  391. @media (min-width: 992px) {
  392. body {
  393. display: grid;
  394. grid-template-columns: 0.3fr 2fr 1fr 0.3fr;
  395. grid-template-rows: auto 1fr auto;
  396. grid-template-areas:
  397. "header header header header"
  398. "main main main main"
  399. "footer footer footer footer";
  400. }
  401. .form {
  402. display: grid;
  403. grid-gap: 1px;
  404. grid-template-columns: 1fr 1.4fr 0.3fr 1.3fr;
  405. grid-template-areas: ". search-box search-button dropdown";
  406. grid-area: form;
  407. position: relative;
  408. }
  409. .dropdown {
  410. display: grid;
  411. grid-gap: 1px;
  412. grid-template-columns: 100px auto;
  413. grid-template-areas:
  414. "dropdown-label"
  415. "dropdown-content";
  416. grid-area: dropdown;
  417. position: absolute;
  418. z-index: 1;
  419. }
  420. #options-toggle-cbox:checked ~ .dropdown-content {
  421. width: calc(100% + 100px);
  422. max-height: 80vh;
  423. overflow-y: scroll;
  424. }
  425. /* playlist */
  426. .playlist {
  427. display: grid;
  428. grid-gap: 1px;
  429. grid-template-columns: 1fr 1.4fr 0.3fr 1.3fr;
  430. grid-template-areas: ". play-box play-add play-clean";
  431. grid-area: playlist;
  432. }
  433. .play-clean {
  434. grid-template-columns: 100px auto;
  435. }
  436. .play-clean > button {
  437. padding-left: 0px;
  438. padding-right: 0px;
  439. padding-bottom: 6px;
  440. padding-top: 6px;
  441. text-align: center;
  442. white-space: nowrap;
  443. background-color: var(--buttom);
  444. color: var(--buttom-text);
  445. border-radius: 5px;
  446. cursor: pointer;
  447. }
  448. .video-container {
  449. display: grid;
  450. grid-template-columns: repeat(4, 1fr);
  451. grid-gap: 1rem;
  452. grid-column-gap: 1rem;
  453. }
  454. .footer {
  455. display: grid;
  456. grid-template-columns: repeat(3, 1fr);
  457. grid-column-gap: 2rem;
  458. align-items: center;
  459. justify-content: center;
  460. text-align: center;
  461. margin-top: 1rem;
  462. margin-bottom: 1rem;
  463. }
  464. }