tecitheme 0.1.2 → 0.1.5

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('https://thunderheadeng-www.imgix.net{data.image}?w=600&auto=compress&auto=format');"
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 : 'https://thunderheadeng-www.imgix.net' + image}>
11
- <img class="w-full" src="https://thunderheadeng-www.imgix.net{image}?auto=compress&auto=format" 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>
@@ -1,7 +1,19 @@
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
19
  <section class="w-full mx-auto flex flex-col items-center md:flex-row md:items-start justify-center">
@@ -12,9 +24,9 @@ import Video from './Video.svelte'
12
24
  {:else if data.image}
13
25
  <div class="block w-full max-w-xl mb-4 md:mb-0">
14
26
  <figure>
15
- <a href="https://thunderheadeng-www.imgix.net{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="https://thunderheadeng-www.imgix.net{data.image}?w=576&ar=16:9&fit=crop&auto=compress&auto=format" alt={data.name}
29
+ src={figureImage} alt={data.name}
18
30
  />
19
31
  </a>
20
32
  </figure>
@@ -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,7 +41,11 @@
41
41
  host = getContext('currentHost');
42
42
 
43
43
  if (images.length > 0) {
44
- featuredImage = 'https://thunderheadeng-www.imgix.net'+images[0]+'?w=1200&h=627&fit=crop&auto=compress&auto=format'
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
50
  featuredImage = 'https://files.thunderheadeng.com/www/images/teci_icon_250.png'
47
51
  }
package/package.json CHANGED
@@ -1,11 +1,11 @@
1
1
  {
2
2
  "name": "tecitheme",
3
- "version": "0.1.2",
3
+ "version": "0.1.5",
4
4
  "svelte": true,
5
5
  "devDependencies": {
6
6
  "@jsdevtools/rehype-toc": "^3.0.2",
7
- "@sveltejs/adapter-netlify": "next",
8
- "@sveltejs/kit": "next",
7
+ "@sveltejs/adapter-netlify": "1.0.0-next.65",
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",