Add mock catalog

This commit is contained in:
ZXY101
2023-08-01 16:29:02 +02:00
parent 3c2199b06a
commit 995c6a98c5
20 changed files with 291 additions and 100 deletions

View File

@@ -0,0 +1,36 @@
<script lang="ts">
import { goto } from '$app/navigation';
import { currentManga } from '$lib/catalog';
import type { Manga } from '$lib/types/catalog';
import Button from './Button.svelte';
export let manga: Manga;
const { cover, currentPage, title, totalPages } = manga;
function onClick() {
currentManga.set(manga);
}
</script>
<a href={title} on:click={onClick}>
<div class="content">
{title}
<img src={cover} alt={title} />
{currentPage} / {totalPages}
</div>
</a>
<style>
img {
width: 250px;
height: 350px;
object-fit: contain;
}
.content {
display: flex;
flex-direction: column;
gap: 5px;
text-align: center;
}
</style>