tecitheme 0.0.2 → 0.0.6

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.
@@ -1,227 +1,248 @@
1
- <script>
2
- import CountrySelector from '../CountrySelector/index.svelte';
3
- import IconTE from '../Logos/TECi_icon_250.svelte';
4
- import { onMount } from 'svelte';
5
- import { scrollTo, validateEmail } from '../utils.js';
6
-
7
- onMount(() => {
8
- setTimeout(() => {
9
- timePassed = true;
10
- }, 3000);
11
- });
12
-
13
- let resellerModal = false;
14
- let country = 'sel';
15
- let name = '';
16
- let email = '';
17
- let product = 0;
18
- let valid = false;
19
- let message = '';
20
- let error = '';
21
- let answer = '';
22
- let submitted = false;
23
- let waiting = false;
24
- let timePassed = false;
25
-
26
- $: if (
27
- country != 'sel' &&
28
- name != '' &&
29
- validateEmail(email) &&
30
- product != 0 &&
31
- answer == '' &&
32
- timePassed
33
- ) {
34
- valid = true;
35
- } else {
36
- valid = false;
37
- }
38
-
39
- $: if (submitted == true && message == '') {
40
- waiting = true;
41
- scrollTo('trial-request');
42
- } else {
43
- waiting = false;
44
- }
45
-
46
- const submitForm = async () => {
47
- submitted = true;
48
- error = '';
49
-
50
- try {
51
- const submit = await fetch('https://hook.integromat.com/6btizsespvl1na5lrrs9617vwlfnhmvn', {
52
- method: 'POST',
53
- body: JSON.stringify({
54
- name,
55
- email,
56
- country,
57
- product
58
- })
59
- });
60
- message = await submit.json();
61
- } catch (err) {
62
- console.log(err);
63
- }
64
- };
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
+ };
65
60
  </script>
66
61
 
67
- <form id="trial-request" on:submit|preventDefault={submitForm}>
68
- <div class=" border shadow overflow-hidden">
69
- {#if message}
70
- <div class="px-4 py-5 bg-white sm:p-6 prose">
62
+ <div class="prose">
63
+ <h2>30-day Trial Request</h2>
64
+ </div>
65
+ <div class="mt-10 sm:mt-0 pb-12">
66
+ <div class="md:grid md:grid-cols-3 md:gap-6 mt-8">
67
+ <div class="md:col-span-1">
68
+ <div class=" prose px-4 sm:px-0">
71
69
  <p>
72
- Thank you <strong>{message.name}</strong> for requesting a trial of {#if message.product == 1}PyroSim{:else if message.product == 2}Pathfinder{:else if message.product == 3}PyroSim
73
- and Pathfinder{/if}!<br />
74
- You will receive an email to <strong>{message.email}</strong> with your activation key{#if message.product == 3}s{/if}
75
- in a few moments.
70
+ Please complete the form and click "Send Request". <b>All fields are required.</b>
76
71
  </p>
77
- {#if message.product == 1}
78
- <h3>PyroSim</h3>
79
- <p>
80
- To download the most recent version visit the <a
81
- href="https://support.thunderheadeng.com/pyrosim/">PyroSim Support</a
82
- > page.
83
- </p>
84
- {:else if message.product == 2}
85
- <h3>Pathfinder</h3>
86
- <p>
87
- To download the most recent version visit the <a
88
- href="https://support.thunderheadeng.com/pathfinder/">Pathfinder Support</a
89
- > page.
90
- </p>
91
- {:else if message.product == 3}
92
- <h3>PyroSim</h3>
93
- <p>
94
- To download the most recent version visit the <a
95
- href="https://support.thunderheadeng.com/pyrosim/">PyroSim Support</a
96
- > page.
97
- </p>
98
- <h3>Pathfinder</h3>
99
- <p>
100
- To download the most recent version visit the <a
101
- href="https://support.thunderheadeng.com/pathfinder/">Pathfinder Support</a
102
- > page.
103
- </p>
104
- {/if}
105
- <h3>Need Help?</h3>
72
+ <p>Within a few minutes, you will receive an email message containing a download link.</p>
106
73
  <p>
107
- Please email <a href="mailto:support@thunderheadeng.com">support@thunderheadeng.com</a> if
108
- you have any questions.
74
+ If you need assistance, please send an email to <a href="mailto:sales@thunderheadeng.com">sales</a>.
109
75
  </p>
110
76
  </div>
111
- {:else if error}
112
- <p>There was an error: {error}</p>
113
- {:else if waiting}
114
- <div id="waiting" class="p-12 mx-auto">
115
- <p class="text-center pb-8 font-bold">Waiting for Trial Approval...</p>
116
- <IconTE classes="h-24 w-24 mx-auto animate-pulse" />
117
- </div>
118
- {:else}
119
- <div class="px-4 py-5 bg-white space-y-6 sm:p-6">
120
- <fieldset>
121
- <div>
122
- <legend class="text-lg font-bold text-gray-900"> Personal Information </legend>
123
- </div>
124
- <div class="flex flex-row align-middle items-center pt-4">
125
- <label for="name" class="whitespace-nowrap pr-2 block font-medium text-gray-700">
126
- Full Name:
127
- </label>
128
- <input
129
- id="name"
130
- type="text"
131
- name="name"
132
- bind:value={name}
133
- class="w-full p-1 border-0 border-b-2 border-gray-500"
134
- />
135
- </div>
136
- <div class="flex flex-row align-middle items-center pt-4">
137
- <label for="email" class="pr-2 block font-medium text-gray-700"> Email: </label>
138
- <input
139
- id="email"
140
- type="text"
141
- name="email"
142
- bind:value={email}
143
- class="w-full p-1 border-0 border-b-2 border-gray-500"
144
- />
145
- </div>
146
- <div class="flex flex-row align-middle items-center pt-4">
147
- <label for="country" class="pr-2 block font-medium text-gray-700"> Country: </label>
148
- <input id="country" type="hidden" name="country" value={country} />
149
- <CountrySelector bind:selection={country} bind:resellerModal />
150
- </div>
151
- </fieldset>
152
- <fieldset>
153
- <div>
154
- <legend class="text-lg font-bold text-gray-900"> What would you like to try? </legend>
155
- </div>
156
- <div class="mt-4 space-y-4">
157
- <div class="flex items-center">
158
- <input
159
- id="pyrosim"
160
- name="product"
161
- type="radio"
162
- value={1}
163
- bind:group={product}
164
- class="focus:ring-teci-blue-dark h-4 w-4 text-blue-600 border-gray-300"
165
- />
166
- <label for="pyrosim" class="ml-3 block text-sm font-medium text-gray-700">
167
- PyroSim
168
- </label>
77
+ </div>
78
+ <div class="mt-5 md:mt-0 md:col-span-2">
79
+ <form id="trial-request" on:submit|preventDefault={submitForm}>
80
+ <div class="border shadow overflow-hidden">
81
+ {#if message}
82
+ <div class="px-4 py-5 bg-white sm:p-6 prose">
83
+ <p>
84
+ Thank you <strong>{message.name}</strong> for requesting a trial of {#if message.product == 1}PyroSim{:else if message.product == 2}Pathfinder{:else if message.product == 3}PyroSim
85
+ and Pathfinder{/if}!<br />
86
+ You will receive an email to <strong>{message.email}</strong> with your activation
87
+ key{#if message.product == 3}s{/if}
88
+ in a few moments.
89
+ </p>
90
+ {#if message.product == 1}
91
+ <h3>PyroSim</h3>
92
+ <p>
93
+ To download the most recent version visit the <a
94
+ href="https://support.thunderheadeng.com/pyrosim/">PyroSim Support</a
95
+ > page.
96
+ </p>
97
+ {:else if message.product == 2}
98
+ <h3>Pathfinder</h3>
99
+ <p>
100
+ To download the most recent version visit the <a
101
+ href="https://support.thunderheadeng.com/pathfinder/">Pathfinder Support</a
102
+ > page.
103
+ </p>
104
+ {:else if message.product == 3}
105
+ <h3>PyroSim</h3>
106
+ <p>
107
+ To download the most recent version visit the <a
108
+ href="https://support.thunderheadeng.com/pyrosim/">PyroSim Support</a
109
+ > page.
110
+ </p>
111
+ <h3>Pathfinder</h3>
112
+ <p>
113
+ To download the most recent version visit the <a
114
+ href="https://support.thunderheadeng.com/pathfinder/">Pathfinder Support</a
115
+ > page.
116
+ </p>
117
+ {/if}
118
+ <h3>Need Help?</h3>
119
+ <p>
120
+ Please email <a href="mailto:support@thunderheadeng.com"
121
+ >support@thunderheadeng.com</a
122
+ > if you have any questions.
123
+ </p>
169
124
  </div>
170
- <div class="flex items-center">
171
- <input
172
- id="pathfinder"
173
- name="product"
174
- type="radio"
175
- value={2}
176
- bind:group={product}
177
- class="focus:ring-teci-blue-dark h-4 w-4 text-blue-600 border-gray-300"
178
- />
179
- <label for="pathfinder" class="ml-3 block text-sm font-medium text-gray-700">
180
- Pathfinder
181
- </label>
125
+ {:else if error}
126
+ <p>There was an error: {error}</p>
127
+ {:else if waiting}
128
+ <div id="waiting" class="p-12 mx-auto">
129
+ <p class="text-center pb-8 font-bold">Waiting for Trial Approval...</p>
130
+ <Icon classes="h-24 w-24 mx-auto animate-pulse" />
182
131
  </div>
183
- <div class="flex items-center">
132
+ {:else}
133
+ <div class="px-4 py-5 bg-white space-y-6 sm:p-6">
134
+ <fieldset>
135
+ <div>
136
+ <legend class="text-lg font-bold text-gray-900"> Personal Information </legend>
137
+ </div>
138
+ <div class="flex flex-row align-middle items-center pt-4">
139
+ <label for="name" class="whitespace-nowrap pr-2 block font-medium text-gray-700">
140
+ Full Name:
141
+ </label>
142
+ <input
143
+ id="name"
144
+ type="text"
145
+ name="name"
146
+ bind:value={name}
147
+ class="w-full p-1 border-0 border-b-2 border-gray-500"
148
+ />
149
+ </div>
150
+ <div class="flex flex-row align-middle items-center pt-4">
151
+ <label for="email" class="pr-2 block font-medium text-gray-700"> Email: </label>
152
+ <input
153
+ id="email"
154
+ type="text"
155
+ name="email"
156
+ bind:value={email}
157
+ class="w-full p-1 border-0 border-b-2 border-gray-500"
158
+ />
159
+ </div>
160
+ <div class="flex flex-row align-middle items-center pt-4">
161
+ <label for="country" class="pr-2 block font-medium text-gray-700">
162
+ Country:
163
+ </label>
164
+ <input id="country" type="hidden" name="country" value={country} />
165
+ <CountrySelector bind:selection={country} bind:resellerModal />
166
+ </div>
167
+ </fieldset>
168
+ <fieldset>
169
+ <div>
170
+ <legend class="text-lg font-bold text-gray-900">
171
+ What would you like to try?
172
+ </legend>
173
+ </div>
174
+ <div class="mt-4 space-y-4">
175
+ <div class="flex items-center">
176
+ <input
177
+ id="pyrosim"
178
+ name="product"
179
+ type="radio"
180
+ value={1}
181
+ bind:group={product}
182
+ class="focus:ring-teci-blue-dark h-4 w-4 text-blue-600 border-gray-300"
183
+ />
184
+ <label for="pyrosim" class="ml-3 block text-sm font-medium text-gray-700">
185
+ PyroSim
186
+ </label>
187
+ </div>
188
+ <div class="flex items-center">
189
+ <input
190
+ id="pathfinder"
191
+ name="product"
192
+ type="radio"
193
+ value={2}
194
+ bind:group={product}
195
+ class="focus:ring-teci-blue-dark h-4 w-4 text-blue-600 border-gray-300"
196
+ />
197
+ <label for="pathfinder" class="ml-3 block text-sm font-medium text-gray-700">
198
+ Pathfinder
199
+ </label>
200
+ </div>
201
+ <div class="flex items-center">
202
+ <input
203
+ id="pyropath"
204
+ name="product"
205
+ type="radio"
206
+ value={3}
207
+ bind:group={product}
208
+ class="focus:ring-teci-blue-dark h-4 w-4 text-blue-600 border-gray-300"
209
+ />
210
+ <label for="pyropath" class="ml-3 block text-sm font-medium text-gray-700">
211
+ PyroSim and Pathfinder
212
+ </label>
213
+ </div>
214
+ </div>
215
+ </fieldset>
184
216
  <input
185
- id="pyropath"
186
- name="product"
187
- type="radio"
188
- value={3}
189
- bind:group={product}
190
- class="focus:ring-teci-blue-dark h-4 w-4 text-blue-600 border-gray-300"
217
+ class="confident"
218
+ id="answer"
219
+ type="text"
220
+ name="answer"
221
+ bind:value={answer}
222
+ placeholder="Correct answers only..."
191
223
  />
192
- <label for="pyropath" class="ml-3 block text-sm font-medium text-gray-700">
193
- PyroSim and Pathfinder
194
- </label>
195
224
  </div>
196
- </div>
197
- </fieldset>
198
- <input
199
- class="confident"
200
- id="answer"
201
- type="text"
202
- name="answer"
203
- bind:value={answer}
204
- placeholder="Correct answers only..."
205
- />
206
- </div>
207
- <div class="px-4 py-3 text-right sm:px-6">
208
- <button
209
- type="submit"
210
- disabled={!valid}
211
- class="inline-flex justify-center py-2 px-4 border border-transparent shadow-sm text-sm font-medium text-white {valid ===
212
- true
213
- ? 'bg-teci-blue-light hover:bg-teci-blue-dark focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500'
214
- : 'bg-gray-300 cursor-not-allowed'}"
215
- >
216
- Send Request
217
- </button>
218
- {#if answer}
219
- <p>Something is wrong with the form, please email support@thunderheadeng.com.</p>
220
- {/if}
221
- </div>
222
- {/if}
225
+ <div class="px-4 py-3 text-right sm:px-6">
226
+ <button
227
+ type="submit"
228
+ disabled={!valid}
229
+ class="inline-flex justify-center py-2 px-4 border border-transparent shadow-sm text-sm font-medium text-white {valid ===
230
+ true
231
+ ? 'bg-teci-blue-light hover:bg-teci-blue-dark focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500'
232
+ : 'bg-gray-300 cursor-not-allowed'}"
233
+ >
234
+ Send Request
235
+ </button>
236
+ {#if answer}
237
+ <p>Something is wrong with the form, please email support@thunderheadeng.com.</p>
238
+ {/if}
239
+ </div>
240
+ {/if}
241
+ </div>
242
+ </form>
243
+ </div>
223
244
  </div>
224
- </form>
245
+ </div>
225
246
 
226
247
  <style >
227
248
  .confident {
@@ -1,13 +1,3 @@
1
- /** @typedef {typeof __propDef.props} TrialFormProps */
2
- /** @typedef {typeof __propDef.events} TrialFormEvents */
3
- /** @typedef {typeof __propDef.slots} TrialFormSlots */
4
- export default class TrialForm extends SvelteComponentTyped<{}, {
5
- [evt: string]: CustomEvent<any>;
6
- }, {}> {
7
- }
8
- export type TrialFormProps = typeof __propDef.props;
9
- export type TrialFormEvents = typeof __propDef.events;
10
- export type TrialFormSlots = typeof __propDef.slots;
11
1
  import { SvelteComponentTyped } from "svelte";
12
2
  declare const __propDef: {
13
3
  props: {};
@@ -16,4 +6,9 @@ declare const __propDef: {
16
6
  };
17
7
  slots: {};
18
8
  };
9
+ export declare type TrialFormProps = typeof __propDef.props;
10
+ export declare type TrialFormEvents = typeof __propDef.events;
11
+ export declare type TrialFormSlots = typeof __propDef.slots;
12
+ export default class TrialForm extends SvelteComponentTyped<TrialFormProps, TrialFormEvents, TrialFormSlots> {
13
+ }
19
14
  export {};
@@ -0,0 +1,12 @@
1
+ <script>
2
+ export let v
3
+ </script>
4
+
5
+ <iframe
6
+ class="w-full aspect-video border border-slate-100 shadow-lg p-2"
7
+ src="https://www.youtube-nocookie.com/embed/{v}"
8
+ title="YouTube video player"
9
+ frameborder="0"
10
+ allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture"
11
+ allowfullscreen
12
+ />
@@ -0,0 +1,23 @@
1
+ /** @typedef {typeof __propDef.props} YtProps */
2
+ /** @typedef {typeof __propDef.events} YtEvents */
3
+ /** @typedef {typeof __propDef.slots} YtSlots */
4
+ export default class Yt extends SvelteComponentTyped<{
5
+ v: any;
6
+ }, {
7
+ [evt: string]: CustomEvent<any>;
8
+ }, {}> {
9
+ }
10
+ export type YtProps = typeof __propDef.props;
11
+ export type YtEvents = typeof __propDef.events;
12
+ export type YtSlots = typeof __propDef.slots;
13
+ import { SvelteComponentTyped } from "svelte";
14
+ declare const __propDef: {
15
+ props: {
16
+ v: any;
17
+ };
18
+ events: {
19
+ [evt: string]: CustomEvent<any>;
20
+ };
21
+ slots: {};
22
+ };
23
+ export {};
package/demodata.d.ts CHANGED
@@ -1,5 +1,4 @@
1
1
  export namespace bannerData {
2
- const showLogo: boolean;
3
2
  const showCTA: boolean;
4
3
  const shortText: string;
5
4
  const longText: string;
package/demodata.js CHANGED
@@ -1,5 +1,4 @@
1
1
  export const bannerData = {
2
- showLogo: true,
3
2
  showCTA: true,
4
3
  shortText: "Some Banner Short text in a few words.",
5
4
  longText: "Some Banner Long test text that goes on and on for a while with some information about something.",
@@ -0,0 +1,25 @@
1
+ <script>
2
+ import SectionHeaderCentered from 'tecitheme/components/SectionHeaderCentered.svelte';
3
+ import ThreeColumn from 'tecitheme/components/ThreeColumn.svelte';
4
+ import NewsGrid from 'tecitheme/components/NewsGrid.svelte';
5
+
6
+ export let title
7
+ export let page_sections
8
+ export let posts
9
+ </script>
10
+
11
+ <svelte:head>
12
+ <title>{title}</title>
13
+ </svelte:head>
14
+
15
+ {#each page_sections as section}
16
+ {#if section.block == "heading-centered"}
17
+ <SectionHeaderCentered bind:data={section} />
18
+ {:else if section.block == "three-column"}
19
+ <ThreeColumn bind:data={section.cards} />
20
+ {:else if section.block == "news-grid"}
21
+ <NewsGrid bind:data={section} bind:posts={posts} />
22
+ {:else if section.block == "content"}
23
+ <div class="content prose"><slot/></div>
24
+ {/if}
25
+ {/each}
@@ -0,0 +1,31 @@
1
+ /** @typedef {typeof __propDef.props} BlocksProps */
2
+ /** @typedef {typeof __propDef.events} BlocksEvents */
3
+ /** @typedef {typeof __propDef.slots} BlocksSlots */
4
+ export default class Blocks extends SvelteComponentTyped<{
5
+ title: any;
6
+ page_sections: any;
7
+ posts: any;
8
+ }, {
9
+ [evt: string]: CustomEvent<any>;
10
+ }, {
11
+ default: {};
12
+ }> {
13
+ }
14
+ export type BlocksProps = typeof __propDef.props;
15
+ export type BlocksEvents = typeof __propDef.events;
16
+ export type BlocksSlots = typeof __propDef.slots;
17
+ import { SvelteComponentTyped } from "svelte";
18
+ declare const __propDef: {
19
+ props: {
20
+ title: any;
21
+ page_sections: any;
22
+ posts: any;
23
+ };
24
+ events: {
25
+ [evt: string]: CustomEvent<any>;
26
+ };
27
+ slots: {
28
+ default: {};
29
+ };
30
+ };
31
+ export {};
@@ -0,0 +1,14 @@
1
+ <script>
2
+ export let title;
3
+ export let date;
4
+ </script>
5
+
6
+ <svelte:head>
7
+ <title>{title} | Thunderhead Engineering</title>
8
+ </svelte:head>
9
+
10
+ <div class="prose lg:prose-lg">
11
+ <h1>{title}</h1>
12
+ <p>Published on {date}</p>
13
+ <slot/>
14
+ </div>
@@ -0,0 +1,29 @@
1
+ /** @typedef {typeof __propDef.props} NewsProps */
2
+ /** @typedef {typeof __propDef.events} NewsEvents */
3
+ /** @typedef {typeof __propDef.slots} NewsSlots */
4
+ export default class News extends SvelteComponentTyped<{
5
+ title: any;
6
+ date: any;
7
+ }, {
8
+ [evt: string]: CustomEvent<any>;
9
+ }, {
10
+ default: {};
11
+ }> {
12
+ }
13
+ export type NewsProps = typeof __propDef.props;
14
+ export type NewsEvents = typeof __propDef.events;
15
+ export type NewsSlots = typeof __propDef.slots;
16
+ import { SvelteComponentTyped } from "svelte";
17
+ declare const __propDef: {
18
+ props: {
19
+ title: any;
20
+ date: any;
21
+ };
22
+ events: {
23
+ [evt: string]: CustomEvent<any>;
24
+ };
25
+ slots: {
26
+ default: {};
27
+ };
28
+ };
29
+ export {};