summaryrefslogtreecommitdiffstatshomepage
path: root/frontend/src/lib/reader/ReaderPage.svelte
blob: 4a19c6e7d449294529c312844213c858b62f157b (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
<script lang="ts">
	import type { PageFragment } from '$gql/graphql';
	import { src } from '$lib/Utils';
	import type { MouseEventHandler } from 'svelte/elements';

	interface Props {
		page: PageFragment;
		onclick: MouseEventHandler<HTMLDivElement>;
	}

	let { page, onclick }: Props = $props();
</script>

<!-- svelte-ignore a11y_click_events_have_key_events -->
<!-- svelte-ignore a11y_no_static_element_interactions -->
<div class="flex w-full" {onclick}>
	<img
		class="h-auto w-auto object-contain"
		width={page.image.width}
		height={page.image.height}
		src={src(page.image, 'full')}
		alt={page.path}
	/>
</div>

<style>
	div {
		justify-content: var(--justify);
	}
</style>