tecitheme 0.2.1 → 0.2.2

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,11 +1,11 @@
1
1
  <script>
2
- import { getContext } from 'svelte';
3
- import { paginate, PaginationNav } from 'svelte-paginate';
4
- import Icon from './Icon.svelte';
2
+ import { getContext } from "svelte";
3
+ import { paginate, PaginationNav } from "svelte-paginate";
4
+ import Icon from "./Icon.svelte";
5
5
 
6
6
  export let data;
7
7
 
8
- let posts = getContext('newsPosts');
8
+ let posts = getContext("newsPosts");
9
9
  let filteredPosts = [];
10
10
  let items = [];
11
11
  let currentPage = 1;
@@ -69,7 +69,8 @@
69
69
  data-base="https://app.mailjet.com"
70
70
  data-width="640"
71
71
  data-height="480"
72
- data-statics="statics"></data>
72
+ data-statics="statics"
73
+ />
73
74
  <button
74
75
  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"
75
76
  data-token="f594659941689957f270ca278a80dc7d"
@@ -81,12 +82,12 @@
81
82
  {#if showPagination}
82
83
  <div class="paginator mx-auto flex justify-center pt-4">
83
84
  <PaginationNav
84
- totalItems="{items.length}"
85
- pageSize="{pageSize ? pageSize : 6}"
86
- currentPage="{currentPage}"
87
- limit="{1}"
88
- showStepOptions="{true}"
89
- on:setPage="{(e) => (currentPage = e.detail.page)}"
85
+ totalItems={items.length}
86
+ pageSize={pageSize ? pageSize : 6}
87
+ {currentPage}
88
+ limit={1}
89
+ showStepOptions={true}
90
+ on:setPage={(e) => (currentPage = e.detail.page)}
90
91
  />
91
92
  </div>
92
93
  {/if}
@@ -96,21 +97,26 @@
96
97
  {#each paginatedItems as post}
97
98
  <div class="h-full">
98
99
  <div class="flex h-full flex-col items-stretch ">
99
- <time
100
- class="mb-1 block text-sm text-gray-500"
101
- datetime="{post.date}"
102
- >{new Date(post.date).toLocaleDateString('en-us', { weekday:"short", year:"numeric", month:"short", day:"numeric", timeZone: "UTC", timeZoneName: "short"})}</time
100
+ <time class="mb-1 block text-sm text-gray-500" datetime={post.date}
101
+ >{new Date(post.date).toLocaleDateString("en-us", {
102
+ weekday: "short",
103
+ year: "numeric",
104
+ month: "short",
105
+ day: "numeric",
106
+ timeZone: "UTC",
107
+ timeZoneName: "short",
108
+ })}</time
103
109
  >
104
110
  <h2 class="mb-2 text-xl font-semibold text-gray-900">
105
- <a href="{post.slug}">
111
+ <a href={post.slug}>
106
112
  {post.title}
107
113
  </a>
108
114
  </h2>
109
115
  {#if post.summary}
110
116
  <p class="mb-2 flex-1 text-base text-gray-500">
111
- <a href="{post.slug}">
117
+ <a href={post.slug}>
112
118
  {post.summary.length > 190
113
- ? post.summary.substring(0, 190) + ' ...'
119
+ ? post.summary.substring(0, 190) + " ..."
114
120
  : post.summary}
115
121
  </a>
116
122
  </p>
@@ -138,7 +144,7 @@
138
144
  <p
139
145
  class="text-sm font-semibold text-teci-blue-light hover:text-teci-blue-dark"
140
146
  >
141
- <a href="{post.slug}">
147
+ <a href={post.slug}>
142
148
  Read full article<span aria-hidden="true">&nbsp;→</span>
143
149
  </a>
144
150
  </p>
@@ -149,12 +155,12 @@
149
155
  {#if showPagination}
150
156
  <div class="paginator mx-auto flex justify-center pt-8">
151
157
  <PaginationNav
152
- totalItems="{items.length}"
153
- pageSize="{pageSize ? pageSize : 6}"
154
- currentPage="{currentPage}"
155
- limit="{1}"
156
- showStepOptions="{true}"
157
- on:setPage="{(e) => (currentPage = e.detail.page)}"
158
+ totalItems={items.length}
159
+ pageSize={pageSize ? pageSize : 6}
160
+ {currentPage}
161
+ limit={1}
162
+ showStepOptions={true}
163
+ on:setPage={(e) => (currentPage = e.detail.page)}
158
164
  />
159
165
  </div>
160
166
  {/if}
@@ -7,54 +7,114 @@
7
7
  export let date;
8
8
  export let lastmod;
9
9
 
10
- let formattedDate = (date != undefined ? new Date(date).toLocaleDateString('en-us', { weekday:"short", year:"numeric", month:"short", day:"numeric", timeZone: "UTC", timeZoneName: "short"}) : undefined)
11
- let formattedLastModDate = (lastmod != undefined ? new Date(lastmod).toLocaleDateString('en-us', { weekday:"short", year:"numeric", month:"short", day:"numeric", timeZone: "UTC", timeZoneName: "short"}) : undefined)
10
+ let formattedDate =
11
+ date != undefined
12
+ ? new Date(date).toLocaleDateString("en-us", {
13
+ weekday: "short",
14
+ year: "numeric",
15
+ month: "short",
16
+ day: "numeric",
17
+ timeZone: "UTC",
18
+ timeZoneName: "short",
19
+ })
20
+ : undefined;
21
+ let formattedLastModDate =
22
+ lastmod != undefined
23
+ ? new Date(lastmod).toLocaleDateString("en-us", {
24
+ weekday: "short",
25
+ year: "numeric",
26
+ month: "short",
27
+ day: "numeric",
28
+ timeZone: "UTC",
29
+ timeZoneName: "short",
30
+ })
31
+ : undefined;
12
32
  let tocOpen = false;
13
33
  let tocBuilt = false;
14
34
  let w;
15
-
16
- $: if (w > 702 && tocOpen == false) {tocOpen = true}
17
35
 
18
- onMount( async () => {
36
+ $: if (w > 702 && tocOpen == false) {
37
+ tocOpen = true;
38
+ }
39
+
40
+ onMount(async () => {
19
41
  if (data.toc) {
20
42
  tocBuilt = buildToC();
21
- };
43
+ }
22
44
  });
23
45
  </script>
24
46
 
25
- <section bind:clientWidth={w} class="relative flex flex-row { data.fullWidth ? 'mx-0' : 'mx-auto'} {(data.toc || data.rightRail) ? 'md:space-x-8' : 'space-x-0'}">
26
-
27
- <div id="content" class="prose w-full { data.fullWidth ? 'max-w-none' : 'max-w-prose'}">
47
+ <section
48
+ bind:clientWidth={w}
49
+ class="relative flex flex-row {data.fullWidth
50
+ ? 'mx-0'
51
+ : 'mx-auto'} {data.toc || data.rightRail ? 'md:space-x-8' : 'space-x-0'}"
52
+ >
53
+ <div
54
+ id="content"
55
+ class="prose w-full {data.fullWidth ? 'max-w-none' : 'max-w-prose'}"
56
+ >
28
57
  {#if !data.hideTitle}
29
- <h1>{title}</h1>
58
+ <h1>{title}</h1>
30
59
  {/if}
31
60
  <slot />
32
- {#if (formattedDate && data.showDate)}
33
- <p class="text-sm">Published: {formattedDate}{#if (formattedLastModDate != formattedDate && formattedLastModDate)}&nbsp;&nbsp;|&nbsp;&nbsp;Last Updated: {formattedLastModDate}{/if}</p>
61
+ {#if formattedDate && data.showDate}
62
+ <p class="text-sm">
63
+ Published: {formattedDate}{#if formattedLastModDate != formattedDate && formattedLastModDate}&nbsp;&nbsp;|&nbsp;&nbsp;Last
64
+ Updated: {formattedLastModDate}{/if}
65
+ </p>
34
66
  {/if}
35
67
  </div>
36
- <aside class="relative w-0 {(data.toc || data.rightRail) ? 'md:w-60' : 'hidden'}">
68
+ <aside
69
+ class="relative w-0 {data.toc || data.rightRail ? 'md:w-60' : 'hidden'}"
70
+ >
37
71
  {#if data.toc}
38
- <div class="sticky top-8 shrink-0 flex flex-col">
39
- <button on:click={() => {tocOpen = !tocOpen;}}
40
- class="md:hidden absolute -left-10 w-10 h-10 flex items-center justify-center border border-teci-blue-light text-teci-blue-light bg-white
41
- {tocOpen ? 'border-opacity-100 bg-opacity-100 text-opacity-100' : 'border-opacity-60 bg-opacity-20 text-opacity-60 hover:border-opacity-100 hover:bg-opacity-100 hover:text-opacity-100'}"
42
- title="Table of Contents Toggle" alt="Table of Contents Toggle"
72
+ <div class="sticky top-8 flex shrink-0 flex-col">
73
+ <button
74
+ on:click={() => {
75
+ tocOpen = !tocOpen;
76
+ }}
77
+ class="absolute -left-10 flex h-10 w-10 items-center justify-center border border-teci-blue-light bg-white text-teci-blue-light md:hidden
78
+ {tocOpen
79
+ ? 'border-opacity-100 bg-opacity-100 text-opacity-100'
80
+ : 'border-opacity-60 bg-opacity-20 text-opacity-60 hover:border-opacity-100 hover:bg-opacity-100 hover:text-opacity-100'}"
81
+ title="Table of Contents Toggle"
82
+ alt="Table of Contents Toggle"
43
83
  >
44
84
  <span class="material-icons-outlined">menu_open</span>
45
85
  </button>
46
86
  {#if tocBuilt == false}
47
- <svg role="status" class="inline-block m-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">
48
- <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"/>
49
- <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"/>
87
+ <svg
88
+ role="status"
89
+ class="m-2 inline-block h-6 w-6 animate-spin fill-blue-600 text-gray-200 dark:text-gray-600"
90
+ viewBox="0 0 100 101"
91
+ fill="none"
92
+ xmlns="http://www.w3.org/2000/svg"
93
+ >
94
+ <path
95
+ 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"
96
+ fill="currentColor"
97
+ />
98
+ <path
99
+ 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"
100
+ fill="currentFill"
101
+ />
50
102
  </svg>
51
103
  {/if}
52
- <div id="ToC" class="absolute md:relative -left-[282px] border shadow-md bg-white md:left-0 font-medium text-right md:text-left p-2 {tocOpen ? 'block w-60 mb-4' : 'hidden'}">
53
- </div>
104
+ <div
105
+ id="ToC"
106
+ class="absolute -left-[282px] border bg-white p-2 text-right font-medium shadow-md md:relative md:left-0 md:text-left {tocOpen
107
+ ? 'mb-4 block w-60'
108
+ : 'hidden'}"
109
+ />
54
110
  </div>
55
111
  {/if}
56
112
  {#if data.rightRail}
57
- <div class="hidden md:block p-2 bg-gray-200 {(data.toc || data.rightRail) ? 'md:w-60' : 'w-0'}">
113
+ <div
114
+ class="hidden bg-gray-200 p-2 md:block {data.toc || data.rightRail
115
+ ? 'md:w-60'
116
+ : 'w-0'}"
117
+ >
58
118
  Dynamic Stuff
59
119
  </div>
60
120
  {/if}
@@ -2,7 +2,7 @@
2
2
  export let classes;
3
3
  </script>
4
4
 
5
- <div class="w-32 not-prose {classes ? classes : ''}">
5
+ <div class="not-prose w-32 {classes ? classes : ''}">
6
6
  <data
7
7
  id="mj-w-res-data"
8
8
  data-token="2a0fbbba6aa7f1398b091a6a5f5f2167"
@@ -13,11 +13,12 @@
13
13
  data-base="https://app.mailjet.com"
14
14
  data-width="640"
15
15
  data-height="480"
16
- data-statics="statics"></data>
16
+ data-statics="statics"
17
+ />
17
18
  <button
18
19
  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
20
  data-token="2a0fbbba6aa7f1398b091a6a5f5f2167"
20
21
  onclick="mjOpenPopin(event, this)">Subscribe</button
21
22
  >
22
23
  </div>
23
- <div class="clear-both"></div>
24
+ <div class="clear-both" />
@@ -2,7 +2,7 @@
2
2
  //Based on:
3
3
  //https://tailwindui.com/components/marketing/sections/feature-sections#component-c683653471044e6ffc32739e199dfbf2
4
4
  //https://tailwindui.com/components/marketing/sections/team-sections#component-0efa5ebc92e2aa72bc2332fcf5578869
5
- import Card from './Card.svelte';
5
+ import Card from "./Card.svelte";
6
6
  export let data;
7
7
  </script>
8
8