tecitheme 0.1.6 → 0.1.7

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.
@@ -11,7 +11,11 @@
11
11
  if (dev && data.image) {
12
12
  backgroundImage = data.image;
13
13
  } else if (data.image) {
14
- backgroundImage = 'https://thunderheadeng-www.imgix.net'+data.image+'?w=1200&h=627&fit=crop&auto=compress&auto=format';
14
+ if (data.image.includes("gif")) {
15
+ backgroundImage = 'https://thunderheadeng-www.imgix.net'+data.image;
16
+ } else {
17
+ backgroundImage = 'https://thunderheadeng-www.imgix.net'+data.image+'?w=1200&h=627&fit=crop&auto=compress&auto=format';
18
+ }
15
19
  }
16
20
 
17
21
  </script>
@@ -13,12 +13,21 @@
13
13
  figureImage = image
14
14
  figureLink = link ? link : image
15
15
  } else if (image) {
16
- figureImage = image.startsWith('http') ? image : 'https://thunderheadeng-www.imgix.net'+image+'?auto=compress&auto=format'
17
- figureLink = link ? link : image.startsWith('http') ? image : 'https://thunderheadeng-www.imgix.net'+image
16
+ if (image.startsWith('http')) {
17
+ figureImage = image;
18
+ figureLink = link ? link : image
19
+ } else if (image.includes("gif")) {
20
+ figureImage = 'https://thunderheadeng-www.imgix.net'+image;
21
+ figureLink = link ? link : 'https://thunderheadeng-www.imgix.net'+image
22
+ } else {
23
+ figureImage = 'https://thunderheadeng-www.imgix.net'+image+'?auto=compress&auto=format';
24
+ figureLink = link ? link : 'https://thunderheadeng-www.imgix.net'+image
25
+ }
18
26
  }
19
27
 
20
28
  </script>
21
29
 
30
+ {#if image}
22
31
  <section class="flex justify-center not-prose mb-8">
23
32
  <figure class="bg-white w-auto mx-auto shadow-lg border border-slate-100 p-2">
24
33
  <a href={figureLink}>
@@ -29,3 +38,4 @@
29
38
  {/if}
30
39
  </figure>
31
40
  </section>
41
+ {/if}
@@ -14,6 +14,22 @@ import Video from './Video.svelte'
14
14
  figureImage = data.image.startsWith('http') ? data.image : 'https://thunderheadeng-www.imgix.net'+data.image+'?w=576&ar=16:9&fit=crop&auto=compress&auto=format'
15
15
  figureLink = data.image.startsWith('http') ? data.image : 'https://thunderheadeng-www.imgix.net'+data.image
16
16
  }
17
+
18
+ if (dev && data.image) {
19
+ figureImage = data.image
20
+ figureLink = data.link ? data.link : data.image
21
+ } else if (data.image) {
22
+ if (data.image.startsWith('http')) {
23
+ figureImage = data.image;
24
+ figureLink = data.link ? data.link : data.image
25
+ } else if (data.image.includes("gif")) {
26
+ figureImage = 'https://thunderheadeng-www.imgix.net'+data.image;
27
+ figureLink = data.link ? data.link : 'https://thunderheadeng-www.imgix.net'+data.image
28
+ } else {
29
+ figureImage = 'https://thunderheadeng-www.imgix.net'+data.image+'?w=576&ar=16:9&fit=crop&auto=compress&auto=format';
30
+ figureLink = data.link ? data.link : 'https://thunderheadeng-www.imgix.net'+data.image
31
+ }
32
+ }
17
33
  </script>
18
34
 
19
35
  <section class="w-full mx-auto flex flex-col items-center md:flex-row md:items-start justify-center">
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tecitheme",
3
- "version": "0.1.6",
3
+ "version": "0.1.7",
4
4
  "svelte": true,
5
5
  "devDependencies": {
6
6
  "@jsdevtools/rehype-toc": "^3.0.2",