mirror of
https://github.com/ld3z/new-manga.git
synced 2026-11-09 21:03:45 -07:00
add nsfw tag to comics
This commit is contained in:
parent
c36a374bce
commit
9f58423953
4 changed files with 10 additions and 0 deletions
|
|
@ -14,6 +14,7 @@ const isAvif = comic.md_comics.md_covers[0]?.b2key.endsWith('.avif');
|
||||||
const coverUrl = comic.md_comics.md_covers[0]
|
const coverUrl = comic.md_comics.md_covers[0]
|
||||||
? `https://meo.comick.pictures/${comic.md_comics.md_covers[0].b2key}`
|
? `https://meo.comick.pictures/${comic.md_comics.md_covers[0].b2key}`
|
||||||
: '/placeholder.png';
|
: '/placeholder.png';
|
||||||
|
const isNSFW = comic.md_comics.content_rating === 'erotica';
|
||||||
---
|
---
|
||||||
|
|
||||||
<div class="group relative bg-secondary rounded-xl overflow-visible shadow-lg transition-all duration-300 hover:-translate-y-2 hover:shadow-xl h-full flex flex-col max-w-[280px] mx-auto border border-hover/30">
|
<div class="group relative bg-secondary rounded-xl overflow-visible shadow-lg transition-all duration-300 hover:-translate-y-2 hover:shadow-xl h-full flex flex-col max-w-[280px] mx-auto border border-hover/30">
|
||||||
|
|
@ -36,6 +37,12 @@ const coverUrl = comic.md_comics.md_covers[0]
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
<div class="absolute inset-0 bg-gradient-to-t from-black/60 to-transparent opacity-0 group-hover:opacity-100 transition-opacity duration-300"></div>
|
<div class="absolute inset-0 bg-gradient-to-t from-black/60 to-transparent opacity-0 group-hover:opacity-100 transition-opacity duration-300"></div>
|
||||||
|
|
||||||
|
{isNSFW && (
|
||||||
|
<div class="absolute top-2 right-2 bg-red-500/90 text-white px-2 py-1 rounded text-xs font-bold shadow-lg backdrop-blur-[2px]">
|
||||||
|
NSFW
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="p-4 md:p-5 flex-grow flex flex-col bg-secondary relative rounded-b-xl">
|
<div class="p-4 md:p-5 flex-grow flex flex-col bg-secondary relative rounded-b-xl">
|
||||||
|
|
|
||||||
1
src/components/TypeFilter.astro
Normal file
1
src/components/TypeFilter.astro
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
|
||||||
|
|
@ -9,6 +9,7 @@ export interface Comic {
|
||||||
md_covers: {
|
md_covers: {
|
||||||
b2key: string;
|
b2key: string;
|
||||||
}[];
|
}[];
|
||||||
|
content_rating: string;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
1
src/pages/[lang]/[contentType]/[type].astro
Normal file
1
src/pages/[lang]/[contentType]/[type].astro
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue