tecitheme 0.0.16 → 0.0.17

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,30 +1,28 @@
1
1
  <script>
2
- export let data = {
3
- title: 'Ready to dive in?',
4
- subtitle: 'Start your free trial today.',
5
- links: [
6
- {
7
- linkText: 'Get Started',
8
- linkURL: '/product'
9
- }
10
- ]
11
- }
2
+ export let data;
12
3
  </script>
13
4
 
14
5
  <!-- This example requires Tailwind CSS v2.0+ -->
15
- <section class="bg-white mb-12">
6
+ <section class="mb-12">
16
7
  <div class="mx-auto text-center px-4 sm:px-6 lg:px-8">
17
- <h2 class="text-3xl font-bold tracking-tight text-gray-900 sm:text-4xl">
18
- <span class="block">{data.title}</span>
19
- </h2>
20
- <div class="mt-8 flex justify-center">
21
- {#each data.links as link}
22
- <div class="inline-flex shadow">
23
- <a href={link.linkURL} class="inline-flex items-center justify-center px-5 py-3 border border-transparent text-base font-medium text-white bg-teci-blue-light hover:bg-teci-blue-dark">{link.linkText}</a>
24
- </div>
25
- {:else}
26
- <br>
27
- {/each}
28
- </div>
8
+ {#if data.title}
9
+ <h2 class="{ data.subtitle ? 'mb-4' : 'mb-8'} text-3xl font-bold tracking-tight text-gray-900 sm:text-4xl">
10
+ <span class="block">{data.title}</span>
11
+ </h2>
12
+ {/if}
13
+ {#if data.subtitle}
14
+ <h2 class="mb-8 text-xl font-bold tracking-tight text-teci-blue-dark">
15
+ <span class="block">{data.subtitle}</span>
16
+ </h2>
17
+ {/if}
18
+ {#if data.links}
19
+ <div class="flex flex-col space-x-0 space-y-8 justify-center items-center md:space-x-8 md:space-y-0 md:flex-row md:justify-around">
20
+ {#each data.links as link}
21
+ <div class="inline-flex shadow w-full max-w-xs">
22
+ <a href={link.linkURL} class="whitespace-nowrap w-full inline-flex items-center justify-center px-5 py-3 border border-transparent text-base font-medium text-white bg-teci-blue-light hover:bg-teci-blue-dark">{link.linkText}</a>
23
+ </div>
24
+ {/each}
25
+ </div>
26
+ {/if}
29
27
  </div>
30
28
  </section>
@@ -2,14 +2,7 @@
2
2
  /** @typedef {typeof __propDef.events} CtaEvents */
3
3
  /** @typedef {typeof __propDef.slots} CtaSlots */
4
4
  export default class Cta extends SvelteComponentTyped<{
5
- data?: {
6
- title: string;
7
- subtitle: string;
8
- links: {
9
- linkText: string;
10
- linkURL: string;
11
- }[];
12
- };
5
+ data: any;
13
6
  }, {
14
7
  [evt: string]: CustomEvent<any>;
15
8
  }, {}> {
@@ -20,14 +13,7 @@ export type CtaSlots = typeof __propDef.slots;
20
13
  import { SvelteComponentTyped } from "svelte";
21
14
  declare const __propDef: {
22
15
  props: {
23
- data?: {
24
- title: string;
25
- subtitle: string;
26
- links: {
27
- linkText: string;
28
- linkURL: string;
29
- }[];
30
- };
16
+ data: any;
31
17
  };
32
18
  events: {
33
19
  [evt: string]: CustomEvent<any>;
@@ -0,0 +1,46 @@
1
+ <script>
2
+ //Allows icons from https://fonts.google.com/icons?selected=Material+Icons by name in the format 'icon-XXXX'.
3
+
4
+ import Icon from './Icon.svelte';
5
+ export let data;
6
+ export let halfHeight;
7
+ </script>
8
+
9
+ <div class="group space-y-4">
10
+ {#if data.image}
11
+ <div class="w-full {halfHeight ? 'aspect-video' : 'aspect-square'} bg-cover bg-no-repeat shadow-md border border-gray-200 flex items-center justify-center"
12
+ style="background-image: url({data.image});"
13
+ >
14
+ <div class="md:group-hover:backdrop-grayscale py-8 flex flex-col w-full h-full justify-center items-center {halfHeight ? 'space-y-4' : 'space-y-8'} transition">
15
+ {#each data.links as link}
16
+ <a href={link.linkURL} class="whitespace-nowrap hidden md:group-hover:block btn w-3/4 text-center">{link.linkText}</a>
17
+ {/each}
18
+ </div>
19
+ </div>
20
+ {/if}
21
+ <div>
22
+ <a href={data.cardURL}>
23
+ <div class="flex flex-row items-start space-x-4 mb-2">
24
+ {#if data.icon}
25
+ <div class="grid place-items-center">
26
+ <Icon classes={data.classes} icon={data.icon} />
27
+ </div>
28
+ {/if}
29
+ <div class="leading-none font-medium flex flex-col">
30
+ {#if data.heading}
31
+ <h3 class="text-2xl leading-none">{data.heading}</h3>
32
+ {/if}
33
+ {#if data.subheading}
34
+ <p class="text-teci-blue-dark leading-6">{data.subheading}</p>
35
+ {/if}
36
+ </div>
37
+ </div>
38
+ {#if data.text}
39
+ <div class="text-lg">
40
+ <p class="text-gray-500">{data.text}</p>
41
+ <span class="text-sm font-medium text-teci-blue-light lg:mt-4">{data.cardLinkText}<span aria-hidden="true">&nbsp;→</span></span>
42
+ </div>
43
+ {/if}
44
+ </a>
45
+ </div>
46
+ </div>
@@ -0,0 +1,25 @@
1
+ /** @typedef {typeof __propDef.props} CardProps */
2
+ /** @typedef {typeof __propDef.events} CardEvents */
3
+ /** @typedef {typeof __propDef.slots} CardSlots */
4
+ export default class Card extends SvelteComponentTyped<{
5
+ data: any;
6
+ halfHeight: any;
7
+ }, {
8
+ [evt: string]: CustomEvent<any>;
9
+ }, {}> {
10
+ }
11
+ export type CardProps = typeof __propDef.props;
12
+ export type CardEvents = typeof __propDef.events;
13
+ export type CardSlots = typeof __propDef.slots;
14
+ import { SvelteComponentTyped } from "svelte";
15
+ declare const __propDef: {
16
+ props: {
17
+ data: any;
18
+ halfHeight: any;
19
+ };
20
+ events: {
21
+ [evt: string]: CustomEvent<any>;
22
+ };
23
+ slots: {};
24
+ };
25
+ export {};
@@ -6,7 +6,11 @@
6
6
  export let selection = 'sel';
7
7
  export let allowContinue = false;
8
8
 
9
- let modal;
9
+ let modalData = {
10
+ title: '',
11
+ text: '',
12
+ modalContent: "<h2 class='text-lg leading-6 font-medium text-gray-900'>Reseller Required</h2><div class='mt-2 px-7 py-3'><p class='text-sm text-gray-500'>Thunderhead cannot sell to you directly, you must use the authorized reseller for your region.</p></div><div class='items-center px-4 py-3'><a href='https://www.thunderheadeng.com/pyrosim/pyrosim-licensing/#r{resellerIndex+1}' id='ok-btn' class='px-4 py-2 bg-teci-blue-light text-white text-base font-medium w-full shadow-sm hover:bg-teci-blue-dark focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500'>Reseller Contact Information</a></div>"
13
+ };
10
14
  let resellerIndex = -1;
11
15
  let resellerArray = [
12
16
  ["BE", "NL", "LU"],
@@ -136,21 +140,4 @@
136
140
  <option value="VN">Viet Nam</option>
137
141
  </select>
138
142
 
139
- <Modal bind:this={modal}>
140
- <div class="mt-3 text-center">
141
- <h2 class="text-lg leading-6 font-medium text-gray-900">Reseller Required</h2>
142
- <div class="mt-2 px-7 py-3">
143
- <p class="text-sm text-gray-500">
144
- Thunderhead cannot sell to you directly, you must use the authorized reseller for your region.
145
- </p>
146
- </div>
147
- <div class="items-center px-4 py-3">
148
- <a href="https://www.thunderheadeng.com/pyrosim/pyrosim-licensing/#r{resellerIndex+1}"
149
- id="ok-btn"
150
- class="px-4 py-2 bg-teci-blue-light text-white text-base font-medium w-full shadow-sm hover:bg-teci-blue-dark focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500"
151
- >
152
- Reseller Contact Information
153
- </a>
154
- </div>
155
- </div>
156
- </Modal>
143
+ <Modal bind:data={modalData} />
@@ -0,0 +1,31 @@
1
+ /** @typedef {typeof __propDef.props} HeadingCenteredProps */
2
+ /** @typedef {typeof __propDef.events} HeadingCenteredEvents */
3
+ /** @typedef {typeof __propDef.slots} HeadingCenteredSlots */
4
+ export default class HeadingCentered extends SvelteComponentTyped<{
5
+ data?: {
6
+ toptext: string;
7
+ title: string;
8
+ subtitle: string;
9
+ };
10
+ }, {
11
+ [evt: string]: CustomEvent<any>;
12
+ }, {}> {
13
+ }
14
+ export type HeadingCenteredProps = typeof __propDef.props;
15
+ export type HeadingCenteredEvents = typeof __propDef.events;
16
+ export type HeadingCenteredSlots = typeof __propDef.slots;
17
+ import { SvelteComponentTyped } from "svelte";
18
+ declare const __propDef: {
19
+ props: {
20
+ data?: {
21
+ toptext: string;
22
+ title: string;
23
+ subtitle: string;
24
+ };
25
+ };
26
+ events: {
27
+ [evt: string]: CustomEvent<any>;
28
+ };
29
+ slots: {};
30
+ };
31
+ export {};
@@ -1,12 +1,13 @@
1
1
  <script>
2
- import YT from "./YT.svelte"
2
+ import Video from './Video.svelte'
3
+
3
4
  export let data;
4
5
  </script>
5
6
 
6
7
  <section class="w-full mx-auto flex flex-col md:flex-row items-center justify-center">
7
- {#if data.video}
8
+ {#if data.v}
8
9
  <div class="w-full max-w-xl {data.position === 'right' ? 'mb-4 md:mb-0' : 'mb-0'}">
9
- <YT v={data.video} />
10
+ <Video bind:data />
10
11
  </div>
11
12
  {:else if data.image}
12
13
  <div class="block w-full max-w-xl mb-4 md:mb-0">
@@ -1,31 +1,45 @@
1
1
  <script>
2
- let shown = false;
3
- export function show() {
4
- shown = true;
5
- }
6
- export function hide() {
7
- shown = false;
8
- }
9
- </script>
2
+ export let data;
3
+ let shown = false;
4
+
5
+ function show() {
6
+ shown = true;
7
+ }
8
+ function hide() {
9
+ shown = false;
10
+ }
11
+ </script>
10
12
 
11
- <svelte:window
12
- on:keydown={e => {
13
- if (e.keyCode == 27) {
14
- hide();
15
- }
16
- }} />
17
-
18
- {#if shown}
19
- <div class="z-50 fixed inset-0 bg-gray-900 bg-opacity-50 overflow-y-auto h-full w-full">
20
- <div class="relative top-20 mx-auto p-5 border w-96 shadow-lg bg-white">
21
- <button type="button" on:click={hide} class="absolute top-0 right-0 bg-white p-1 mr-2 mt-2 inline-flex items-center justify-center text-teci-blue-light hover:text-white hover:bg-teci-blue-dark focus:outline-none focus:ring-2 focus:ring-inset focus:ring-teci-blue-dark">
22
- <span class="sr-only">Close menu</span>
23
- <!-- Heroicon name: outline/x -->
24
- <svg class="h-6 w-6" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor" aria-hidden="true">
25
- <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M6 18L18 6M6 6l12 12" />
26
- </svg>
27
- </button>
28
- <slot />
13
+ <svelte:window
14
+ on:keydown={e => {
15
+ if (e.keyCode == 27) {
16
+ hide();
17
+ }
18
+ }} />
19
+
20
+ <div class="prose max-w-none">
21
+ {#if data.title}
22
+ <h2>{data.title}</h2>
23
+ {/if}
24
+ {#if data.text}
25
+ <p>{data.text}</p>
26
+ {/if}
27
+ <button on:click={show} class="btn">{data.buttonText}</button>
28
+ </div>
29
+
30
+ {#if shown}
31
+ <div class="z-50 fixed inset-0 bg-gray-900 bg-opacity-50 overflow-y-auto h-full w-full !mt-0">
32
+ <div class="relative top-20 mx-auto p-5 border w-96 shadow-lg bg-white">
33
+ <button type="button" on:click={hide} class="absolute top-0 right-0 bg-white p-1 mr-2 mt-2 inline-flex items-center justify-center text-teci-blue-light hover:text-white hover:bg-teci-blue-dark focus:outline-none focus:ring-2 focus:ring-inset focus:ring-teci-blue-dark">
34
+ <span class="sr-only">Close menu</span>
35
+ <!-- Heroicon name: outline/x -->
36
+ <svg class="h-6 w-6" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor" aria-hidden="true">
37
+ <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M6 18L18 6M6 6l12 12" />
38
+ </svg>
39
+ </button>
40
+ <div class="mt-3 text-center">
41
+ {@html data.modalContent}
29
42
  </div>
30
43
  </div>
31
- {/if}
44
+ </div>
45
+ {/if}
@@ -2,15 +2,10 @@
2
2
  /** @typedef {typeof __propDef.events} ModalEvents */
3
3
  /** @typedef {typeof __propDef.slots} ModalSlots */
4
4
  export default class Modal extends SvelteComponentTyped<{
5
- show?: () => void;
6
- hide?: () => void;
5
+ data: any;
7
6
  }, {
8
7
  [evt: string]: CustomEvent<any>;
9
- }, {
10
- default: {};
11
- }> {
12
- get show(): () => void;
13
- get hide(): () => void;
8
+ }, {}> {
14
9
  }
15
10
  export type ModalProps = typeof __propDef.props;
16
11
  export type ModalEvents = typeof __propDef.events;
@@ -18,14 +13,11 @@ export type ModalSlots = typeof __propDef.slots;
18
13
  import { SvelteComponentTyped } from "svelte";
19
14
  declare const __propDef: {
20
15
  props: {
21
- show?: () => void;
22
- hide?: () => void;
16
+ data: any;
23
17
  };
24
18
  events: {
25
19
  [evt: string]: CustomEvent<any>;
26
20
  };
27
- slots: {
28
- default: {};
29
- };
21
+ slots: {};
30
22
  };
31
23
  export {};
@@ -1,60 +1,35 @@
1
1
  <script>
2
2
  import { DateTime } from "luxon";
3
+ import { getContext } from 'svelte';
4
+
3
5
  export let data;
4
- export let posts;
6
+ const posts = getContext('newsPosts');
5
7
  </script>
6
8
 
7
9
  <div class="relative mx-auto w-full divide-y-2 divide-gray-200">
8
- <div>
9
- <h2 class="text-3xl font-bold tracking-tight text-gray-900 sm:text-4xl">
10
- {data.title}
11
- </h2>
12
- <div class="mt-3 sm:mt-4 lg:grid lg:grid-cols-2 lg:items-center lg:gap-5">
10
+ <div class="flex flex-col sm:flex-row justify-between sm:items-end space-y-4 sm:space-y-0">
11
+ <div>
12
+ <h1 class="text-3xl font-bold tracking-tight text-gray-900 sm:text-4xl">{data.title}</h1>
13
13
  <p class="text-xl text-gray-500">{data.subtitle}</p>
14
- <form class="mt-6 flex flex-col sm:flex-row lg:mt-0 lg:justify-end">
15
- <div>
16
- <label for="email-address" class="sr-only">Email address</label>
17
- <input
18
- id="email-address"
19
- name="email-address"
20
- type="email"
21
- autocomplete="email"
22
- required
23
- class="w-full appearance-none border-b-2 border-b-gray-800 bg-white px-4 py-2 text-base text-gray-900 placeholder-gray-500 focus:border-teci-blue-light focus:outline-none focus:ring-teci-blue-light lg:max-w-xs"
24
- placeholder="Enter your email"
25
- />
26
- </div>
27
- <div
28
- class="mt-2 flex w-full flex-shrink-0 shadow-sm sm:mt-0 sm:ml-3 sm:inline-flex sm:w-auto"
29
- >
30
- <button type="button" class="btn">Subscribe</button>
31
- </div>
32
- </form>
14
+ </div>
15
+ <div class="w-32">
16
+ <button class="w-full flex items-center justify-center px-4 py-2 border border-transparent text-base leading-6 font-medium text-white hover:bg-teci-blue-dark bg-teci-blue-light focus:outline-none focus:border-teci-blue-dark transition duration-150 ease-in-out"
17
+ data-token="1cb5a0d7baa67f6265665b6f911f3487" onclick="mjOpenPopin(event, this)"
18
+ >
19
+ Subscribe
20
+ </button>
33
21
  </div>
34
22
  </div>
35
- <div class="mt-6 grid gap-16 pt-10 lg:grid-cols-2 lg:gap-x-5 lg:gap-y-12">
23
+ <div class="mt-6 grid gap-16 pt-10 md:grid-cols-2 lg:grid-cols-3 lg:gap-x-5 lg:gap-y-12">
36
24
  {#each posts as post}
37
- <div>
38
- <p class="text-sm text-gray-500">
39
- <time datetime={post.meta.date}>{DateTime.fromISO(post.meta.date).toLocaleString()}</time>
40
- </p>
41
- <a href={post.path} class="mt-2 block">
42
- <p class="text-xl font-semibold text-gray-900">
43
- {post.meta.title}
44
- </p>
45
- <p class="mt-3 text-base text-gray-500">
46
- {post.meta.summary}
47
- </p>
48
- </a>
49
- <div class="mt-3">
50
- <a
51
- href={post.path}
52
- class="text-base font-semibold text-teci-blue-light hover:text-teci-blue-dark"
53
- >
54
- Read full story
55
- </a>
56
- </div>
25
+ <a class="block h-full" href={post.path}>
26
+ <div class="flex flex-col items-stretch h-full">
27
+ <time class="block mb-1 text-sm text-gray-500" datetime={post.meta.date}>{DateTime.fromISO(post.meta.date).toLocaleString()}</time>
28
+ <p class="mb-2 text-xl font-semibold text-gray-900">{post.meta.title}</p>
29
+ <p class="flex-1 mb-2 text-base text-gray-500">{post.meta.summary}</p>
30
+ <p class="text-sm font-semibold text-teci-blue-light hover:text-teci-blue-dark">Read full article<span aria-hidden="true">&nbsp;→</span></p>
57
31
  </div>
32
+ </a>
58
33
  {/each}
59
34
  </div>
60
35
  </div>
@@ -3,7 +3,6 @@
3
3
  /** @typedef {typeof __propDef.slots} NewsGridSlots */
4
4
  export default class NewsGrid extends SvelteComponentTyped<{
5
5
  data: any;
6
- posts: any;
7
6
  }, {
8
7
  [evt: string]: CustomEvent<any>;
9
8
  }, {}> {
@@ -15,7 +14,6 @@ import { SvelteComponentTyped } from "svelte";
15
14
  declare const __propDef: {
16
15
  props: {
17
16
  data: any;
18
- posts: any;
19
17
  };
20
18
  events: {
21
19
  [evt: string]: CustomEvent<any>;
@@ -27,7 +27,9 @@
27
27
 
28
28
  <div id="content" class="prose w-full { data.fullWidth ? 'max-w-none' : 'max-w-prose'}">
29
29
  <h1>{title}</h1>
30
+ {#if formattedDate}
30
31
  <p>Published: {formattedDate}{#if (formattedLastModDate != formattedDate && formattedLastModDate)}, Updated: {formattedLastModDate}{/if}</p>
32
+ {/if}
31
33
  <slot />
32
34
  </div>
33
35
  <aside class="relative w-0 {(data.toc || data.rightRail) ? 'md:w-60' : 'hidden'}">
@@ -1,78 +1,19 @@
1
1
  <script>
2
- //Based on:
3
- //https://tailwindui.com/components/marketing/sections/feature-sections#component-c683653471044e6ffc32739e199dfbf2
4
- //https://tailwindui.com/components/marketing/sections/team-sections#component-0efa5ebc92e2aa72bc2332fcf5578869
5
- //Allows icons from https://fonts.google.com/icons?selected=Material+Icons by name in the format 'icon-XXXX'.
6
-
7
- import Icon from './Icon.svelte';
8
-
9
- export let title = 'A better way to do things.';
10
-
11
- export let data = [
12
- {
13
- icon: 'pyrosim',
14
- classes: 'h-12 w-12',
15
- image: 'https://www.thunderheadeng.com/wp-content/uploads/2013/09/company_pyrosim.jpg',
16
- heading: 'Product 1',
17
- subheading: 'Nutshell',
18
- text: 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed quis quam ultrices, vestibulum lacus nec, interdum est. Ut.',
19
- linkURL: '/product'
20
- },
21
- {
22
- icon: '',
23
- classes: '',
24
- image: 'https://www.thunderheadeng.com/wp-content/uploads/2013/08/company_pathfinder.png',
25
- heading: 'Product 2',
26
- subheading: 'No Icon',
27
- text: 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed quis quam ultrices, vestibulum lacus nec, interdum est. Ut.',
28
- linkURL: '/product'
29
- },
30
- {
31
- icon: 'icon-auto_stories',
32
- image: 'https://www.thunderheadeng.com/wp-content/uploads/2013/08/company_petrasim.png',
33
- classes: 'bg-teci-blue-dark text-white text-4xl grid place-items-center h-12 w-12',
34
- heading: 'Google Icon, No Subtitle or Text',
35
- subheading: '',
36
- text: '',
37
- linkURL: '/product'
38
- }
39
- ];
2
+ //Based on:
3
+ //https://tailwindui.com/components/marketing/sections/feature-sections#component-c683653471044e6ffc32739e199dfbf2
4
+ //https://tailwindui.com/components/marketing/sections/team-sections#component-0efa5ebc92e2aa72bc2332fcf5578869
5
+ import Card from './Card.svelte';
6
+ export let data;
40
7
  </script>
41
8
 
42
9
  <!-- This example requires Tailwind CSS v2.0+ -->
43
- <div class="w-full mx-auto">
44
- <h2 class="sr-only">{title}</h2>
45
- <dl class="space-y-10 sm:grid sm:grid-cols-2 sm:gap-8 sm:space-y-0 md:grid-cols-3">
46
- {#each data as col}
47
- <div>
48
- <a href={col.linkURL}>
49
- <div class="space-y-4">
50
- {#if col.image}
51
- <div class="w-full aspect-square bg-slate-100">
52
- <img class="w-full aspect-square object-cover shadow-md border border-gray-200" src={col.image} title={col.heading} alt={col.heading} />
53
- </div>
54
- {/if}
55
- <div class="flex flex-row items-start space-x-4">
56
- {#if col.icon}
57
- <div class="grid place-items-center">
58
- <Icon classes={col.classes} icon={col.icon} />
59
- </div>
60
- {/if}
61
- <div class="leading-none font-medium flex flex-col">
62
- <h3 class="text-2xl leading-none">{col.heading}</h3>
63
- {#if col.subheading}
64
- <p class="text-teci-blue-dark leading-6">{col.subheading}</p>
65
- {/if}
66
- </div>
67
- </div>
68
- {#if col.text}
69
- <div class="text-lg">
70
- <p class="text-gray-500">{col.text}</p>
71
- </div>
72
- {/if}
73
- </div>
74
- </a>
75
- </div>
76
- {/each}
77
- </dl>
10
+ <div class="mx-auto w-full">
11
+ {#if data.title}
12
+ <h2 class="sr-only">{data.title}</h2>
13
+ {/if}
14
+ <dl class="space-y-10 sm:grid sm:grid-cols-2 sm:gap-8 sm:space-y-0 md:grid-cols-3">
15
+ {#each data.cards as card}
16
+ <Card bind:data={card} bind:halfHeight={data.halfHeight} />
17
+ {/each}
18
+ </dl>
78
19
  </div>
@@ -2,16 +2,7 @@
2
2
  /** @typedef {typeof __propDef.events} ThreeColumnEvents */
3
3
  /** @typedef {typeof __propDef.slots} ThreeColumnSlots */
4
4
  export default class ThreeColumn extends SvelteComponentTyped<{
5
- data?: {
6
- icon: string;
7
- classes: string;
8
- image: string;
9
- heading: string;
10
- subheading: string;
11
- text: string;
12
- linkURL: string;
13
- }[];
14
- title?: string;
5
+ data: any;
15
6
  }, {
16
7
  [evt: string]: CustomEvent<any>;
17
8
  }, {}> {
@@ -22,16 +13,7 @@ export type ThreeColumnSlots = typeof __propDef.slots;
22
13
  import { SvelteComponentTyped } from "svelte";
23
14
  declare const __propDef: {
24
15
  props: {
25
- data?: {
26
- icon: string;
27
- classes: string;
28
- image: string;
29
- heading: string;
30
- subheading: string;
31
- text: string;
32
- linkURL: string;
33
- }[];
34
- title?: string;
16
+ data: any;
35
17
  };
36
18
  events: {
37
19
  [evt: string]: CustomEvent<any>;
@@ -0,0 +1,26 @@
1
+ <script>
2
+ export let data = {};
3
+ export let v = '';
4
+ let id;
5
+
6
+ if (v) {
7
+ id = v;
8
+ }
9
+ else if (data) {
10
+ id = data.v;
11
+ }
12
+ else {
13
+ id = '';
14
+ }
15
+ </script>
16
+
17
+ <section class="w-full aspect-video border bg-black border-gray-200 shadow-md">
18
+ <iframe
19
+ src="https://www.youtube.com/embed/{id}"
20
+ title="YouTube Video ID {id}"
21
+ class="w-full aspect-video"
22
+ frameborder="0"
23
+ allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture"
24
+ allowfullscreen>
25
+ </iframe>
26
+ </section>
@@ -0,0 +1,25 @@
1
+ /** @typedef {typeof __propDef.props} VideoProps */
2
+ /** @typedef {typeof __propDef.events} VideoEvents */
3
+ /** @typedef {typeof __propDef.slots} VideoSlots */
4
+ export default class Video extends SvelteComponentTyped<{
5
+ data?: {};
6
+ v?: string;
7
+ }, {
8
+ [evt: string]: CustomEvent<any>;
9
+ }, {}> {
10
+ }
11
+ export type VideoProps = typeof __propDef.props;
12
+ export type VideoEvents = typeof __propDef.events;
13
+ export type VideoSlots = typeof __propDef.slots;
14
+ import { SvelteComponentTyped } from "svelte";
15
+ declare const __propDef: {
16
+ props: {
17
+ data?: {};
18
+ v?: string;
19
+ };
20
+ events: {
21
+ [evt: string]: CustomEvent<any>;
22
+ };
23
+ slots: {};
24
+ };
25
+ export {};
@@ -1,19 +1,32 @@
1
1
  <script>
2
- import SectionHeaderCentered from '../components/SectionHeaderCentered.svelte';
3
- import ThreeColumn from '../components/ThreeColumn.svelte';
4
- import NewsGrid from '../components/NewsGrid.svelte';
5
- import YT from '../components/YT.svelte';
6
- import CTA from '../components/CTA.svelte';
7
- import SidebarContent from '../components/SidebarContent.svelte';
8
- import MediaFeature from '../components/MediaFeature.svelte';
9
- import TrialForm from '../components/TrialForm.svelte';
2
+ import CTA from '../components/CTA.svelte';
3
+ import HeadingCentered from '../components/HeadingCentered.svelte';
4
+ import MediaFeature from '../components/MediaFeature.svelte';
5
+ import Modal from '../components/Modal.svelte';
6
+ import NewsGrid from '../components/NewsGrid.svelte';
7
+ import SidebarContent from '../components/SidebarContent.svelte';
8
+ import ThreeColumn from '../components/ThreeColumn.svelte';
9
+ import TrialForm from '../components/TrialForm.svelte';
10
+ import Video from '../components/Video.svelte';
11
+
12
+ let blocks = [
13
+ {ref: "cta-center", component: CTA},
14
+ {ref: "heading-centered", component: HeadingCentered},
15
+ {ref: "media-feature", component: MediaFeature},
16
+ {ref: "modal", component: Modal},
17
+ {ref: "news-grid", component: NewsGrid},
18
+ {ref: "sidebar-content", component: SidebarContent},
19
+ {ref: "three-column", component: ThreeColumn},
20
+ {ref: "trial-form", component: TrialForm},
21
+ {ref: "video", component: Video},
22
+ ]
10
23
 
11
- export let title
12
- export let date
13
- export let lastmod
14
- export let page_sections
15
- export let posts
16
- export let summary
24
+ export let title;
25
+ export let date;
26
+ export let lastmod;
27
+ export let summary;
28
+ export let layout;
29
+ export let page_sections;
17
30
  </script>
18
31
 
19
32
  <svelte:head>
@@ -21,28 +34,12 @@
21
34
  <meta name="description" content={summary}>
22
35
  </svelte:head>
23
36
 
24
- <article class="flex flex-col space-y-12">
25
- {#each page_sections as section}
26
- {#if section.fieldGroup == "heading-centered"}
27
- <SectionHeaderCentered bind:data={section} />
28
- {:else if section.fieldGroup == "three-column"}
29
- <ThreeColumn bind:data={section.cards} />
30
- {:else if section.fieldGroup == "news-grid"}
31
- <NewsGrid bind:data={section} bind:posts={posts} />
32
- {:else if section.fieldGroup == "video"}
33
- <YT bind:v={section.v} />
34
- {:else if section.fieldGroup == "cta-center"}
35
- <CTA bind:data={section} />
36
- {:else if section.fieldGroup == "sidebar-content"}
37
- <SidebarContent bind:data={section} {title} {date} {lastmod} {summary}>
38
- <slot/>
39
- </SidebarContent>
40
- {:else if section.fieldGroup == "media-feature"}
41
- <MediaFeature bind:data={section} />
42
- {:else if section.fieldGroup == "trial"}
43
- <TrialForm />
44
- {:else if section.fieldGroup == "content"}
45
- <div class="content prose"><slot/></div>
46
- {/if}
47
- {/each}
37
+ <article class="flex flex-col space-y-12 {layout}">
38
+ {#each page_sections as section}
39
+ {#if (section) && (section.fieldGroup === "sidebar-content")}
40
+ <svelte:component this={blocks.find(obj=>obj.ref===section.fieldGroup).component} bind:data={section} {title} {date} {lastmod}><slot/></svelte:component>
41
+ {:else if (section) && (section.fieldGroup != "sidebar-content")}
42
+ <svelte:component this={blocks.find(obj=>obj.ref===section.fieldGroup).component} bind:data={section} />
43
+ {/if}
44
+ {/each}
48
45
  </article>
@@ -5,9 +5,9 @@ export default class Blocks extends SvelteComponentTyped<{
5
5
  title: any;
6
6
  date: any;
7
7
  lastmod: any;
8
- page_sections: any;
9
- posts: any;
10
8
  summary: any;
9
+ layout: any;
10
+ page_sections: any;
11
11
  }, {
12
12
  [evt: string]: CustomEvent<any>;
13
13
  }, {
@@ -23,9 +23,9 @@ declare const __propDef: {
23
23
  title: any;
24
24
  date: any;
25
25
  lastmod: any;
26
- page_sections: any;
27
- posts: any;
28
26
  summary: any;
27
+ layout: any;
28
+ page_sections: any;
29
29
  };
30
30
  events: {
31
31
  [evt: string]: CustomEvent<any>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tecitheme",
3
- "version": "0.0.16",
3
+ "version": "0.0.17",
4
4
  "svelte": true,
5
5
  "devDependencies": {
6
6
  "@jsdevtools/rehype-toc": "^3.0.2",
@@ -9,41 +9,41 @@
9
9
  "@sveltejs/kit": "next",
10
10
  "@tailwindcss/forms": "^0.5.0",
11
11
  "@tailwindcss/typography": "^0.5.2",
12
- "@types/cookie": "^0.4.1",
13
- "@typescript-eslint/eslint-plugin": "^4.31.1",
14
- "@typescript-eslint/parser": "^4.31.1",
15
- "autoprefixer": "^10.4.2",
12
+ "@types/cookie": "^0.5.0",
13
+ "@typescript-eslint/eslint-plugin": "^5.19.0",
14
+ "@typescript-eslint/parser": "^5.19.0",
15
+ "autoprefixer": "^10.4.4",
16
16
  "dotenv": "^16.0.0",
17
17
  "encoding": "^0.1.13",
18
- "eslint": "^7.32.0",
19
- "eslint-config-prettier": "^8.3.0",
20
- "eslint-plugin-svelte3": "^3.4.0",
18
+ "eslint": "^8.13.0",
19
+ "eslint-config-prettier": "^8.5.0",
20
+ "eslint-plugin-svelte3": "^3.4.1",
21
21
  "luxon": "^2.3.1",
22
22
  "mdsvex": "^0.10.5",
23
- "postcss": "^8.4.6",
24
- "prettier": "^2.5.1",
25
- "prettier-plugin-tailwindcss": "^0.1.7",
23
+ "postcss": "^8.4.12",
24
+ "prettier": "^2.6.2",
25
+ "prettier-plugin-tailwindcss": "^0.1.9",
26
26
  "rehype-parse": "^8.0.4",
27
27
  "rehype-slug": "^5.0.1",
28
28
  "rehype-stringify": "^9.0.3",
29
29
  "stream": "^0.0.2",
30
- "svelte": "^3.46.4",
31
- "svelte-check": "^2.4.3",
30
+ "svelte": "^3.47.0",
31
+ "svelte-check": "^2.7.0",
32
32
  "svelte-cubed": "^0.2.1",
33
- "svelte-preprocess": "^4.10.4",
34
- "svelte2tsx": "^0.5.3",
35
- "tailwindcss": "^3.0.23",
36
- "three": "^0.137.5",
33
+ "svelte-preprocess": "^4.10.6",
34
+ "svelte2tsx": "^0.5.9",
35
+ "tailwindcss": "^3.0.24",
36
+ "three": "^0.139.2",
37
37
  "tslib": "^2.3.1",
38
- "typescript": "^4.5.5",
39
- "vite": "^2.8.3",
40
- "vite-plugin-autoimport": "^1.4.3"
38
+ "typescript": "^4.6.3",
39
+ "vite": "^2.9.5",
40
+ "vite-plugin-autoimport": "^1.6.3"
41
41
  },
42
42
  "type": "module",
43
43
  "dependencies": {
44
44
  "@lukeed/uuid": "^2.0.0",
45
- "cookie": "^0.4.2",
46
- "katex": "^0.15.2"
45
+ "cookie": "^0.5.0",
46
+ "katex": "^0.15.3"
47
47
  },
48
48
  "exports": {
49
49
  "./package.json": "./package.json",
@@ -51,20 +51,21 @@
51
51
  "./components/Banner.svelte": "./components/Banner.svelte",
52
52
  "./components/Button.svelte": "./components/Button.svelte",
53
53
  "./components/CTA.svelte": "./components/CTA.svelte",
54
+ "./components/Card.svelte": "./components/Card.svelte",
54
55
  "./components/CountrySelector.svelte": "./components/CountrySelector.svelte",
55
56
  "./components/Figure.svelte": "./components/Figure.svelte",
56
57
  "./components/Footer.svelte": "./components/Footer.svelte",
57
58
  "./components/Header.svelte": "./components/Header.svelte",
59
+ "./components/HeadingCentered.svelte": "./components/HeadingCentered.svelte",
58
60
  "./components/Icon.svelte": "./components/Icon.svelte",
59
61
  "./components/Math.svelte": "./components/Math.svelte",
60
62
  "./components/MediaFeature.svelte": "./components/MediaFeature.svelte",
61
63
  "./components/Modal.svelte": "./components/Modal.svelte",
62
64
  "./components/NewsGrid.svelte": "./components/NewsGrid.svelte",
63
- "./components/SectionHeaderCentered.svelte": "./components/SectionHeaderCentered.svelte",
64
65
  "./components/SidebarContent.svelte": "./components/SidebarContent.svelte",
65
66
  "./components/ThreeColumn.svelte": "./components/ThreeColumn.svelte",
66
67
  "./components/TrialForm.svelte": "./components/TrialForm.svelte",
67
- "./components/YT.svelte": "./components/YT.svelte",
68
+ "./components/Video.svelte": "./components/Video.svelte",
68
69
  "./layouts/blocks.svelte": "./layouts/blocks.svelte",
69
70
  "./req_utils": "./req_utils.js",
70
71
  "./utils": "./utils.js",
@@ -1,31 +0,0 @@
1
- /** @typedef {typeof __propDef.props} SectionHeaderCenteredProps */
2
- /** @typedef {typeof __propDef.events} SectionHeaderCenteredEvents */
3
- /** @typedef {typeof __propDef.slots} SectionHeaderCenteredSlots */
4
- export default class SectionHeaderCentered extends SvelteComponentTyped<{
5
- data?: {
6
- toptext: string;
7
- title: string;
8
- subtitle: string;
9
- };
10
- }, {
11
- [evt: string]: CustomEvent<any>;
12
- }, {}> {
13
- }
14
- export type SectionHeaderCenteredProps = typeof __propDef.props;
15
- export type SectionHeaderCenteredEvents = typeof __propDef.events;
16
- export type SectionHeaderCenteredSlots = typeof __propDef.slots;
17
- import { SvelteComponentTyped } from "svelte";
18
- declare const __propDef: {
19
- props: {
20
- data?: {
21
- toptext: string;
22
- title: string;
23
- subtitle: string;
24
- };
25
- };
26
- events: {
27
- [evt: string]: CustomEvent<any>;
28
- };
29
- slots: {};
30
- };
31
- export {};
@@ -1,14 +0,0 @@
1
- <script>
2
- export let v
3
- </script>
4
-
5
- <section class="w-full aspect-video border bg-black border-gray-200 shadow-md">
6
- <iframe
7
- src="https://www.youtube-nocookie.com/embed/{v}?rel=0&modestbranding=1"
8
- title="YouTube Video ID {v}"
9
- class="w-full aspect-video"
10
- frameborder="0"
11
- allow="accelerometer; clipboard-write; encrypted-media; gyroscope"
12
- allowfullscreen
13
- />
14
- </section>
@@ -1,23 +0,0 @@
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 {};