move friends

This commit is contained in:
sevichecc 2022-09-03 14:23:36 +08:00
parent 21021e8fe1
commit c14ed1c151
4 changed files with 7 additions and 14 deletions

View file

@ -12,18 +12,10 @@
import '../app.css' import '../app.css'
export let data: LayoutData export let data: LayoutData
posts.set(data.res) posts.set(data.res)
tags.set(genTags(data.res)) tags.set(genTags(data.res))
onMount(
() =>
!dev &&
browser &&
registerSW({
onRegistered: r => r && setInterval(async () => await r.update(), 198964),
onRegisterError: error => console.error(error)
})
)
</script> </script>
<Head /> <Head />
@ -37,4 +29,4 @@
out:fly={{ y: -100, duration: 300 }}> out:fly={{ y: -100, duration: 300 }}>
<slot /> <slot />
</div> </div>
{/key} {/key}

View file

@ -1,9 +1,10 @@
<script lang="ts"> <script lang="ts">
// @ts-nocheck // @ts-nocheck
import Masonry from 'svelte-bricks' import type { Friend } from '$lib/config/friends'
import { friends as allFriends } from '$lib/config/friends' import { friends as allFriends } from '$lib/config/friends'
import { title as storedTitle } from '$lib/stores/title' import { title as storedTitle } from '$lib/stores/title'
import Head from '$lib/components/head.svelte' import Head from '$lib/components/head.svelte'
import Masonry from 'svelte-bricks'
import FriendComponent from '$lib/components/extra/friend.svelte' import FriendComponent from '$lib/components/extra/friend.svelte'
const rnd = Math.random() const rnd = Math.random()
@ -16,7 +17,7 @@
storedTitle.set('') storedTitle.set('')
</script> </script>
<Head /> <Head page={{ title: 'Friends', path: '/friends' }} />
<Masonry <Masonry
{items} {items}
@ -28,4 +29,4 @@
bind:width bind:width
bind:height> bind:height>
<FriendComponent {item} /> <FriendComponent {item} />
</Masonry> </Masonry>