diff options
| author | Bobby <[email protected]> | 2024-08-25 14:43:36 -0400 |
|---|---|---|
| committer | Bobby <[email protected]> | 2024-08-25 14:43:36 -0400 |
| commit | 3316aba2fd31e7ee9e1556392046c110c25c6cab (patch) | |
| tree | 89b23f6b4eff85558cb1b874fdb0eb7417ff354c | |
| parent | 4a1f0de84bdb1c3a1346ef3b6e6e2ddf27f86cea (diff) | |
| download | yugen-3316aba2fd31e7ee9e1556392046c110c25c6cab.tar.xz yugen-3316aba2fd31e7ee9e1556392046c110c25c6cab.zip | |
partial update
| -rw-r--r-- | static/css/input.css | 2 | ||||
| -rw-r--r-- | static/css/main.css | 371 | ||||
| -rw-r--r-- | templates/home/index.html | 295 | ||||
| -rw-r--r-- | templates/partials/datacard_render.html | 53 | ||||
| -rw-r--r-- | templates/partials/sidebarwidecard_render.html | 68 |
5 files changed, 247 insertions, 542 deletions
diff --git a/static/css/input.css b/static/css/input.css index 16e55a9..ccde68d 100644 --- a/static/css/input.css +++ b/static/css/input.css @@ -19,7 +19,7 @@ } main { - max-width: 1800px; + max-width: 1920px; } /* Style for the active pagination bullet */ diff --git a/static/css/main.css b/static/css/main.css index 0b5b74c..eff2ebe 100644 --- a/static/css/main.css +++ b/static/css/main.css @@ -595,6 +595,10 @@ video { margin-left: 1rem; } +.mr-1 { + margin-right: 0.25rem; +} + .mr-2 { margin-right: 0.5rem; } @@ -603,10 +607,6 @@ video { margin-top: 0.5rem; } -.mr-1 { - margin-right: 0.25rem; -} - .mt-4 { margin-top: 1rem; } @@ -631,9 +631,9 @@ video { display: none; } -.size-6 { - width: 1.5rem; - height: 1.5rem; +.size-3 { + width: 0.75rem; + height: 0.75rem; } .size-4 { @@ -641,14 +641,9 @@ video { height: 1rem; } -.size-2 { - width: 0.5rem; - height: 0.5rem; -} - -.size-3 { - width: 0.75rem; - height: 0.75rem; +.size-6 { + width: 1.5rem; + height: 1.5rem; } .h-6 { @@ -663,44 +658,28 @@ video { height: 24rem; } -.h-full { - height: 100%; -} - -.h-32 { - height: 8rem; -} - -.h-72 { - height: 18rem; -} - -.h-2 { - height: 0.5rem; -} - -.h-4 { - height: 1rem; +.h-auto { + height: auto; } -.h-24 { - height: 6rem; +.h-full { + height: 100%; } -.h-56 { - height: 14rem; +.max-h-24 { + max-height: 6rem; } -.h-40 { - height: 10rem; +.w-1\/2 { + width: 50%; } -.max-h-24 { - max-height: 6rem; +.w-32 { + width: 8rem; } -.max-h-12 { - max-height: 3rem; +.w-56 { + width: 14rem; } .w-6 { @@ -719,48 +698,11 @@ video { width: 100%; } -.w-auto { - width: auto; -} - .w-max { width: -moz-max-content; width: max-content; } -.w-1\/2 { - width: 50%; -} - -.w-1\/3 { - width: 33.333333%; -} - -.w-2 { - width: 0.5rem; -} - -.w-4 { - width: 1rem; -} - -.w-56 { - width: 14rem; -} - -.w-20 { - width: 5rem; -} - -.w-32 { - width: 8rem; -} - -.max-w-fit { - max-width: -moz-fit-content; - max-width: fit-content; -} - .max-w-max { max-width: -moz-max-content; max-width: max-content; @@ -792,10 +734,6 @@ video { flex-wrap: wrap; } -.content-center { - align-content: center; -} - .items-start { align-items: flex-start; } @@ -824,6 +762,10 @@ video { justify-content: space-around; } +.gap-1 { + gap: 0.25rem; +} + .gap-2 { gap: 0.5rem; } @@ -836,46 +778,10 @@ video { gap: 2rem; } -.gap-1 { - gap: 0.25rem; -} - -.space-x-2 > :not([hidden]) ~ :not([hidden]) { - --tw-space-x-reverse: 0; - margin-right: calc(0.5rem * var(--tw-space-x-reverse)); - margin-left: calc(0.5rem * calc(1 - var(--tw-space-x-reverse))); -} - .overflow-auto { overflow: auto; } -.overflow-hidden { - overflow: hidden; -} - -.overflow-clip { - overflow: clip; -} - -.truncate { - overflow: hidden; - text-overflow: ellipsis; - white-space: nowrap; -} - -.text-ellipsis { - text-overflow: ellipsis; -} - -.whitespace-normal { - white-space: normal; -} - -.whitespace-nowrap { - white-space: nowrap; -} - .rounded { border-radius: 0.25rem; } @@ -892,10 +798,6 @@ video { border-radius: 0.75rem; } -.rounded-sm { - border-radius: 0.125rem; -} - .border { border-width: 1px; } @@ -914,24 +816,9 @@ video { background-color: rgb(0 0 0 / var(--tw-bg-opacity)); } -.bg-neutral-900 { - --tw-bg-opacity: 1; - background-color: rgb(23 23 23 / var(--tw-bg-opacity)); -} - -.bg-neutral-950 { - --tw-bg-opacity: 1; - background-color: rgb(10 10 10 / var(--tw-bg-opacity)); -} - -.bg-white { - --tw-bg-opacity: 1; - background-color: rgb(255 255 255 / var(--tw-bg-opacity)); -} - -.bg-green-500 { +.bg-blue-100 { --tw-bg-opacity: 1; - background-color: rgb(34 197 94 / var(--tw-bg-opacity)); + background-color: rgb(219 234 254 / var(--tw-bg-opacity)); } .bg-green-100 { @@ -939,19 +826,19 @@ video { background-color: rgb(220 252 231 / var(--tw-bg-opacity)); } -.bg-pink-100 { +.bg-indigo-100 { --tw-bg-opacity: 1; - background-color: rgb(252 231 243 / var(--tw-bg-opacity)); + background-color: rgb(224 231 255 / var(--tw-bg-opacity)); } -.bg-blue-100 { +.bg-neutral-900 { --tw-bg-opacity: 1; - background-color: rgb(219 234 254 / var(--tw-bg-opacity)); + background-color: rgb(23 23 23 / var(--tw-bg-opacity)); } -.bg-indigo-100 { +.bg-neutral-950 { --tw-bg-opacity: 1; - background-color: rgb(224 231 255 / var(--tw-bg-opacity)); + background-color: rgb(10 10 10 / var(--tw-bg-opacity)); } .bg-orange-100 { @@ -959,39 +846,39 @@ video { background-color: rgb(255 237 213 / var(--tw-bg-opacity)); } -.bg-purple-100 { +.bg-pink-100 { --tw-bg-opacity: 1; - background-color: rgb(243 232 255 / var(--tw-bg-opacity)); + background-color: rgb(252 231 243 / var(--tw-bg-opacity)); } -.bg-red-100 { +.bg-purple-100 { --tw-bg-opacity: 1; - background-color: rgb(254 226 226 / var(--tw-bg-opacity)); + background-color: rgb(243 232 255 / var(--tw-bg-opacity)); } -.bg-teal-100 { +.bg-purple-600 { --tw-bg-opacity: 1; - background-color: rgb(204 251 241 / var(--tw-bg-opacity)); + background-color: rgb(147 51 234 / var(--tw-bg-opacity)); } -.bg-yellow-100 { +.bg-red-100 { --tw-bg-opacity: 1; - background-color: rgb(254 249 195 / var(--tw-bg-opacity)); + background-color: rgb(254 226 226 / var(--tw-bg-opacity)); } -.bg-purple-400 { +.bg-teal-100 { --tw-bg-opacity: 1; - background-color: rgb(192 132 252 / var(--tw-bg-opacity)); + background-color: rgb(204 251 241 / var(--tw-bg-opacity)); } -.bg-purple-600 { +.bg-white { --tw-bg-opacity: 1; - background-color: rgb(147 51 234 / var(--tw-bg-opacity)); + background-color: rgb(255 255 255 / var(--tw-bg-opacity)); } -.bg-green-400 { +.bg-yellow-100 { --tw-bg-opacity: 1; - background-color: rgb(74 222 128 / var(--tw-bg-opacity)); + background-color: rgb(254 249 195 / var(--tw-bg-opacity)); } .bg-opacity-10 { @@ -1006,10 +893,6 @@ video { --tw-bg-opacity: 0.4; } -.bg-opacity-50 { - --tw-bg-opacity: 0.5; -} - .bg-cover { background-size: cover; } @@ -1028,16 +911,22 @@ video { object-fit: cover; } +.p-2 { + padding: 0.5rem; +} + .p-4 { padding: 1rem; } -.p-2 { - padding: 0.5rem; +.px-1 { + padding-left: 0.25rem; + padding-right: 0.25rem; } -.p-1 { - padding: 0.25rem; +.px-2 { + padding-left: 0.5rem; + padding-right: 0.5rem; } .px-4 { @@ -1050,16 +939,6 @@ video { padding-right: 1.5rem; } -.py-3 { - padding-top: 0.75rem; - padding-bottom: 0.75rem; -} - -.px-2 { - padding-left: 0.5rem; - padding-right: 0.5rem; -} - .py-1 { padding-top: 0.25rem; padding-bottom: 0.25rem; @@ -1070,9 +949,9 @@ video { padding-bottom: 0.5rem; } -.px-1 { - padding-left: 0.25rem; - padding-right: 0.25rem; +.py-3 { + padding-top: 0.75rem; + padding-bottom: 0.75rem; } .pl-4 { @@ -1083,18 +962,15 @@ video { padding-right: 3rem; } -.pb-4 { - padding-bottom: 1rem; -} - -.pt-2 { - padding-top: 0.5rem; -} - .pt-1 { padding-top: 0.25rem; } +.text-2xl { + font-size: 1.5rem; + line-height: 2rem; +} + .text-4xl { font-size: 2.25rem; line-height: 2.5rem; @@ -1115,11 +991,6 @@ video { line-height: 1rem; } -.text-2xl { - font-size: 1.5rem; - line-height: 2rem; -} - .font-bold { font-weight: 700; } @@ -1128,33 +999,34 @@ video { text-transform: uppercase; } -.text-purple-400 { +.text-blue-300 { --tw-text-opacity: 1; - color: rgb(192 132 252 / var(--tw-text-opacity)); + color: rgb(147 197 253 / var(--tw-text-opacity)); } -.text-transparent { - color: transparent; +.text-blue-500 { + --tw-text-opacity: 1; + color: rgb(59 130 246 / var(--tw-text-opacity)); } -.text-white { +.text-gray-400 { --tw-text-opacity: 1; - color: rgb(255 255 255 / var(--tw-text-opacity)); + color: rgb(156 163 175 / var(--tw-text-opacity)); } -.text-green-300 { +.text-gray-500 { --tw-text-opacity: 1; - color: rgb(134 239 172 / var(--tw-text-opacity)); + color: rgb(107 114 128 / var(--tw-text-opacity)); } -.text-pink-300 { +.text-green-300 { --tw-text-opacity: 1; - color: rgb(249 168 212 / var(--tw-text-opacity)); + color: rgb(134 239 172 / var(--tw-text-opacity)); } -.text-blue-300 { +.text-green-500 { --tw-text-opacity: 1; - color: rgb(147 197 253 / var(--tw-text-opacity)); + color: rgb(34 197 94 / var(--tw-text-opacity)); } .text-indigo-300 { @@ -1167,11 +1039,21 @@ video { color: rgb(253 186 116 / var(--tw-text-opacity)); } +.text-pink-300 { + --tw-text-opacity: 1; + color: rgb(249 168 212 / var(--tw-text-opacity)); +} + .text-purple-300 { --tw-text-opacity: 1; color: rgb(216 180 254 / var(--tw-text-opacity)); } +.text-purple-400 { + --tw-text-opacity: 1; + color: rgb(192 132 252 / var(--tw-text-opacity)); +} + .text-red-300 { --tw-text-opacity: 1; color: rgb(252 165 165 / var(--tw-text-opacity)); @@ -1182,24 +1064,18 @@ video { color: rgb(94 234 212 / var(--tw-text-opacity)); } -.text-yellow-300 { - --tw-text-opacity: 1; - color: rgb(253 224 71 / var(--tw-text-opacity)); -} - -.text-gray-500 { - --tw-text-opacity: 1; - color: rgb(107 114 128 / var(--tw-text-opacity)); +.text-transparent { + color: transparent; } -.text-green-500 { +.text-white { --tw-text-opacity: 1; - color: rgb(34 197 94 / var(--tw-text-opacity)); + color: rgb(255 255 255 / var(--tw-text-opacity)); } -.text-blue-500 { +.text-yellow-300 { --tw-text-opacity: 1; - color: rgb(59 130 246 / var(--tw-text-opacity)); + color: rgb(253 224 71 / var(--tw-text-opacity)); } .text-yellow-500 { @@ -1207,21 +1083,6 @@ video { color: rgb(234 179 8 / var(--tw-text-opacity)); } -.text-gray-400 { - --tw-text-opacity: 1; - color: rgb(156 163 175 / var(--tw-text-opacity)); -} - -.text-gray-300 { - --tw-text-opacity: 1; - color: rgb(209 213 219 / var(--tw-text-opacity)); -} - -.text-gray-200 { - --tw-text-opacity: 1; - color: rgb(229 231 235 / var(--tw-text-opacity)); -} - .outline-none { outline: 2px solid transparent; outline-offset: 2px; @@ -1247,7 +1108,7 @@ video { } main { - max-width: 1800px; + max-width: 1920px; } /* Style for the active pagination bullet */ @@ -1288,34 +1149,10 @@ main { width: 50%; } - .lg\:w-1\/6 { - width: 16.666667%; - } - - .lg\:w-5\/6 { - width: 83.333333%; - } - - .lg\:w-1\/3 { - width: 33.333333%; - } - - .lg\:w-2\/3 { - width: 66.666667%; - } - .lg\:w-1\/4 { width: 25%; } - .lg\:w-1\/5 { - width: 20%; - } - - .lg\:w-3\/4 { - width: 75%; - } - .lg\:flex-row { flex-direction: row; } @@ -1346,4 +1183,20 @@ main { .xl\:hidden { display: none; } + + .xl\:w-1\/4 { + width: 25%; + } + + .xl\:w-1\/6 { + width: 16.666667%; + } + + .xl\:w-3\/4 { + width: 75%; + } + + .xl\:flex-row { + flex-direction: row; + } } diff --git a/templates/home/index.html b/templates/home/index.html index 9a05b41..8edfef2 100644 --- a/templates/home/index.html +++ b/templates/home/index.html @@ -94,8 +94,8 @@ </section> <!-- Split: Anime List: Sidebar --> -<section class="flex flex-col lg:flex-row mt-4 gap-4"> - <section class="w-full lg:w-3/4 flex flex-col items-center p-2"> +<section class="flex flex-col xl:flex-row mt-4 gap-4"> + <section class="w-full xl:w-3/4 flex flex-col items-center p-2"> <!-- Top Bar: Trending, Popular, Top Rated: Purple Text: Active Tab --> <section class="inline-flex w-max flex-row gap-4 rounded-full bg-white bg-opacity-10 mx-auto"> <button class="flex flex-row items-center focus:outline-none gap-2 text-sm font-bold py-2 px-4 rounded-full bg-purple-600 category-switch active-category" data-target="trending"> @@ -119,297 +119,28 @@ </section> <!-- Data Cards: Trending Anime --> <section id="trending" class="flex flex-wrap justify-center mt-4 animate__animated animate__slideInUp"> - {% for anime in trending_anime %} - {% if anime.title.english %} - <a href="#" class="w-1/2 lg:w-1/6 text-gray-500 px-1 mb-4 hover:text-white flex flex-col gap-2"> - <img src="{{ anime.image }}" alt="{{ anime.title.english }}" class="rounded-lg h-72 w-auto object-cover"/> - <div class="inline-flex gap-2 flex-wrap"> - <span class="text-xs font-bold bg-white bg-opacity-10 text-white px-2 py-1 rounded flex items-center gap-1"> - <svg stroke="currentColor" fill="none" stroke-width="2" viewBox="0 0 24 24" stroke-linecap="round" stroke-linejoin="round" height="1em" width="1em" xmlns="http://www.w3.org/2000/svg" class="mr-1"> - <path d="M3.604 7.197l7.138 -3.109a.96 .96 0 0 1 1.27 .527l4.924 11.902a1 1 0 0 1 -.514 1.304l-7.137 3.109a.96 .96 0 0 1 -1.271 -.527l-4.924 -11.903a1 1 0 0 1 .514 -1.304z"></path> - <path d="M15 4h1a1 1 0 0 1 1 1v3.5"></path> - <path d="M20 6c.264 .112 .52 .217 .768 .315a1 1 0 0 1 .53 1.311l-2.298 5.374"></path> - </svg> - {{ anime.type }} - </span> - <span class="text-xs font-bold bg-white bg-opacity-10 text-white px-2 py-1 rounded flex items-center gap-1"> - <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor" class="size-4"> - <path fill-rule="evenodd" d="M6.75 2.25A.75.75 0 0 1 7.5 3v1.5h9V3A.75.75 0 0 1 18 3v1.5h.75a3 3 0 0 1 3 3v11.25a3 3 0 0 1-3 3H5.25a3 3 0 0 1-3-3V7.5a3 3 0 0 1 3-3H6V3a.75.75 0 0 1 .75-.75Zm13.5 9a1.5 1.5 0 0 0-1.5-1.5H5.25a1.5 1.5 0 0 0-1.5 1.5v7.5a1.5 1.5 0 0 0 1.5 1.5h13.5a1.5 1.5 0 0 0 1.5-1.5v-7.5Z" clip-rule="evenodd" /> - </svg> - {{ anime.releaseDate }} - </span> - <span class="text-xs font-bold bg-white bg-opacity-10 text-white px-2 py-1 rounded flex items-center gap-1"> - <svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="size-4"> - <path stroke-linecap="round" stroke-linejoin="round" d="M11.48 3.499a.562.562 0 0 1 1.04 0l2.125 5.111a.563.563 0 0 0 .475.345l5.518.442c.499.04.701.663.321.988l-4.204 3.602a.563.563 0 0 0-.182.557l1.285 5.385a.562.562 0 0 1-.84.61l-4.725-2.885a.562.562 0 0 0-.586 0L6.982 20.54a.562.562 0 0 1-.84-.61l1.285-5.386a.562.562 0 0 0-.182-.557l-4.204-3.602a.562.562 0 0 1 .321-.988l5.518-.442a.563.563 0 0 0 .475-.345L11.48 3.5Z"/> - </svg> - {{ anime.rating }} - </span> - </div> - <span class="text-sm font-bold flex gap-1 flex-row items-start"> - {% if anime.status == "Ongoing" %} - <span class="text-green-500 pt-1"> - <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor" class="size-3"> - <circle cx="12" cy="12" r="12" /> - </svg> - </span> - {% elif anime.status == "Not yet aired" %} - <span class="text-yellow-500 pt-1"> - <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor" class="size-3"> - <circle cx="12" cy="12" r="12" /> - </svg> - </span> - {% else %} - <span class="text-blue-500 pt-1"> - <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor" class="size-3"> - <circle cx="12" cy="12" r="12" /> - </svg> - </span> - {% endif %} - <span> - {{ anime.title.english }} - </span> - </span> - </a> - {% endif %} - {% endfor %} + {% include "partials/datacard_render.html" with data=trending_anime %} </section> <!-- Data Cards: Popular Anime --> <section id="popular" class="flex-wrap justify-center mt-4 hidden animate__animated animate__slideInUp"> - {% for anime in popular_anime %} - {% if anime.title.english %} - <a href="#" class="w-1/2 lg:w-1/6 text-gray-500 px-1 mb-4 hover:text-white flex flex-col gap-2"> - <img src="{{ anime.image }}" alt="{{ anime.title.english }}" class="rounded-lg h-72 w-auto object-cover"/> - <div class="inline-flex gap-2 flex-wrap"> - <span class="text-xs font-bold bg-white bg-opacity-10 text-white px-2 py-1 rounded flex items-center gap-1"> - <svg stroke="currentColor" fill="none" stroke-width="2" viewBox="0 0 24 24" stroke-linecap="round" stroke-linejoin="round" height="1em" width="1em" xmlns="http://www.w3.org/2000/svg" class="mr-1"> - <path d="M3.604 7.197l7.138 -3.109a.96 .96 0 0 1 1.27 .527l4.924 11.902a1 1 0 0 1 -.514 1.304l-7.137 3.109a.96 .96 0 0 1 -1.271 -.527l-4.924 -11.903a1 1 0 0 1 .514 -1.304z"></path> - <path d="M15 4h1a1 1 0 0 1 1 1v3.5"></path> - <path d="M20 6c.264 .112 .52 .217 .768 .315a1 1 0 0 1 .53 1.311l-2.298 5.374"></path> - </svg> - {{ anime.type }} - </span> - <span class="text-xs font-bold bg-white bg-opacity-10 text-white px-2 py-1 rounded flex items-center gap-1"> - <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor" class="size-4"> - <path fill-rule="evenodd" d="M6.75 2.25A.75.75 0 0 1 7.5 3v1.5h9V3A.75.75 0 0 1 18 3v1.5h.75a3 3 0 0 1 3 3v11.25a3 3 0 0 1-3 3H5.25a3 3 0 0 1-3-3V7.5a3 3 0 0 1 3-3H6V3a.75.75 0 0 1 .75-.75Zm13.5 9a1.5 1.5 0 0 0-1.5-1.5H5.25a1.5 1.5 0 0 0-1.5 1.5v7.5a1.5 1.5 0 0 0 1.5 1.5h13.5a1.5 1.5 0 0 0 1.5-1.5v-7.5Z" clip-rule="evenodd" /> - </svg> - {{ anime.releaseDate }} - </span> - <span class="text-xs font-bold bg-white bg-opacity-10 text-white px-2 py-1 rounded flex items-center gap-1"> - <svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="size-4"> - <path stroke-linecap="round" stroke-linejoin="round" d="M11.48 3.499a.562.562 0 0 1 1.04 0l2.125 5.111a.563.563 0 0 0 .475.345l5.518.442c.499.04.701.663.321.988l-4.204 3.602a.563.563 0 0 0-.182.557l1.285 5.385a.562.562 0 0 1-.84.61l-4.725-2.885a.562.562 0 0 0-.586 0L6.982 20.54a.562.562 0 0 1-.84-.61l1.285-5.386a.562.562 0 0 0-.182-.557l-4.204-3.602a.562.562 0 0 1 .321-.988l5.518-.442a.563.563 0 0 0 .475-.345L11.48 3.5Z"/> - </svg> - {{ anime.rating }} - </span> - </div> - <span class="text-sm font-bold flex gap-1 flex-row items-start"> - {% if anime.status == "Ongoing" %} - <span class="text-green-500 pt-1"> - <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor" class="size-3"> - <circle cx="12" cy="12" r="12" /> - </svg> - </span> - {% elif anime.status == "Not yet aired" %} - <span class="text-yellow-500 pt-1"> - <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor" class="size-3"> - <circle cx="12" cy="12" r="12" /> - </svg> - </span> - {% else %} - <span class="text-blue-500 pt-1"> - <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor" class="size-3"> - <circle cx="12" cy="12" r="12" /> - </svg> - </span> - {% endif %} - <span> - {{ anime.title.english }} - </span> - </span> - </a> - {% endif %} - {% endfor %} + {% include "partials/datacard_render.html" with data=popular_anime %} </section> <!-- Data Cards: Top Rated Anime --> <section id="top_rated" class="flex-wrap justify-center mt-4 hidden animate__animated animate__slideInUp"> - {% for anime in top_anime %} - {% if anime.title.english %} - <a href="#" class="w-1/2 lg:w-1/6 text-gray-500 px-1 mb-4 hover:text-white flex flex-col gap-2"> - <img src="{{ anime.image }}" alt="{{ anime.title.english }}" class="rounded-lg h-72 w-auto object-cover"/> - <div class="inline-flex gap-2 flex-wrap"> - <span class="text-xs font-bold bg-white bg-opacity-10 text-white px-2 py-1 rounded flex items-center gap-1"> - <svg stroke="currentColor" fill="none" stroke-width="2" viewBox="0 0 24 24" stroke-linecap="round" stroke-linejoin="round" height="1em" width="1em" xmlns="http://www.w3.org/2000/svg" class="mr-1"> - <path d="M3.604 7.197l7.138 -3.109a.96 .96 0 0 1 1.27 .527l4.924 11.902a1 1 0 0 1 -.514 1.304l-7.137 3.109a.96 .96 0 0 1 -1.271 -.527l-4.924 -11.903a1 1 0 0 1 .514 -1.304z"></path> - <path d="M15 4h1a1 1 0 0 1 1 1v3.5"></path> - <path d="M20 6c.264 .112 .52 .217 .768 .315a1 1 0 0 1 .53 1.311l-2.298 5.374"></path> - </svg> - {{ anime.type }} - </span> - <span class="text-xs font-bold bg-white bg-opacity-10 text-white px-2 py-1 rounded flex items-center gap-1"> - <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor" class="size-4"> - <path fill-rule="evenodd" d="M6.75 2.25A.75.75 0 0 1 7.5 3v1.5h9V3A.75.75 0 0 1 18 3v1.5h.75a3 3 0 0 1 3 3v11.25a3 3 0 0 1-3 3H5.25a3 3 0 0 1-3-3V7.5a3 3 0 0 1 3-3H6V3a.75.75 0 0 1 .75-.75Zm13.5 9a1.5 1.5 0 0 0-1.5-1.5H5.25a1.5 1.5 0 0 0-1.5 1.5v7.5a1.5 1.5 0 0 0 1.5 1.5h13.5a1.5 1.5 0 0 0 1.5-1.5v-7.5Z" clip-rule="evenodd" /> - </svg> - {{ anime.releaseDate }} - </span> - <span class="text-xs font-bold bg-white bg-opacity-10 text-white px-2 py-1 rounded flex items-center gap-1"> - <svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="size-4"> - <path stroke-linecap="round" stroke-linejoin="round" d="M11.48 3.499a.562.562 0 0 1 1.04 0l2.125 5.111a.563.563 0 0 0 .475.345l5.518.442c.499.04.701.663.321.988l-4.204 3.602a.563.563 0 0 0-.182.557l1.285 5.385a.562.562 0 0 1-.84.61l-4.725-2.885a.562.562 0 0 0-.586 0L6.982 20.54a.562.562 0 0 1-.84-.61l1.285-5.386a.562.562 0 0 0-.182-.557l-4.204-3.602a.562.562 0 0 1 .321-.988l5.518-.442a.563.563 0 0 0 .475-.345L11.48 3.5Z"/> - </svg> - {{ anime.rating }} - </span> - </div> - <span class="text-sm font-bold flex gap-1 flex-row items-start"> - {% if anime.status == "Ongoing" %} - <span class="text-green-500 pt-1"> - <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor" class="size-3"> - <circle cx="12" cy="12" r="12" /> - </svg> - </span> - {% elif anime.status == "Not yet aired" %} - <span class="text-yellow-500 pt-1"> - <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor" class="size-3"> - <circle cx="12" cy="12" r="12" /> - </svg> - </span> - {% else %} - <span class="text-blue-500 pt-1"> - <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor" class="size-3"> - <circle cx="12" cy="12" r="12" /> - </svg> - </span> - {% endif %} - <span> - {{ anime.title.english }} - </span> - </span> - </a> - {% endif %} - {% endfor %} + {% include "partials/datacard_render.html" with data=top_anime %} </section> </section> - <section class="w-full lg:w-1/4 px-4 py-2"> + <section class="w-full xl:w-1/4 px-4 py-2"> <h2 class="text-2xl font-bold text-white uppercase">Top Airing</h2> <!-- Wide Cards: Upcoming --> <section class="flex flex-col gap-4 mt-4 animate__animated animate__slideInUp"> - {% for anime in top_airing_anime %} - {% if anime.title.english %} - <a href="#" class="flex flex-row gap-4 bg-white bg-opacity-10 p-2 rounded hover:bg-opacity-20"> - <img src="{{ anime.image }}" alt="{{ anime.title.english }}" class="rounded-lg h-40 w-32 object-cover"/> - <div class="flex flex-col gap-2"> - <span class="text-sm font-bold flex gap-1 flex-row items-start"> - {% if anime.status == "Ongoing" %} - <span class="text-green-500 pt-1"> - <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor" class="size-3"> - <circle cx="12" cy="12" r="12" /> - </svg> - </span> - {% elif anime.status == "Not yet aired" %} - <span class="text-yellow-500 pt-1"> - <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor" class="size-3"> - <circle cx="12" cy="12" r="12" /> - </svg> - </span> - {% else %} - <span class="text-blue-500 pt-1"> - <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor" class="size-3"> - <circle cx="12" cy="12" r="12" /> - </svg> - </span> - {% endif %} - <span> - {{ anime.title.english }} - </span> - </span> - <div class="text-sm text-gray-400 w-full overflow-auto no-scrollbar max-h-24 max-w-max mb-2"> - {{ anime.description|safe }} - </div> - <div class="inline-flex gap-2"> - <span class="text-xs font-bold bg-white bg-opacity-10 text-white px-2 py-1 rounded flex items-center gap-1"> - <svg stroke="currentColor" fill="none" stroke-width="2" viewBox="0 0 24 24" stroke-linecap="round" stroke-linejoin="round" height="1em" width="1em" xmlns="http://www.w3.org/2000/svg" class="mr-1"> - <path d="M3.604 7.197l7.138 -3.109a.96 .96 0 0 1 1.27 .527l4.924 11.902a1 1 0 0 1 -.514 1.304l-7.137 3.109a.96 .96 0 0 1 -1.271 -.527l-4.924 -11.903a1 1 0 0 1 .514 -1.304z"></path> - <path d="M15 4h1a1 1 0 0 1 1 1v3.5"></path> - <path d="M20 6c.264 .112 .52 .217 .768 .315a1 1 0 0 1 .53 1.311l-2.298 5.374"></path> - </svg> - {{ anime.type }} - </span> - <span class="text-xs font-bold bg-white bg-opacity-10 text-white px-2 py-1 rounded flex items-center gap-1"> - <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor" class="size-4"> - <path fill-rule="evenodd" d="M6.75 2.25A.75.75 0 0 1 7.5 3v1.5h9V3A.75.75 0 0 1 18 3v1.5h.75a3 3 0 0 1 3 3v11.25a3 3 0 0 1-3 3H5.25a3 3 0 0 1-3-3V7.5a3 3 0 0 1 3-3H6V3a.75.75 0 0 1 .75-.75Zm13.5 9a1.5 1.5 0 0 0-1.5-1.5H5.25a1.5 1.5 0 0 0-1.5 1.5v7.5a1.5 1.5 0 0 0 1.5 1.5h13.5a1.5 1.5 0 0 0 1.5-1.5v-7.5Z" clip-rule="evenodd" /> - </svg> - {{ anime.releaseDate }} - </span> - <span class="text-xs font-bold bg-white bg-opacity-10 text-white px-2 py-1 rounded flex items-center gap-1"> - <svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="size-4"> - <path stroke-linecap="round" stroke-linejoin="round" d="M11.48 3.499a.562.562 0 0 1 1.04 0l2.125 5.111a.563.563 0 0 0 .475.345l5.518.442c.499.04.701.663.321.988l-4.204 3.602a.563.563 0 0 0-.182.557l1.285 5.385a.562.562 0 0 1-.84.61l-4.725-2.885a.562.562 0 0 0-.586 0L6.982 20.54a.562.562 0 0 1-.84-.61l1.285-5.386a.562.562 0 0 0-.182-.557l-4.204-3.602a.562.562 0 0 1 .321-.988l5.518-.442a.563.563 0 0 0 .475-.345L11.48 3.5Z"/> - </svg> - {{ anime.rating }} - </span> - <span class="text-xs font-bold bg-white bg-opacity-10 text-white px-2 py-1 rounded flex items-center gap-1"> - <svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="size-4"> - <path stroke-linecap="round" stroke-linejoin="round" d="M5.25 8.25h15m-16.5 7.5h15m-1.8-13.5-3.9 19.5m-2.1-19.5-3.9 19.5"/> - </svg> - {{ anime.currentEpisode }} / {{ anime.totalEpisodes }} - </span> - </div> - </div> - </a> - {% endif %} - {% endfor %} - </section> - <h2 class="text-2xl font-bold text-white uppercase mt-4">Upcoming {{ next_season }}</h2> - <!-- Wide Cards: Upcoming --> - <section class="flex flex-col gap-4 mt-4 animate__animated animate__slideInUp"> - {% for anime in upcoming_anime %} - {% if anime.title.english %} - <a href="#" class="flex flex-row gap-4 bg-white bg-opacity-10 p-2 rounded hover:bg-opacity-20"> - <img src="{{ anime.image }}" alt="{{ anime.title.english }}" class="rounded-lg h-40 w-32 object-cover"/> - <div class="flex flex-col gap-2"> - <span class="text-sm font-bold flex gap-1 flex-row items-start"> - {% if anime.status == "Ongoing" %} - <span class="text-green-500 pt-1"> - <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor" class="size-3"> - <circle cx="12" cy="12" r="12" /> - </svg> - </span> - {% elif anime.status == "Not yet aired" %} - <span class="text-yellow-500 pt-1"> - <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor" class="size-3"> - <circle cx="12" cy="12" r="12" /> - </svg> - </span> - {% else %} - <span class="text-blue-500 pt-1"> - <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor" class="size-3"> - <circle cx="12" cy="12" r="12" /> - </svg> - </span> - {% endif %} - <span> - {{ anime.title.english }} - </span> - </span> - <div class="text-sm text-gray-400 w-full overflow-auto no-scrollbar max-h-24 max-w-max mb-2"> - {{ anime.description|safe }} - </div> - <div class="inline-flex gap-2"> - <span class="text-xs font-bold bg-white bg-opacity-10 text-white px-2 py-1 rounded flex items-center gap-1"> - <svg stroke="currentColor" fill="none" stroke-width="2" viewBox="0 0 24 24" stroke-linecap="round" stroke-linejoin="round" height="1em" width="1em" xmlns="http://www.w3.org/2000/svg" class="mr-1"> - <path d="M3.604 7.197l7.138 -3.109a.96 .96 0 0 1 1.27 .527l4.924 11.902a1 1 0 0 1 -.514 1.304l-7.137 3.109a.96 .96 0 0 1 -1.271 -.527l-4.924 -11.903a1 1 0 0 1 .514 -1.304z"></path> - <path d="M15 4h1a1 1 0 0 1 1 1v3.5"></path> - <path d="M20 6c.264 .112 .52 .217 .768 .315a1 1 0 0 1 .53 1.311l-2.298 5.374"></path> - </svg> - {{ anime.type }} - </span> - <span class="text-xs font-bold bg-white bg-opacity-10 text-white px-2 py-1 rounded flex items-center gap-1"> - <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor" class="size-4"> - <path fill-rule="evenodd" d="M6.75 2.25A.75.75 0 0 1 7.5 3v1.5h9V3A.75.75 0 0 1 18 3v1.5h.75a3 3 0 0 1 3 3v11.25a3 3 0 0 1-3 3H5.25a3 3 0 0 1-3-3V7.5a3 3 0 0 1 3-3H6V3a.75.75 0 0 1 .75-.75Zm13.5 9a1.5 1.5 0 0 0-1.5-1.5H5.25a1.5 1.5 0 0 0-1.5 1.5v7.5a1.5 1.5 0 0 0 1.5 1.5h13.5a1.5 1.5 0 0 0 1.5-1.5v-7.5Z" clip-rule="evenodd" /> - </svg> - {{ anime.releaseDate }} - </span> - </div> - </div> - </a> - {% endif %} - {% endfor %} + {% include "partials/sidebarwidecard_render.html" with data=top_airing_anime %} + </section> + <h2 class="text-2xl font-bold text-white uppercase mt-4">Upcoming {{ next_season }}</h2> + <!-- Wide Cards: Upcoming --> + <section class="flex flex-col gap-4 mt-4 animate__animated animate__slideInUp"> + {% include "partials/sidebarwidecard_render.html" with data=upcoming_anime %} + </section> </section> </section> diff --git a/templates/partials/datacard_render.html b/templates/partials/datacard_render.html new file mode 100644 index 0000000..e4a89df --- /dev/null +++ b/templates/partials/datacard_render.html @@ -0,0 +1,53 @@ +{% for anime in data %} + {% if anime.title.english %} + <a href="#" class="w-1/2 lg:w-1/4 xl:w-1/6 text-gray-500 px-1 mb-4 hover:text-white flex flex-col gap-2"> + <img src="{{ anime.image }}" alt="{{ anime.title.english }}" class="rounded-lg w-56 h-auto mx-auto object-cover"/> + <div class="inline-flex gap-2 flex-wrap"> + <span class="text-xs font-bold bg-white bg-opacity-10 text-white px-2 py-1 rounded flex items-center gap-1"> + <svg stroke="currentColor" fill="none" stroke-width="2" viewBox="0 0 24 24" stroke-linecap="round" stroke-linejoin="round" height="1em" width="1em" xmlns="http://www.w3.org/2000/svg" class="mr-1"> + <path d="M3.604 7.197l7.138 -3.109a.96 .96 0 0 1 1.27 .527l4.924 11.902a1 1 0 0 1 -.514 1.304l-7.137 3.109a.96 .96 0 0 1 -1.271 -.527l-4.924 -11.903a1 1 0 0 1 .514 -1.304z"></path> + <path d="M15 4h1a1 1 0 0 1 1 1v3.5"></path> + <path d="M20 6c.264 .112 .52 .217 .768 .315a1 1 0 0 1 .53 1.311l-2.298 5.374"></path> + </svg> + {{ anime.type }} + </span> + <span class="text-xs font-bold bg-white bg-opacity-10 text-white px-2 py-1 rounded flex items-center gap-1"> + <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor" class="size-4"> + <path fill-rule="evenodd" d="M6.75 2.25A.75.75 0 0 1 7.5 3v1.5h9V3A.75.75 0 0 1 18 3v1.5h.75a3 3 0 0 1 3 3v11.25a3 3 0 0 1-3 3H5.25a3 3 0 0 1-3-3V7.5a3 3 0 0 1 3-3H6V3a.75.75 0 0 1 .75-.75Zm13.5 9a1.5 1.5 0 0 0-1.5-1.5H5.25a1.5 1.5 0 0 0-1.5 1.5v7.5a1.5 1.5 0 0 0 1.5 1.5h13.5a1.5 1.5 0 0 0 1.5-1.5v-7.5Z" clip-rule="evenodd" /> + </svg> + {{ anime.releaseDate }} + </span> + <span class="text-xs font-bold bg-white bg-opacity-10 text-white px-2 py-1 rounded flex items-center gap-1"> + <svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="size-4"> + <path stroke-linecap="round" stroke-linejoin="round" d="M11.48 3.499a.562.562 0 0 1 1.04 0l2.125 5.111a.563.563 0 0 0 .475.345l5.518.442c.499.04.701.663.321.988l-4.204 3.602a.563.563 0 0 0-.182.557l1.285 5.385a.562.562 0 0 1-.84.61l-4.725-2.885a.562.562 0 0 0-.586 0L6.982 20.54a.562.562 0 0 1-.84-.61l1.285-5.386a.562.562 0 0 0-.182-.557l-4.204-3.602a.562.562 0 0 1 .321-.988l5.518-.442a.563.563 0 0 0 .475-.345L11.48 3.5Z"/> + </svg> + {{ anime.rating }} + </span> + </div> + <span class="text-sm font-bold flex gap-1 flex-row items-start"> + {% if anime.status == "Ongoing" %} + <span class="text-green-500 pt-1"> + <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor" class="size-3"> + <circle cx="12" cy="12" r="12" /> + </svg> + </span> + {% elif anime.status == "Not yet aired" %} + <span class="text-yellow-500 pt-1"> + <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor" class="size-3"> + <circle cx="12" cy="12" r="12" /> + </svg> + </span> + {% else %} + <span class="text-blue-500 pt-1"> + <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor" class="size-3"> + <circle cx="12" cy="12" r="12" /> + </svg> + </span> + {% endif %} + <span> + {{ anime.title.english }} + </span> + </span> + </a> + {% endif %} +{% endfor %}
\ No newline at end of file diff --git a/templates/partials/sidebarwidecard_render.html b/templates/partials/sidebarwidecard_render.html new file mode 100644 index 0000000..9e431dc --- /dev/null +++ b/templates/partials/sidebarwidecard_render.html @@ -0,0 +1,68 @@ +{% for anime in data %} + {% if anime.title.english %} + <a href="#" class="flex flex-row w-full gap-4 bg-white bg-opacity-10 p-2 rounded hover:bg-opacity-20"> + <img src="{{ anime.image }}" alt="{{ anime.title.english }}" class="rounded-lg w-32 h-auto object-cover"/> + <div class="flex flex-col gap-2"> + <span class="text-sm font-bold flex gap-1 flex-row items-start"> + {% if anime.status == "Ongoing" %} + <span class="text-green-500 pt-1"> + <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor" class="size-3"> + <circle cx="12" cy="12" r="12" /> + </svg> + </span> + {% elif anime.status == "Not yet aired" %} + <span class="text-yellow-500 pt-1"> + <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor" class="size-3"> + <circle cx="12" cy="12" r="12" /> + </svg> + </span> + {% else %} + <span class="text-blue-500 pt-1"> + <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor" class="size-3"> + <circle cx="12" cy="12" r="12" /> + </svg> + </span> + {% endif %} + <span> + {{ anime.title.english }} + </span> + </span> + <div class="text-sm text-gray-400 w-full overflow-auto no-scrollbar max-h-24 max-w-max mb-2"> + {{ anime.description|safe }} + </div> + <div class="inline-flex gap-2 flex-wrap"> + <span class="text-xs font-bold bg-white bg-opacity-10 text-white px-2 py-1 rounded flex items-center gap-1"> + <svg stroke="currentColor" fill="none" stroke-width="2" viewBox="0 0 24 24" stroke-linecap="round" stroke-linejoin="round" height="1em" width="1em" xmlns="http://www.w3.org/2000/svg" class="mr-1"> + <path d="M3.604 7.197l7.138 -3.109a.96 .96 0 0 1 1.27 .527l4.924 11.902a1 1 0 0 1 -.514 1.304l-7.137 3.109a.96 .96 0 0 1 -1.271 -.527l-4.924 -11.903a1 1 0 0 1 .514 -1.304z"></path> + <path d="M15 4h1a1 1 0 0 1 1 1v3.5"></path> + <path d="M20 6c.264 .112 .52 .217 .768 .315a1 1 0 0 1 .53 1.311l-2.298 5.374"></path> + </svg> + {{ anime.type }} + </span> + <span class="text-xs font-bold bg-white bg-opacity-10 text-white px-2 py-1 rounded flex items-center gap-1"> + <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor" class="size-4"> + <path fill-rule="evenodd" d="M6.75 2.25A.75.75 0 0 1 7.5 3v1.5h9V3A.75.75 0 0 1 18 3v1.5h.75a3 3 0 0 1 3 3v11.25a3 3 0 0 1-3 3H5.25a3 3 0 0 1-3-3V7.5a3 3 0 0 1 3-3H6V3a.75.75 0 0 1 .75-.75Zm13.5 9a1.5 1.5 0 0 0-1.5-1.5H5.25a1.5 1.5 0 0 0-1.5 1.5v7.5a1.5 1.5 0 0 0 1.5 1.5h13.5a1.5 1.5 0 0 0 1.5-1.5v-7.5Z" clip-rule="evenodd" /> + </svg> + {{ anime.releaseDate }} + </span> + {% if anime.rating %} + <span class="text-xs font-bold bg-white bg-opacity-10 text-white px-2 py-1 rounded flex items-center gap-1"> + <svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="size-4"> + <path stroke-linecap="round" stroke-linejoin="round" d="M11.48 3.499a.562.562 0 0 1 1.04 0l2.125 5.111a.563.563 0 0 0 .475.345l5.518.442c.499.04.701.663.321.988l-4.204 3.602a.563.563 0 0 0-.182.557l1.285 5.385a.562.562 0 0 1-.84.61l-4.725-2.885a.562.562 0 0 0-.586 0L6.982 20.54a.562.562 0 0 1-.84-.61l1.285-5.386a.562.562 0 0 0-.182-.557l-4.204-3.602a.562.562 0 0 1 .321-.988l5.518-.442a.563.563 0 0 0 .475-.345L11.48 3.5Z"/> + </svg> + {{ anime.rating }} + </span> + {% endif %} + {% if anime.currentEpisode and anime.totalEpisodes %} + <span class="text-xs font-bold bg-white bg-opacity-10 text-white px-2 py-1 rounded flex items-center gap-1"> + <svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="size-4"> + <path stroke-linecap="round" stroke-linejoin="round" d="M5.25 8.25h15m-16.5 7.5h15m-1.8-13.5-3.9 19.5m-2.1-19.5-3.9 19.5"/> + </svg> + {{ anime.currentEpisode }} / {{ anime.totalEpisodes }} + </span> + {% endif %} + </div> + </div> + </a> + {% endif %} +{% endfor %}
\ No newline at end of file |
