tecitheme 0.0.23 → 0.1.1
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/Card.svelte
CHANGED
|
@@ -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>
|
package/components/Header.svelte
CHANGED
|
@@ -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
|
|
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/
|
|
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
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
export let description
|
|
4
4
|
export let image
|
|
5
5
|
export let url
|
|
6
|
+
export let host
|
|
6
7
|
|
|
7
8
|
function imageURL(str)
|
|
8
9
|
{
|
|
@@ -15,13 +16,13 @@
|
|
|
15
16
|
</script>
|
|
16
17
|
|
|
17
18
|
<meta property="og:type" content="website">
|
|
18
|
-
<meta property="og:url" content="{url
|
|
19
|
+
<meta property="og:url" content="{url}">
|
|
19
20
|
<meta name="og:title" content={title} >
|
|
20
21
|
<meta name="og:description" content={description} >
|
|
21
22
|
{#if imageURL(image)}
|
|
22
23
|
<meta name="og:image" content="{image}" >
|
|
23
24
|
{:else}
|
|
24
|
-
<meta name="og:image" content="https://{
|
|
25
|
+
<meta name="og:image" content="https://{host}/{image}" >
|
|
25
26
|
{/if}
|
|
26
27
|
<meta name="twitter:card" content="summary_large_image">
|
|
27
28
|
<meta name="twitter:site" content="@thunderheadeng">
|
|
@@ -6,6 +6,7 @@ export default class MetaSocial extends SvelteComponentTyped<{
|
|
|
6
6
|
description: any;
|
|
7
7
|
image: any;
|
|
8
8
|
url: any;
|
|
9
|
+
host: any;
|
|
9
10
|
}, {
|
|
10
11
|
[evt: string]: CustomEvent<any>;
|
|
11
12
|
}, {}> {
|
|
@@ -20,6 +21,7 @@ declare const __propDef: {
|
|
|
20
21
|
description: any;
|
|
21
22
|
image: any;
|
|
22
23
|
url: any;
|
|
24
|
+
host: any;
|
|
23
25
|
};
|
|
24
26
|
events: {
|
|
25
27
|
[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
|
-
|
|
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
|
-
|
|
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
|
|
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,78 +79,100 @@
|
|
|
72
79
|
>
|
|
73
80
|
</div>
|
|
74
81
|
</div>
|
|
75
|
-
{#if
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
<div class="h-full
|
|
93
|
-
<
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
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
|
+
/>
|
|
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"> →</span>
|
|
117
145
|
</a>
|
|
118
|
-
|
|
146
|
+
</p>
|
|
119
147
|
</div>
|
|
120
|
-
{/if}
|
|
121
|
-
<p
|
|
122
|
-
class="text-sm font-semibold text-teci-blue-light hover:text-teci-blue-dark"
|
|
123
|
-
>
|
|
124
|
-
Read full article<span aria-hidden="true"> →</span>
|
|
125
|
-
</p>
|
|
126
148
|
</div>
|
|
127
|
-
|
|
149
|
+
{/each}
|
|
128
150
|
</div>
|
|
129
|
-
{
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
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}
|
|
141
169
|
{:else}
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
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>
|
|
148
177
|
{/if}
|
|
149
|
-
</div>
|
|
178
|
+
</div>
|
package/layouts/blocks.svelte
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
<script>
|
|
2
|
-
import {
|
|
2
|
+
import { browser } from '$app/env';
|
|
3
|
+
import { getContext } from 'svelte';
|
|
3
4
|
|
|
4
5
|
import CTA from '../components/CTA.svelte';
|
|
5
6
|
import HeadingCentered from '../components/HeadingCentered.svelte';
|
|
@@ -33,6 +34,11 @@
|
|
|
33
34
|
export let page_sections;
|
|
34
35
|
|
|
35
36
|
let featuredImage;
|
|
37
|
+
let url;
|
|
38
|
+
let host;
|
|
39
|
+
|
|
40
|
+
url = getContext('currentURL');
|
|
41
|
+
host = getContext('currentHost');
|
|
36
42
|
|
|
37
43
|
if (images.length > 0) {
|
|
38
44
|
featuredImage = images[0]
|
|
@@ -44,7 +50,9 @@
|
|
|
44
50
|
<svelte:head>
|
|
45
51
|
<title>{title} | Thunderhead Engineering</title>
|
|
46
52
|
<meta name="description" content={summary}>
|
|
47
|
-
|
|
53
|
+
{#if browser}
|
|
54
|
+
<MetaSocial title={title} description={summary} image={featuredImage} {url} {host} />
|
|
55
|
+
{/if}
|
|
48
56
|
</svelte:head>
|
|
49
57
|
|
|
50
58
|
<article class="flex flex-col space-y-12 {layout}">
|
package/package.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "tecitheme",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.1.1",
|
|
4
4
|
"svelte": true,
|
|
5
5
|
"devDependencies": {
|
|
6
6
|
"@jsdevtools/rehype-toc": "^3.0.2",
|
|
7
7
|
"@sveltejs/adapter-netlify": "next",
|
|
8
8
|
"@sveltejs/kit": "next",
|
|
9
|
-
"@tailwindcss/forms": "^0.5.
|
|
9
|
+
"@tailwindcss/forms": "^0.5.2",
|
|
10
10
|
"@tailwindcss/typography": "^0.5.2",
|
|
11
11
|
"@types/cookie": "^0.5.1",
|
|
12
12
|
"@typescript-eslint/eslint-plugin": "^5.27.0",
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
"autoprefixer": "^10.4.7",
|
|
15
15
|
"dotenv": "^16.0.1",
|
|
16
16
|
"encoding": "^0.1.13",
|
|
17
|
-
"eslint": "^8.
|
|
17
|
+
"eslint": "^8.17.0",
|
|
18
18
|
"eslint-config-prettier": "^8.5.0",
|
|
19
19
|
"eslint-plugin-svelte3": "^4.0.0",
|
|
20
20
|
"luxon": "^2.4.0",
|
|
@@ -27,14 +27,15 @@
|
|
|
27
27
|
"rehype-stringify": "^9.0.3",
|
|
28
28
|
"stream": "^0.0.2",
|
|
29
29
|
"svelte": "^3.48.0",
|
|
30
|
-
"svelte-check": "^2.7.
|
|
30
|
+
"svelte-check": "^2.7.2",
|
|
31
31
|
"svelte-paginate": "^0.0.1",
|
|
32
|
-
"svelte-preprocess": "^4.10.
|
|
32
|
+
"svelte-preprocess": "^4.10.7",
|
|
33
33
|
"svelte2tsx": "^0.5.10",
|
|
34
|
-
"tailwindcss": "^3.
|
|
34
|
+
"tailwindcss": "^3.1.3",
|
|
35
35
|
"tslib": "^2.4.0",
|
|
36
|
-
"typescript": "^4.7.
|
|
37
|
-
"
|
|
36
|
+
"typescript": "^4.7.3",
|
|
37
|
+
"uuid-by-string": "^3.0.7",
|
|
38
|
+
"vite": "^2.9.12",
|
|
38
39
|
"vite-plugin-autoimport": "^1.6.6"
|
|
39
40
|
},
|
|
40
41
|
"type": "module",
|