Skip to content

Commit ce8e8cc

Browse files
authored
feat(tools): add thumbnail (#1470)
feat(tools): add thumbnail file
1 parent fceae35 commit ce8e8cc

File tree

4 files changed

+23
-17
lines changed

4 files changed

+23
-17
lines changed

src/routes/+layout.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@
158158

159159
<!-- use those meta tags everywhere except on the share assistant page -->
160160
<!-- feel free to refacto if there's a better way -->
161-
{#if !$page.url.pathname.includes("/assistant/") && $page.route.id !== "/assistants" && !$page.url.pathname.includes("/models/")}
161+
{#if !$page.url.pathname.includes("/assistant/") && $page.route.id !== "/assistants" && !$page.url.pathname.includes("/models/") && !$page.url.pathname.includes("/tools")}
162162
<meta property="og:title" content={envPublic.PUBLIC_APP_NAME} />
163163
<meta property="og:type" content="website" />
164164
<meta property="og:url" content="{envPublic.PUBLIC_ORIGIN || $page.url.origin}{base}" />

src/routes/tools/+layout.svelte

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,23 @@
1+
<script lang="ts">
2+
import { env as envPublic } from "$env/dynamic/public";
3+
import { isHuggingChat } from "$lib/utils/isHuggingChat";
4+
import { base } from "$app/paths";
5+
import { page } from "$app/stores";
6+
</script>
7+
8+
<svelte:head>
9+
{#if isHuggingChat}
10+
<title>HuggingChat - Tools</title>
11+
<meta property="og:title" content="HuggingChat - Tools" />
12+
<meta property="og:type" content="link" />
13+
<meta property="og:description" content="Browse HuggingChat tools made by the community." />
14+
<meta
15+
property="og:image"
16+
content="{envPublic.PUBLIC_ORIGIN ||
17+
$page.url.origin}{base}/{envPublic.PUBLIC_APP_ASSETS}/tools-thumbnail.png"
18+
/>
19+
<meta property="og:url" content={$page.url.href} />
20+
{/if}
21+
</svelte:head>
22+
123
<slot />

src/routes/tools/+page.svelte

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
<script lang="ts">
22
import type { PageData } from "./$types";
33
4-
import { env as envPublic } from "$env/dynamic/public";
54
import { isHuggingChat } from "$lib/utils/isHuggingChat";
65
76
import { goto } from "$app/navigation";
@@ -88,21 +87,6 @@
8887
};
8988
</script>
9089

91-
<svelte:head>
92-
{#if isHuggingChat}
93-
<title>HuggingChat - Tools</title>
94-
<meta property="og:title" content="HuggingChat - Tools" />
95-
<meta property="og:type" content="link" />
96-
<meta property="og:description" content="Browse HuggingChat tools made by the community." />
97-
<meta
98-
property="og:image"
99-
content="{envPublic.PUBLIC_ORIGIN ||
100-
$page.url.origin}{base}/{envPublic.PUBLIC_APP_ASSETS}/tools-thumbnail.png"
101-
/>
102-
<meta property="og:url" content={$page.url.href} />
103-
{/if}
104-
</svelte:head>
105-
10690
<div class="scrollbar-custom mr-1 h-full overflow-y-auto py-12 max-sm:pt-8 md:py-24">
10791
<div class="pt-42 mx-auto flex flex-col px-5 xl:w-[60rem] 2xl:w-[64rem]">
10892
<div class="flex items-center">
429 KB
Loading

0 commit comments

Comments
 (0)