mirror of
https://github.com/ivabus/gui
synced 2025-06-07 07:40:27 +03:00
Merge pull request #102 from teaxyz/scroll-up-on-change-route
#90 scroll up on change route
This commit is contained in:
commit
f063c576cb
2 changed files with 286 additions and 408 deletions
|
@ -1,22 +1,27 @@
|
|||
<!-- home / discover / welcome page -->
|
||||
<script lang="ts">
|
||||
import '$appcss';
|
||||
import { navigating } from '$app/stores';
|
||||
import NavBar from '$components/NavBar/NavBar.svelte';
|
||||
import FooterLinks from '$components/FooterLinks/FooterLinks.svelte';
|
||||
|
||||
import { backLink as backLinkStore } from '$libs/stores';
|
||||
|
||||
let view: HTMLElement;
|
||||
|
||||
let backLink = '';
|
||||
backLinkStore.subscribe((v) => {
|
||||
backLink = v;
|
||||
});
|
||||
|
||||
$: if ($navigating) view.scrollTop = 0;
|
||||
</script>
|
||||
|
||||
<div id="main-layout">
|
||||
<nav class="border border-t-0 border-l-0 border-b-0 border-gray">
|
||||
<NavBar />
|
||||
</nav>
|
||||
<section class="pt-24">
|
||||
<section class="pt-24" bind:this={view}>
|
||||
{#if backLink}
|
||||
<header class="border-b border-gray px-16 text-3xl text-gray hover:text-primary">
|
||||
<a href={backLink}>←</a>
|
||||
|
|
687
pnpm-lock.yaml
687
pnpm-lock.yaml
File diff suppressed because it is too large
Load diff
Loading…
Reference in a new issue