blob: 964c67765c6354e24c7e9cc796dd77fba12dc8ef (
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
31
32
33
34
35
36
37
38
39
40
41
42
|
<script lang="ts">
import type { PageFragment } from '$gql/graphql';
import GalleryPage from './GalleryPage.svelte';
export let pages: PageFragment[];
</script>
<div class="max-h-full gap-2 overflow-auto p-1 pr-3" tabindex="-1">
{#each pages as page, index}
<GalleryPage {page} {index} on:open on:cover />
{/each}
</div>
<style>
:root {
--gallery-image-size: 100px;
}
@media (min-width: 1280px) {
:root {
--gallery-image-size: 180px;
}
}
@media (min-width: 1600px) {
:root {
--gallery-image-size: 200px;
}
}
@media (min-width: 1920px) {
:root {
--gallery-image-size: 240px;
}
}
div {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(var(--gallery-image-size), 1fr));
grid-auto-rows: fit-content(400px);
}
</style>
|