|
1 | 1 | <script>
|
2 |
| - import { langStore } from "../routes/stores.js"; |
3 | 2 | import lang from "../routes/_lang.js";
|
4 | 3 | let strings = lang.strings;
|
5 | 4 | let toClose = false;
|
6 | 5 |
|
7 |
| - let language = $langStore || "en"; |
8 |
| - let languageList = [ |
9 |
| - { id: "en", name: "Accessories", link: "pattern-accessories" }, |
10 |
| - { id: "de", name: "Home & Living", link: "pattern-home-living" }, |
11 |
| - { id: "fr", name: "Phone Cases", link: "pattern-phone-cases" }, |
12 |
| - { id: "it", name: "Stationery & Office", link: "pattern-stationery-office" }, |
13 |
| - { id: "es", name: "Stickers & Skins", link: "pattern-stickers-skins" }, |
14 |
| - { id: "pl", name: "Wall Art", link: "pattern-wall-art" }, |
| 6 | + let shopList = [ |
| 7 | + { name: "Accessories", link: "pattern-accessories" }, |
| 8 | + { name: "Home & Living", link: "pattern-home-living" }, |
| 9 | + { name: "Phone Cases", link: "pattern-phone-cases" }, |
| 10 | + { name: "Stationery & Office", link: "pattern-stationery-office" }, |
| 11 | + { name: "Stickers & Skins", link: "pattern-stickers-skins" }, |
| 12 | + { name: "Wall Art", link: "pattern-wall-art" }, |
15 | 13 | ];
|
16 | 14 |
|
17 |
| - const languageName = languageList.find(({ id }) => id === language).name; |
18 |
| -
|
19 | 15 | function toggle(e) {
|
20 | 16 | e.stopPropagation();
|
21 | 17 | let menu = this.nextSibling;
|
| 18 | + // let menu = document.getElementById('shopMenu') |
| 19 | + document.getElementById('langMenu').style.display = "none"; |
22 | 20 |
|
23 | 21 | while (menu && menu.nodeType != 1) {
|
24 | 22 | menu = menu.nextSibling;
|
|
77 | 75 | <polyline points="6 9 12 15 18 9" />
|
78 | 76 | </svg>
|
79 | 77 | </button>
|
80 |
| - <ul class="menuItems p-0"> |
81 |
| - {#each languageList as lang} |
82 |
| - <li> |
83 |
| - <!-- <a class="px-4 py-3 {lang.name === languageName ? 'selectedLang' : ''}" href={lang.link}>{lang.name}</a> --> |
84 |
| - <a class="px-4 py-3" href={lang.link}>{lang.name}</a> |
85 |
| - </li> |
| 78 | + <ul id="shopMenu" class="menuItems p-0"> |
| 79 | + {#each shopList as shop} |
| 80 | + <li><a class="px-4 py-3" href={shop.link}>{shop.name}</a></li> |
86 | 81 | {/each}
|
87 | 82 | </ul>
|
88 | 83 | </div>
|
|
130 | 125 | background-clip: padding-box;
|
131 | 126 | border-radius: var(--border-radius);
|
132 | 127 | box-shadow: 0 10px 15px -3px rgb(0 0 0 / 10%), 0 4px 6px -2px rgb(0 0 0 / 5%);
|
133 |
| - /* --tw-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05); |
134 |
| - --tw-ring-offset-shadow: 0 0 #0000; |
135 |
| - box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow); */ |
136 |
| - /* padding: 0; */ |
137 | 128 | }
|
138 | 129 | .menuItems a {
|
139 | 130 | text-decoration: none;
|
140 |
| - /* padding: 0; */ |
141 | 131 | }
|
142 | 132 | .menuItems li a {
|
143 | 133 | color: var(--gray-300);
|
|
0 commit comments