diff options
author | Wolfgang Müller | 2025-02-19 15:39:48 +0100 |
---|---|---|
committer | Wolfgang Müller | 2025-02-19 15:39:48 +0100 |
commit | 6bc3ca7032c78c77a6e2b316789938221d686d8b (patch) | |
tree | b70bdd334a825b1fe6d14603e214b993ed2ce08b /frontend/src/lib/reader/components/SliderTooltip.svelte | |
parent | 2177d004c88d1daccc9ae4808dc75b66eb0f2d3a (diff) | |
download | hircine-6bc3ca7032c78c77a6e2b316789938221d686d8b.tar.gz |
frontend: Implement a better page indicator
This replaces the very simplistic x/y page indicator with a visual bar
at the bottom of the reader that allows the user quick access to any
arbitrary page. At the margins it shows the current page number(s) and
the total amount of pages.
Diffstat (limited to 'frontend/src/lib/reader/components/SliderTooltip.svelte')
-rw-r--r-- | frontend/src/lib/reader/components/SliderTooltip.svelte | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/frontend/src/lib/reader/components/SliderTooltip.svelte b/frontend/src/lib/reader/components/SliderTooltip.svelte new file mode 100644 index 0000000..9e0322d --- /dev/null +++ b/frontend/src/lib/reader/components/SliderTooltip.svelte @@ -0,0 +1,17 @@ +<script lang="ts"> + import type { Snippet } from 'svelte'; + + let { children }: { children: Snippet } = $props(); +</script> + +<div + class="invisible absolute bottom-10 w-20 rounded-xl bg-blue-500 p-1 font-semibold text-white drop-shadow-md group-hover/page:visible" +> + {@render children()} +</div> + +<style lang="postcss"> + div { + left: calc(50% - 2.5rem); + } +</style> |