tecitheme 0.8.1 → 0.9.0
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/dist/assets/TECi_logo.svelte +177 -0
- package/dist/assets/TECi_logo.svelte.d.ts +23 -0
- package/dist/assets/js/store.d.ts +3 -0
- package/dist/assets/js/store.js +4 -0
- package/dist/components/Accordion.svelte +74 -0
- package/dist/components/Accordion.svelte.d.ts +27 -0
- package/dist/components/Banner.svelte +91 -0
- package/dist/components/Banner.svelte.d.ts +33 -0
- package/dist/components/Button.svelte +21 -0
- package/dist/components/Button.svelte.d.ts +37 -0
- package/dist/components/CTA.svelte +51 -0
- package/dist/components/CTA.svelte.d.ts +23 -0
- package/dist/components/CTASplitImage.svelte +34 -0
- package/dist/components/CTASplitImage.svelte.d.ts +23 -0
- package/dist/components/Card.svelte +91 -0
- package/dist/components/Card.svelte.d.ts +25 -0
- package/dist/components/CognitoForm.svelte +24 -0
- package/dist/components/CognitoForm.svelte.d.ts +27 -0
- package/dist/components/ContentTwoColumns.svelte +54 -0
- package/dist/components/ContentTwoColumns.svelte.d.ts +23 -0
- package/dist/components/CountrySelector.svelte +167 -0
- package/dist/components/CountrySelector.svelte.d.ts +27 -0
- package/dist/components/FeatureGrid.svelte +44 -0
- package/dist/components/FeatureGrid.svelte.d.ts +23 -0
- package/dist/components/Figure.svelte +40 -0
- package/dist/components/Figure.svelte.d.ts +29 -0
- package/dist/components/Footer.svelte +243 -0
- package/dist/components/Footer.svelte.d.ts +23 -0
- package/dist/components/Header.svelte +888 -0
- package/dist/components/Header.svelte.d.ts +30 -0
- package/dist/components/HeadingCentered.svelte +38 -0
- package/dist/components/HeadingCentered.svelte.d.ts +23 -0
- package/dist/components/Hero.svelte +82 -0
- package/dist/components/Hero.svelte.d.ts +23 -0
- package/dist/components/Icon.svelte +162 -0
- package/dist/components/Icon.svelte.d.ts +25 -0
- package/dist/components/LogoCloud.svelte +25 -0
- package/dist/components/LogoCloud.svelte.d.ts +23 -0
- package/dist/components/Math.svelte +24 -0
- package/dist/components/Math.svelte.d.ts +25 -0
- package/dist/components/MediaFeature.svelte +76 -0
- package/dist/components/MediaFeature.svelte.d.ts +23 -0
- package/dist/components/Modal.svelte +69 -0
- package/dist/components/Modal.svelte.d.ts +29 -0
- package/dist/components/NewsGrid.svelte +196 -0
- package/dist/components/NewsGrid.svelte.d.ts +23 -0
- package/dist/components/PageNav.svelte +243 -0
- package/dist/components/PageNav.svelte.d.ts +32 -0
- package/dist/components/PricingTable.svelte +100 -0
- package/dist/components/PricingTable.svelte.d.ts +23 -0
- package/dist/components/SidebarContent.svelte +124 -0
- package/dist/components/SidebarContent.svelte.d.ts +33 -0
- package/dist/components/Stats.svelte +40 -0
- package/dist/components/Stats.svelte.d.ts +23 -0
- package/dist/components/Testimonial.svelte +168 -0
- package/dist/components/Testimonial.svelte.d.ts +23 -0
- package/dist/components/ThreeColumn.svelte +20 -0
- package/dist/components/ThreeColumn.svelte.d.ts +23 -0
- package/dist/components/TrialForm.svelte +296 -0
- package/dist/components/TrialForm.svelte.d.ts +14 -0
- package/dist/components/Video.svelte +125 -0
- package/dist/components/Video.svelte.d.ts +27 -0
- package/dist/components/Wrap.svelte +12 -0
- package/dist/components/Wrap.svelte.d.ts +31 -0
- package/dist/get-content.d.ts +9 -0
- package/dist/get-content.js +98 -0
- package/dist/index.d.ts +31 -0
- package/dist/index.js +31 -0
- package/dist/layouts/blocks.svelte +108 -0
- package/dist/layouts/blocks.svelte.d.ts +47 -0
- package/dist/req_utils.d.ts +3 -0
- package/dist/req_utils.js +63 -0
- package/dist/site_config.json +13 -0
- package/dist/utils.d.ts +5 -0
- package/dist/utils.js +162 -0
- package/dist/variables.d.ts +1 -0
- package/dist/variables.js +2 -0
- package/package.json +1 -1
|
@@ -0,0 +1,296 @@
|
|
|
1
|
+
<script>import CountrySelector from "./CountrySelector.svelte";
|
|
2
|
+
import Icon from "./Icon.svelte";
|
|
3
|
+
import { onMount } from "svelte";
|
|
4
|
+
import { scrollTo, validateEmail } from "../utils.js";
|
|
5
|
+
import { variables } from "../variables";
|
|
6
|
+
onMount(() => {
|
|
7
|
+
setTimeout(() => {
|
|
8
|
+
timePassed = true;
|
|
9
|
+
}, 3000);
|
|
10
|
+
});
|
|
11
|
+
let resellerModal = false;
|
|
12
|
+
let country = "sel";
|
|
13
|
+
let name = "";
|
|
14
|
+
let email = "";
|
|
15
|
+
let product = 0;
|
|
16
|
+
let valid = false;
|
|
17
|
+
let message = "";
|
|
18
|
+
let error = "";
|
|
19
|
+
let answer = "";
|
|
20
|
+
let submitted = false;
|
|
21
|
+
let waiting = false;
|
|
22
|
+
let timePassed = false;
|
|
23
|
+
$: if (country != "sel" &&
|
|
24
|
+
name != "" &&
|
|
25
|
+
validateEmail(email) &&
|
|
26
|
+
product != 0 &&
|
|
27
|
+
answer == "" &&
|
|
28
|
+
timePassed) {
|
|
29
|
+
valid = true;
|
|
30
|
+
}
|
|
31
|
+
else {
|
|
32
|
+
valid = false;
|
|
33
|
+
}
|
|
34
|
+
$: if (submitted == true && message == "") {
|
|
35
|
+
waiting = true;
|
|
36
|
+
scrollTo("trial-request");
|
|
37
|
+
}
|
|
38
|
+
else {
|
|
39
|
+
waiting = false;
|
|
40
|
+
}
|
|
41
|
+
const submitForm = async () => {
|
|
42
|
+
submitted = true;
|
|
43
|
+
error = "";
|
|
44
|
+
try {
|
|
45
|
+
const submit = await fetch(variables.trialEndpoint, {
|
|
46
|
+
method: "POST",
|
|
47
|
+
body: JSON.stringify({
|
|
48
|
+
name,
|
|
49
|
+
email,
|
|
50
|
+
country,
|
|
51
|
+
product,
|
|
52
|
+
}),
|
|
53
|
+
});
|
|
54
|
+
message = await submit.json();
|
|
55
|
+
}
|
|
56
|
+
catch (err) {
|
|
57
|
+
console.log(err);
|
|
58
|
+
}
|
|
59
|
+
};
|
|
60
|
+
</script>
|
|
61
|
+
|
|
62
|
+
<div class="mt-10 sm:mt-0">
|
|
63
|
+
<div class="mt-8 md:grid md:grid-cols-3 md:gap-6">
|
|
64
|
+
<div class="md:col-span-1">
|
|
65
|
+
<div class="prose px-4 sm:px-0">
|
|
66
|
+
<h2>30-day Trial Request</h2>
|
|
67
|
+
<p>
|
|
68
|
+
Please complete the form and click "Send Request". <b
|
|
69
|
+
>All fields are required.</b
|
|
70
|
+
>
|
|
71
|
+
</p>
|
|
72
|
+
<p>
|
|
73
|
+
Within a few minutes, you will receive an email message containing a
|
|
74
|
+
download link.
|
|
75
|
+
</p>
|
|
76
|
+
<p>
|
|
77
|
+
If you need assistance, please send an email to <a
|
|
78
|
+
href="mailto:sales@thunderheadeng.com">sales</a
|
|
79
|
+
>.
|
|
80
|
+
</p>
|
|
81
|
+
</div>
|
|
82
|
+
</div>
|
|
83
|
+
<div class="mt-5 md:col-span-2 md:mt-0">
|
|
84
|
+
<form id="trial-request" on:submit|preventDefault={submitForm}>
|
|
85
|
+
<div class="overflow-hidden border shadow">
|
|
86
|
+
{#if message}
|
|
87
|
+
<div class="prose bg-white px-4 py-5 sm:p-6">
|
|
88
|
+
<p>
|
|
89
|
+
Thank you <strong>{message.name}</strong> for requesting a trial
|
|
90
|
+
of {#if message.product == 1}PyroSim{:else if message.product == 2}Pathfinder{:else if message.product == 3}PyroSim
|
|
91
|
+
and Pathfinder{/if}!<br />
|
|
92
|
+
You will receive an email to <strong>{message.email}</strong>
|
|
93
|
+
with your activation key{#if message.product == 3}s{/if}
|
|
94
|
+
in a few moments.
|
|
95
|
+
</p>
|
|
96
|
+
{#if message.product == 1}
|
|
97
|
+
<h3>PyroSim</h3>
|
|
98
|
+
<p>
|
|
99
|
+
To download the most recent version visit the <a
|
|
100
|
+
href="https://support.thunderheadeng.com/pyrosim/"
|
|
101
|
+
>PyroSim Support</a
|
|
102
|
+
> page.
|
|
103
|
+
</p>
|
|
104
|
+
{:else if message.product == 2}
|
|
105
|
+
<h3>Pathfinder</h3>
|
|
106
|
+
<p>
|
|
107
|
+
To download the most recent version visit the <a
|
|
108
|
+
href="https://support.thunderheadeng.com/pathfinder/"
|
|
109
|
+
>Pathfinder Support</a
|
|
110
|
+
> page.
|
|
111
|
+
</p>
|
|
112
|
+
{:else if message.product == 3}
|
|
113
|
+
<h3>PyroSim</h3>
|
|
114
|
+
<p>
|
|
115
|
+
To download the most recent version visit the <a
|
|
116
|
+
href="https://support.thunderheadeng.com/pyrosim/"
|
|
117
|
+
>PyroSim Support</a
|
|
118
|
+
> page.
|
|
119
|
+
</p>
|
|
120
|
+
<h3>Pathfinder</h3>
|
|
121
|
+
<p>
|
|
122
|
+
To download the most recent version visit the <a
|
|
123
|
+
href="https://support.thunderheadeng.com/pathfinder/"
|
|
124
|
+
>Pathfinder Support</a
|
|
125
|
+
> page.
|
|
126
|
+
</p>
|
|
127
|
+
{/if}
|
|
128
|
+
<h3>Need Help?</h3>
|
|
129
|
+
<p>
|
|
130
|
+
Please email <a href="mailto:support@thunderheadeng.com"
|
|
131
|
+
>support@thunderheadeng.com</a
|
|
132
|
+
> if you have any questions.
|
|
133
|
+
</p>
|
|
134
|
+
</div>
|
|
135
|
+
{:else if error}
|
|
136
|
+
<p>There was an error: {error}</p>
|
|
137
|
+
{:else if waiting}
|
|
138
|
+
<div id="waiting" class="mx-auto p-12">
|
|
139
|
+
<p class="pb-8 text-center font-bold">
|
|
140
|
+
Waiting for Trial Approval...
|
|
141
|
+
</p>
|
|
142
|
+
<Icon classes="h-24 w-24 mx-auto animate-pulse" />
|
|
143
|
+
</div>
|
|
144
|
+
{:else}
|
|
145
|
+
<div class="space-y-6 bg-white px-4 py-5 sm:p-6">
|
|
146
|
+
<fieldset>
|
|
147
|
+
<div>
|
|
148
|
+
<legend class="text-lg font-bold text-gray-900">
|
|
149
|
+
Personal Information
|
|
150
|
+
</legend>
|
|
151
|
+
</div>
|
|
152
|
+
<div class="flex flex-row items-center pt-4 align-middle">
|
|
153
|
+
<label
|
|
154
|
+
for="name"
|
|
155
|
+
class="block whitespace-nowrap pr-2 font-medium text-gray-700"
|
|
156
|
+
>
|
|
157
|
+
Full Name:
|
|
158
|
+
</label>
|
|
159
|
+
<input
|
|
160
|
+
id="name"
|
|
161
|
+
type="text"
|
|
162
|
+
name="name"
|
|
163
|
+
bind:value={name}
|
|
164
|
+
class="w-full border-0 border-b-2 border-gray-500 p-1"
|
|
165
|
+
/>
|
|
166
|
+
</div>
|
|
167
|
+
<div class="flex flex-row items-center pt-4 align-middle">
|
|
168
|
+
<label
|
|
169
|
+
for="email"
|
|
170
|
+
class="block pr-2 font-medium text-gray-700"
|
|
171
|
+
>
|
|
172
|
+
Email:
|
|
173
|
+
</label>
|
|
174
|
+
<input
|
|
175
|
+
id="email"
|
|
176
|
+
type="text"
|
|
177
|
+
name="email"
|
|
178
|
+
bind:value={email}
|
|
179
|
+
class="w-full border-0 border-b-2 border-gray-500 p-1"
|
|
180
|
+
/>
|
|
181
|
+
</div>
|
|
182
|
+
<div class="flex flex-row items-center pt-4 align-middle">
|
|
183
|
+
<label
|
|
184
|
+
for="country"
|
|
185
|
+
class="block pr-2 font-medium text-gray-700"
|
|
186
|
+
>
|
|
187
|
+
Country:
|
|
188
|
+
</label>
|
|
189
|
+
<input
|
|
190
|
+
id="country"
|
|
191
|
+
type="hidden"
|
|
192
|
+
name="country"
|
|
193
|
+
value={country}
|
|
194
|
+
/>
|
|
195
|
+
<CountrySelector
|
|
196
|
+
bind:selection={country}
|
|
197
|
+
bind:resellerModal
|
|
198
|
+
/>
|
|
199
|
+
</div>
|
|
200
|
+
</fieldset>
|
|
201
|
+
<fieldset>
|
|
202
|
+
<div>
|
|
203
|
+
<legend class="text-lg font-bold text-gray-900">
|
|
204
|
+
What would you like to try?
|
|
205
|
+
</legend>
|
|
206
|
+
</div>
|
|
207
|
+
<div class="mt-4 space-y-4">
|
|
208
|
+
<div class="flex items-center">
|
|
209
|
+
<input
|
|
210
|
+
id="pyrosim"
|
|
211
|
+
name="product"
|
|
212
|
+
type="radio"
|
|
213
|
+
value={1}
|
|
214
|
+
bind:group={product}
|
|
215
|
+
class="h-4 w-4 border-gray-300 text-blue-600 focus:ring-teci-blue-dark"
|
|
216
|
+
/>
|
|
217
|
+
<label
|
|
218
|
+
for="pyrosim"
|
|
219
|
+
class="ml-3 block text-sm font-medium text-gray-700"
|
|
220
|
+
>
|
|
221
|
+
PyroSim
|
|
222
|
+
</label>
|
|
223
|
+
</div>
|
|
224
|
+
<div class="flex items-center">
|
|
225
|
+
<input
|
|
226
|
+
id="pathfinder"
|
|
227
|
+
name="product"
|
|
228
|
+
type="radio"
|
|
229
|
+
value={2}
|
|
230
|
+
bind:group={product}
|
|
231
|
+
class="h-4 w-4 border-gray-300 text-blue-600 focus:ring-teci-blue-dark"
|
|
232
|
+
/>
|
|
233
|
+
<label
|
|
234
|
+
for="pathfinder"
|
|
235
|
+
class="ml-3 block text-sm font-medium text-gray-700"
|
|
236
|
+
>
|
|
237
|
+
Pathfinder
|
|
238
|
+
</label>
|
|
239
|
+
</div>
|
|
240
|
+
<div class="flex items-center">
|
|
241
|
+
<input
|
|
242
|
+
id="pyropath"
|
|
243
|
+
name="product"
|
|
244
|
+
type="radio"
|
|
245
|
+
value={3}
|
|
246
|
+
bind:group={product}
|
|
247
|
+
class="h-4 w-4 border-gray-300 text-blue-600 focus:ring-teci-blue-dark"
|
|
248
|
+
/>
|
|
249
|
+
<label
|
|
250
|
+
for="pyropath"
|
|
251
|
+
class="ml-3 block text-sm font-medium text-gray-700"
|
|
252
|
+
>
|
|
253
|
+
PyroSim and Pathfinder
|
|
254
|
+
</label>
|
|
255
|
+
</div>
|
|
256
|
+
</div>
|
|
257
|
+
</fieldset>
|
|
258
|
+
<input
|
|
259
|
+
class="confident"
|
|
260
|
+
id="answer"
|
|
261
|
+
type="text"
|
|
262
|
+
name="answer"
|
|
263
|
+
bind:value={answer}
|
|
264
|
+
placeholder="Correct answers only..."
|
|
265
|
+
/>
|
|
266
|
+
</div>
|
|
267
|
+
<div class="px-4 py-3 text-right sm:px-6">
|
|
268
|
+
<button
|
|
269
|
+
type="submit"
|
|
270
|
+
disabled={!valid}
|
|
271
|
+
class="inline-flex justify-center border border-transparent py-2 px-4 text-sm font-medium text-white shadow-sm {valid ===
|
|
272
|
+
true
|
|
273
|
+
? 'bg-teci-blue-light hover:bg-teci-blue-dark focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-offset-2'
|
|
274
|
+
: 'cursor-not-allowed bg-gray-300'}"
|
|
275
|
+
>
|
|
276
|
+
Send Request
|
|
277
|
+
</button>
|
|
278
|
+
{#if answer}
|
|
279
|
+
<p>
|
|
280
|
+
Something is wrong with the form, please email
|
|
281
|
+
support@thunderheadeng.com.
|
|
282
|
+
</p>
|
|
283
|
+
{/if}
|
|
284
|
+
</div>
|
|
285
|
+
{/if}
|
|
286
|
+
</div>
|
|
287
|
+
</form>
|
|
288
|
+
</div>
|
|
289
|
+
</div>
|
|
290
|
+
</div>
|
|
291
|
+
|
|
292
|
+
<style>
|
|
293
|
+
.confident {
|
|
294
|
+
@apply hidden;
|
|
295
|
+
}
|
|
296
|
+
</style>
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { SvelteComponent } from "svelte";
|
|
2
|
+
declare const __propDef: {
|
|
3
|
+
props: Record<string, never>;
|
|
4
|
+
events: {
|
|
5
|
+
[evt: string]: CustomEvent<any>;
|
|
6
|
+
};
|
|
7
|
+
slots: {};
|
|
8
|
+
};
|
|
9
|
+
export type TrialFormProps = typeof __propDef.props;
|
|
10
|
+
export type TrialFormEvents = typeof __propDef.events;
|
|
11
|
+
export type TrialFormSlots = typeof __propDef.slots;
|
|
12
|
+
export default class TrialForm extends SvelteComponent<TrialFormProps, TrialFormEvents, TrialFormSlots> {
|
|
13
|
+
}
|
|
14
|
+
export {};
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
<script>
|
|
2
|
+
import { onMount } from 'svelte'
|
|
3
|
+
|
|
4
|
+
export let data={};
|
|
5
|
+
export let v = undefined;
|
|
6
|
+
export let thumbnail = undefined;
|
|
7
|
+
|
|
8
|
+
let videoID="";
|
|
9
|
+
let thumb="";
|
|
10
|
+
let youtube=false;
|
|
11
|
+
let videoURL="";
|
|
12
|
+
let id
|
|
13
|
+
|
|
14
|
+
if (data.v) {
|
|
15
|
+
id = `video-${encodeURIComponent(data.v).toLowerCase()}`
|
|
16
|
+
} else if (v) {
|
|
17
|
+
id = `video-${encodeURIComponent(v).toLowerCase()}`
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
onMount(() => {
|
|
21
|
+
var lazyVideos = [].slice.call(document.querySelectorAll("video.lazy"));
|
|
22
|
+
|
|
23
|
+
if ("IntersectionObserver" in window) {
|
|
24
|
+
var lazyVideoObserver = new IntersectionObserver(function(entries, observer) {
|
|
25
|
+
entries.forEach(function(video) {
|
|
26
|
+
if (video.isIntersecting) {
|
|
27
|
+
for (var source in video.target.children) {
|
|
28
|
+
var videoSource = video.target.children[source];
|
|
29
|
+
if (typeof videoSource.tagName === "string" && videoSource.tagName === "SOURCE") {
|
|
30
|
+
videoSource.src = videoSource.dataset.src;
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
video.target.load();
|
|
35
|
+
video.target.classList.remove("lazy");
|
|
36
|
+
lazyVideoObserver.unobserve(video.target);
|
|
37
|
+
}
|
|
38
|
+
});
|
|
39
|
+
});
|
|
40
|
+
|
|
41
|
+
lazyVideos.forEach(function(lazyVideo) {
|
|
42
|
+
lazyVideoObserver.observe(lazyVideo);
|
|
43
|
+
});
|
|
44
|
+
}
|
|
45
|
+
})
|
|
46
|
+
|
|
47
|
+
if (v) {
|
|
48
|
+
if (v.includes("mp4")) {
|
|
49
|
+
youtube = false;
|
|
50
|
+
videoURL = `https://teci.imgix.net/www/videos/${v}`;
|
|
51
|
+
} else {
|
|
52
|
+
youtube = true;
|
|
53
|
+
videoID = v;
|
|
54
|
+
};
|
|
55
|
+
} else if (data.v) {
|
|
56
|
+
if (data.v.includes("mp4")) {
|
|
57
|
+
youtube = false;
|
|
58
|
+
videoURL = `https://teci.imgix.net/www/videos/${data.v}`;
|
|
59
|
+
} else {
|
|
60
|
+
youtube = true;
|
|
61
|
+
videoID = data.v;
|
|
62
|
+
};
|
|
63
|
+
} else {
|
|
64
|
+
videoID = "";
|
|
65
|
+
videoURL = "";
|
|
66
|
+
};
|
|
67
|
+
|
|
68
|
+
if (thumbnail) {
|
|
69
|
+
thumb = `https://teci.imgix.net/www/images/${thumbnail}?w=1214&fit=clip&auto=compress&auto=format`;
|
|
70
|
+
} else if (data.thumbnail) {
|
|
71
|
+
thumb = `https://teci.imgix.net/www/images/${data.thumbnail}?w=1214&fit=clip&auto=compress&auto=format`;
|
|
72
|
+
} else if (videoID) {
|
|
73
|
+
if (youtube) {
|
|
74
|
+
thumb = `https://i.ytimg.com/vi/${videoID}/maxresdefault.jpg`;
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
</script>
|
|
78
|
+
|
|
79
|
+
<section {id} class="aspect-video not-prose w-full border border-gray-200 bg-black shadow-md">
|
|
80
|
+
{#if youtube}
|
|
81
|
+
<iframe
|
|
82
|
+
title="YouTube Video ID {videoID}"
|
|
83
|
+
class="aspect-video w-full"
|
|
84
|
+
frameborder="0"
|
|
85
|
+
allow="autoplay; encrypted-media"
|
|
86
|
+
allowfullscreen
|
|
87
|
+
src="https://www.youtube.com/embed/${videoID}?autoplay=1&start=0&mute=1"
|
|
88
|
+
srcdoc="{`
|
|
89
|
+
<style>
|
|
90
|
+
body, .youtubeembed {
|
|
91
|
+
width: 100%;
|
|
92
|
+
height: 100%;
|
|
93
|
+
margin: 0;
|
|
94
|
+
position: absolute;
|
|
95
|
+
display: flex;
|
|
96
|
+
justify-content: center;
|
|
97
|
+
object-fit: cover;
|
|
98
|
+
}
|
|
99
|
+
</style>
|
|
100
|
+
<a
|
|
101
|
+
href='https://www.youtube.com/embed/${videoID}?autoplay=1&start=0&mute=1'
|
|
102
|
+
class='youtubeembed'
|
|
103
|
+
>
|
|
104
|
+
<img
|
|
105
|
+
src='${thumb}'
|
|
106
|
+
class='youtubeembed'
|
|
107
|
+
/>
|
|
108
|
+
<svg
|
|
109
|
+
version='1.1'
|
|
110
|
+
viewBox='0 0 68 48'
|
|
111
|
+
width='68px'
|
|
112
|
+
style='position: relative;'
|
|
113
|
+
>
|
|
114
|
+
<path d='M66.52,7.74c-0.78-2.93-2.49-5.41-5.42-6.19C55.79,.13,34,0,34,0S12.21,.13,6.9,1.55 C3.97,2.33,2.27,4.81,1.48,7.74C0.06,13.05,0,24,0,24s0.06,10.95,1.48,16.26c0.78,2.93,2.49,5.41,5.42,6.19 C12.21,47.87,34,48,34,48s21.79-0.13,27.1-1.55c2.93-0.78,4.64-3.26,5.42-6.19C67.94,34.95,68,24,68,24S67.94,13.05,66.52,7.74z' fill='#f00'></path>
|
|
115
|
+
<path d='M 45,24 27,14 27,34' fill='#fff'></path>
|
|
116
|
+
</svg>
|
|
117
|
+
</a>
|
|
118
|
+
`}"
|
|
119
|
+
/>
|
|
120
|
+
{:else}
|
|
121
|
+
<video class="lazy aspect-video w-full" autoplay muted loop playsinline controls poster={thumb}>
|
|
122
|
+
<source data-src={videoURL} type="video/mp4">
|
|
123
|
+
</video>
|
|
124
|
+
{/if}
|
|
125
|
+
</section>
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/** @typedef {typeof __propDef.props} VideoProps */
|
|
2
|
+
/** @typedef {typeof __propDef.events} VideoEvents */
|
|
3
|
+
/** @typedef {typeof __propDef.slots} VideoSlots */
|
|
4
|
+
export default class Video extends SvelteComponent<{
|
|
5
|
+
data?: {};
|
|
6
|
+
v?: any;
|
|
7
|
+
thumbnail?: any;
|
|
8
|
+
}, {
|
|
9
|
+
[evt: string]: CustomEvent<any>;
|
|
10
|
+
}, {}> {
|
|
11
|
+
}
|
|
12
|
+
export type VideoProps = typeof __propDef.props;
|
|
13
|
+
export type VideoEvents = typeof __propDef.events;
|
|
14
|
+
export type VideoSlots = typeof __propDef.slots;
|
|
15
|
+
import { SvelteComponent } from "svelte";
|
|
16
|
+
declare const __propDef: {
|
|
17
|
+
props: {
|
|
18
|
+
data?: {};
|
|
19
|
+
v?: any;
|
|
20
|
+
thumbnail?: any;
|
|
21
|
+
};
|
|
22
|
+
events: {
|
|
23
|
+
[evt: string]: CustomEvent<any>;
|
|
24
|
+
};
|
|
25
|
+
slots: {};
|
|
26
|
+
};
|
|
27
|
+
export {};
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/** @typedef {typeof __propDef.props} WrapProps */
|
|
2
|
+
/** @typedef {typeof __propDef.events} WrapEvents */
|
|
3
|
+
/** @typedef {typeof __propDef.slots} WrapSlots */
|
|
4
|
+
export default class Wrap extends SvelteComponent<{
|
|
5
|
+
[x: string]: any;
|
|
6
|
+
tag?: string;
|
|
7
|
+
when?: boolean;
|
|
8
|
+
}, {
|
|
9
|
+
[evt: string]: CustomEvent<any>;
|
|
10
|
+
}, {
|
|
11
|
+
default: {};
|
|
12
|
+
}> {
|
|
13
|
+
}
|
|
14
|
+
export type WrapProps = typeof __propDef.props;
|
|
15
|
+
export type WrapEvents = typeof __propDef.events;
|
|
16
|
+
export type WrapSlots = typeof __propDef.slots;
|
|
17
|
+
import { SvelteComponent } from "svelte";
|
|
18
|
+
declare const __propDef: {
|
|
19
|
+
props: {
|
|
20
|
+
[x: string]: any;
|
|
21
|
+
tag?: string;
|
|
22
|
+
when?: boolean;
|
|
23
|
+
};
|
|
24
|
+
events: {
|
|
25
|
+
[evt: string]: CustomEvent<any>;
|
|
26
|
+
};
|
|
27
|
+
slots: {
|
|
28
|
+
default: {};
|
|
29
|
+
};
|
|
30
|
+
};
|
|
31
|
+
export {};
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
// get-content.js
|
|
2
|
+
// HTML parser from https://github.com/html-to-text/node-html-to-text
|
|
3
|
+
import { convert } from "html-to-text";
|
|
4
|
+
import { PUBLIC_BUILD_MODE } from '$env/static/public';
|
|
5
|
+
|
|
6
|
+
const getContent = async (content='') => {
|
|
7
|
+
|
|
8
|
+
let indexData = [];
|
|
9
|
+
let iterableContentFiles = Object.entries([]);
|
|
10
|
+
let sortedIndex = [];
|
|
11
|
+
|
|
12
|
+
// Use 'content' variable to determine files to import.
|
|
13
|
+
switch (content) {
|
|
14
|
+
case "news":
|
|
15
|
+
iterableContentFiles = Object.entries(
|
|
16
|
+
import.meta.glob("/src/routes/news/*(!(+page)).md")
|
|
17
|
+
);
|
|
18
|
+
break;
|
|
19
|
+
default:
|
|
20
|
+
iterableContentFiles = Object.entries(
|
|
21
|
+
import.meta.glob("/src/routes/**/*(!(+page)).md")
|
|
22
|
+
);
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
const allContent = await Promise.all(
|
|
26
|
+
iterableContentFiles.map(async ([path, resolver]) => {
|
|
27
|
+
const contentPath = path.slice(11, -3);
|
|
28
|
+
const file = await resolver();
|
|
29
|
+
const metadata = file.metadata;
|
|
30
|
+
const today = new Date();
|
|
31
|
+
|
|
32
|
+
if (
|
|
33
|
+
metadata.notIndexed ||
|
|
34
|
+
(PUBLIC_BUILD_MODE=='development' ? false : metadata.draft) ||
|
|
35
|
+
(PUBLIC_BUILD_MODE=='development' ? false : new Date(metadata.date) > today)
|
|
36
|
+
) {
|
|
37
|
+
return;
|
|
38
|
+
} else {
|
|
39
|
+
var html = file.default.render().html;
|
|
40
|
+
var plaintext = convert(html, {
|
|
41
|
+
baseElements: {
|
|
42
|
+
orderBy: "occurrence",
|
|
43
|
+
},
|
|
44
|
+
wordwrap: false,
|
|
45
|
+
selectors: [
|
|
46
|
+
{ selector: "h1", format: "skip" },
|
|
47
|
+
{ selector: "h2", options: { uppercase: false } },
|
|
48
|
+
{ selector: "a", options: { ignoreHref: true } },
|
|
49
|
+
{ selector: "a.button", format: "skip" },
|
|
50
|
+
{ selector: "a.btn", format: "skip" },
|
|
51
|
+
{ selector: "aside", format: "skip" },
|
|
52
|
+
{ selector: "ul", options: { itemPrefix: "- " } },
|
|
53
|
+
{ selector: "img", format: "skip" },
|
|
54
|
+
],
|
|
55
|
+
})
|
|
56
|
+
.replace(/\n\n\n/gm, " ")
|
|
57
|
+
.replace(/\n\n/g, " ")
|
|
58
|
+
.replace(/\n/g, " ")
|
|
59
|
+
.replace(/\"/g, "'")
|
|
60
|
+
.trim();
|
|
61
|
+
|
|
62
|
+
if (metadata && contentPath && plaintext) {
|
|
63
|
+
return {
|
|
64
|
+
meta: metadata,
|
|
65
|
+
path: contentPath,
|
|
66
|
+
text: plaintext,
|
|
67
|
+
};
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
})
|
|
71
|
+
);
|
|
72
|
+
|
|
73
|
+
for (let i = 0; i < allContent.length; i++) {
|
|
74
|
+
if (allContent[i]) {
|
|
75
|
+
let today = new Date();
|
|
76
|
+
let postdate = allContent[i].meta.date
|
|
77
|
+
? new Date(allContent[i].meta.date)
|
|
78
|
+
: today;
|
|
79
|
+
let entry = {
|
|
80
|
+
title: allContent[i].meta.title,
|
|
81
|
+
content: allContent[i].text,
|
|
82
|
+
summary: allContent[i].meta.summary,
|
|
83
|
+
date: postdate,
|
|
84
|
+
slug: allContent[i].path,
|
|
85
|
+
categories: allContent[i].meta.categories,
|
|
86
|
+
};
|
|
87
|
+
indexData.push(entry);
|
|
88
|
+
} else {
|
|
89
|
+
continue;
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
sortedIndex = indexData.slice().sort((a, b) => new Date(b.date) - new Date(a.date));
|
|
94
|
+
|
|
95
|
+
return sortedIndex;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
export default getContent
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
export * from "./utils.js";
|
|
2
|
+
export { default as getContent } from "./get-content.js";
|
|
3
|
+
export { default as Accordion } from "./components/Accordion.svelte";
|
|
4
|
+
export { default as Banner } from "./components/Banner.svelte";
|
|
5
|
+
export { default as Button } from "./components/Button.svelte";
|
|
6
|
+
export { default as Card } from "./components/Card.svelte";
|
|
7
|
+
export { default as CognitoForm } from "./components/CognitoForm.svelte";
|
|
8
|
+
export { default as ContentTwoColumns } from "./components/ContentTwoColumns.svelte";
|
|
9
|
+
export { default as CountrySelector } from "./components/CountrySelector.svelte";
|
|
10
|
+
export { default as CTA } from "./components/CTA.svelte";
|
|
11
|
+
export { default as CTASplitImage } from "./components/CTASplitImage.svelte";
|
|
12
|
+
export { default as FeatureGrid } from "./components/FeatureGrid.svelte";
|
|
13
|
+
export { default as Figure } from "./components/Figure.svelte";
|
|
14
|
+
export { default as Footer } from "./components/Footer.svelte";
|
|
15
|
+
export { default as Header } from "./components/Header.svelte";
|
|
16
|
+
export { default as HeadingCentered } from "./components/HeadingCentered.svelte";
|
|
17
|
+
export { default as Hero } from "./components/Hero.svelte";
|
|
18
|
+
export { default as Icon } from "./components/Icon.svelte";
|
|
19
|
+
export { default as LogoCloud } from "./components/LogoCloud.svelte";
|
|
20
|
+
export { default as Math } from "./components/Math.svelte";
|
|
21
|
+
export { default as MediaFeature } from "./components/MediaFeature.svelte";
|
|
22
|
+
export { default as Modal } from "./components/Modal.svelte";
|
|
23
|
+
export { default as NewsGrid } from "./components/NewsGrid.svelte";
|
|
24
|
+
export { default as PricingTable } from "./components/PricingTable.svelte";
|
|
25
|
+
export { default as SidebarContent } from "./components/SidebarContent.svelte";
|
|
26
|
+
export { default as Stats } from "./components/Stats.svelte";
|
|
27
|
+
export { default as Testimonial } from "./components/Testimonial.svelte";
|
|
28
|
+
export { default as ThreeColumn } from "./components/ThreeColumn.svelte";
|
|
29
|
+
export { default as TrialForm } from "./components/TrialForm.svelte";
|
|
30
|
+
export { default as Video } from "./components/Video.svelte";
|
|
31
|
+
export { default as Wrap } from "./components/Wrap.svelte";
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
export * from './utils.js';
|
|
2
|
+
export { default as getContent } from './get-content.js';
|
|
3
|
+
export { default as Accordion } from './components/Accordion.svelte';
|
|
4
|
+
export { default as Banner } from './components/Banner.svelte';
|
|
5
|
+
export { default as Button } from './components/Button.svelte';
|
|
6
|
+
export { default as Card } from './components/Card.svelte';
|
|
7
|
+
export { default as CognitoForm } from './components/CognitoForm.svelte';
|
|
8
|
+
export { default as ContentTwoColumns } from './components/ContentTwoColumns.svelte';
|
|
9
|
+
export { default as CountrySelector } from './components/CountrySelector.svelte';
|
|
10
|
+
export { default as CTA } from './components/CTA.svelte';
|
|
11
|
+
export { default as CTASplitImage } from './components/CTASplitImage.svelte';
|
|
12
|
+
export { default as FeatureGrid } from './components/FeatureGrid.svelte';
|
|
13
|
+
export { default as Figure } from './components/Figure.svelte';
|
|
14
|
+
export { default as Footer } from './components/Footer.svelte';
|
|
15
|
+
export { default as Header } from './components/Header.svelte';
|
|
16
|
+
export { default as HeadingCentered } from './components/HeadingCentered.svelte';
|
|
17
|
+
export { default as Hero } from './components/Hero.svelte';
|
|
18
|
+
export { default as Icon } from './components/Icon.svelte';
|
|
19
|
+
export { default as LogoCloud } from './components/LogoCloud.svelte';
|
|
20
|
+
export { default as Math } from './components/Math.svelte';
|
|
21
|
+
export { default as MediaFeature } from './components/MediaFeature.svelte';
|
|
22
|
+
export { default as Modal } from './components/Modal.svelte';
|
|
23
|
+
export { default as NewsGrid } from './components/NewsGrid.svelte';
|
|
24
|
+
export { default as PricingTable } from './components/PricingTable.svelte';
|
|
25
|
+
export { default as SidebarContent } from './components/SidebarContent.svelte';
|
|
26
|
+
export { default as Stats } from './components/Stats.svelte';
|
|
27
|
+
export { default as Testimonial } from './components/Testimonial.svelte';
|
|
28
|
+
export { default as ThreeColumn } from './components/ThreeColumn.svelte';
|
|
29
|
+
export { default as TrialForm } from './components/TrialForm.svelte';
|
|
30
|
+
export { default as Video } from './components/Video.svelte';
|
|
31
|
+
export { default as Wrap } from './components/Wrap.svelte';
|