Directly passing icon.

This commit is contained in:
Bradley Shellnut 2023-09-13 20:38:44 -07:00
parent dc121abb2a
commit db9b000073
2 changed files with 3 additions and 4 deletions

View file

@ -1,13 +1,13 @@
<script lang="ts"> <script lang="ts">
import * as Card from "$lib/components/ui/card"; import * as Card from "$lib/components/ui/card";
import logo from '$lib/assets/bored-game.png';
export let title: string; export let title: string;
export let icon: string;
</script> </script>
<Card.Root class="w-[350px]"> <Card.Root class="w-[350px]">
<Card.Header> <Card.Header>
<Card.Title class="flex place-items-center gap-1"><div class="w-8 h-8"><img src={icon} alt="Bored Game" /></div>{title}</Card.Title> <Card.Title class="flex place-items-center gap-1"><div class="w-8 h-8"><img src={logo} alt="Bored Game" /></div>{title}</Card.Title>
</Card.Header> </Card.Header>
<Card.Content> <Card.Content>
<slot /> <slot />

View file

@ -1,7 +1,6 @@
import { superValidate } from 'sveltekit-superforms/server'; import { superValidate } from 'sveltekit-superforms/server';
import { search_schema } from '$lib/zodValidation'; import { search_schema } from '$lib/zodValidation';
import type { MetaTagsProps } from 'svelte-meta-tags'; import type { MetaTagsProps } from 'svelte-meta-tags';
import logo from '$lib/assets/bored-game.png';
export const load = async ({ fetch, url }) => { export const load = async ({ fetch, url }) => {
const metaTags: MetaTagsProps = Object.freeze({ const metaTags: MetaTagsProps = Object.freeze({
@ -15,7 +14,7 @@ export const load = async ({ fetch, url }) => {
description: 'Bored Game, keep track of your games', description: 'Bored Game, keep track of your games',
images: [ images: [
{ {
url: `${new URL(url.pathname, url.origin).href}og?title=Home | Bored Game&icon=${logo}`, url: `${new URL(url.pathname, url.origin).href}og?title=Home | Bored Game`,
width: 1200, width: 1200,
height: 630 height: 630
} }