tecitheme 0.0.8 → 0.0.9
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/Button.svelte +8 -0
- package/components/Button.svelte.d.ts +25 -0
- package/components/Figure.svelte +8 -6
- package/components/MediaFeature.svelte +29 -0
- package/components/MediaFeature.svelte.d.ts +23 -0
- package/components/NewsGrid.svelte +1 -1
- package/components/SectionHeaderCentered.svelte +1 -1
- package/components/SidebarContent.svelte +53 -0
- package/components/SidebarContent.svelte.d.ts +27 -0
- package/components/ThreeColumn.svelte +1 -1
- package/components/TrialForm.svelte +3 -5
- package/components/YT.svelte +1 -1
- package/layouts/blocks.svelte +11 -1
- package/package.json +12 -7
- package/demodata.d.ts +0 -7
- package/demodata.js +0 -7
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/** @typedef {typeof __propDef.props} ButtonProps */
|
|
2
|
+
/** @typedef {typeof __propDef.events} ButtonEvents */
|
|
3
|
+
/** @typedef {typeof __propDef.slots} ButtonSlots */
|
|
4
|
+
export default class Button extends SvelteComponentTyped<{
|
|
5
|
+
url: any;
|
|
6
|
+
text: any;
|
|
7
|
+
}, {
|
|
8
|
+
[evt: string]: CustomEvent<any>;
|
|
9
|
+
}, {}> {
|
|
10
|
+
}
|
|
11
|
+
export type ButtonProps = typeof __propDef.props;
|
|
12
|
+
export type ButtonEvents = typeof __propDef.events;
|
|
13
|
+
export type ButtonSlots = typeof __propDef.slots;
|
|
14
|
+
import { SvelteComponentTyped } from "svelte";
|
|
15
|
+
declare const __propDef: {
|
|
16
|
+
props: {
|
|
17
|
+
url: any;
|
|
18
|
+
text: any;
|
|
19
|
+
};
|
|
20
|
+
events: {
|
|
21
|
+
[evt: string]: CustomEvent<any>;
|
|
22
|
+
};
|
|
23
|
+
slots: {};
|
|
24
|
+
};
|
|
25
|
+
export {};
|
package/components/Figure.svelte
CHANGED
|
@@ -4,9 +4,11 @@
|
|
|
4
4
|
export let caption;
|
|
5
5
|
</script>
|
|
6
6
|
|
|
7
|
-
<
|
|
8
|
-
<
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
7
|
+
<section class="flex justify-center not-prose">
|
|
8
|
+
<figure class="bg-white w-auto mx-auto shadow-lg border border-slate-100 p-2">
|
|
9
|
+
<img class="w-full" src={image} alt={title} title={title}>
|
|
10
|
+
{#if caption}
|
|
11
|
+
<figcaption class="text-center p-2">{@html caption}</figcaption>
|
|
12
|
+
{/if}
|
|
13
|
+
</figure>
|
|
14
|
+
</section>
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
<script>
|
|
2
|
+
import YT from "./YT.svelte"
|
|
3
|
+
export let data;
|
|
4
|
+
</script>
|
|
5
|
+
|
|
6
|
+
<section class="w-full mx-auto flex flex-col md:flex-row items-center">
|
|
7
|
+
{#if data.video}
|
|
8
|
+
<div class="w-full max-w-xl {data.position === 'right' ? 'mb-4 md:mb-0' : 'mb-0'}">
|
|
9
|
+
<YT v={data.video} />
|
|
10
|
+
</div>
|
|
11
|
+
{:else if data.image}
|
|
12
|
+
<a class="block w-full max-w-xl mb-4 md:mb-0" href={data.image}>
|
|
13
|
+
<figure>
|
|
14
|
+
<img class="aspect-video object-cover" src={data.image} alt={data.name}/>
|
|
15
|
+
</figure>
|
|
16
|
+
</a>
|
|
17
|
+
{/if}
|
|
18
|
+
<div class="flex flex-col justify-center {data.position === 'right' ? 'md:order-last md:ml-8' : 'md:order-first md:mr-8'}">
|
|
19
|
+
<div class="w-full max-w-3xl">
|
|
20
|
+
<h2 class="text-lg font-bold pb-4">{data.name}</h2>
|
|
21
|
+
<span class="prose">{@html data.text}</span>
|
|
22
|
+
</div>
|
|
23
|
+
{#if data.ctaText}
|
|
24
|
+
<div class="text-right md:text-left mt-4">
|
|
25
|
+
<a class="inline-block btn" href={data.ctaURL}>{data.ctaText}</a>
|
|
26
|
+
</div>
|
|
27
|
+
{/if}
|
|
28
|
+
</div>
|
|
29
|
+
</section>
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/** @typedef {typeof __propDef.props} MediaFeatureProps */
|
|
2
|
+
/** @typedef {typeof __propDef.events} MediaFeatureEvents */
|
|
3
|
+
/** @typedef {typeof __propDef.slots} MediaFeatureSlots */
|
|
4
|
+
export default class MediaFeature extends SvelteComponentTyped<{
|
|
5
|
+
data: any;
|
|
6
|
+
}, {
|
|
7
|
+
[evt: string]: CustomEvent<any>;
|
|
8
|
+
}, {}> {
|
|
9
|
+
}
|
|
10
|
+
export type MediaFeatureProps = typeof __propDef.props;
|
|
11
|
+
export type MediaFeatureEvents = typeof __propDef.events;
|
|
12
|
+
export type MediaFeatureSlots = typeof __propDef.slots;
|
|
13
|
+
import { SvelteComponentTyped } from "svelte";
|
|
14
|
+
declare const __propDef: {
|
|
15
|
+
props: {
|
|
16
|
+
data: any;
|
|
17
|
+
};
|
|
18
|
+
events: {
|
|
19
|
+
[evt: string]: CustomEvent<any>;
|
|
20
|
+
};
|
|
21
|
+
slots: {};
|
|
22
|
+
};
|
|
23
|
+
export {};
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
export let posts;
|
|
4
4
|
</script>
|
|
5
5
|
|
|
6
|
-
<div class="relative mx-auto w-full divide-y-2 divide-gray-200
|
|
6
|
+
<div class="relative mx-auto w-full divide-y-2 divide-gray-200">
|
|
7
7
|
<div>
|
|
8
8
|
<h2 class="text-3xl font-extrabold tracking-tight text-gray-900 sm:text-4xl">
|
|
9
9
|
{data.title}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
<script>
|
|
2
|
+
import { onMount } from "svelte";
|
|
3
|
+
export let data;
|
|
4
|
+
|
|
5
|
+
let tocMoved = false;
|
|
6
|
+
|
|
7
|
+
onMount(() => {
|
|
8
|
+
function moveTOC() {
|
|
9
|
+
console.log("Moving TOC");
|
|
10
|
+
var oldParent = document.getElementsByClassName('page-toc')[0];
|
|
11
|
+
if (oldParent && oldParent.nodeType == 1){
|
|
12
|
+
var newParent = document.getElementById('sidebar-nav');
|
|
13
|
+
var loader = document.getElementById('loader');
|
|
14
|
+
var classes = oldParent.classList;
|
|
15
|
+
newParent.insertAdjacentElement('beforeend', oldParent)
|
|
16
|
+
loader.remove();
|
|
17
|
+
classes.remove("hidden");
|
|
18
|
+
tocMoved = true;
|
|
19
|
+
console.log("TOC Moved")
|
|
20
|
+
} else {
|
|
21
|
+
console.log(tocMoved, oldParent);
|
|
22
|
+
if(!tocMoved && oldParent == undefined){
|
|
23
|
+
console.log("Reloading");
|
|
24
|
+
window.location.reload();
|
|
25
|
+
} else {
|
|
26
|
+
console.log("Leave it alone.")
|
|
27
|
+
tocMoved = true;
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
if (tocMoved == false && data.sidebar) {
|
|
33
|
+
moveTOC();
|
|
34
|
+
};
|
|
35
|
+
});
|
|
36
|
+
</script>
|
|
37
|
+
|
|
38
|
+
<section class="w-auto mx-auto flex flex-col lg:flex-row items-start lg:space-x-8">
|
|
39
|
+
{#if data.sidebar}
|
|
40
|
+
<div id="sidebar-nav" class="pr-4 lg:text-right font-medium mb-4 w-auto lg:max-w-xs lg:mb-0 lg:w-60 lg:sticky lg:top-8 shrink-0 lg:border-r lg:border-r-gray-400">
|
|
41
|
+
<div id="loader">
|
|
42
|
+
<svg role="status" class="inline-block mr-2 w-6 h-6 text-gray-200 animate-spin dark:text-gray-600 fill-blue-600" viewBox="0 0 100 101" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
43
|
+
<path d="M100 50.5908C100 78.2051 77.6142 100.591 50 100.591C22.3858 100.591 0 78.2051 0 50.5908C0 22.9766 22.3858 0.59082 50 0.59082C77.6142 0.59082 100 22.9766 100 50.5908ZM9.08144 50.5908C9.08144 73.1895 27.4013 91.5094 50 91.5094C72.5987 91.5094 90.9186 73.1895 90.9186 50.5908C90.9186 27.9921 72.5987 9.67226 50 9.67226C27.4013 9.67226 9.08144 27.9921 9.08144 50.5908Z" fill="currentColor"/>
|
|
44
|
+
<path d="M93.9676 39.0409C96.393 38.4038 97.8624 35.9116 97.0079 33.5539C95.2932 28.8227 92.871 24.3692 89.8167 20.348C85.8452 15.1192 80.8826 10.7238 75.2124 7.41289C69.5422 4.10194 63.2754 1.94025 56.7698 1.05124C51.7666 0.367541 46.6976 0.446843 41.7345 1.27873C39.2613 1.69328 37.813 4.19778 38.4501 6.62326C39.0873 9.04874 41.5694 10.4717 44.0505 10.1071C47.8511 9.54855 51.7191 9.52689 55.5402 10.0491C60.8642 10.7766 65.9928 12.5457 70.6331 15.2552C75.2735 17.9648 79.3347 21.5619 82.5849 25.841C84.9175 28.9121 86.7997 32.2913 88.1811 35.8758C89.083 38.2158 91.5421 39.6781 93.9676 39.0409Z" fill="currentFill"/>
|
|
45
|
+
</svg>
|
|
46
|
+
<span class="inline-block">Loading...</span>
|
|
47
|
+
</div>
|
|
48
|
+
</div>
|
|
49
|
+
{/if}
|
|
50
|
+
<div id="text" class="w-full prose max-w-none lg:max-w-prose">
|
|
51
|
+
<slot />
|
|
52
|
+
</div>
|
|
53
|
+
</section>
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/** @typedef {typeof __propDef.props} SidebarContentProps */
|
|
2
|
+
/** @typedef {typeof __propDef.events} SidebarContentEvents */
|
|
3
|
+
/** @typedef {typeof __propDef.slots} SidebarContentSlots */
|
|
4
|
+
export default class SidebarContent extends SvelteComponentTyped<{
|
|
5
|
+
data: any;
|
|
6
|
+
}, {
|
|
7
|
+
[evt: string]: CustomEvent<any>;
|
|
8
|
+
}, {
|
|
9
|
+
default: {};
|
|
10
|
+
}> {
|
|
11
|
+
}
|
|
12
|
+
export type SidebarContentProps = typeof __propDef.props;
|
|
13
|
+
export type SidebarContentEvents = typeof __propDef.events;
|
|
14
|
+
export type SidebarContentSlots = typeof __propDef.slots;
|
|
15
|
+
import { SvelteComponentTyped } from "svelte";
|
|
16
|
+
declare const __propDef: {
|
|
17
|
+
props: {
|
|
18
|
+
data: any;
|
|
19
|
+
};
|
|
20
|
+
events: {
|
|
21
|
+
[evt: string]: CustomEvent<any>;
|
|
22
|
+
};
|
|
23
|
+
slots: {
|
|
24
|
+
default: {};
|
|
25
|
+
};
|
|
26
|
+
};
|
|
27
|
+
export {};
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
</script>
|
|
38
38
|
|
|
39
39
|
<!-- This example requires Tailwind CSS v2.0+ -->
|
|
40
|
-
<div class="
|
|
40
|
+
<div class="w-full mx-auto">
|
|
41
41
|
<h2 class="sr-only">{title}</h2>
|
|
42
42
|
<dl class="space-y-10 sm:grid sm:grid-cols-2 sm:gap-8 sm:space-y-0 lg:grid-cols-3">
|
|
43
43
|
{#each data as col}
|
|
@@ -59,13 +59,11 @@ const submitForm = async () => {
|
|
|
59
59
|
};
|
|
60
60
|
</script>
|
|
61
61
|
|
|
62
|
-
<div class="
|
|
63
|
-
<h2>30-day Trial Request</h2>
|
|
64
|
-
</div>
|
|
65
|
-
<div class="mt-10 sm:mt-0 pb-12">
|
|
62
|
+
<div class="mt-10 sm:mt-0">
|
|
66
63
|
<div class="md:grid md:grid-cols-3 md:gap-6 mt-8">
|
|
67
64
|
<div class="md:col-span-1">
|
|
68
|
-
<div class="
|
|
65
|
+
<div class="prose px-4 sm:px-0">
|
|
66
|
+
<h2>30-day Trial Request</h2>
|
|
69
67
|
<p>
|
|
70
68
|
Please complete the form and click "Send Request". <b>All fields are required.</b>
|
|
71
69
|
</p>
|
package/components/YT.svelte
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
export let v
|
|
3
3
|
</script>
|
|
4
4
|
|
|
5
|
-
<section class="w-full aspect-video border bg-black border-gray-200 shadow-md
|
|
5
|
+
<section class="w-full aspect-video border bg-black border-gray-200 shadow-md">
|
|
6
6
|
<iframe
|
|
7
7
|
src="https://www.youtube-nocookie.com/embed/{v}?rel=0&modestbranding=1"
|
|
8
8
|
title="YouTube Video ID {v}"
|
package/layouts/blocks.svelte
CHANGED
|
@@ -4,6 +4,8 @@
|
|
|
4
4
|
import NewsGrid from '../components/NewsGrid.svelte';
|
|
5
5
|
import YT from '../components/YT.svelte';
|
|
6
6
|
import CTA from '../components/CTA.svelte';
|
|
7
|
+
import SidebarContent from '../components/SidebarContent.svelte';
|
|
8
|
+
import MediaFeature from '../components/MediaFeature.svelte';
|
|
7
9
|
|
|
8
10
|
export let title
|
|
9
11
|
export let page_sections
|
|
@@ -14,6 +16,7 @@
|
|
|
14
16
|
<title>{title} | Thunderhead Engineering</title>
|
|
15
17
|
</svelte:head>
|
|
16
18
|
|
|
19
|
+
<article class="flex flex-col space-y-12">
|
|
17
20
|
{#each page_sections as section}
|
|
18
21
|
{#if section.fieldGroup == "heading-centered"}
|
|
19
22
|
<SectionHeaderCentered bind:data={section} />
|
|
@@ -25,7 +28,14 @@
|
|
|
25
28
|
<YT bind:v={section.v} />
|
|
26
29
|
{:else if section.fieldGroup == "cta-center"}
|
|
27
30
|
<CTA bind:data={section} />
|
|
31
|
+
{:else if section.fieldGroup == "sidebar-content"}
|
|
32
|
+
<SidebarContent bind:data={section}>
|
|
33
|
+
<slot/>
|
|
34
|
+
</SidebarContent>
|
|
35
|
+
{:else if section.fieldGroup == "media-feature"}
|
|
36
|
+
<MediaFeature bind:data={section} />
|
|
28
37
|
{:else if section.fieldGroup == "content"}
|
|
29
38
|
<div class="content prose"><slot/></div>
|
|
30
39
|
{/if}
|
|
31
|
-
{/each}
|
|
40
|
+
{/each}
|
|
41
|
+
</article>
|
package/package.json
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "tecitheme",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.9",
|
|
4
4
|
"svelte": true,
|
|
5
5
|
"devDependencies": {
|
|
6
|
+
"@jsdevtools/rehype-toc": "^3.0.2",
|
|
6
7
|
"@sveltejs/adapter-auto": "next",
|
|
7
8
|
"@sveltejs/adapter-netlify": "next",
|
|
8
9
|
"@sveltejs/kit": "next",
|
|
9
|
-
"@tailwindcss/forms": "^0.
|
|
10
|
+
"@tailwindcss/forms": "^0.5.0",
|
|
10
11
|
"@tailwindcss/typography": "^0.5.2",
|
|
11
12
|
"@types/cookie": "^0.4.1",
|
|
12
13
|
"@typescript-eslint/eslint-plugin": "^4.31.1",
|
|
@@ -21,13 +22,16 @@
|
|
|
21
22
|
"postcss": "^8.4.6",
|
|
22
23
|
"prettier": "^2.5.1",
|
|
23
24
|
"prettier-plugin-tailwindcss": "^0.1.7",
|
|
25
|
+
"rehype-parse": "^8.0.4",
|
|
26
|
+
"rehype-slug": "^5.0.1",
|
|
27
|
+
"rehype-stringify": "^9.0.3",
|
|
24
28
|
"stream": "^0.0.2",
|
|
25
29
|
"svelte": "^3.46.4",
|
|
26
30
|
"svelte-check": "^2.4.3",
|
|
27
31
|
"svelte-cubed": "^0.2.1",
|
|
28
|
-
"svelte-preprocess": "^4.10.
|
|
32
|
+
"svelte-preprocess": "^4.10.4",
|
|
29
33
|
"svelte2tsx": "^0.5.3",
|
|
30
|
-
"tailwindcss": "^3.0.
|
|
34
|
+
"tailwindcss": "^3.0.23",
|
|
31
35
|
"three": "^0.137.5",
|
|
32
36
|
"tslib": "^2.3.1",
|
|
33
37
|
"typescript": "^4.5.5",
|
|
@@ -37,13 +41,13 @@
|
|
|
37
41
|
"dependencies": {
|
|
38
42
|
"@lukeed/uuid": "^2.0.0",
|
|
39
43
|
"cookie": "^0.4.2",
|
|
40
|
-
"katex": "^0.15.2"
|
|
41
|
-
"ultra_cart_rest_api_v2": "^3.7.38"
|
|
44
|
+
"katex": "^0.15.2"
|
|
42
45
|
},
|
|
43
46
|
"exports": {
|
|
44
47
|
"./package.json": "./package.json",
|
|
45
48
|
"./assets/TECi_logo.svelte": "./assets/TECi_logo.svelte",
|
|
46
49
|
"./components/Banner.svelte": "./components/Banner.svelte",
|
|
50
|
+
"./components/Button.svelte": "./components/Button.svelte",
|
|
47
51
|
"./components/CTA.svelte": "./components/CTA.svelte",
|
|
48
52
|
"./components/CountrySelector.svelte": "./components/CountrySelector.svelte",
|
|
49
53
|
"./components/Figure.svelte": "./components/Figure.svelte",
|
|
@@ -51,13 +55,14 @@
|
|
|
51
55
|
"./components/Header.svelte": "./components/Header.svelte",
|
|
52
56
|
"./components/Icon.svelte": "./components/Icon.svelte",
|
|
53
57
|
"./components/Math.svelte": "./components/Math.svelte",
|
|
58
|
+
"./components/MediaFeature.svelte": "./components/MediaFeature.svelte",
|
|
54
59
|
"./components/Modal.svelte": "./components/Modal.svelte",
|
|
55
60
|
"./components/NewsGrid.svelte": "./components/NewsGrid.svelte",
|
|
56
61
|
"./components/SectionHeaderCentered.svelte": "./components/SectionHeaderCentered.svelte",
|
|
62
|
+
"./components/SidebarContent.svelte": "./components/SidebarContent.svelte",
|
|
57
63
|
"./components/ThreeColumn.svelte": "./components/ThreeColumn.svelte",
|
|
58
64
|
"./components/TrialForm.svelte": "./components/TrialForm.svelte",
|
|
59
65
|
"./components/YT.svelte": "./components/YT.svelte",
|
|
60
|
-
"./demodata": "./demodata.js",
|
|
61
66
|
"./layouts/blocks.svelte": "./layouts/blocks.svelte",
|
|
62
67
|
"./layouts/news.svelte": "./layouts/news.svelte",
|
|
63
68
|
"./req_utils": "./req_utils.js",
|
package/demodata.d.ts
DELETED
package/demodata.js
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
export const bannerData = {
|
|
2
|
-
showCTA: true,
|
|
3
|
-
shortText: "Some Banner Short text in a few words.",
|
|
4
|
-
longText: "Some Banner Long test text that goes on and on for a while with some information about something.",
|
|
5
|
-
ctaText: "Take Action",
|
|
6
|
-
ctaLink: "https://www.thunderheadeng.com"
|
|
7
|
-
}
|