tecitheme 0.0.18 → 0.0.21

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/README.md CHANGED
@@ -12,17 +12,17 @@ This theme system is released on NPM to make it easier to include in all Thunder
12
12
  ### Authenticate to NPM
13
13
 
14
14
  1. `npm adduser`
15
- 2. Enter username and password for the npm account.
16
- 3. Enter email address
17
- 3. Enter 2FA Code
15
+ 1. Enter username and password for the npm account.
16
+ 1. Enter email address
17
+ 1. Enter 2FA Code
18
18
 
19
19
  ### Update the package version
20
20
 
21
21
  1. Edit package.json with the next version.
22
- 2. Commit and push to origin.
22
+ 1. Commit and push to origin.
23
23
 
24
24
  ### Package the project and publish
25
25
 
26
26
  1. `npm run package`
27
- 2. `cd package`
28
- 3. `npm publish`
27
+ 1. `cd package`
28
+ 1. `npm publish`
@@ -3,26 +3,24 @@
3
3
  </script>
4
4
 
5
5
  <!-- This example requires Tailwind CSS v2.0+ -->
6
- <section class="mb-12">
7
- <div class="mx-auto text-center px-4 sm:px-6 lg:px-8">
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-sm w-full max-w-xs">
22
- <a href={link.linkURL} class="btn w-full inline-flex items-center px-5 py-3 text-base">{link.linkText}</a>
23
- </div>
24
- {/each}
6
+ <section class="mb-12 mx-auto text-center px-4 sm:px-6 lg:px-8">
7
+ {#if data.title}
8
+ <h2 class="{ data.subtitle ? 'mb-4' : 'mb-8'} text-3xl font-bold tracking-tight text-gray-900 sm:text-4xl">
9
+ <span class="block">{data.title}</span>
10
+ </h2>
11
+ {/if}
12
+ {#if data.subtitle}
13
+ <h3 class="mb-8 text-xl font-bold tracking-tight text-teci-blue-dark">
14
+ <span class="block">{data.subtitle}</span>
15
+ </h3>
16
+ {/if}
17
+ {#if data.links}
18
+ <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">
19
+ {#each data.links as link}
20
+ <div class="inline-flex shadow-sm w-full max-w-xs">
21
+ <a href={link.linkURL} class="btn w-full inline-flex items-center px-5 py-3 text-base">{link.linkText}</a>
25
22
  </div>
26
- {/if}
23
+ {/each}
27
24
  </div>
25
+ {/if}
28
26
  </section>
@@ -1,52 +1,65 @@
1
1
  <script>
2
2
  //Allows icons from https://fonts.google.com/icons?selected=Material+Icons by name in the format 'icon-XXXX'.
3
- import Icon from './Icon.svelte';
3
+ import Icon from './Icon.svelte';
4
4
  import Wrap from './Wrap.svelte';
5
5
  export let data;
6
6
  export let halfHeight;
7
7
  </script>
8
8
 
9
- <Wrap tag='a' when={!data.links} href={data.cardURL}>
10
- <div class="group space-y-4 p-2 border border-gray-100 hover:border-gray-200 hover:shadow-md">
9
+ <div class="group flex flex-col items-stretch space-y-2 border border-gray-100 p-2 hover:border-gray-200 hover:shadow-md" >
11
10
  {#if data.image}
12
- <div style="background-image: url({data.image});" class="w-full {halfHeight ? 'aspect-video' : 'aspect-square'} bg-cover bg-no-repeat border border-gray-200 flex items-center justify-center">
13
- <div class="{halfHeight ? 'space-y-4' : 'space-y-8'} p-4 flex flex-col w-full h-full justify-center items-center">
14
- {#if data.links}
15
- {#each data.links as link}
16
- <a href={link.linkURL} class="whitespace-nowrap text-sm btn w-3/4 text-center">{link.linkText}</a>
17
- {/each}
18
- {:else}
19
- <span>&#8203;</span>
20
- {/if}
11
+ <div style="background-image: url({data.image});"
12
+ 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
+ >
14
+ <div class="{halfHeight ? 'space-y-4' : 'space-y-8'} flex h-full w-full flex-col items-center justify-center" >
15
+ {#if data.links}
16
+ {#each data.links as link}
17
+ <a href={link.linkURL} class="btn w-3/4 whitespace-nowrap text-center text-sm" >
18
+ {link.linkText}
19
+ </a>
20
+ {/each}
21
+ {:else}
22
+ <a href={data.cardURL} class="h-full w-full">
23
+ <span>&#8203;</span>
24
+ </a>
25
+ {/if}
26
+ </div>
21
27
  </div>
22
- </div>
23
28
  {/if}
24
- <div>
25
- <a href={data.cardURL}>
26
- <div class="flex flex-row items-start space-x-4 mb-2">
27
- {#if data.icon}
29
+ <a href={data.cardURL}>
30
+ <div class="flex flex-row items-start space-x-2">
31
+ {#if data.icon}
28
32
  <div class="grid place-items-center">
29
33
  <Icon classes={data.classes} icon={data.icon} />
30
34
  </div>
31
- {/if}
32
- <div class="leading-none font-medium flex flex-col">
35
+ {/if}
36
+ {#if data.heading || data.subheading}
37
+ <div class="flex flex-col font-medium leading-none">
33
38
  {#if data.heading}
34
- <h3 class="text-2xl leading-none">{data.heading}</h3>
39
+ <h3 class="text-2xl leading-none">{data.heading}</h3>
35
40
  {/if}
36
41
  {#if data.subheading}
37
- <p class="text-teci-blue-dark leading-6">{data.subheading}</p>
42
+ <p class="leading-6 text-teci-blue-dark">{data.subheading}</p>
38
43
  {/if}
39
44
  </div>
40
- </div>
41
- {#if data.text}
42
- <div class="text-lg w-full">
43
- <p class="text-gray-500">{data.text}</p>
44
- <div class="w-full flex flex-col items-end">
45
- <span class="inline-block max-w-sm text-center text-sm font-medium text-white mt-1 btn">{data.cardLinkText}</span>
46
- </div>
47
- </div>
48
45
  {/if}
46
+ </div>
47
+ </a>
48
+ {#if data.text}
49
+ <div class="flex w-full flex-1 flex-col">
50
+ {data.text}
51
+ {#if data.cardActionStyle == 'link'}
52
+ <a class="inline-block mt-2 text-sm font-medium text-teci-blue-light" href={data.cardURL}>
53
+ {data.cardLinkText}<span aria-hidden="true"> →</span>
54
+ </a>
55
+ {/if}
56
+ </div>
57
+ {/if}
58
+ {#if data.cardActionStyle == 'button'}
59
+ <a class="block shrink-0" href={data.cardURL}>
60
+ <div class="flex w-full flex-col items-end">
61
+ <span class="btn text-sm">{data.cardLinkText}</span>
62
+ </div>
49
63
  </a>
50
- </div>
64
+ {/if}
51
65
  </div>
52
- </Wrap>
@@ -2,11 +2,12 @@
2
2
  export let image;
3
3
  export let title;
4
4
  export let caption;
5
+ export let link;
5
6
  </script>
6
7
 
7
8
  <section class="flex justify-center not-prose mb-8">
8
9
  <figure class="bg-white w-auto mx-auto shadow-lg border border-slate-100 p-2">
9
- <a href={image}>
10
+ <a href={link ? link : image}>
10
11
  <img class="w-full" src={image} alt={title} title={title}>
11
12
  </a>
12
13
  {#if caption}
@@ -5,6 +5,7 @@ export default class Figure extends SvelteComponentTyped<{
5
5
  image: any;
6
6
  title: any;
7
7
  caption: any;
8
+ link: any;
8
9
  }, {
9
10
  [evt: string]: CustomEvent<any>;
10
11
  }, {}> {
@@ -18,6 +19,7 @@ declare const __propDef: {
18
19
  image: any;
19
20
  title: any;
20
21
  caption: any;
22
+ link: any;
21
23
  };
22
24
  events: {
23
25
  [evt: string]: CustomEvent<any>;