tecitheme 0.0.24 → 0.1.2

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.
@@ -8,7 +8,7 @@
8
8
 
9
9
  <div class="group flex flex-col items-stretch space-y-2 border border-gray-100 p-2 hover:border-gray-200 hover:shadow-md" >
10
10
  {#if data.image}
11
- <div style="background-image: url({data.image});"
11
+ <div style="background-image: url('https://thunderheadeng-www.imgix.net{data.image}?w=600&auto=compress&auto=format');"
12
12
  class="w-full shrink-0 {halfHeight ? 'aspect-video' : 'aspect-square'} flex items-center justify-center border border-gray-200 bg-cover bg-no-repeat"
13
13
  >
14
14
  <div class="{halfHeight ? 'space-y-4' : 'space-y-8'} flex h-full w-full flex-col items-center justify-center" >
@@ -47,7 +47,7 @@
47
47
  </a>
48
48
  {#if data.text}
49
49
  <div class="flex w-full flex-1 flex-col">
50
- {data.text}
50
+ {@html data.text}
51
51
  {#if data.cardActionStyle == 'link'}
52
52
  <a class="inline-block mt-2 text-sm font-medium text-teci-blue-light" href={data.cardURL}>
53
53
  {data.cardLinkText}<span aria-hidden="true"> →</span>
@@ -7,8 +7,8 @@
7
7
 
8
8
  <section class="flex justify-center not-prose mb-8">
9
9
  <figure class="bg-white w-auto mx-auto shadow-lg border border-slate-100 p-2">
10
- <a href={link ? link : image}>
11
- <img class="w-full" src={image} alt={title} title={title}>
10
+ <a href={link ? link : 'https://thunderheadeng-www.imgix.net' + image}>
11
+ <img class="w-full" src="https://thunderheadeng-www.imgix.net{image}?auto=compress&auto=format" alt={title} title={title}>
12
12
  </a>
13
13
  {#if caption}
14
14
  <figcaption class="text-center p-2">{@html caption}</figcaption>
@@ -1,7 +1,7 @@
1
1
  <script>
2
2
  import Icon from './Icon.svelte';
3
3
  import { slide } from 'svelte/transition';
4
- import { cubicIn, cubicOut, bounceIn, bounceOut } from 'svelte/easing';
4
+ import { cubicIn, cubicOut } from 'svelte/easing';
5
5
 
6
6
  let openMenu = '';
7
7
 
@@ -81,14 +81,14 @@
81
81
 
82
82
  <!-- Flyout menu -->
83
83
  {#if openMenu == 'products'}
84
- <div
84
+ <div
85
85
  class="absolute inset-x-0 top-full z-10 transform bg-white shadow-lg"
86
86
  use:clickOutside
87
87
  on:outclick="{() => (openMenu = '')}"
88
88
  in:slide="{{ duration: 250, easing: cubicOut }}"
89
89
  out:slide="{{ duration: 150, easing: cubicIn }}"
90
90
  >
91
- <div
91
+ <div on:click="{() => (openMenu = '')}"
92
92
  class="mx-auto grid max-w-7xl gap-y-8 px-4 py-8 sm:grid-cols-2 sm:gap-8 sm:px-6 lg:grid-cols-3 lg:px-8"
93
93
  >
94
94
  <a
@@ -183,7 +183,7 @@
183
183
 
184
184
  <!-- Action Buttons -->
185
185
  <div class="relative bg-gray-50">
186
- <div
186
+ <div on:click="{() => (openMenu = '')}"
187
187
  class="mx-auto max-w-7xl space-y-6 px-4 py-5 sm:flex sm:space-y-0 sm:space-x-10 sm:px-6 lg:px-8"
188
188
  >
189
189
  <div class="flow-root">
@@ -295,7 +295,7 @@
295
295
  in:slide="{{ duration: 250, easing: cubicOut }}"
296
296
  out:slide="{{ duration: 150, easing: cubicIn }}"
297
297
  >
298
- <div
298
+ <div on:click="{() => (openMenu = '')}"
299
299
  class="relative grid gap-6 bg-white px-5 py-6 sm:gap-8 sm:p-8"
300
300
  >
301
301
  <a
@@ -406,7 +406,7 @@
406
406
  </div>
407
407
  </a>
408
408
  </div>
409
- <div
409
+ <div on:click="{() => (openMenu = '')}"
410
410
  class="space-y-6 bg-gray-50 px-5 py-5 sm:flex sm:space-y-0 sm:space-x-10 sm:px-8"
411
411
  >
412
412
  <div class="flow-root">
@@ -495,7 +495,7 @@
495
495
  in:slide="{{ duration: 250, easing: cubicOut }}"
496
496
  out:slide="{{ duration: 150, easing: cubicIn }}"
497
497
  >
498
- <div
498
+ <div on:click="{() => (openMenu = '')}"
499
499
  class="relative grid gap-6 bg-white px-5 py-6 sm:gap-8 sm:p-8"
500
500
  >
501
501
  <a
@@ -576,7 +576,7 @@
576
576
  </div>
577
577
  </a>
578
578
  </div>
579
- <div
579
+ <div on:click="{() => (openMenu = '')}"
580
580
  class="space-y-6 bg-gray-50 px-5 py-5 sm:flex sm:space-y-0 sm:space-x-10 sm:px-8"
581
581
  >
582
582
  <div class="flow-root">
@@ -664,7 +664,7 @@
664
664
  in:slide="{{ duration: 250, easing: cubicOut }}"
665
665
  out:slide="{{ duration: 150, easing: cubicIn }}"
666
666
  >
667
- <div
667
+ <div on:click="{() => (openMenu = '')}"
668
668
  class="relative grid gap-6 bg-white px-5 py-6 sm:gap-8 sm:p-8"
669
669
  >
670
670
  <a
@@ -746,7 +746,7 @@
746
746
  </a>
747
747
 
748
748
  <a
749
- href="https://www.thunderheadeng.com/pyrosim/pyrosim-licensing/#distributors"
749
+ href="https://www.thunderheadeng.com/pyrosim/licensing#international-distributors"
750
750
  class="-m-3 flex items-start p-3 transition duration-150 ease-in-out hover:bg-gray-50"
751
751
  >
752
752
  <svg
@@ -904,10 +904,10 @@
904
904
  >
905
905
  <div class="px-4 pt-5 pb-6 sm:pb-8">
906
906
  <div class="flex items-center justify-between">
907
- <a class="block" href="https://www.thunderheadeng.com">
907
+ <a on:click="{() => (openMenu = '')}" class="block" href="https://www.thunderheadeng.com">
908
908
  <img
909
909
  class="h-10 w-auto"
910
- src="https://files.thunderheadeng.com/support/images/te_logo.svg"
910
+ src="https://files.thunderheadeng.com/www/images/teci_logo.svg"
911
911
  alt="Thunderhead Engineering"
912
912
  />
913
913
  </a>
@@ -1073,7 +1073,7 @@
1073
1073
  <div class="flow-root">
1074
1074
  <a
1075
1075
  href="https://www.thunderheadeng.com/news"
1076
- class="-m-3 flex items-center p-3 text-base font-medium text-gray-900 hover:bg-gray-100"
1076
+ class="-m-3 flex items-start p-3 text-base font-medium text-gray-900 hover:bg-gray-100"
1077
1077
  >
1078
1078
  <svg
1079
1079
  xmlns="http://www.w3.org/2000/svg"
@@ -1095,7 +1095,7 @@
1095
1095
  <div class="flow-root">
1096
1096
  <a
1097
1097
  href="https://support.thunderheadeng.com/release-notes"
1098
- class="-m-3 flex items-center p-3 text-base font-medium text-gray-900 hover:bg-gray-100"
1098
+ class="-m-3 flex items-start p-3 text-base font-medium text-gray-900 hover:bg-gray-100"
1099
1099
  >
1100
1100
  <svg
1101
1101
  xmlns="http://www.w3.org/2000/svg"
@@ -1117,7 +1117,7 @@
1117
1117
  <div class="flow-root">
1118
1118
  <a
1119
1119
  href="https://store2.thunderheadeng.com/cart"
1120
- class="-m-3 flex items-center p-3 text-base font-medium text-gray-900 hover:bg-gray-100"
1120
+ class="-m-3 flex items-start p-3 text-base font-medium text-gray-900 hover:bg-gray-100"
1121
1121
  >
1122
1122
  <svg
1123
1123
  xmlns="http://www.w3.org/2000/svg"
@@ -1139,7 +1139,7 @@
1139
1139
  <div class="flow-root">
1140
1140
  <a
1141
1141
  href="https://store2.thunderheadeng.com/trial/"
1142
- class="-m-3 flex items-center p-3 text-base font-medium text-gray-900 hover:bg-gray-100"
1142
+ class="-m-3 flex items-start p-3 text-base font-medium text-gray-900 hover:bg-gray-100"
1143
1143
  >
1144
1144
  <svg
1145
1145
  xmlns="http://www.w3.org/2000/svg"
@@ -1160,7 +1160,7 @@
1160
1160
  <div class="flow-root">
1161
1161
  <a
1162
1162
  href="mailto:sales@thunderheadeng.com"
1163
- class="-m-3 flex items-center p-3 text-base font-medium text-gray-900 hover:bg-gray-100"
1163
+ class="-m-3 flex items-start p-3 text-base font-medium text-gray-900 hover:bg-gray-100"
1164
1164
  >
1165
1165
  <svg
1166
1166
  xmlns="http://www.w3.org/2000/svg"
@@ -1182,7 +1182,7 @@
1182
1182
  <div class="flow-root">
1183
1183
  <a
1184
1184
  href="mailto:support@thunderheadeng.com"
1185
- class="-m-3 flex items-center p-3 text-base font-medium text-gray-900 hover:bg-gray-100"
1185
+ class="-m-3 flex items-start p-3 text-base font-medium text-gray-900 hover:bg-gray-100"
1186
1186
  >
1187
1187
  <svg
1188
1188
  xmlns="http://www.w3.org/2000/svg"
@@ -4,17 +4,17 @@ import Video from './Video.svelte'
4
4
  export let data;
5
5
  </script>
6
6
 
7
- <section class="w-full mx-auto flex flex-col md:flex-row items-start justify-center">
7
+ <section class="w-full mx-auto flex flex-col items-center md:flex-row md:items-start justify-center">
8
8
  {#if data.v}
9
- <div class="block w-full max-w-xl {data.position === 'right' ? 'mb-4 md:mb-0' : 'mb-0'}">
9
+ <div class="block w-full max-w-xl mb-4 md:mb-0">
10
10
  <Video bind:data />
11
11
  </div>
12
12
  {:else if data.image}
13
- <div class="block w-full max-w-xl {data.position === 'right' ? 'mb-4 md:mb-0' : 'mb-0'}">
13
+ <div class="block w-full max-w-xl mb-4 md:mb-0">
14
14
  <figure>
15
- <a href={data.image}>
15
+ <a href="https://thunderheadeng-www.imgix.net{data.image}">
16
16
  <img class="w-full aspect-video object-cover border bg-black border-gray-200 shadow-md {data.imageClass ? data.imageClass : ''}"
17
- src={data.image} alt={data.name}
17
+ src="https://thunderheadeng-www.imgix.net{data.image}?w=576&ar=16:9&fit=crop&auto=compress&auto=format" alt={data.name}
18
18
  />
19
19
  </a>
20
20
  </figure>
@@ -3,27 +3,13 @@
3
3
  export let description
4
4
  export let image
5
5
  export let url
6
- export let host
7
-
8
- function imageURL(str)
9
- {
10
- var tarea = str;
11
- if (tarea.indexOf("http://") == 0 || tarea.indexOf("https://") == 0) {
12
- return true
13
- }
14
- return false
15
- }
16
6
  </script>
17
7
 
18
8
  <meta property="og:type" content="website">
19
- <meta property="og:url" content="{url}">
9
+ <meta property="og:url" content={url}>
20
10
  <meta name="og:title" content={title} >
21
11
  <meta name="og:description" content={description} >
22
- {#if imageURL(image)}
23
- <meta name="og:image" content="{image}" >
24
- {:else}
25
- <meta name="og:image" content="https://{host}/{image}" >
26
- {/if}
12
+ <meta name="og:image" content={image} >
27
13
  <meta name="twitter:card" content="summary_large_image">
28
14
  <meta name="twitter:site" content="@thunderheadeng">
29
15
  <meta name="twitter:creator" content="@thunderheadeng">
@@ -6,7 +6,6 @@ export default class MetaSocial extends SvelteComponentTyped<{
6
6
  description: any;
7
7
  image: any;
8
8
  url: any;
9
- host: any;
10
9
  }, {
11
10
  [evt: string]: CustomEvent<any>;
12
11
  }, {}> {
@@ -21,7 +20,6 @@ declare const __propDef: {
21
20
  description: any;
22
21
  image: any;
23
22
  url: any;
24
- host: any;
25
23
  };
26
24
  events: {
27
25
  [evt: string]: CustomEvent<any>;
@@ -2,25 +2,32 @@
2
2
  import { DateTime } from 'luxon';
3
3
  import { getContext } from 'svelte';
4
4
  import { paginate, PaginationNav } from 'svelte-paginate';
5
- import Icon from './Icon.svelte'
5
+ import Icon from './Icon.svelte';
6
6
 
7
7
  export let data;
8
8
 
9
- const posts = getContext('newsPosts');
9
+ let posts = getContext('newsPosts');
10
10
 
11
11
  let filteredPosts = [];
12
12
  let items = [];
13
13
  let currentPage = 1;
14
14
  let pageSize = data.pageSize;
15
+ let postLimit = data.limit;
16
+ let showPagination = true;
17
+
18
+ if (postLimit > 0) {
19
+ posts = posts.slice(0, postLimit);
20
+ postLimit <= pageSize ? (showPagination = false) : (showPagination = true);
21
+ }
15
22
 
16
23
  function termExists(arr, terms) {
17
24
  if (arr) {
18
25
  return terms.some((term) => {
19
- return arr.includes(term);
26
+ return arr.includes(term);
20
27
  });
21
28
  } else {
22
- return false
23
- }
29
+ return false;
30
+ }
24
31
  }
25
32
 
26
33
  function filterPosts(arr, terms) {
@@ -43,7 +50,7 @@
43
50
  $: paginatedItems = paginate({ items, pageSize, currentPage });
44
51
  </script>
45
52
 
46
- <div class="relative w-full mx-auto">
53
+ <div class="relative mx-auto w-full">
47
54
  <div
48
55
  class="flex flex-col justify-between space-y-4 border-b-2 border-gray-200 pb-4 sm:flex-row sm:items-end sm:space-y-0"
49
56
  >
@@ -72,80 +79,100 @@
72
79
  >
73
80
  </div>
74
81
  </div>
75
- {#if (items.length > 0)}
76
- <div class="paginator mx-auto flex justify-center pt-4">
77
- <PaginationNav
78
- totalItems="{items.length}"
79
- pageSize="{pageSize ? pageSize : 6}"
80
- currentPage="{currentPage}"
81
- limit="{1}"
82
- showStepOptions="{true}"
83
- on:setPage="{(e) => (currentPage = e.detail.page)}"
84
- />
85
- </div>
86
- <div
87
- class="grid gap-16 pt-8 md:grid-cols-2 lg:grid-cols-3 lg:gap-x-5 lg:gap-y-12"
88
- >
89
- {#each paginatedItems as post}
90
- <div class="h-full">
91
- <div class="h-full flex flex-col items-stretch ">
92
- <time
93
- class="mb-1 block text-sm text-gray-500"
94
- datetime="{post.meta.date}"
95
- >{DateTime.fromISO(post.meta.date).toLocaleString()}</time
96
- >
97
- <h2 class="mb-2 text-xl font-semibold text-gray-900">
98
- <a href="/{post.path}">
99
- {post.meta.title}
100
- </a>
101
- </h2>
102
- {#if post.meta.summary}
103
- <p class="mb-2 flex-1 text-base text-gray-500">
104
- <a href="/{post.path}">
105
- {post.meta.summary.length > 190
106
- ? post.meta.summary.substring(0, 190) + ' ...'
107
- : post.meta.summary}
108
- </a>
109
- </p>
110
- {:else}
111
- <p class="mb-2 flex-1 text-base text-red-500">
112
- Missing Summary Text
113
- </p>
114
- {/if}
115
- {#if post.meta.categories}
116
- <div class="w-full text-sm flex flex-wrap">
117
- {#each (post.meta.categories.sort()) as term}
118
- <a class="inline-block mr-2 mb-2" href="/news/{term}" rel="external">
119
- <span class="inline-flex items-center px-2.5 py-0.5 rounded-full text-xs bg-teci-blue-dark text-white">{term}</span>
120
- </a>
121
- {/each}
122
- </div>
123
- {/if}
124
- <p class="text-sm font-semibold text-teci-blue-light hover:text-teci-blue-dark">
125
- <a href="/{post.path}">
126
- Read full article<span aria-hidden="true">&nbsp;→</span>
127
- </a>
128
- </p>
82
+ {#if items.length > 0}
83
+ {#if showPagination}
84
+ <div class="paginator mx-auto flex justify-center pt-4">
85
+ <PaginationNav
86
+ totalItems="{items.length}"
87
+ pageSize="{pageSize ? pageSize : 6}"
88
+ currentPage="{currentPage}"
89
+ limit="{1}"
90
+ showStepOptions="{true}"
91
+ on:setPage="{(e) => (currentPage = e.detail.page)}"
92
+ />
129
93
  </div>
94
+ {/if}
95
+ <div
96
+ class="grid gap-8 pt-8 md:grid-cols-2 md:gap-16 lg:grid-cols-3 lg:gap-x-5 lg:gap-y-12"
97
+ >
98
+ {#each paginatedItems as post}
99
+ <div class="h-full">
100
+ <div class="flex h-full flex-col items-stretch ">
101
+ <time
102
+ class="mb-1 block text-sm text-gray-500"
103
+ datetime="{post.meta.date}"
104
+ >{DateTime.fromISO(post.meta.date).toLocaleString()}</time
105
+ >
106
+ <h2 class="mb-2 text-xl font-semibold text-gray-900">
107
+ <a href="/{post.path}">
108
+ {post.meta.title}
109
+ </a>
110
+ </h2>
111
+ {#if post.meta.summary}
112
+ <p class="mb-2 flex-1 text-base text-gray-500">
113
+ <a href="/{post.path}">
114
+ {post.meta.summary.length > 190
115
+ ? post.meta.summary.substring(0, 190) + ' ...'
116
+ : post.meta.summary}
117
+ </a>
118
+ </p>
119
+ {:else}
120
+ <p class="mb-2 flex-1 text-base text-red-500">
121
+ Missing Summary Text
122
+ </p>
123
+ {/if}
124
+ {#if post.meta.categories}
125
+ <div class="flex w-full flex-wrap text-sm">
126
+ {#each post.meta.categories.sort() as term}
127
+ <a
128
+ class="mr-2 mb-2 inline-block"
129
+ href="/news/{term}"
130
+ rel="external"
131
+ >
132
+ <span
133
+ class="inline-flex items-center rounded-full bg-teci-blue-dark px-2.5 py-0.5 text-xs text-white hover:bg-teci-blue-light"
134
+ >{term}</span
135
+ >
136
+ </a>
137
+ {/each}
138
+ </div>
139
+ {/if}
140
+ <p
141
+ class="text-sm font-semibold text-teci-blue-light hover:text-teci-blue-dark"
142
+ >
143
+ <a href="/{post.path}">
144
+ Read full article<span aria-hidden="true">&nbsp;→</span>
145
+ </a>
146
+ </p>
147
+ </div>
148
+ </div>
149
+ {/each}
130
150
  </div>
131
- {/each}
132
- </div>
133
- <div class="paginator mx-auto flex justify-center pt-8">
134
- <PaginationNav
135
- totalItems="{items.length}"
136
- pageSize="{pageSize ? pageSize : 6}"
137
- currentPage="{currentPage}"
138
- limit="{1}"
139
- showStepOptions="{true}"
140
- on:setPage="{(e) => (currentPage = e.detail.page)}"
141
- />
142
- </div>
151
+ {#if showPagination}
152
+ <div class="paginator mx-auto flex justify-center pt-8">
153
+ <PaginationNav
154
+ totalItems="{items.length}"
155
+ pageSize="{pageSize ? pageSize : 6}"
156
+ currentPage="{currentPage}"
157
+ limit="{1}"
158
+ showStepOptions="{true}"
159
+ on:setPage="{(e) => (currentPage = e.detail.page)}"
160
+ />
161
+ </div>
162
+ {/if}
163
+ {#if !showPagination}
164
+ <div class="mt-8 w-full">
165
+ <a class="btn float-right" href="/news" rel="external">All News Posts</a
166
+ >
167
+ </div>
168
+ {/if}
143
169
  {:else}
144
- <div class="prose">
145
- <p class="pt-8">
146
- Sorry, there isn't any news for you to see here.<br>
147
- Please visit the <a rel="external" href="/news">All News</a> page for an updated list.
148
- </p>
149
- </div>
170
+ <div class="prose">
171
+ <p class="pt-8">
172
+ Sorry, there isn't any news for you to see here.<br />
173
+ Please visit the <a rel="external" href="/news">All News</a> page for an
174
+ updated list.
175
+ </p>
176
+ </div>
150
177
  {/if}
151
- </div>
178
+ </div>
@@ -41,9 +41,9 @@
41
41
  host = getContext('currentHost');
42
42
 
43
43
  if (images.length > 0) {
44
- featuredImage = images[0]
44
+ featuredImage = 'https://thunderheadeng-www.imgix.net'+images[0]+'?w=1200&h=627&fit=crop&auto=compress&auto=format'
45
45
  } else {
46
- featuredImage = "https://www.thunderheadeng.com/wp-content/uploads/2022/01/femtc-brno.jpg"
46
+ featuredImage = 'https://files.thunderheadeng.com/www/images/teci_icon_250.png'
47
47
  }
48
48
  </script>
49
49
 
@@ -51,7 +51,7 @@
51
51
  <title>{title} | Thunderhead Engineering</title>
52
52
  <meta name="description" content={summary}>
53
53
  {#if browser}
54
- <MetaSocial title={title} description={summary} image={featuredImage} {url} {host} />
54
+ <MetaSocial title={title} description={summary} image={featuredImage} {url} />
55
55
  {/if}
56
56
  </svelte:head>
57
57
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tecitheme",
3
- "version": "0.0.24",
3
+ "version": "0.1.2",
4
4
  "svelte": true,
5
5
  "devDependencies": {
6
6
  "@jsdevtools/rehype-toc": "^3.0.2",
@@ -31,11 +31,11 @@
31
31
  "svelte-paginate": "^0.0.1",
32
32
  "svelte-preprocess": "^4.10.7",
33
33
  "svelte2tsx": "^0.5.10",
34
- "tailwindcss": "^3.1.1",
34
+ "tailwindcss": "^3.1.3",
35
35
  "tslib": "^2.4.0",
36
36
  "typescript": "^4.7.3",
37
37
  "uuid-by-string": "^3.0.7",
38
- "vite": "^2.9.10",
38
+ "vite": "^2.9.12",
39
39
  "vite-plugin-autoimport": "^1.6.6"
40
40
  },
41
41
  "type": "module",