misc: change svelte:head
This commit is contained in:
1 parent
39ce616d0d
commit
ff3246c0a6
5 files changed
+36
-52
No files matched your search
@@ -14,23 +14,32 @@
|
||||
|
||||
<svelte:head>
|
||||
<title>{data.posts.posts[0]?.community.name}</title>
|
||||
<meta
|
||||
name="og:title"
|
||||
content={data.community.community_view.community.name}
|
||||
/>
|
||||
{#if data.community.community_view.community.description}
|
||||
<meta
|
||||
name="og:description"
|
||||
content={data.community.community_view.community.description}
|
||||
/>
|
||||
{/if}
|
||||
<meta name="og:url" content={$page.url.toString()} />
|
||||
</svelte:head>
|
||||
|
||||
<div class="flex flex-col md:flex-row gap-4 w-full">
|
||||
<div class="md:hidden">
|
||||
{#await data.streamed.community then community}
|
||||
<details>
|
||||
<summary class="flex flex-row">
|
||||
<div
|
||||
class="{Color.secondary} px-3 py-1 transition-colors text-sm
|
||||
<details>
|
||||
<summary class="flex flex-row">
|
||||
<div
|
||||
class="{Color.secondary} px-3 py-1 transition-colors text-sm
|
||||
rounded-md cursor-pointer mb-1"
|
||||
>
|
||||
Sidebar
|
||||
</div>
|
||||
</summary>
|
||||
<CommunityCard community_view={community.community_view} />
|
||||
</details>
|
||||
{/await}
|
||||
>
|
||||
Sidebar
|
||||
</div>
|
||||
</summary>
|
||||
<CommunityCard community_view={data.community.community_view} />
|
||||
</details>
|
||||
</div>
|
||||
<div class="flex flex-col gap-4 max-w-full w-full">
|
||||
<div class="flex flex-col sm:flex-row gap-4 max-w-full w-full">
|
||||
@@ -67,39 +76,6 @@
|
||||
</Button>
|
||||
</div>
|
||||
<div class="hidden md:block">
|
||||
{#await data.streamed.community}
|
||||
<Card>
|
||||
<div
|
||||
class="w-[64px] h-[64px] rounded-full bg-slate-200
|
||||
dark:bg-zinc-700 animate-pulse"
|
||||
/>
|
||||
<div
|
||||
class="w-32 h-3 bg-slate-200 dark:bg-zinc-700 animate-pulse
|
||||
rounded-md"
|
||||
/>
|
||||
<div
|
||||
class="w-64 h-3 bg-slate-200 dark:bg-zinc-700 animate-pulse
|
||||
rounded-md"
|
||||
/>
|
||||
<div
|
||||
class="w-36 h-4 bg-slate-200 dark:bg-zinc-700 animate-pulse
|
||||
rounded-md"
|
||||
/>
|
||||
<div
|
||||
class="w-full h-4 bg-slate-200 dark:bg-zinc-700 animate-pulse
|
||||
rounded-md"
|
||||
/>
|
||||
<div
|
||||
class="w-24 h-4 bg-slate-200 dark:bg-zinc-700 animate-pulse
|
||||
rounded-md"
|
||||
/>
|
||||
</Card>
|
||||
{:then community}
|
||||
<CommunityCard community_view={community.community_view} />
|
||||
{:catch}
|
||||
<Card>
|
||||
<p>Failed to load community. This is likely an issue on Lemmy's end.</p>
|
||||
</Card>
|
||||
{/await}
|
||||
<CommunityCard community_view={data.community.community_view} />
|
||||
</div>
|
||||
</div>
|
||||
@@ -16,10 +16,8 @@ export async function load(req: any) {
|
||||
sort: sort,
|
||||
auth: get(authData)?.token,
|
||||
}),
|
||||
streamed: {
|
||||
community: getClient().getCommunity({
|
||||
name: req.params.name,
|
||||
}),
|
||||
},
|
||||
community: getClient().getCommunity({
|
||||
name: req.params.name,
|
||||
}),
|
||||
}
|
||||
}
|
||||
@@ -66,7 +66,7 @@
|
||||
}
|
||||
</script>
|
||||
|
||||
<svelte:head>Login</svelte:head>
|
||||
<svelte:head><title>Login</title></svelte:head>
|
||||
|
||||
<!-- <div
|
||||
class="p-4 absolute top-[50%] left-[50%] translate-x-[-50%]
|
||||
|
||||
@@ -18,6 +18,7 @@
|
||||
import RelativeDate from '$lib/components/util/RelativeDate.svelte'
|
||||
import CommunityCard from '$lib/components/community/CommunityCard.svelte'
|
||||
import Button from '$lib/components/input/Button.svelte'
|
||||
import { page } from '$app/stores'
|
||||
|
||||
export let data
|
||||
|
||||
@@ -41,6 +42,14 @@
|
||||
|
||||
<svelte:head>
|
||||
<title>{data.post.post_view.post.name}</title>
|
||||
<meta property="og:title" content={data.post.post_view.post.name} />
|
||||
<meta property="og:url" content={$page.url.toString()} />
|
||||
{#if isImage(post.url)}
|
||||
<meta property="og:image" content={post.url} />
|
||||
{/if}
|
||||
{#if post.body}
|
||||
<meta property="og:description" content={post.body} />
|
||||
{/if}
|
||||
</svelte:head>
|
||||
|
||||
<div class="flex flex-col gap-2">
|
||||
|
||||
Reference in new issue
Block a user