tecitheme 0.15.1 → 0.15.3

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.
@@ -33,10 +33,10 @@
33
33
 
34
34
  </script>
35
35
 
36
- <div {id} class="{getColorStyles("background", color)} py-8 lg:py-12">
36
+ <section {id} class="{getColorStyles("background", color)} py-8 lg:py-12 not-prose">
37
37
  <div class="relative isolate">
38
- <div class="mx-auto max-w-7xl sm:px-6 lg:px-8">
39
- <div class="mx-auto flex max-w-2xl flex-col gap-16 px-6 lg:mx-0 lg:max-w-none lg:flex-row lg:items-center xl:gap-x-20 xl:px-20">
38
+ <div class="mx-auto max-w-7xl">
39
+ <div class="mx-auto flex max-w-2xl flex-col gap-16 lg:mx-0 lg:max-w-none lg:flex-row lg:items-center xl:gap-x-20">
40
40
 
41
41
  <!-- Image -->
42
42
  <img
@@ -90,4 +90,4 @@
90
90
  </div>
91
91
  </div>
92
92
  </div>
93
- </div>
93
+ </section>
@@ -1,19 +1,34 @@
1
1
  <script>
2
- import { getColorStyles, makeIdString } from '../utils'
2
+ import { getColorStyles, getGridSizeStyles, makeIdString } from '../utils'
3
3
  export let data = {};
4
- let id = makeIdString(data.name);
4
+
5
+ let {
6
+ name,
7
+ heading,
8
+ subheading,
9
+ color,
10
+ image,
11
+ imageAltText,
12
+ columns,
13
+ rows,
14
+ stats,
15
+ } = data;
16
+
17
+ columns = columns ? columns : 3 //Overrides default Grid column count (1 -> 3)
18
+
19
+ let id = makeIdString(name);
5
20
  </script>
6
21
 
7
22
  <section {id} class="bg-gray-50">
8
23
  <!-- Headings -->
9
- {#if data.heading || data.subheading}
24
+ {#if heading || subheading}
10
25
  <div class="mx-auto max-w-7xl p-6 lg:p-8">
11
26
  <div class="mx-auto max-w-4xl text-center">
12
- {#if data.heading}
13
- <h2 class="text-3xl font-bold tracking-tight text-gray-900 sm:text-4xl">{@html data.heading}</h2>
27
+ {#if heading}
28
+ <h2 class="text-3xl font-bold tracking-tight text-gray-900 sm:text-4xl">{@html heading}</h2>
14
29
  {/if}
15
- {#if data.subheading}
16
- <p class="mt-3 text-xl text-gray-500 sm:mt-4">{@html data.subheading}</p>
30
+ {#if subheading}
31
+ <p class="mt-3 text-xl text-gray-500 sm:mt-4">{@html subheading}</p>
17
32
  {/if}
18
33
  </div>
19
34
  </div>
@@ -27,20 +42,20 @@
27
42
  <!-- Stats -->
28
43
  <div class="relative mx-auto max-w-7xl px-6 lg:px-8 ">
29
44
  <div class="mx-auto max-w-4xl ">
30
- <dl class="bg-white shadow ring-1 ring-black/5 sm:grid sm:grid-cols-3">
31
- {#each data.stats as stat, i}
45
+ <dl class="bg-white shadow ring-1 ring-black/5 grid {getGridSizeStyles(columns, rows)}">
46
+ {#each stats as stat, i}
32
47
  <div id="stat-{i}" class="flex flex-col border-b border-gray-100 p-6 text-center sm:border-0 sm:border-r sm:border-l">
33
48
  <dt class="order-2 mt-2 text-lg font-medium leading-6 text-gray-500">{stat.label}</dt>
34
- <dd class="order-1 text-5xl font-bold tracking-tight {getColorStyles('text', data.color)}">{stat.value}</dd>
49
+ <dd class="order-1 text-5xl font-bold tracking-tight {getColorStyles('text', color)}">{stat.value}</dd>
35
50
  </div>
36
51
  {/each}
37
52
  </dl>
38
53
  </div>
39
54
 
40
55
  <!-- Image -->
41
- {#if data.image}
56
+ {#if image}
42
57
  <figure>
43
- <img class="w-full" alt="{(data.imageAltText?data.imageAltText:data.heading)}" src="https://files.thunderheadeng.com/www/images/{data.image}?w=1152&fit=crop&auto=compress&auto=format">
58
+ <img class="w-full" alt="{(imageAltText ? imageAltText : heading)}" src="https://files.thunderheadeng.com/www/images/{image}?w=1152&fit=crop&auto=compress&auto=format">
44
59
  </figure>
45
60
  {/if}
46
61
  </div>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tecitheme",
3
- "version": "0.15.1",
3
+ "version": "0.15.3",
4
4
  "license": "MIT",
5
5
  "scripts": {
6
6
  "dev": "vite dev",