tecitheme 0.0.5 → 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.
- package/components/Figure.svelte +12 -0
- package/components/Figure.svelte.d.ts +27 -0
- package/components/Math.svelte +19 -0
- package/components/Math.svelte.d.ts +25 -0
- package/components/NewsGrid.svelte +67 -0
- package/components/NewsGrid.svelte.d.ts +25 -0
- package/components/SectionHeaderCentered.svelte +1 -1
- package/components/ThreeColumn.svelte +1 -1
- package/components/TrialForm.svelte +1 -1
- package/components/YT.svelte +12 -0
- package/components/YT.svelte.d.ts +23 -0
- package/layouts/blocks.svelte +25 -0
- package/layouts/blocks.svelte.d.ts +31 -0
- package/layouts/news.svelte +14 -0
- package/layouts/news.svelte.d.ts +29 -0
- package/package.json +9 -2
- package/utils.d.ts +1 -0
- package/utils.js +3 -1
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
<script>
|
|
2
|
+
export let image;
|
|
3
|
+
export let title;
|
|
4
|
+
export let caption;
|
|
5
|
+
</script>
|
|
6
|
+
|
|
7
|
+
<figure class="not-prose shadow-lg border border-slate-100 p-2">
|
|
8
|
+
<img src={image} alt={title} title={title}>
|
|
9
|
+
{#if caption}
|
|
10
|
+
<figcaption class="text-center p-2">{@html caption}</figcaption>
|
|
11
|
+
{/if}
|
|
12
|
+
</figure>
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/** @typedef {typeof __propDef.props} FigureProps */
|
|
2
|
+
/** @typedef {typeof __propDef.events} FigureEvents */
|
|
3
|
+
/** @typedef {typeof __propDef.slots} FigureSlots */
|
|
4
|
+
export default class Figure extends SvelteComponentTyped<{
|
|
5
|
+
image: any;
|
|
6
|
+
title: any;
|
|
7
|
+
caption: any;
|
|
8
|
+
}, {
|
|
9
|
+
[evt: string]: CustomEvent<any>;
|
|
10
|
+
}, {}> {
|
|
11
|
+
}
|
|
12
|
+
export type FigureProps = typeof __propDef.props;
|
|
13
|
+
export type FigureEvents = typeof __propDef.events;
|
|
14
|
+
export type FigureSlots = typeof __propDef.slots;
|
|
15
|
+
import { SvelteComponentTyped } from "svelte";
|
|
16
|
+
declare const __propDef: {
|
|
17
|
+
props: {
|
|
18
|
+
image: any;
|
|
19
|
+
title: any;
|
|
20
|
+
caption: any;
|
|
21
|
+
};
|
|
22
|
+
events: {
|
|
23
|
+
[evt: string]: CustomEvent<any>;
|
|
24
|
+
};
|
|
25
|
+
slots: {};
|
|
26
|
+
};
|
|
27
|
+
export {};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
<script>
|
|
2
|
+
// Based on: https://svelte.dev/repl/49ff6c089825418888cf804d9dde77bc?version=3.46.4
|
|
3
|
+
import katex from "katex";
|
|
4
|
+
export let math;
|
|
5
|
+
export let displayMode = false;
|
|
6
|
+
|
|
7
|
+
const options = {
|
|
8
|
+
displayMode: displayMode,
|
|
9
|
+
throwOnError: false
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
$: katexString = katex.renderToString(math, options);
|
|
13
|
+
</script>
|
|
14
|
+
|
|
15
|
+
<svelte:head>
|
|
16
|
+
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/katex@0.12.0/dist/katex.min.css" integrity="sha384-AfEj0r4/OFrOo5t7NnNe46zW/tFgW6x/bCJG8FqQCEo3+Aro6EYUG4+cU+KJWu/X" crossorigin="anonymous">
|
|
17
|
+
</svelte:head>
|
|
18
|
+
|
|
19
|
+
{@html katexString}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/** @typedef {typeof __propDef.props} MathProps */
|
|
2
|
+
/** @typedef {typeof __propDef.events} MathEvents */
|
|
3
|
+
/** @typedef {typeof __propDef.slots} MathSlots */
|
|
4
|
+
export default class Math extends SvelteComponentTyped<{
|
|
5
|
+
math: any;
|
|
6
|
+
displayMode?: boolean;
|
|
7
|
+
}, {
|
|
8
|
+
[evt: string]: CustomEvent<any>;
|
|
9
|
+
}, {}> {
|
|
10
|
+
}
|
|
11
|
+
export type MathProps = typeof __propDef.props;
|
|
12
|
+
export type MathEvents = typeof __propDef.events;
|
|
13
|
+
export type MathSlots = typeof __propDef.slots;
|
|
14
|
+
import { SvelteComponentTyped } from "svelte";
|
|
15
|
+
declare const __propDef: {
|
|
16
|
+
props: {
|
|
17
|
+
math: any;
|
|
18
|
+
displayMode?: boolean;
|
|
19
|
+
};
|
|
20
|
+
events: {
|
|
21
|
+
[evt: string]: CustomEvent<any>;
|
|
22
|
+
};
|
|
23
|
+
slots: {};
|
|
24
|
+
};
|
|
25
|
+
export {};
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
<script>
|
|
2
|
+
export let data;
|
|
3
|
+
export let posts;
|
|
4
|
+
</script>
|
|
5
|
+
|
|
6
|
+
<div class="relative pb-12 w-full mx-auto divide-y-2 divide-gray-200">
|
|
7
|
+
<div>
|
|
8
|
+
<h2 class="text-3xl tracking-tight font-extrabold text-gray-900 sm:text-4xl">
|
|
9
|
+
{data.title}
|
|
10
|
+
</h2>
|
|
11
|
+
<div
|
|
12
|
+
class="mt-3 sm:mt-4 lg:grid lg:grid-cols-2 lg:gap-5 lg:items-center"
|
|
13
|
+
>
|
|
14
|
+
<p class="text-xl text-gray-500">{data.subtitle}</p>
|
|
15
|
+
<form class="mt-6 flex flex-col sm:flex-row lg:mt-0 lg:justify-end">
|
|
16
|
+
<div>
|
|
17
|
+
<label for="email-address" class="sr-only"
|
|
18
|
+
>Email address</label
|
|
19
|
+
>
|
|
20
|
+
<input
|
|
21
|
+
id="email-address"
|
|
22
|
+
name="email-address"
|
|
23
|
+
type="email"
|
|
24
|
+
autocomplete="email"
|
|
25
|
+
required
|
|
26
|
+
class="appearance-none w-full px-4 py-2 border border-gray-300 text-base rounded-md text-gray-900 bg-white placeholder-gray-500 focus:outline-none focus:ring-indigo-500 focus:border-indigo-500 lg:max-w-xs"
|
|
27
|
+
placeholder="Enter your email"
|
|
28
|
+
/>
|
|
29
|
+
</div>
|
|
30
|
+
<div
|
|
31
|
+
class="mt-2 flex-shrink-0 w-full flex rounded-md shadow-sm sm:mt-0 sm:ml-3 sm:w-auto sm:inline-flex"
|
|
32
|
+
>
|
|
33
|
+
<button
|
|
34
|
+
type="button"
|
|
35
|
+
class="w-full bg-indigo-600 px-4 py-2 border border-transparent rounded-md flex items-center justify-center text-base font-medium text-white hover:bg-indigo-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500 sm:w-auto sm:inline-flex"
|
|
36
|
+
>Notify me</button
|
|
37
|
+
>
|
|
38
|
+
</div>
|
|
39
|
+
</form>
|
|
40
|
+
</div>
|
|
41
|
+
</div>
|
|
42
|
+
<div class="mt-6 pt-10 grid gap-16 lg:grid-cols-2 lg:gap-x-5 lg:gap-y-12">
|
|
43
|
+
{#each posts as post}
|
|
44
|
+
<div>
|
|
45
|
+
<p class="text-sm text-gray-500">
|
|
46
|
+
<time datetime="{post.meta.date}">{post.meta.date}</time>
|
|
47
|
+
</p>
|
|
48
|
+
<a href={post.path} class="mt-2 block">
|
|
49
|
+
<p class="text-xl font-semibold text-gray-900">
|
|
50
|
+
{post.meta.title}
|
|
51
|
+
</p>
|
|
52
|
+
<p class="mt-3 text-base text-gray-500">
|
|
53
|
+
{post.meta.summary}
|
|
54
|
+
</p>
|
|
55
|
+
</a>
|
|
56
|
+
<div class="mt-3">
|
|
57
|
+
<a
|
|
58
|
+
href="{post.path}"
|
|
59
|
+
class="text-base font-semibold text-indigo-600 hover:text-indigo-500"
|
|
60
|
+
>
|
|
61
|
+
Read full story
|
|
62
|
+
</a>
|
|
63
|
+
</div>
|
|
64
|
+
</div>
|
|
65
|
+
{/each}
|
|
66
|
+
</div>
|
|
67
|
+
</div>
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/** @typedef {typeof __propDef.props} NewsGridProps */
|
|
2
|
+
/** @typedef {typeof __propDef.events} NewsGridEvents */
|
|
3
|
+
/** @typedef {typeof __propDef.slots} NewsGridSlots */
|
|
4
|
+
export default class NewsGrid extends SvelteComponentTyped<{
|
|
5
|
+
data: any;
|
|
6
|
+
posts: any;
|
|
7
|
+
}, {
|
|
8
|
+
[evt: string]: CustomEvent<any>;
|
|
9
|
+
}, {}> {
|
|
10
|
+
}
|
|
11
|
+
export type NewsGridProps = typeof __propDef.props;
|
|
12
|
+
export type NewsGridEvents = typeof __propDef.events;
|
|
13
|
+
export type NewsGridSlots = typeof __propDef.slots;
|
|
14
|
+
import { SvelteComponentTyped } from "svelte";
|
|
15
|
+
declare const __propDef: {
|
|
16
|
+
props: {
|
|
17
|
+
data: any;
|
|
18
|
+
posts: any;
|
|
19
|
+
};
|
|
20
|
+
events: {
|
|
21
|
+
[evt: string]: CustomEvent<any>;
|
|
22
|
+
};
|
|
23
|
+
slots: {};
|
|
24
|
+
};
|
|
25
|
+
export {};
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
</script>
|
|
40
40
|
|
|
41
41
|
<!-- This example requires Tailwind CSS v2.0+ -->
|
|
42
|
-
<div class="
|
|
42
|
+
<div class="pb-12 bg-white mx-auto">
|
|
43
43
|
<h2 class="sr-only">{title}</h2>
|
|
44
44
|
<dl class="space-y-10 sm:grid sm:grid-cols-2 sm:gap-8 sm:space-y-0 lg:grid-cols-3">
|
|
45
45
|
{#each data as col}
|
|
@@ -62,7 +62,7 @@ const submitForm = async () => {
|
|
|
62
62
|
<div class="prose">
|
|
63
63
|
<h2>30-day Trial Request</h2>
|
|
64
64
|
</div>
|
|
65
|
-
<div class="mt-10 sm:mt-0">
|
|
65
|
+
<div class="mt-10 sm:mt-0 pb-12">
|
|
66
66
|
<div class="md:grid md:grid-cols-3 md:gap-6 mt-8">
|
|
67
67
|
<div class="md:col-span-1">
|
|
68
68
|
<div class=" prose px-4 sm:px-0">
|
|
@@ -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 {};
|
|
@@ -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 {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "tecitheme",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.6",
|
|
4
4
|
"svelte": true,
|
|
5
5
|
"devDependencies": {
|
|
6
6
|
"@sveltejs/adapter-auto": "next",
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
"mdsvex": "^0.10.5",
|
|
21
21
|
"postcss": "^8.4.6",
|
|
22
22
|
"prettier": "^2.5.1",
|
|
23
|
-
"prettier-plugin-
|
|
23
|
+
"prettier-plugin-tailwindcss": "^0.1.5",
|
|
24
24
|
"stream": "^0.0.2",
|
|
25
25
|
"svelte": "^3.46.3",
|
|
26
26
|
"svelte-check": "^2.4.2",
|
|
@@ -37,6 +37,7 @@
|
|
|
37
37
|
"dependencies": {
|
|
38
38
|
"@lukeed/uuid": "^2.0.0",
|
|
39
39
|
"cookie": "^0.4.1",
|
|
40
|
+
"katex": "^0.15.2",
|
|
40
41
|
"ultra_cart_rest_api_v2": "^3.6.36"
|
|
41
42
|
},
|
|
42
43
|
"exports": {
|
|
@@ -44,14 +45,20 @@
|
|
|
44
45
|
"./assets/TECi_logo.svelte": "./assets/TECi_logo.svelte",
|
|
45
46
|
"./components/Banner.svelte": "./components/Banner.svelte",
|
|
46
47
|
"./components/CountrySelector.svelte": "./components/CountrySelector.svelte",
|
|
48
|
+
"./components/Figure.svelte": "./components/Figure.svelte",
|
|
47
49
|
"./components/Footer.svelte": "./components/Footer.svelte",
|
|
48
50
|
"./components/Header.svelte": "./components/Header.svelte",
|
|
49
51
|
"./components/Icon.svelte": "./components/Icon.svelte",
|
|
52
|
+
"./components/Math.svelte": "./components/Math.svelte",
|
|
50
53
|
"./components/Modal.svelte": "./components/Modal.svelte",
|
|
54
|
+
"./components/NewsGrid.svelte": "./components/NewsGrid.svelte",
|
|
51
55
|
"./components/SectionHeaderCentered.svelte": "./components/SectionHeaderCentered.svelte",
|
|
52
56
|
"./components/ThreeColumn.svelte": "./components/ThreeColumn.svelte",
|
|
53
57
|
"./components/TrialForm.svelte": "./components/TrialForm.svelte",
|
|
58
|
+
"./components/YT.svelte": "./components/YT.svelte",
|
|
54
59
|
"./demodata": "./demodata.js",
|
|
60
|
+
"./layouts/blocks.svelte": "./layouts/blocks.svelte",
|
|
61
|
+
"./layouts/news.svelte": "./layouts/news.svelte",
|
|
55
62
|
"./req_utils": "./req_utils.js",
|
|
56
63
|
"./utils": "./utils.js",
|
|
57
64
|
"./variables": "./variables.js"
|
package/utils.d.ts
CHANGED
package/utils.js
CHANGED
|
@@ -7,4 +7,6 @@ export function scrollTo(anchor) {
|
|
|
7
7
|
export function validateEmail(email) {
|
|
8
8
|
const re = /^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;
|
|
9
9
|
return re.test(String(email).toLowerCase());
|
|
10
|
-
}
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export const slugFromPath = (path) => path.match(/([\w-]+)\.(svelte\.md|md|svx)/i)?.[1] ?? null;
|