tecitheme 0.5.2 → 0.6.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/README.md +315 -2
- package/dist/components/Accordion.svelte +1 -1
- package/dist/components/Button.svelte +14 -6
- package/dist/components/Button.svelte.d.ts +10 -0
- package/dist/components/CTA.svelte +22 -12
- package/dist/components/CTASplitImage.svelte +13 -11
- package/dist/components/Card.svelte +18 -19
- package/dist/components/ContentTwoColumns.svelte +12 -10
- package/dist/components/FeatureGrid.svelte +5 -8
- package/dist/components/Figure.svelte +1 -3
- package/dist/components/Footer.svelte +11 -30
- package/dist/components/Header.svelte +21 -21
- package/dist/components/Hero.svelte +10 -11
- package/dist/components/LogoCloud.svelte +1 -1
- package/dist/components/MediaFeature.svelte +4 -1
- package/dist/components/Modal.svelte +2 -1
- package/dist/components/NewsGrid.svelte +14 -19
- package/dist/components/PricingTable.svelte +5 -6
- package/dist/components/Stats.svelte +2 -1
- package/dist/components/Testimonial.svelte +3 -2
- package/dist/index.d.ts +0 -2
- package/dist/index.js +0 -2
- package/dist/layouts/blocks.svelte +3 -5
- package/dist/utils.d.ts +1 -0
- package/dist/utils.js +69 -0
- package/package.json +24 -24
- package/dist/components/CTABranded.svelte +0 -20
- package/dist/components/CTABranded.svelte.d.ts +0 -23
- package/dist/components/Subscribe.svelte +0 -24
- package/dist/components/Subscribe.svelte.d.ts +0 -23
package/README.md
CHANGED
|
@@ -12,17 +12,330 @@ This theme system is released on NPM to make it easier to include in all Thunder
|
|
|
12
12
|
|
|
13
13
|
### Authenticate to NPM
|
|
14
14
|
|
|
15
|
-
1. `npm login`
|
|
16
|
-
1. Enter username and password for the
|
|
15
|
+
1. `npm login --auth-type=legacy`
|
|
16
|
+
1. Enter username and password for the NPM account.
|
|
17
17
|
1. Enter email address
|
|
18
18
|
1. Enter 2FA Code
|
|
19
19
|
|
|
20
20
|
### Update the package version
|
|
21
21
|
|
|
22
22
|
1. Edit package.json with the next version.
|
|
23
|
+
1. Run `npm install` to update the package-lock.json file.
|
|
23
24
|
1. Commit and push to origin.
|
|
24
25
|
|
|
25
26
|
### Package the project and publish
|
|
26
27
|
|
|
27
28
|
1. `npm run package`
|
|
28
29
|
1. `npm publish`
|
|
30
|
+
|
|
31
|
+
## Theme Components
|
|
32
|
+
|
|
33
|
+
The following components are available in the ThunderTheme Design System.
|
|
34
|
+
Each component can have one or more of the three use cases listed below.
|
|
35
|
+
|
|
36
|
+
- **Page Section**: This component can be used in the Front Matter of a markdown file for a particular page.
|
|
37
|
+
This will result in that component being added into the page layout in the order that it appears in the `page_sections` array.
|
|
38
|
+
- **Content Component**: This component can be used within the Markdown content like a 'shortcode'.
|
|
39
|
+
- **Layout Component**: This component is not typically used directly, and is part of a page layout or as a child component in another component.
|
|
40
|
+
|
|
41
|
+
### Accordion
|
|
42
|
+
|
|
43
|
+
Provides a list of prompts that can be expanded for more information.
|
|
44
|
+
|
|
45
|
+
- Page Section
|
|
46
|
+
- Content Component
|
|
47
|
+
|
|
48
|
+
#### Accordion Inputs
|
|
49
|
+
|
|
50
|
+
- **title** - String - Text for the Accordion title
|
|
51
|
+
- **prompts** - Array - Each expandable element
|
|
52
|
+
- **title** - String - Text for element prompt.
|
|
53
|
+
- **content** - String - HTML - Text shown when prompt is expanded.
|
|
54
|
+
|
|
55
|
+
### Banner
|
|
56
|
+
|
|
57
|
+
Announcement Banner placed under the Header component in `src/routes/+layout.svelte`.
|
|
58
|
+
Input values are set in the `src/lib/site_config.json` global config file.
|
|
59
|
+
|
|
60
|
+
- Layout Component
|
|
61
|
+
|
|
62
|
+
#### Banner Inputs
|
|
63
|
+
|
|
64
|
+
- **showCTA** - Boolean - Show CTA Button in Banner
|
|
65
|
+
- **shortText** - String - Shorter version of Banner text for narrower screens.
|
|
66
|
+
- **longText** - String - Longer version of Banner text for wider screens.
|
|
67
|
+
- **ctaText** - String - CTA Button text
|
|
68
|
+
- **ctaLink** - String - CTA Button URL
|
|
69
|
+
- **allowClose** - Boolean - Add close/hide button to banner.
|
|
70
|
+
|
|
71
|
+
### Button
|
|
72
|
+
|
|
73
|
+
Basic Button component can trigger actions with a `button` element or link to URLs as an `a` element.
|
|
74
|
+
Must pass `action = true` and use an `on:click` function for use as a button.
|
|
75
|
+
|
|
76
|
+
- Content Component
|
|
77
|
+
- Layout Component
|
|
78
|
+
|
|
79
|
+
#### Button Inputs
|
|
80
|
+
|
|
81
|
+
- **action** - Boolean - If `true`, will use the `button` element.
|
|
82
|
+
Must also specify an `on:click` function for the button.
|
|
83
|
+
- **url** - String - URL for `a` element href.
|
|
84
|
+
- **text** - String - Text for the button.
|
|
85
|
+
- **color** - String - Uses the `getColorStyles` function with the 'button' style option.
|
|
86
|
+
- **justify** - String - `left` or `right`, defaults to `center` if not specified.
|
|
87
|
+
|
|
88
|
+
### Card
|
|
89
|
+
|
|
90
|
+
- Layout Component
|
|
91
|
+
|
|
92
|
+
#### Card Inputs
|
|
93
|
+
|
|
94
|
+
- **halfHeight** - Boolean - If `halfHeight` is true, then card image aspect ratio is set to 'video' (16:9), else it is set to the default of 'square' (1:1).
|
|
95
|
+
- **image** - String - Background image filename.
|
|
96
|
+
- **icon** - String - Background image filename.
|
|
97
|
+
- **heading** - String - Background image filename.
|
|
98
|
+
- **subheading** - String - Background image filename.
|
|
99
|
+
- **subheadingColor** - String - Background image filename.
|
|
100
|
+
- **cardActionStyle** - String - Background image filename.
|
|
101
|
+
- **cardLinkColor** - String - Background image filename.
|
|
102
|
+
- **cardLinkText** - String - Background image filename.
|
|
103
|
+
- **cardURL** - String - Background image filename.
|
|
104
|
+
- **links** - Array - Background image filename.
|
|
105
|
+
- **url** - Array - Background image filename.
|
|
106
|
+
- **text** - Array - Background image filename.
|
|
107
|
+
- **color** - Array - Background image filename.
|
|
108
|
+
|
|
109
|
+
### ContentTwoColumns
|
|
110
|
+
|
|
111
|
+
- Page Section
|
|
112
|
+
|
|
113
|
+
#### ContentTwoColumns Inputs
|
|
114
|
+
|
|
115
|
+
- **param** - Type - Text
|
|
116
|
+
|
|
117
|
+
### CountrySelector
|
|
118
|
+
|
|
119
|
+
- Layout Component
|
|
120
|
+
|
|
121
|
+
#### CountrySelector Inputs
|
|
122
|
+
|
|
123
|
+
- **param** - Type - Text
|
|
124
|
+
|
|
125
|
+
### CTA
|
|
126
|
+
|
|
127
|
+
- Page Section
|
|
128
|
+
- Content Component
|
|
129
|
+
- Layout Component
|
|
130
|
+
|
|
131
|
+
### CTA Inputs
|
|
132
|
+
|
|
133
|
+
- **param** - Type - Text
|
|
134
|
+
|
|
135
|
+
### CTASplitImage
|
|
136
|
+
|
|
137
|
+
- Page Section
|
|
138
|
+
- Content Component
|
|
139
|
+
- Layout Component
|
|
140
|
+
|
|
141
|
+
#### CTASplitImage Inputs
|
|
142
|
+
|
|
143
|
+
- **param** - Type - Text
|
|
144
|
+
|
|
145
|
+
### FeatureGrid
|
|
146
|
+
|
|
147
|
+
- Page Section
|
|
148
|
+
- Content Component
|
|
149
|
+
- Layout Component
|
|
150
|
+
|
|
151
|
+
#### FeatureGrid Inputs
|
|
152
|
+
|
|
153
|
+
- **param** - Type - Text
|
|
154
|
+
|
|
155
|
+
### Figure
|
|
156
|
+
|
|
157
|
+
- Page Section
|
|
158
|
+
- Content Component
|
|
159
|
+
- Layout Component
|
|
160
|
+
|
|
161
|
+
#### Figure Inputs
|
|
162
|
+
|
|
163
|
+
- **param** - Type - Text
|
|
164
|
+
|
|
165
|
+
### Footer
|
|
166
|
+
|
|
167
|
+
- Layout Component
|
|
168
|
+
|
|
169
|
+
#### Footer Inputs
|
|
170
|
+
|
|
171
|
+
- **param** - Type - Text
|
|
172
|
+
|
|
173
|
+
### Header
|
|
174
|
+
|
|
175
|
+
- Page Section
|
|
176
|
+
- Content Component
|
|
177
|
+
- Layout Component
|
|
178
|
+
|
|
179
|
+
#### Header Inputs
|
|
180
|
+
|
|
181
|
+
- **param** - Type - Text
|
|
182
|
+
|
|
183
|
+
### HeadingCentered
|
|
184
|
+
|
|
185
|
+
- Page Section
|
|
186
|
+
- Content Component
|
|
187
|
+
- Layout Component
|
|
188
|
+
|
|
189
|
+
#### HeadingCentered Inputs
|
|
190
|
+
|
|
191
|
+
- **param** - Type - Text
|
|
192
|
+
|
|
193
|
+
### Hero
|
|
194
|
+
|
|
195
|
+
- Page Section
|
|
196
|
+
- Content Component
|
|
197
|
+
- Layout Component
|
|
198
|
+
|
|
199
|
+
#### Hero Inputs
|
|
200
|
+
|
|
201
|
+
- **param** - Type - Text
|
|
202
|
+
|
|
203
|
+
### Icon
|
|
204
|
+
|
|
205
|
+
- Page Section
|
|
206
|
+
- Content Component
|
|
207
|
+
- Layout Component
|
|
208
|
+
|
|
209
|
+
#### Icon Inputs
|
|
210
|
+
|
|
211
|
+
- **param** - Type - Text
|
|
212
|
+
|
|
213
|
+
### LogoCloud
|
|
214
|
+
|
|
215
|
+
- Page Section
|
|
216
|
+
- Content Component
|
|
217
|
+
- Layout Component
|
|
218
|
+
|
|
219
|
+
#### LogoCloud Inputs
|
|
220
|
+
|
|
221
|
+
- **param** - Type - Text
|
|
222
|
+
|
|
223
|
+
### Math
|
|
224
|
+
|
|
225
|
+
- Page Section
|
|
226
|
+
- Content Component
|
|
227
|
+
- Layout Component
|
|
228
|
+
|
|
229
|
+
#### Math Inputs
|
|
230
|
+
|
|
231
|
+
- **param** - Type - Text
|
|
232
|
+
|
|
233
|
+
### MediaFeature
|
|
234
|
+
|
|
235
|
+
- Page Section
|
|
236
|
+
- Content Component
|
|
237
|
+
- Layout Component
|
|
238
|
+
|
|
239
|
+
### MediaFeature Inputs
|
|
240
|
+
|
|
241
|
+
- **param** - Type - Text
|
|
242
|
+
|
|
243
|
+
### Modal
|
|
244
|
+
|
|
245
|
+
- Page Section
|
|
246
|
+
- Content Component
|
|
247
|
+
- Layout Component
|
|
248
|
+
|
|
249
|
+
#### Modal Inputs
|
|
250
|
+
|
|
251
|
+
- **param** - Type - Text
|
|
252
|
+
|
|
253
|
+
### NewsGrid
|
|
254
|
+
|
|
255
|
+
- Page Section
|
|
256
|
+
- Content Component
|
|
257
|
+
- Layout Component
|
|
258
|
+
|
|
259
|
+
#### NewsGrid Inputs
|
|
260
|
+
|
|
261
|
+
- **param** - Type - Text
|
|
262
|
+
|
|
263
|
+
### PricingTable
|
|
264
|
+
|
|
265
|
+
- Page Section
|
|
266
|
+
- Content Component
|
|
267
|
+
- Layout Component
|
|
268
|
+
|
|
269
|
+
#### PricingTable Inputs
|
|
270
|
+
|
|
271
|
+
- **param** - Type - Text
|
|
272
|
+
|
|
273
|
+
### SidebarContent
|
|
274
|
+
|
|
275
|
+
- Page Section
|
|
276
|
+
- Content Component
|
|
277
|
+
- Layout Component
|
|
278
|
+
|
|
279
|
+
#### SidebarContent Inputs
|
|
280
|
+
|
|
281
|
+
- **param** - Type - Text
|
|
282
|
+
|
|
283
|
+
### Stats
|
|
284
|
+
|
|
285
|
+
- Page Section
|
|
286
|
+
- Content Component
|
|
287
|
+
- Layout Component
|
|
288
|
+
|
|
289
|
+
#### Stats Inputs
|
|
290
|
+
|
|
291
|
+
- **param** - Type - Text
|
|
292
|
+
|
|
293
|
+
### Testimonial
|
|
294
|
+
|
|
295
|
+
- Page Section
|
|
296
|
+
- Content Component
|
|
297
|
+
- Layout Component
|
|
298
|
+
|
|
299
|
+
#### Testimonial Inputs
|
|
300
|
+
|
|
301
|
+
- **param** - Type - Text
|
|
302
|
+
|
|
303
|
+
### ThreeColumn
|
|
304
|
+
|
|
305
|
+
- Page Section
|
|
306
|
+
- Content Component
|
|
307
|
+
- Layout Component
|
|
308
|
+
|
|
309
|
+
#### ThreeColumn Inputs
|
|
310
|
+
|
|
311
|
+
- **param** - Type - Text
|
|
312
|
+
|
|
313
|
+
### TrialForm
|
|
314
|
+
|
|
315
|
+
- Page Section
|
|
316
|
+
- Content Component
|
|
317
|
+
- Layout Component
|
|
318
|
+
|
|
319
|
+
#### TrialForm Inputs
|
|
320
|
+
|
|
321
|
+
- **param** - Type - Text
|
|
322
|
+
|
|
323
|
+
### Video
|
|
324
|
+
|
|
325
|
+
- Page Section
|
|
326
|
+
- Content Component
|
|
327
|
+
- Layout Component
|
|
328
|
+
|
|
329
|
+
#### Video Inputs
|
|
330
|
+
|
|
331
|
+
- **param** - Type - Text
|
|
332
|
+
|
|
333
|
+
### Wrap
|
|
334
|
+
|
|
335
|
+
- Page Section
|
|
336
|
+
- Content Component
|
|
337
|
+
- Layout Component
|
|
338
|
+
|
|
339
|
+
#### Wrap Inputs
|
|
340
|
+
|
|
341
|
+
- **param** - Type - Text
|
|
@@ -64,7 +64,7 @@
|
|
|
64
64
|
</button>
|
|
65
65
|
</dt>
|
|
66
66
|
<dd id="prompt-content-{i}" class="mt-2 pr-12 transition-opacity ease-in duration-100 opacity-100 {openPrompts.includes(`prompt-${i}`) ? "opacity-100" : "opacity-0"}">
|
|
67
|
-
<p class="text-base leading-7
|
|
67
|
+
<p class="text-base leading-7" class:hidden={!openPrompts.includes(`prompt-${i}`)}>
|
|
68
68
|
{@html prompt.content}
|
|
69
69
|
</p>
|
|
70
70
|
</dd>
|
|
@@ -1,12 +1,20 @@
|
|
|
1
1
|
<script>
|
|
2
|
+
import { getColorStyles } from '../utils'
|
|
3
|
+
export let action;
|
|
2
4
|
export let url;
|
|
3
5
|
export let text;
|
|
6
|
+
export let color;
|
|
7
|
+
export let justify;
|
|
4
8
|
</script>
|
|
5
9
|
|
|
6
|
-
<div class="not-prose
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
10
|
+
<div class="not-prose flex w-full {justify=="left"?"justify-start":(justify=="right"?"justify-end":"justify-center")} ">
|
|
11
|
+
{#if !action}
|
|
12
|
+
<a href={url} class="btn inline-block {getColorStyles('button', color)}" rel="external">
|
|
13
|
+
{text}
|
|
14
|
+
</a>
|
|
15
|
+
{:else}
|
|
16
|
+
<button on:click class="btn inline-block {getColorStyles('button', color)}">
|
|
17
|
+
{text}
|
|
18
|
+
</button>
|
|
19
|
+
{/if}
|
|
12
20
|
</div>
|
|
@@ -2,9 +2,14 @@
|
|
|
2
2
|
/** @typedef {typeof __propDef.events} ButtonEvents */
|
|
3
3
|
/** @typedef {typeof __propDef.slots} ButtonSlots */
|
|
4
4
|
export default class Button extends SvelteComponentTyped<{
|
|
5
|
+
action: any;
|
|
5
6
|
url: any;
|
|
6
7
|
text: any;
|
|
8
|
+
color: any;
|
|
9
|
+
justify: any;
|
|
7
10
|
}, {
|
|
11
|
+
click: MouseEvent;
|
|
12
|
+
} & {
|
|
8
13
|
[evt: string]: CustomEvent<any>;
|
|
9
14
|
}, {}> {
|
|
10
15
|
}
|
|
@@ -14,10 +19,15 @@ export type ButtonSlots = typeof __propDef.slots;
|
|
|
14
19
|
import { SvelteComponentTyped } from "svelte";
|
|
15
20
|
declare const __propDef: {
|
|
16
21
|
props: {
|
|
22
|
+
action: any;
|
|
17
23
|
url: any;
|
|
18
24
|
text: any;
|
|
25
|
+
color: any;
|
|
26
|
+
justify: any;
|
|
19
27
|
};
|
|
20
28
|
events: {
|
|
29
|
+
click: MouseEvent;
|
|
30
|
+
} & {
|
|
21
31
|
[evt: string]: CustomEvent<any>;
|
|
22
32
|
};
|
|
23
33
|
slots: {};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
<script>
|
|
2
|
+
import { getColorStyles } from '../utils'
|
|
2
3
|
export let data;
|
|
3
4
|
let id
|
|
4
5
|
|
|
@@ -7,32 +8,41 @@
|
|
|
7
8
|
}
|
|
8
9
|
</script>
|
|
9
10
|
|
|
10
|
-
|
|
11
|
-
|
|
11
|
+
<section {id} class="{data.bgColor?'p-8':''} {getColorStyles('background', data.bgColor)}
|
|
12
|
+
{data.fullwidth?'w-full mx-auto':'max-w-3xl mx-auto'}
|
|
13
|
+
{data.justifyText?(data.justifyText=='left'?'text-left':(data.justifyText=='right'?'text-right':'')):'text-center'}
|
|
14
|
+
"
|
|
15
|
+
>
|
|
12
16
|
{#if data.title}
|
|
13
|
-
<h2
|
|
14
|
-
class="{data.subtitle
|
|
15
|
-
? 'mb-4'
|
|
16
|
-
: 'mb-8'} text-3xl font-bold tracking-tight text-gray-900 sm:text-4xl"
|
|
17
|
-
>
|
|
17
|
+
<h2 class="text-3xl font-bold tracking-tight sm:text-4xl">
|
|
18
18
|
<span class="block">{data.title}</span>
|
|
19
19
|
</h2>
|
|
20
20
|
{/if}
|
|
21
21
|
{#if data.subtitle}
|
|
22
|
-
<h3 class="
|
|
22
|
+
<h3 class="text-xl font-bold tracking-tight
|
|
23
|
+
{data.title?'pt-4':''}
|
|
24
|
+
{getColorStyles('text', data.subtitleColor)}
|
|
25
|
+
">
|
|
23
26
|
<span class="block">{data.subtitle}</span>
|
|
24
27
|
</h3>
|
|
25
28
|
{/if}
|
|
29
|
+
{#if data.text}
|
|
30
|
+
<div class="prose max-w-none {(data.title||data.subtitle)?'pt-4':''} {getColorStyles('background', data.bgColor)}">
|
|
31
|
+
<p>{data.text}</p>
|
|
32
|
+
</div>
|
|
33
|
+
{/if}
|
|
26
34
|
{#if data.links}
|
|
27
35
|
<div
|
|
28
|
-
class="flex flex-col items-center justify-center space-x-0 space-y-8 md:flex-row md:
|
|
36
|
+
class="{(data.title||data.subtitle||data.text)?'pt-4':''} flex flex-col items-center justify-center space-x-0 space-y-8 md:flex-row md:space-x-8 md:space-y-0
|
|
37
|
+
{data.justifyButton?(data.justifyButton=='left'?'md:justify-start':(data.justifyButton=='right'?'md:justify-end':'md:justify-center')):'md:justify-center'}"
|
|
29
38
|
>
|
|
30
39
|
{#each data.links as link}
|
|
31
40
|
<div class="inline-flex w-full max-w-xs shadow-sm">
|
|
32
41
|
<a
|
|
33
|
-
href={link.
|
|
34
|
-
class="btn inline-flex w-full items-center px-5 py-3 text-base
|
|
35
|
-
|
|
42
|
+
href={link.url}
|
|
43
|
+
class="btn inline-flex w-full items-center px-5 py-3 text-base
|
|
44
|
+
{getColorStyles('button', link.color)}"
|
|
45
|
+
>{link.text}</a
|
|
36
46
|
>
|
|
37
47
|
</div>
|
|
38
48
|
{/each}
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
<script>
|
|
2
|
+
import { getColorStyles } from '../utils'
|
|
3
|
+
import Button from './Button.svelte'
|
|
2
4
|
export let data
|
|
3
5
|
let id
|
|
4
6
|
|
|
@@ -7,26 +9,26 @@
|
|
|
7
9
|
}
|
|
8
10
|
</script>
|
|
9
11
|
|
|
10
|
-
<section {id} class="relative {(
|
|
12
|
+
<section {id} class="relative {getColorStyles('background', data.color)}">
|
|
11
13
|
<div class="h-56 sm:h-72 md:absolute md:left-0 md:h-full md:w-1/2">
|
|
12
14
|
<img class="h-full w-full object-cover" src="https://teci-files.imgix.net/www/images/{data.image}?w=608&fit=clip&auto=compress&auto=format" alt="Image for {data.preheading}">
|
|
13
15
|
</div>
|
|
14
16
|
<div class="relative mx-auto max-w-7xl py-12 px-6 lg:px-8 lg:py-16">
|
|
15
17
|
<div class="md:ml-auto md:w-1/2 md:pl-10">
|
|
16
|
-
<h2 class="text-lg font-semibold text
|
|
17
|
-
<p class="mt-2 text-3xl font-bold tracking-tight
|
|
18
|
-
<
|
|
18
|
+
<h2 class="text-lg font-semibold {getColorStyles('text', data.preheadingColor)}">{data.preheading}</h2>
|
|
19
|
+
<p class="mt-2 text-3xl font-bold tracking-tight sm:text-4xl {getColorStyles('text', data.headingColor)}">{data.heading}</p>
|
|
20
|
+
<svelte:element this={(data.listStyle?data.listStyle:'ul')}
|
|
21
|
+
class="mt-3 text-lg pl-6
|
|
22
|
+
{data.listStyle=='ol'?'list-decimal':'list-disc'}
|
|
23
|
+
{getColorStyles('text', data.listColor)}
|
|
24
|
+
">
|
|
19
25
|
{#each data.items as item}
|
|
20
26
|
<li>{item.text}</li>
|
|
21
27
|
{/each}
|
|
22
|
-
</
|
|
28
|
+
</svelte:element>
|
|
23
29
|
<div class="mt-8">
|
|
24
|
-
<
|
|
25
|
-
<a href={data.cta_url} class="inline-flex items-center justify-center border border-transparent bg-white px-5 py-3 text-base font-medium text-gray-900 hover:bg-gray-50">
|
|
26
|
-
{data.cta}
|
|
27
|
-
</a>
|
|
28
|
-
</div>
|
|
30
|
+
<Button text={data.cta} url={data.cta_url} color={data.cta_color} justify='left' />
|
|
29
31
|
</div>
|
|
30
32
|
</div>
|
|
31
33
|
</div>
|
|
32
|
-
</section>
|
|
34
|
+
</section>
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
<script>
|
|
2
|
+
import Button from './Button.svelte'
|
|
3
|
+
|
|
2
4
|
//Allows icons from https://fonts.google.com/icons?selected=Material+Icons by name in the format 'icon-XXXX'.
|
|
5
|
+
import { getColorStyles } from '../utils'
|
|
3
6
|
import Icon from "./Icon.svelte";
|
|
4
7
|
export let data;
|
|
5
8
|
export let halfHeight;
|
|
@@ -18,15 +21,11 @@
|
|
|
18
21
|
}
|
|
19
22
|
</script>
|
|
20
23
|
|
|
21
|
-
<div
|
|
22
|
-
class="group flex flex-col items-stretch space-y-2 border border-gray-100 p-2 hover:border-gray-200 hover:shadow-md"
|
|
23
|
-
>
|
|
24
|
+
<div class="group flex flex-col items-stretch space-y-2 border border-gray-100 p-2 hover:border-gray-200 hover:shadow-md">
|
|
24
25
|
{#if data.image}
|
|
25
26
|
<div
|
|
26
27
|
style="background-image: url({backgroundImage});"
|
|
27
|
-
class="w-full shrink-0 {halfHeight
|
|
28
|
-
? 'aspect-video'
|
|
29
|
-
: 'aspect-square'} flex items-center justify-center border border-gray-200 bg-cover bg-no-repeat"
|
|
28
|
+
class="w-full shrink-0 {halfHeight?'aspect-video':'aspect-square'} flex items-center justify-center border border-gray-200 bg-cover bg-no-repeat"
|
|
30
29
|
>
|
|
31
30
|
<div
|
|
32
31
|
class="{halfHeight
|
|
@@ -35,11 +34,8 @@
|
|
|
35
34
|
>
|
|
36
35
|
{#if data.links}
|
|
37
36
|
{#each data.links as link}
|
|
38
|
-
<a
|
|
39
|
-
|
|
40
|
-
class="btn w-3/4 whitespace-nowrap text-center text-sm"
|
|
41
|
-
>
|
|
42
|
-
{link.linkText}
|
|
37
|
+
<a href={link.url} class="btn w-3/4 whitespace-nowrap text-center text-sm {getColorStyles('button', link.color)}">
|
|
38
|
+
{link.text}
|
|
43
39
|
</a>
|
|
44
40
|
{/each}
|
|
45
41
|
{:else}
|
|
@@ -60,10 +56,12 @@
|
|
|
60
56
|
{#if data.heading || data.subheading}
|
|
61
57
|
<div class="flex flex-col font-medium leading-none">
|
|
62
58
|
{#if data.heading}
|
|
63
|
-
<h3 class="text-2xl leading-none">{data.heading}</h3>
|
|
59
|
+
<h3 class="text-2xl leading-none text-gray-900">{data.heading}</h3>
|
|
64
60
|
{/if}
|
|
65
61
|
{#if data.subheading}
|
|
66
|
-
<p class="leading-6 text
|
|
62
|
+
<p class="leading-6 {getColorStyles('text', data.subheadingColor)}">
|
|
63
|
+
{data.subheading}
|
|
64
|
+
</p>
|
|
67
65
|
{/if}
|
|
68
66
|
</div>
|
|
69
67
|
{/if}
|
|
@@ -83,10 +81,11 @@
|
|
|
83
81
|
</div>
|
|
84
82
|
{/if}
|
|
85
83
|
{#if data.cardActionStyle == "button"}
|
|
86
|
-
<
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
84
|
+
<Button
|
|
85
|
+
url={data.cardURL}
|
|
86
|
+
text={data.cardLinkText}
|
|
87
|
+
color={data.cardLinkColor}
|
|
88
|
+
justify="right"
|
|
89
|
+
/>
|
|
91
90
|
{/if}
|
|
92
|
-
</div>
|
|
91
|
+
</div>
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
<script>
|
|
2
|
+
import { getColorStyles } from '../utils'
|
|
2
3
|
export let data
|
|
3
4
|
let id
|
|
4
5
|
|
|
@@ -10,15 +11,15 @@
|
|
|
10
11
|
<section {id} class="overflow-hidden mx-auto max-w-max lg:max-w-7xl">
|
|
11
12
|
<div class="relative z-10 mb-8 md:mb-2">
|
|
12
13
|
<div class="max-w-prose text-base lg:max-w-none">
|
|
13
|
-
<h2 class="font-semibold leading-6 {(
|
|
14
|
-
<p class="mt-2 text-3xl font-bold leading-8 tracking-tight text-
|
|
14
|
+
<h2 class="font-semibold leading-6 {getColorStyles('text', data.color)}">{data.preheading}</h2>
|
|
15
|
+
<p class="mt-2 text-3xl font-bold leading-8 tracking-tight sm:text-4xl text-black">{data.heading}</p>
|
|
15
16
|
</div>
|
|
16
17
|
</div>
|
|
17
18
|
<div class="relative">
|
|
18
19
|
<svg class="absolute top-0 right-0 -mt-20 -mr-20 hidden md:block md:[overflow-anchor:none]" width="404" height="384" fill="none" viewBox="0 0 404 384" aria-hidden="true">
|
|
19
20
|
<defs>
|
|
20
21
|
<pattern id="95e8f2de-6d30-4b7e-8159-f791729db21b" x="0" y="0" width="20" height="20" patternUnits="userSpaceOnUse">
|
|
21
|
-
<rect x="0" y="0" width="4" height="4" class="text-
|
|
22
|
+
<rect x="0" y="0" width="4" height="4" class="{getColorStyles('text', data.color)} opacity-20" fill="currentColor" />
|
|
22
23
|
</pattern>
|
|
23
24
|
</defs>
|
|
24
25
|
<rect width="404" height="384" fill="url(#95e8f2de-6d30-4b7e-8159-f791729db21b)" />
|
|
@@ -26,27 +27,28 @@
|
|
|
26
27
|
<svg class="absolute bottom-0 left-0 -mb-20 -ml-20 hidden md:block md:[overflow-anchor:none]" width="404" height="384" fill="none" viewBox="0 0 404 384" aria-hidden="true">
|
|
27
28
|
<defs>
|
|
28
29
|
<pattern id="7a00fe67-0343-4a3c-8e81-c145097a3ce0" x="0" y="0" width="20" height="20" patternUnits="userSpaceOnUse">
|
|
29
|
-
<rect x="0" y="0" width="4" height="4" class="text-
|
|
30
|
+
<rect x="0" y="0" width="4" height="4" class="{getColorStyles('text', data.color)} opacity-20" fill="currentColor" />
|
|
30
31
|
</pattern>
|
|
31
32
|
</defs>
|
|
32
33
|
<rect width="404" height="384" fill="url(#7a00fe67-0343-4a3c-8e81-c145097a3ce0)" />
|
|
33
34
|
</svg>
|
|
34
35
|
<div class="relative md:m-4 p-2 bg-white">
|
|
35
|
-
<div class="prose prose-lg columns-1
|
|
36
|
+
<div class="prose prose-lg columns-1 lg:columns-2 lg:max-w-none">
|
|
36
37
|
{@html data.body}
|
|
37
38
|
</div>
|
|
38
39
|
{#if data.ctas}
|
|
39
40
|
<div class="mt-8 flex gap-x-4 float-right py-1">
|
|
40
41
|
{#each data.ctas as cta}
|
|
41
|
-
<a href={cta.url}
|
|
42
|
-
|
|
43
|
-
|
|
42
|
+
<a href={cta.url}
|
|
43
|
+
class="inline-block px-4 py-1.5 text-base font-semibold leading-7 shadow-sm ring-1 ring-gray-900/10 hover:ring-gray-900/20
|
|
44
|
+
{getColorStyles('button', cta.color)}"
|
|
45
|
+
>
|
|
44
46
|
{cta.text}
|
|
45
|
-
<span class="hidden sm:inline
|
|
47
|
+
<span class="hidden sm:inline" aria-hidden="true">→</span>
|
|
46
48
|
</a>
|
|
47
49
|
{/each}
|
|
48
50
|
</div>
|
|
49
51
|
{/if}
|
|
50
52
|
</div>
|
|
51
53
|
</div>
|
|
52
|
-
</section>
|
|
54
|
+
</section>
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
<script>
|
|
2
2
|
import Icon from './Icon.svelte'
|
|
3
3
|
|
|
4
|
+
import { getColorStyles } from '../utils'
|
|
4
5
|
export let data
|
|
5
6
|
let id
|
|
6
7
|
|
|
@@ -12,9 +13,7 @@ import Icon from './Icon.svelte'
|
|
|
12
13
|
<section {id} class="overflow-hidden mx-auto max-w-max lg:max-w-7xl">
|
|
13
14
|
<div class="sm:text-center">
|
|
14
15
|
{#if data.preheading}
|
|
15
|
-
<p class="mb-2 text-lg font-semibold leading-8
|
|
16
|
-
{(data.color == "pyrosim" ? "text-pyrosim" : (data.color == "pathfinder" ? "text-pathfinder" : (data.color == "ventus" ? "text-ventus" : "text-teci-blue-dark")))}
|
|
17
|
-
">
|
|
16
|
+
<p class="mb-2 text-lg font-semibold leading-8 {getColorStyles('text', data.color)}">
|
|
18
17
|
{data.preheading}
|
|
19
18
|
</p>
|
|
20
19
|
{/if}
|
|
@@ -22,7 +21,7 @@ import Icon from './Icon.svelte'
|
|
|
22
21
|
{data.heading}
|
|
23
22
|
</h2>
|
|
24
23
|
{#if data.subheading}
|
|
25
|
-
<p class="mx-auto mt-6 max-w-2xl text-lg leading-8
|
|
24
|
+
<p class="mx-auto mt-6 max-w-2xl text-lg leading-8">
|
|
26
25
|
{data.subheading}
|
|
27
26
|
</p>
|
|
28
27
|
{/if}
|
|
@@ -31,14 +30,12 @@ import Icon from './Icon.svelte'
|
|
|
31
30
|
<div class="grid grid-cols-1 gap-y-8 md:grid-cols-2 md:gap-x-12">
|
|
32
31
|
{#each data.blocks as block}
|
|
33
32
|
<div class="relative flex flex-row gap-6">
|
|
34
|
-
<div class="hidden sm:flex h-12 w-12 items-center justify-center
|
|
35
|
-
{(data.color == "pyrosim" ? "bg-pyrosim" : (data.color == "pathfinder" ? "bg-pathfinder" : (data.color == "ventus" ? "bg-ventus" : "bg-teci-blue-dark")))}
|
|
36
|
-
">
|
|
33
|
+
<div class="hidden sm:flex h-12 w-12 items-center justify-center sm:shrink-0 flex-shrink-0 {getColorStyles('background', data.color)}">
|
|
37
34
|
<Icon classes="w-auto" icon={block.icon} />
|
|
38
35
|
</div>
|
|
39
36
|
<div class="sm:min-w-0 sm:flex-1">
|
|
40
37
|
<p class="text-lg font-semibold leading-8 text-gray-900">{block.heading}</p>
|
|
41
|
-
<p class="mt-2 text-base leading-7
|
|
38
|
+
<p class="mt-2 text-base leading-7">{block.body}</p>
|
|
42
39
|
</div>
|
|
43
40
|
</div>
|
|
44
41
|
{/each}
|