Fix scrolling
This commit is contained in:
@@ -12,6 +12,12 @@
|
|||||||
|
|
||||||
afterNavigate(() => {
|
afterNavigate(() => {
|
||||||
isReader = $page.route.id === '/[manga]/[volume]';
|
isReader = $page.route.id === '/[manga]/[volume]';
|
||||||
|
|
||||||
|
if (isReader) {
|
||||||
|
window.document.body.classList.add('reader');
|
||||||
|
} else {
|
||||||
|
window.document.body.classList.remove('reader');
|
||||||
|
}
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|||||||
@@ -1,19 +1,3 @@
|
|||||||
<script lang="ts">
|
|
||||||
import { currentVolume } from '$lib/catalog';
|
|
||||||
import { onMount } from 'svelte';
|
|
||||||
import { goto } from '$app/navigation';
|
|
||||||
|
|
||||||
const volume = $currentVolume;
|
|
||||||
|
|
||||||
onMount(() => {
|
|
||||||
if (!volume) {
|
|
||||||
goto('/');
|
|
||||||
} else {
|
|
||||||
window.document.body.classList.add('reader');
|
|
||||||
}
|
|
||||||
});
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<slot />
|
<slot />
|
||||||
|
|
||||||
<style>
|
<style>
|
||||||
|
|||||||
Reference in New Issue
Block a user