feat: add loading
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Damillora 2022-07-25 00:21:42 +07:00
parent 9a5426c714
commit 38e97f2fee
3 changed files with 14 additions and 8 deletions

View File

@ -39,7 +39,7 @@
},
"type": "module",
"dependencies": {
"@damillora/plachta": "^1.7.0",
"@damillora/plachta": "^1.8.0",
"@tryghost/content-api": "^1.11.0",
"fitvids": "^2.1.1",
"svelte-material-icons": "^2.0.2",

View File

@ -1,7 +1,7 @@
lockfileVersion: 5.3
specifiers:
'@damillora/plachta': ^1.7.0
'@damillora/plachta': ^1.8.0
'@sveltejs/adapter-auto': next
'@sveltejs/adapter-node': ^1.0.0-next.83
'@sveltejs/kit': next
@ -30,7 +30,7 @@ specifiers:
vite: ^3.0.2
dependencies:
'@damillora/plachta': 1.7.0_svelte@3.49.0
'@damillora/plachta': 1.8.0_svelte@3.49.0
'@tryghost/content-api': 1.11.0
fitvids: 2.1.1
svelte-material-icons: 2.0.2_svelte@3.49.0
@ -66,8 +66,8 @@ packages:
resolution: {integrity: sha512-B1/plF62pt+H2IJHvApK8fdOJAVsvojvacuac8x8s+JIyqbropMyqNqHTKLm3YD8ZFLGwYeFTudU+PQ7vGvBdA==}
dev: true
/@damillora/plachta/1.7.0_svelte@3.49.0:
resolution: {integrity: sha512-CO1gAQ7BnvU9cbP8ahQkjVal1EwKJkLseU9UtTQbAGK23GYtgnT2bcNoKtS+iwRsOYH9zDp62ctliM5frs2baQ==}
/@damillora/plachta/1.8.0_svelte@3.49.0:
resolution: {integrity: sha512-eK5+7IXSGYXfD5pkySgEB3Seijd6oGV2XU8grUuFzUBIRMeiqjtE4UVdlKXSanen22Ta1w55TOyTDOmIF/14Vw==}
dependencies:
svelte-material-icons: 2.0.2_svelte@3.49.0
svelte-themes: 0.0.98
@ -275,8 +275,8 @@ packages:
resolution: {integrity: sha512-wOuvG1SN4Us4rez+tylwwwCV1psiNVOkJeM3AUWUNWg/jDQY2+HE/444y5gc+jBmRqASOm2Oeh5c1axHobwRKQ==}
dev: true
/@types/node/18.0.6:
resolution: {integrity: sha512-/xUq6H2aQm261exT6iZTMifUySEt4GR5KX8eYyY+C4MSNPqSh9oNIP7tz2GLKTlFaiBbgZNxffoR3CVRG+cljw==}
/@types/node/18.6.0:
resolution: {integrity: sha512-WZ/6I1GL0DNAo4bb01lGGKTHH8BHJyECepf11kWONg3OJoHq2WYOm16Es1V54Er7NTUXsbDCpKRKdmBc4X2xhA==}
dev: true
/@types/pug/2.0.6:
@ -286,7 +286,7 @@ packages:
/@types/sass/1.43.1:
resolution: {integrity: sha512-BPdoIt1lfJ6B7rw35ncdwBZrAssjcwzI5LByIrYs+tpXlj/CAkuVdRsgZDdP4lq5EjyWzwxZCqAoFyHKFwp32g==}
dependencies:
'@types/node': 18.0.6
'@types/node': 18.6.0
dev: true
/@types/tryghost__content-api/1.3.11:

View File

@ -12,6 +12,7 @@
</script>
<script lang="ts">
import { navigating } from '$app/stores';
import { goto } from '$app/navigation';
import { browseSettings } from '$lib/content/contentApi';
@ -21,6 +22,7 @@
import NavDarkMode from '@damillora/plachta/components/Nav/NavDarkMode.svelte';
import NavMenu from '@damillora/plachta/components/Nav/NavMenu.svelte';
import NavSearch from '@damillora/plachta/components/Nav/NavSearch.svelte';
import NavigationLoading from '@damillora/plachta/components/NavigationLoading/NavigationLoading.svelte';
import type { Load } from '@sveltejs/kit';
const doSearch = (e: any) => {
@ -33,6 +35,8 @@
export let header = '';
export let footer = '';
let loading = true;
navigating.subscribe((x) => (loading = x != null));
</script>
<svelte:head>
@ -56,3 +60,5 @@
<p>Copyright (c) 2021 Damillora</p>
</Footer>
</Base>
<NavigationLoading {loading} />