tecitheme 0.1.4 → 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.
@@ -10,8 +10,12 @@
10
10
 
11
11
  if (dev && data.image) {
12
12
  backgroundImage = data.image;
13
- } else {
14
- backgroundImage = 'https://thunderheadeng-www.imgix.net'+data.image+'?w=1200&h=627&fit=crop&auto=compress&auto=format';
13
+ } else if (data.image) {
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>
@@ -9,16 +9,25 @@
9
9
  let figureImage;
10
10
  let figureLink;
11
11
 
12
- if (dev) {
12
+ if (dev && image) {
13
13
  figureImage = image
14
14
  figureLink = link ? link : image
15
- } else {
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
15
+ } else if (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}
@@ -7,13 +7,29 @@ import Video from './Video.svelte'
7
7
  let figureImage;
8
8
  let figureLink;
9
9
 
10
- if (dev) {
10
+ if (dev && data.image) {
11
11
  figureImage = data.image
12
12
  figureLink = data.image
13
- } else {
13
+ } else if (data.image) {
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,10 +1,10 @@
1
1
  {
2
2
  "name": "tecitheme",
3
- "version": "0.1.4",
3
+ "version": "0.1.7",
4
4
  "svelte": true,
5
5
  "devDependencies": {
6
6
  "@jsdevtools/rehype-toc": "^3.0.2",
7
- "@sveltejs/adapter-netlify": "next",
7
+ "@sveltejs/adapter-netlify": "1.0.0-next.65",
8
8
  "@sveltejs/kit": "1.0.0-next.358",
9
9
  "@tailwindcss/forms": "^0.5.2",
10
10
  "@tailwindcss/typography": "^0.5.2",