diff options
| author | zephex-alt <[email protected]> | 2024-05-04 18:18:30 +0000 |
|---|---|---|
| committer | GitHub <[email protected]> | 2024-05-04 18:18:30 +0000 |
| commit | a6c3531821aa10d80cc93d1809cbc45943c2c830 (patch) | |
| tree | 0b9fb3df41a4fb23283b730d699dacaf1ed9a7f3 /src/app/anime/top-airing | |
| parent | Update README.md (diff) | |
| download | dramalama-a6c3531821aa10d80cc93d1809cbc45943c2c830.tar.xz dramalama-a6c3531821aa10d80cc93d1809cbc45943c2c830.zip | |
UI changes to improved desktop experience
Diffstat (limited to 'src/app/anime/top-airing')
| -rw-r--r-- | src/app/anime/top-airing/page.jsx | 6 | ||||
| -rw-r--r-- | src/app/anime/top-airing/trending.module.css | 65 |
2 files changed, 39 insertions, 32 deletions
diff --git a/src/app/anime/top-airing/page.jsx b/src/app/anime/top-airing/page.jsx index ab5d3af..ff329f6 100644 --- a/src/app/anime/top-airing/page.jsx +++ b/src/app/anime/top-airing/page.jsx @@ -6,6 +6,7 @@ import { preFetchAnimeInfo } from "../videoLinkfetcher"; export default async function Trending() {
const data = await test();
preFetchAnimeInfo(data);
+
return (
<div className={styles.TrendingContainer}>
<div className={styles.TrendingText}>
@@ -20,7 +21,10 @@ export default async function Trending() { href={`/anime/${item.id}`}
style={{ textDecoration: "none", color: "white" }}
>
- <div className={styles.trendingEntries} title={item.title}>
+ <div
+ className={styles.trendingEntries}
+ title={item.title}
+ >
<Image
src={`https://sup-proxy.zephex0-f6c.workers.dev/api-content?url=${item.image}`}
className={styles.trendingImage}
diff --git a/src/app/anime/top-airing/trending.module.css b/src/app/anime/top-airing/trending.module.css index 7d08a2e..31f6b16 100644 --- a/src/app/anime/top-airing/trending.module.css +++ b/src/app/anime/top-airing/trending.module.css @@ -1,21 +1,17 @@ -.TrendingText {
- display: flex;
- align-items: center;
-}
-
.TrendingText p {
- font-size: 28px;
- margin: 0px;
+ font-size: 36px;
+ margin: 0px 0px 0.5rem 0.5rem;
+ font-weight: 400;
color: var(--soft-purple);
-}
-
-.TrendingText span {
- margin-top: 6px;
+ text-align: center;
}
.trending {
- display: flex;
- overflow-x: auto;
+ display: grid;
+ grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
+ grid-gap: 0.5rem;
+ align-items: center;
+ margin-left: 0.5rem;
}
.TrendingContainer:hover .trendingEntries {
@@ -28,43 +24,50 @@ }
.trending::-webkit-scrollbar {
- height: 5px;
- width: 0px;
-}
-
-.trending::-webkit-scrollbar-thumb {
- background-color: #444444;
- border-radius: 5px;
+ height: 0px;
}
.trendingEntries {
- margin: 4px;
transition: transform 400ms ease;
background-color: #1f1f1fbb;
padding: 0.5rem;
- border-radius: 0.5rem;
+ border-radius: 0.4rem;
transition: opacity 400ms ease, transform 400ms ease;
+ display: flex;
+ flex-direction: column;
+ align-items: center;
+ justify-content: center;
}
.trendingEntries p {
text-align: center;
- margin: 5px auto;
width: auto;
max-width: 180px;
+ margin: 0.5rem 0 0 0;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}
-.trendingEntries p::-webkit-scrollbar {
- width: 2px;
+.trendingEntries img {
+ border-radius: 0.4rem;
}
-.trendingEntries p::-webkit-scrollbar-thumb {
- background-color: #444444;
- border-radius: 5px;
-}
+@media screen and (max-width: 768px) {
+ .TrendingText p {
+ text-align: start;
+ font-size: 26px;
+ margin-bottom: 1rem;
+ }
+
+ .trending {
+ display: flex;
+ overflow-x: auto;
+ overflow-y: hidden;
+ margin-top: -8px;
+ }
-.trendingImage {
- border-radius: 0.5rem;
+ .trendingEntries img {
+ width: auto;
+ }
}
|