refactor: ♻️ use img tag instead of inline svg

This commit is contained in:
Guz013
2023-06-23 16:26:28 -03:00
parent c2d25da670
commit fcaa77acea
2 changed files with 5 additions and 17 deletions

View File

@@ -1,28 +1,22 @@
<script lang="ts">
import type { PageData } from './$types';
export let data: PageData;
</script>
<main un-grid="~ rows-4">
<div un-h="sm" un-flex="~ justify-center items-center" un-bg="#33578a">
<!-- eslint-disable-next-line svelte/no-at-html-tags -->
{@html data.banner}
<img src="/api.svg" alt="">
</div>
<div un-h="sm" un-flex="~ justify-center items-center" un-bg="#0d1117">
<!-- eslint-disable-next-line svelte/no-at-html-tags -->
{@html data.banner}
<img src="/api.svg" alt="">
</div>
<div un-h="sm" un-flex="~ justify-center items-center" un-bg="#ffffff">
<!-- eslint-disable-next-line svelte/no-at-html-tags -->
{@html data.banner}
<img src="/api.svg" alt="">
</div>
<div un-h="sm" un-flex="~ justify-center items-center" un-bg="#0a0c10">
<!-- eslint-disable-next-line svelte/no-at-html-tags -->
{@html data.banner}
<img src="/api.svg" alt="">
</div>
<div un-h="sm" un-flex="~ justify-center items-center" un-bg="#22272e">
<!-- eslint-disable-next-line svelte/no-at-html-tags -->
{@html data.banner}
<img src="/api.svg" alt="">
</div>
</main>

View File

@@ -1,6 +0,0 @@
import type { PageLoad } from './$types';
export const load = (async ({ fetch }): Promise<{ banner: string }> => {
const banner = await (await fetch('/api.svg')).text();
return { banner };
}) satisfies PageLoad;