chore: migrate to svelte 5
This commit is contained in:
@@ -1,17 +1,29 @@
|
||||
<script>
|
||||
import ImageTile from "./ImageTile.svelte";
|
||||
/** @type {string} **/
|
||||
export let src;
|
||||
/** @type {string} **/
|
||||
export let href;
|
||||
/** @type {"_self" | "_blank" | "_parent" | "_top" } **/
|
||||
export let target = "_self";
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* @typedef {Object} Props
|
||||
* @property {string} src
|
||||
* @property {string} href
|
||||
* @property {"_self" | "_blank" | "_parent" | "_top" } [target]
|
||||
* @property {import('svelte').Snippet} [children]
|
||||
*/
|
||||
|
||||
/** @type {Props} */
|
||||
let {
|
||||
src,
|
||||
href,
|
||||
target = "_self",
|
||||
children
|
||||
} = $props();
|
||||
</script>
|
||||
|
||||
<div>
|
||||
<ImageTile {src}>
|
||||
<a {href} {target} class="flex items-center justify-center h-full">
|
||||
<slot />
|
||||
{@render children?.()}
|
||||
</a>
|
||||
</ImageTile>
|
||||
</div>
|
||||
|
||||
@@ -1,6 +1,13 @@
|
||||
<script>
|
||||
/** @string */
|
||||
export let src;
|
||||
|
||||
/**
|
||||
* @typedef {Object} Props
|
||||
* @property {any} src
|
||||
* @property {import('svelte').Snippet} [children]
|
||||
*/
|
||||
|
||||
/** @type {Props} */
|
||||
let { src, children } = $props();
|
||||
</script>
|
||||
|
||||
<div class="grid grid-cols-1 grid-rows-1">
|
||||
@@ -9,6 +16,6 @@
|
||||
class="row-start-1 col-start-1 pointer-events-none w-full h-96 object-cover"
|
||||
/>
|
||||
<div class="row-start-1 col-start-1">
|
||||
<slot />
|
||||
{@render children?.()}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -12,11 +12,17 @@
|
||||
smartLists: true,
|
||||
smartypants: false,
|
||||
});
|
||||
/* @type {string} */
|
||||
export let src;
|
||||
|
||||
/**
|
||||
* @typedef {Object} Props
|
||||
* @property {string} src
|
||||
*/
|
||||
|
||||
/** @type {Props} */
|
||||
let { src } = $props();
|
||||
|
||||
/* @type {Element[]} */
|
||||
let content = [];
|
||||
let content = $state([]);
|
||||
|
||||
onMount(async () => {
|
||||
const DOM_PARSER = new DOMParser();
|
||||
|
||||
@@ -1,8 +1,15 @@
|
||||
<script>
|
||||
import "../app.css";
|
||||
/**
|
||||
* @typedef {Object} Props
|
||||
* @property {import('svelte').Snippet} [children]
|
||||
*/
|
||||
|
||||
/** @type {Props} */
|
||||
let { children } = $props();
|
||||
</script>
|
||||
|
||||
<header class="fixed z-50 mix-blend-difference p-1">
|
||||
<a href="/" class="text-white text-2xl">schreifuchs.ch</a>
|
||||
</header>
|
||||
<slot />
|
||||
{@render children?.()}
|
||||
|
||||
Reference in New Issue
Block a user