impr: improve semantics and optimize elements
This commit is contained in:
15 files changed
+167
-195
No files matched your search
@@ -1,5 +1,6 @@
|
||||
<script lang="ts">
|
||||
import { browser } from '$app/environment'
|
||||
import CommunityItem from '$lib/components/lemmy/community/CommunityItem.svelte'
|
||||
import Location from '$lib/components/lemmy/dropdowns/Location.svelte'
|
||||
import Sort from '$lib/components/lemmy/dropdowns/Sort.svelte'
|
||||
import ViewSelect from '$lib/components/lemmy/dropdowns/ViewSelect.svelte'
|
||||
@@ -13,6 +14,7 @@
|
||||
import { site } from '$lib/lemmy.svelte.js'
|
||||
import { postFeeds } from '$lib/lemmy/postfeed.svelte.js'
|
||||
import { settings } from '$lib/settings.svelte.js'
|
||||
import { Material } from 'mono-svelte'
|
||||
import Button from 'mono-svelte/button/Button.svelte'
|
||||
import { onMount } from 'svelte'
|
||||
import { ArrowRight, ChartBar, Icon } from 'svelte-hero-icons'
|
||||
@@ -76,15 +78,6 @@
|
||||
{/snippet}
|
||||
</Header>
|
||||
|
||||
<!-- <EndPlaceholder size="md">
|
||||
{$t('cards.community.activeDay')}
|
||||
{#snippet action()}
|
||||
<span class="text-primary-900 dark:text-primary-100">
|
||||
{site.data?.site_view.counts.users_active_day.toString()}
|
||||
</span>
|
||||
{/snippet}
|
||||
</EndPlaceholder> -->
|
||||
|
||||
{#await data.feed.value}
|
||||
{#each new Array(5) as _, index}{_}
|
||||
<div
|
||||
|
||||
@@ -87,12 +87,29 @@
|
||||
</script>
|
||||
|
||||
<svelte:head>
|
||||
<title>{data.post.value.post_view.post.name}</title>
|
||||
<title>
|
||||
{data.post.value.post_view.community.title} | {data.post.value.post_view
|
||||
.post.name}
|
||||
</title>
|
||||
<meta property="og:title" content={data.post.value.post_view.post.name} />
|
||||
<meta
|
||||
property="twitter:title"
|
||||
content={data.post.value.post_view.post.name}
|
||||
/>
|
||||
{#if !data.post.value.post_view.post.local}
|
||||
<meta name="robots" content="noindex, follow" />
|
||||
{/if}
|
||||
<link rel="canonical" href={data.post.value.post_view.post.ap_id} />
|
||||
{#if data.post.value.post_view.post.body}
|
||||
<meta
|
||||
property="description"
|
||||
content={data.post.value.post_view.post.body.slice(0, 500)}
|
||||
/>
|
||||
<meta
|
||||
property="og:description"
|
||||
content={data.post.value.post_view.post.body.slice(0, 500)}
|
||||
/>
|
||||
<meta
|
||||
property="twitter:description"
|
||||
content={data.post.value.post_view.post.body.slice(0, 500)}
|
||||
/>
|
||||
{/if}
|
||||
<meta property="og:url" content={page.url.toString()} />
|
||||
{#if isImage(data.post.value.post_view.post.url)}
|
||||
<meta property="og:image" content={data.post.value.post_view.post.url} />
|
||||
@@ -110,23 +127,9 @@
|
||||
content={data.post.value.post_view.post.thumbnail_url}
|
||||
/>
|
||||
{/if}
|
||||
{#if data.post.value.post_view.post.body}
|
||||
<meta
|
||||
property="description"
|
||||
content={data.post.value.post_view.post.body.slice(0, 500)}
|
||||
/>
|
||||
<meta
|
||||
property="og:description"
|
||||
content={data.post.value.post_view.post.body.slice(0, 500)}
|
||||
/>
|
||||
<meta
|
||||
property="twitter:description"
|
||||
content={data.post.value.post_view.post.body.slice(0, 500)}
|
||||
/>
|
||||
{/if}
|
||||
</svelte:head>
|
||||
|
||||
<article class="flex flex-col gap-2 animate-pop-in">
|
||||
<article class="flex flex-col gap-2">
|
||||
<header class="flex flex-col gap-2">
|
||||
<div class="flex flex-row items-center gap-2 flex-wrap">
|
||||
<PostMeta
|
||||
|
||||
Reference in new issue
Block a user