tecitheme 0.0.20 → 0.0.21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/components/Figure.svelte
CHANGED
|
@@ -2,11 +2,12 @@
|
|
|
2
2
|
export let image;
|
|
3
3
|
export let title;
|
|
4
4
|
export let caption;
|
|
5
|
+
export let link;
|
|
5
6
|
</script>
|
|
6
7
|
|
|
7
8
|
<section class="flex justify-center not-prose mb-8">
|
|
8
9
|
<figure class="bg-white w-auto mx-auto shadow-lg border border-slate-100 p-2">
|
|
9
|
-
<a href={image}>
|
|
10
|
+
<a href={link ? link : image}>
|
|
10
11
|
<img class="w-full" src={image} alt={title} title={title}>
|
|
11
12
|
</a>
|
|
12
13
|
{#if caption}
|
|
@@ -5,6 +5,7 @@ export default class Figure extends SvelteComponentTyped<{
|
|
|
5
5
|
image: any;
|
|
6
6
|
title: any;
|
|
7
7
|
caption: any;
|
|
8
|
+
link: any;
|
|
8
9
|
}, {
|
|
9
10
|
[evt: string]: CustomEvent<any>;
|
|
10
11
|
}, {}> {
|
|
@@ -18,6 +19,7 @@ declare const __propDef: {
|
|
|
18
19
|
image: any;
|
|
19
20
|
title: any;
|
|
20
21
|
caption: any;
|
|
22
|
+
link: any;
|
|
21
23
|
};
|
|
22
24
|
events: {
|
|
23
25
|
[evt: string]: CustomEvent<any>;
|
|
@@ -13,7 +13,7 @@ import Video from './Video.svelte'
|
|
|
13
13
|
<div class="block w-full max-w-xl {data.position === 'right' ? 'mb-4 md:mb-0' : 'mb-0'}">
|
|
14
14
|
<figure>
|
|
15
15
|
<a href={data.image}>
|
|
16
|
-
<img class="w-full aspect-video object-cover border bg-black border-gray-200 shadow-md"
|
|
16
|
+
<img class="w-full aspect-video object-cover border bg-black border-gray-200 shadow-md {data.imageClass ? data.imageClass : ''}"
|
|
17
17
|
src={data.image} alt={data.name}
|
|
18
18
|
/>
|
|
19
19
|
</a>
|