tecitheme 0.10.7 → 0.10.8
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,9 +1,11 @@
|
|
|
1
1
|
<script>
|
|
2
2
|
import { filter_partners, get_supported_regions } from "../partners";
|
|
3
|
-
import {
|
|
3
|
+
import { slide } from "svelte/transition";
|
|
4
4
|
import { cubicIn, cubicOut } from "svelte/easing";
|
|
5
5
|
import Icon from "./Icon.svelte";
|
|
6
|
-
|
|
6
|
+
import slugify from "slugify";
|
|
7
|
+
import { writable } from "svelte/store";
|
|
8
|
+
import { onMount } from "svelte";
|
|
7
9
|
|
|
8
10
|
export let data;
|
|
9
11
|
let {name, product} = data;
|
|
@@ -13,7 +15,7 @@
|
|
|
13
15
|
|
|
14
16
|
//For tracking which List items are expaned
|
|
15
17
|
let expanded = {};
|
|
16
|
-
partners.forEach(partner => expanded[partner.name] = false);
|
|
18
|
+
partners.forEach(partner => expanded[slugify(partner.name.toLowerCase())] = false);
|
|
17
19
|
|
|
18
20
|
//List of all known regions
|
|
19
21
|
let regions = get_supported_regions(product);
|
|
@@ -30,6 +32,16 @@
|
|
|
30
32
|
let selectedRegions = Object.entries(regionSelector).filter(([_, v]) => v).map(([region, _]) => region);
|
|
31
33
|
partners = filter_partners(product, selectedRegions).partners;
|
|
32
34
|
}
|
|
35
|
+
|
|
36
|
+
//Get anchor tag to expand specific elements
|
|
37
|
+
onMount(async () => {
|
|
38
|
+
let anchor = window.location.href.split("#")[1];
|
|
39
|
+
if (!(anchor == undefined))
|
|
40
|
+
{
|
|
41
|
+
expanded[anchor] = true;
|
|
42
|
+
}
|
|
43
|
+
})
|
|
44
|
+
|
|
33
45
|
</script>
|
|
34
46
|
|
|
35
47
|
<div id={id} class="flex flex-col space-y-12 py-6">
|
|
@@ -76,11 +88,20 @@
|
|
|
76
88
|
{#each partners as partner}
|
|
77
89
|
<!-- List Items -->
|
|
78
90
|
<li
|
|
79
|
-
|
|
91
|
+
id={slugify(partner.name.toLowerCase())}
|
|
92
|
+
class="relative py-5 hover:bg-gray-50 transform scroll-m-12"
|
|
80
93
|
in:slide={{ duration: 250, easing: cubicOut }}
|
|
81
94
|
out:slide={{ duration: 150, easing: cubicIn }}
|
|
82
95
|
>
|
|
83
|
-
<button class="w-full" on:click={() =>
|
|
96
|
+
<button class="w-full" on:click={() => {
|
|
97
|
+
expanded[slugify(partner.name.toLowerCase())] = !expanded[slugify(partner.name.toLowerCase())];
|
|
98
|
+
|
|
99
|
+
if (expanded[slugify(partner.name.toLowerCase())])
|
|
100
|
+
{
|
|
101
|
+
let url = window.location.href.split("#")[0]
|
|
102
|
+
window.location.href = url + "#" + slugify(partner.name.toLowerCase());
|
|
103
|
+
}
|
|
104
|
+
}}>
|
|
84
105
|
<div class="px-2">
|
|
85
106
|
<div class="mx-auto flex justify-between gap-x-6">
|
|
86
107
|
|
|
@@ -117,7 +138,7 @@
|
|
|
117
138
|
|
|
118
139
|
<!-- Caret -->
|
|
119
140
|
<svg
|
|
120
|
-
class="ml-2 h-5 w-5 group-hover:text-gray-900 {expanded[partner.name] == true
|
|
141
|
+
class="ml-2 h-5 w-5 group-hover:text-gray-900 {expanded[slugify(partner.name.toLowerCase())] == true
|
|
121
142
|
? 'rotate-180 text-gray-900'
|
|
122
143
|
: 'text-gray-400'}"
|
|
123
144
|
xmlns="http://www.w3.org/2000/svg"
|
|
@@ -139,7 +160,7 @@
|
|
|
139
160
|
</li>
|
|
140
161
|
|
|
141
162
|
<!-- Expanding Info Panels -->
|
|
142
|
-
{#if expanded[partner.name]}
|
|
163
|
+
{#if expanded[slugify(partner.name.toLowerCase())]}
|
|
143
164
|
<div
|
|
144
165
|
class="flex flex-col mx-auto px-6 bg-gray-50 transform"
|
|
145
166
|
in:slide={{ duration: 250, easing: cubicOut }}
|
package/dist/partners.json
CHANGED
|
@@ -678,6 +678,34 @@
|
|
|
678
678
|
}
|
|
679
679
|
]
|
|
680
680
|
},
|
|
681
|
+
{
|
|
682
|
+
"name": "Elfire",
|
|
683
|
+
"regions": ["Brazil"],
|
|
684
|
+
"address": ["Elfire Equipamentos de Segurança", "Av. Reg. Feijó, 944", "Vila Formosa, São Paulo", "SP, 03342-000, Brazil"],
|
|
685
|
+
"emails": [
|
|
686
|
+
{
|
|
687
|
+
"address": "marcio@elfire.com.br"
|
|
688
|
+
}
|
|
689
|
+
],
|
|
690
|
+
"telephones": [
|
|
691
|
+
{
|
|
692
|
+
"name": "Telephone",
|
|
693
|
+
"number": "+55 11 32808097"
|
|
694
|
+
}
|
|
695
|
+
],
|
|
696
|
+
"websites": [
|
|
697
|
+
{
|
|
698
|
+
"name": "https://www.elfire.com.br",
|
|
699
|
+
"address": "https://www.elfire.com.br"
|
|
700
|
+
}
|
|
701
|
+
],
|
|
702
|
+
"products": [
|
|
703
|
+
{
|
|
704
|
+
"name": "Pyrosim",
|
|
705
|
+
"languages": ["English"]
|
|
706
|
+
}
|
|
707
|
+
]
|
|
708
|
+
},
|
|
681
709
|
{
|
|
682
710
|
"name": "Thunderhead Engineering Consultants, Inc.",
|
|
683
711
|
"regions": ["USA", "All Other Regions"],
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "tecitheme",
|
|
3
|
-
"version": "0.10.
|
|
3
|
+
"version": "0.10.8",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"dev": "vite dev",
|
|
@@ -66,6 +66,7 @@
|
|
|
66
66
|
},
|
|
67
67
|
"dependencies": {
|
|
68
68
|
"katex": "^0.16.8",
|
|
69
|
+
"slugify": "^1.6.6",
|
|
69
70
|
"svelte": "^4.0.5"
|
|
70
71
|
}
|
|
71
|
-
}
|
|
72
|
+
}
|