tecitheme 0.1.1 → 0.1.4

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,57 +1,59 @@
1
1
  <script>
2
- export let showCTA
3
- export let shortText
4
- export let longText
5
- export let ctaText
6
- export let ctaLink
2
+ export let showCTA;
3
+ export let shortText;
4
+ export let longText;
5
+ export let ctaText;
6
+ export let ctaLink;
7
+ export let allowClose;
8
+
9
+ let bannerOpen = true;
10
+
11
+ let toggleBanner = () => {
12
+ bannerOpen = !bannerOpen
13
+ }
7
14
  </script>
8
15
 
9
- <div x-data="banner">
10
- <div x-show="open" class="bg-teci-blue-light">
11
- <div class="max-w-screen-xl mx-auto py-3 px-3 sm:px-6 lg:px-8">
12
- <div class="flex items-center justify-between flex-wrap">
13
- <div class="w-0 flex-1 flex items-center">
14
- <!-- Banner Text -->
15
- <p class="font-medium text-white truncate">
16
- <!-- Short Text -->
17
- <span class="md:hidden">
18
- {shortText}
19
- </span>
20
- <!-- Long Text-->
21
- <span class="hidden md:inline">
22
- {longText}
23
- </span>
24
- </p>
25
- </div>
26
-
27
- {#if showCTA}
28
- <!-- CTA Button -->
29
- <div class="order-3 mt-2 flex-shrink-0 w-full sm:order-2 sm:mt-0 sm:w-auto">
30
- <div class="shadow-sm">
31
- <a href={ctaLink}
32
- class="flex items-center justify-center px-4 py-2 border shadow-md border-transparent text-sm leading-5 font-medium text-teci-blue-light bg-white hover:text-white hover:bg-teci-blue-dark focus:outline-none focus:shadow-outline transition ease-in-out duration-150"
33
- aria-label="Button to {ctaText}"
34
- title="Click to {ctaText}"
35
- >
36
- {ctaText}
37
- </a>
38
- </div>
39
- </div>
40
- {/if}
41
- <!-- Hide Banner Button -->
42
- <div class="order-2 flex-shrink-0 sm:order-3 sm:ml-3">
43
- <button x-on:click="toggle" type="button"
44
- class="-mr-1 flex p-2 hover:bg-teci-blue-dark focus:outline-none focus:bg-teci-blue-dark sm:-mr-2 transition ease-in-out duration-150"
45
- aria-label="Dismiss"
46
- title="Dismiss Banner"
47
- >
48
- <svg class="h-6 w-6 text-white" fill="none" viewBox="0 0 24 24" stroke="currentColor">
49
- <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M6 18L18 6M6 6l12 12" />
50
- </svg>
51
- </button>
52
- </div>
53
- </div>
16
+ {#if bannerOpen}
17
+ <!-- This example requires Tailwind CSS v2.0+ -->
18
+ <div class="bg-teci-blue-light" >
19
+ <div class="max-w-7xl mx-auto py-3 px-3 sm:px-6 lg:px-8">
20
+ <div class="flex justify-between flex-wrap">
21
+ <div class="h-10 w-0 flex-1 flex items-center order-1">
22
+ <span class="flex p-2 bg-teci-blue-dark">
23
+ <!-- Heroicon name: outline/speakerphone -->
24
+ <svg class="h-6 w-6 text-white" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" aria-hidden="true">
25
+ <path stroke-linecap="round" stroke-linejoin="round" d="M11 5.882V19.24a1.76 1.76 0 01-3.417.592l-2.147-6.15M18 13a3 3 0 100-6M5.436 13.683A4.001 4.001 0 017 6h1.832c4.1 0 7.625-1.234 9.168-3v14c-1.543-1.766-5.067-3-9.168-3H7a3.988 3.988 0 01-1.564-.317z" />
26
+ </svg>
27
+ </span>
28
+ <p class="ml-3 font-medium text-white truncate">
29
+ <span class="inline md:hidden">{shortText}</span>
30
+ <span class="hidden md:inline">{longText}</span>
31
+ </p>
32
+ </div>
33
+ {#if showCTA}
34
+ <div class="flex-shrink-0 w-full sm:w-auto order-3 sm:order-2 mt-2 sm:mt-0 sm:ml-3">
35
+ <a href="{ctaLink}"
36
+ class="flex items-center justify-center px-4 py-2 border border-transparent shadow-sm text-sm font-medium text-teci-blue-light bg-white hover:bg-teci-blue-dark hover:text-white">
37
+ {ctaText}
38
+ </a>
39
+ </div>
40
+ {/if}
41
+ {#if allowClose}
42
+ <div class="flex-shrink-0 sm:ml-3 order-2 sm:order-3">
43
+ <button type="button" on:click={toggleBanner} class="-mr-1 flex p-2 hover:bg-teci-blue-dark focus:outline-none focus:ring-2 focus:ring-white sm:-mr-2">
44
+ <span class="sr-only">Dismiss</span>
45
+ <!-- Heroicon name: outline/x -->
46
+ <svg class="h-6 w-6 text-white" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" aria-hidden="true">
47
+ <path stroke-linecap="round" stroke-linejoin="round" d="M6 18L18 6M6 6l12 12" />
48
+ </svg>
49
+ </button>
50
+ </div>
51
+ {:else}
52
+ <div class="flex-shrink-0 order-2">
53
+ <span>&nbsp;</span>
54
54
  </div>
55
+ {/if}
55
56
  </div>
56
57
  </div>
57
-
58
+ </div>
59
+ {/if}
@@ -7,6 +7,7 @@ export default class Banner extends SvelteComponentTyped<{
7
7
  longText: any;
8
8
  ctaText: any;
9
9
  ctaLink: any;
10
+ allowClose: any;
10
11
  }, {
11
12
  [evt: string]: CustomEvent<any>;
12
13
  }, {}> {
@@ -22,6 +23,7 @@ declare const __propDef: {
22
23
  longText: any;
23
24
  ctaText: any;
24
25
  ctaLink: any;
26
+ allowClose: any;
25
27
  };
26
28
  events: {
27
29
  [evt: string]: CustomEvent<any>;
@@ -1,14 +1,24 @@
1
1
  <script>
2
+ import { dev } from '$app/env';
2
3
  //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';
4
5
  import Wrap from './Wrap.svelte';
5
6
  export let data;
6
7
  export let halfHeight;
8
+
9
+ let backgroundImage;
10
+
11
+ if (dev && data.image) {
12
+ backgroundImage = data.image;
13
+ } else {
14
+ backgroundImage = 'https://thunderheadeng-www.imgix.net'+data.image+'?w=1200&h=627&fit=crop&auto=compress&auto=format';
15
+ }
16
+
7
17
  </script>
8
18
 
9
19
  <div class="group flex flex-col items-stretch space-y-2 border border-gray-100 p-2 hover:border-gray-200 hover:shadow-md" >
10
20
  {#if data.image}
11
- <div style="background-image: url({data.image});"
21
+ <div style="background-image: url({backgroundImage});"
12
22
  class="w-full shrink-0 {halfHeight ? 'aspect-video' : 'aspect-square'} flex items-center justify-center border border-gray-200 bg-cover bg-no-repeat"
13
23
  >
14
24
  <div class="{halfHeight ? 'space-y-4' : 'space-y-8'} flex h-full w-full flex-col items-center justify-center" >
@@ -1,14 +1,28 @@
1
1
  <script>
2
+ import { dev } from '$app/env';
3
+
2
4
  export let image;
3
5
  export let title;
4
6
  export let caption;
5
7
  export let link;
8
+
9
+ let figureImage;
10
+ let figureLink;
11
+
12
+ if (dev) {
13
+ figureImage = image
14
+ figureLink = link ? link : image
15
+ } else {
16
+ figureImage = image.startsWith('http') ? image : 'https://thunderheadeng-www.imgix.net'+image+'?auto=compress&auto=format'
17
+ figureLink = link ? link : image.startsWith('http') ? image : 'https://thunderheadeng-www.imgix.net'+image
18
+ }
19
+
6
20
  </script>
7
21
 
8
22
  <section class="flex justify-center not-prose mb-8">
9
23
  <figure class="bg-white w-auto mx-auto shadow-lg border border-slate-100 p-2">
10
- <a href={link ? link : image}>
11
- <img class="w-full" src={image} alt={title} title={title}>
24
+ <a href={figureLink}>
25
+ <img class="w-full" src="{figureImage}" alt={title} title={title}>
12
26
  </a>
13
27
  {#if caption}
14
28
  <figcaption class="text-center p-2">{@html caption}</figcaption>
@@ -904,10 +904,10 @@
904
904
  >
905
905
  <div class="px-4 pt-5 pb-6 sm:pb-8">
906
906
  <div class="flex items-center justify-between">
907
- <a class="block" href="https://www.thunderheadeng.com">
907
+ <a on:click="{() => (openMenu = '')}" class="block" href="https://www.thunderheadeng.com">
908
908
  <img
909
909
  class="h-10 w-auto"
910
- src="https://files.thunderheadeng.com/support/images/te_logo.svg"
910
+ src="https://files.thunderheadeng.com/www/images/teci_logo.svg"
911
911
  alt="Thunderhead Engineering"
912
912
  />
913
913
  </a>
@@ -1073,7 +1073,7 @@
1073
1073
  <div class="flow-root">
1074
1074
  <a
1075
1075
  href="https://www.thunderheadeng.com/news"
1076
- class="-m-3 flex items-center p-3 text-base font-medium text-gray-900 hover:bg-gray-100"
1076
+ class="-m-3 flex items-start p-3 text-base font-medium text-gray-900 hover:bg-gray-100"
1077
1077
  >
1078
1078
  <svg
1079
1079
  xmlns="http://www.w3.org/2000/svg"
@@ -1095,7 +1095,7 @@
1095
1095
  <div class="flow-root">
1096
1096
  <a
1097
1097
  href="https://support.thunderheadeng.com/release-notes"
1098
- class="-m-3 flex items-center p-3 text-base font-medium text-gray-900 hover:bg-gray-100"
1098
+ class="-m-3 flex items-start p-3 text-base font-medium text-gray-900 hover:bg-gray-100"
1099
1099
  >
1100
1100
  <svg
1101
1101
  xmlns="http://www.w3.org/2000/svg"
@@ -1117,7 +1117,7 @@
1117
1117
  <div class="flow-root">
1118
1118
  <a
1119
1119
  href="https://store2.thunderheadeng.com/cart"
1120
- class="-m-3 flex items-center p-3 text-base font-medium text-gray-900 hover:bg-gray-100"
1120
+ class="-m-3 flex items-start p-3 text-base font-medium text-gray-900 hover:bg-gray-100"
1121
1121
  >
1122
1122
  <svg
1123
1123
  xmlns="http://www.w3.org/2000/svg"
@@ -1139,7 +1139,7 @@
1139
1139
  <div class="flow-root">
1140
1140
  <a
1141
1141
  href="https://store2.thunderheadeng.com/trial/"
1142
- class="-m-3 flex items-center p-3 text-base font-medium text-gray-900 hover:bg-gray-100"
1142
+ class="-m-3 flex items-start p-3 text-base font-medium text-gray-900 hover:bg-gray-100"
1143
1143
  >
1144
1144
  <svg
1145
1145
  xmlns="http://www.w3.org/2000/svg"
@@ -1160,7 +1160,7 @@
1160
1160
  <div class="flow-root">
1161
1161
  <a
1162
1162
  href="mailto:sales@thunderheadeng.com"
1163
- class="-m-3 flex items-center p-3 text-base font-medium text-gray-900 hover:bg-gray-100"
1163
+ class="-m-3 flex items-start p-3 text-base font-medium text-gray-900 hover:bg-gray-100"
1164
1164
  >
1165
1165
  <svg
1166
1166
  xmlns="http://www.w3.org/2000/svg"
@@ -1182,7 +1182,7 @@
1182
1182
  <div class="flow-root">
1183
1183
  <a
1184
1184
  href="mailto:support@thunderheadeng.com"
1185
- class="-m-3 flex items-center p-3 text-base font-medium text-gray-900 hover:bg-gray-100"
1185
+ class="-m-3 flex items-start p-3 text-base font-medium text-gray-900 hover:bg-gray-100"
1186
1186
  >
1187
1187
  <svg
1188
1188
  xmlns="http://www.w3.org/2000/svg"
@@ -1,20 +1,32 @@
1
1
  <script>
2
2
  import Video from './Video.svelte'
3
3
 
4
+ import { dev } from '$app/env';
4
5
  export let data;
6
+
7
+ let figureImage;
8
+ let figureLink;
9
+
10
+ if (dev) {
11
+ figureImage = data.image
12
+ figureLink = data.image
13
+ } else {
14
+ figureImage = data.image.startsWith('http') ? data.image : 'https://thunderheadeng-www.imgix.net'+data.image+'?w=576&ar=16:9&fit=crop&auto=compress&auto=format'
15
+ figureLink = data.image.startsWith('http') ? data.image : 'https://thunderheadeng-www.imgix.net'+data.image
16
+ }
5
17
  </script>
6
18
 
7
- <section class="w-full mx-auto flex flex-col md:flex-row items-start justify-center">
19
+ <section class="w-full mx-auto flex flex-col items-center md:flex-row md:items-start justify-center">
8
20
  {#if data.v}
9
- <div class="block w-full max-w-xl {data.position === 'right' ? 'mb-4 md:mb-0' : 'mb-0'}">
21
+ <div class="block w-full max-w-xl mb-4 md:mb-0">
10
22
  <Video bind:data />
11
23
  </div>
12
24
  {:else if data.image}
13
- <div class="block w-full max-w-xl {data.position === 'right' ? 'mb-4 md:mb-0' : 'mb-0'}">
25
+ <div class="block w-full max-w-xl mb-4 md:mb-0">
14
26
  <figure>
15
- <a href={data.image}>
27
+ <a href={figureLink}>
16
28
  <img class="w-full aspect-video object-cover border bg-black border-gray-200 shadow-md {data.imageClass ? data.imageClass : ''}"
17
- src={data.image} alt={data.name}
29
+ src={figureImage} alt={data.name}
18
30
  />
19
31
  </a>
20
32
  </figure>
@@ -3,27 +3,13 @@
3
3
  export let description
4
4
  export let image
5
5
  export let url
6
- export let host
7
-
8
- function imageURL(str)
9
- {
10
- var tarea = str;
11
- if (tarea.indexOf("http://") == 0 || tarea.indexOf("https://") == 0) {
12
- return true
13
- }
14
- return false
15
- }
16
6
  </script>
17
7
 
18
8
  <meta property="og:type" content="website">
19
- <meta property="og:url" content="{url}">
9
+ <meta property="og:url" content={url}>
20
10
  <meta name="og:title" content={title} >
21
11
  <meta name="og:description" content={description} >
22
- {#if imageURL(image)}
23
- <meta name="og:image" content="{image}" >
24
- {:else}
25
- <meta name="og:image" content="https://{host}/{image}" >
26
- {/if}
12
+ <meta name="og:image" content={image} >
27
13
  <meta name="twitter:card" content="summary_large_image">
28
14
  <meta name="twitter:site" content="@thunderheadeng">
29
15
  <meta name="twitter:creator" content="@thunderheadeng">
@@ -6,7 +6,6 @@ export default class MetaSocial extends SvelteComponentTyped<{
6
6
  description: any;
7
7
  image: any;
8
8
  url: any;
9
- host: any;
10
9
  }, {
11
10
  [evt: string]: CustomEvent<any>;
12
11
  }, {}> {
@@ -21,7 +20,6 @@ declare const __propDef: {
21
20
  description: any;
22
21
  image: any;
23
22
  url: any;
24
- host: any;
25
23
  };
26
24
  events: {
27
25
  [evt: string]: CustomEvent<any>;
@@ -126,7 +126,7 @@
126
126
  {#each post.meta.categories.sort() as term}
127
127
  <a
128
128
  class="mr-2 mb-2 inline-block"
129
- href="/news/{term}"
129
+ href="/news/filter/{term}"
130
130
  rel="external"
131
131
  >
132
132
  <span
@@ -0,0 +1,23 @@
1
+ <script>
2
+ export let classes;
3
+ </script>
4
+
5
+ <div class="w-32 not-prose {classes ? classes : ''}">
6
+ <data
7
+ id="mj-w-res-data"
8
+ data-token="2a0fbbba6aa7f1398b091a6a5f5f2167"
9
+ class="mj-w-data"
10
+ data-apikey="3aOX"
11
+ data-w-id="Fbu"
12
+ data-lang="en_US"
13
+ data-base="https://app.mailjet.com"
14
+ data-width="640"
15
+ data-height="480"
16
+ data-statics="statics"></data>
17
+ <button
18
+ class="flex w-full items-center justify-center border border-transparent bg-teci-blue-light px-4 py-2 text-base font-medium leading-6 text-white transition duration-150 ease-in-out hover:bg-teci-blue-dark focus:border-teci-blue-dark focus:outline-none"
19
+ data-token="2a0fbbba6aa7f1398b091a6a5f5f2167"
20
+ onclick="mjOpenPopin(event, this)">Subscribe</button
21
+ >
22
+ </div>
23
+ <div class="clear-both"></div>
@@ -0,0 +1,23 @@
1
+ /** @typedef {typeof __propDef.props} SubscribeProps */
2
+ /** @typedef {typeof __propDef.events} SubscribeEvents */
3
+ /** @typedef {typeof __propDef.slots} SubscribeSlots */
4
+ export default class Subscribe extends SvelteComponentTyped<{
5
+ classes: any;
6
+ }, {
7
+ [evt: string]: CustomEvent<any>;
8
+ }, {}> {
9
+ }
10
+ export type SubscribeProps = typeof __propDef.props;
11
+ export type SubscribeEvents = typeof __propDef.events;
12
+ export type SubscribeSlots = typeof __propDef.slots;
13
+ import { SvelteComponentTyped } from "svelte";
14
+ declare const __propDef: {
15
+ props: {
16
+ classes: any;
17
+ };
18
+ events: {
19
+ [evt: string]: CustomEvent<any>;
20
+ };
21
+ slots: {};
22
+ };
23
+ export {};
@@ -1,5 +1,5 @@
1
1
  <script>
2
- import { browser } from '$app/env';
2
+ import { browser, dev } from '$app/env';
3
3
  import { getContext } from 'svelte';
4
4
 
5
5
  import CTA from '../components/CTA.svelte';
@@ -41,9 +41,13 @@
41
41
  host = getContext('currentHost');
42
42
 
43
43
  if (images.length > 0) {
44
- featuredImage = images[0]
44
+ if (dev) {
45
+ featuredImage = images[0]
46
+ } else {
47
+ featuredImage = 'https://thunderheadeng-www.imgix.net'+images[0]+'?w=1200&h=627&fit=crop&auto=compress&auto=format'
48
+ }
45
49
  } else {
46
- featuredImage = "https://www.thunderheadeng.com/wp-content/uploads/2022/01/femtc-brno.jpg"
50
+ featuredImage = 'https://files.thunderheadeng.com/www/images/teci_icon_250.png'
47
51
  }
48
52
  </script>
49
53
 
@@ -51,7 +55,7 @@
51
55
  <title>{title} | Thunderhead Engineering</title>
52
56
  <meta name="description" content={summary}>
53
57
  {#if browser}
54
- <MetaSocial title={title} description={summary} image={featuredImage} {url} {host} />
58
+ <MetaSocial title={title} description={summary} image={featuredImage} {url} />
55
59
  {/if}
56
60
  </svelte:head>
57
61
 
package/package.json CHANGED
@@ -1,11 +1,11 @@
1
1
  {
2
2
  "name": "tecitheme",
3
- "version": "0.1.1",
3
+ "version": "0.1.4",
4
4
  "svelte": true,
5
5
  "devDependencies": {
6
6
  "@jsdevtools/rehype-toc": "^3.0.2",
7
7
  "@sveltejs/adapter-netlify": "next",
8
- "@sveltejs/kit": "next",
8
+ "@sveltejs/kit": "1.0.0-next.358",
9
9
  "@tailwindcss/forms": "^0.5.2",
10
10
  "@tailwindcss/typography": "^0.5.2",
11
11
  "@types/cookie": "^0.5.1",
@@ -35,7 +35,7 @@
35
35
  "tslib": "^2.4.0",
36
36
  "typescript": "^4.7.3",
37
37
  "uuid-by-string": "^3.0.7",
38
- "vite": "^2.9.12",
38
+ "vite": "^2.9.10",
39
39
  "vite-plugin-autoimport": "^1.6.6"
40
40
  },
41
41
  "type": "module",
@@ -63,6 +63,7 @@
63
63
  "./components/Modal.svelte": "./components/Modal.svelte",
64
64
  "./components/NewsGrid.svelte": "./components/NewsGrid.svelte",
65
65
  "./components/SidebarContent.svelte": "./components/SidebarContent.svelte",
66
+ "./components/Subscribe.svelte": "./components/Subscribe.svelte",
66
67
  "./components/ThreeColumn.svelte": "./components/ThreeColumn.svelte",
67
68
  "./components/TrialForm.svelte": "./components/TrialForm.svelte",
68
69
  "./components/Video.svelte": "./components/Video.svelte",