spoko-design-system 1.1.1 → 1.1.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.
Files changed (113) hide show
  1. package/.claude/settings.local.json +2 -1
  2. package/.github/workflows/code-quality.yml +3 -3
  3. package/.prettierrc +1 -0
  4. package/CHANGELOG.md +12 -0
  5. package/package.json +8 -2
  6. package/src/MyComponent.astro +1 -1
  7. package/src/components/Badge.vue +2 -2
  8. package/src/components/Badges.vue +17 -7
  9. package/src/components/Breadcrumbs.vue +47 -39
  10. package/src/components/Button.vue +31 -30
  11. package/src/components/ButtonCopy.astro +12 -17
  12. package/src/components/ButtonCopy.vue +26 -25
  13. package/src/components/Card.astro +4 -6
  14. package/src/components/Carousel.astro +4 -4
  15. package/src/components/Category/CategoriesCarousel.astro +75 -75
  16. package/src/components/Category/CategoryDetails.astro +75 -79
  17. package/src/components/Category/CategoryLink.vue +8 -12
  18. package/src/components/Category/CategorySidebarToggler.vue +2 -7
  19. package/src/components/Category/CategoryTile.astro +3 -3
  20. package/src/components/Category/CategoryViewToggler.astro +18 -18
  21. package/src/components/Category/SubCategoryLink.vue +13 -13
  22. package/src/components/Faq.astro +16 -17
  23. package/src/components/FaqItem.astro +27 -27
  24. package/src/components/FeaturesList.vue +19 -29
  25. package/src/components/FuckRussia.vue +40 -27
  26. package/src/components/HandDrive.astro +11 -15
  27. package/src/components/Header/Header.astro +165 -166
  28. package/src/components/Header/SkipToContent.astro +1 -1
  29. package/src/components/Headline.vue +44 -27
  30. package/src/components/Image.astro +5 -7
  31. package/src/components/Input.vue +143 -153
  32. package/src/components/Jumbotron/index.astro +143 -156
  33. package/src/components/Jumbotron/types.ts +28 -29
  34. package/src/components/Jumbotron/variants/Default.astro +44 -40
  35. package/src/components/Jumbotron/variants/Hero.astro +45 -53
  36. package/src/components/Jumbotron/variants/Post.astro +68 -64
  37. package/src/components/Jumbotron/variants/PostSplit.astro +89 -81
  38. package/src/components/Jumbotron.astro +12 -12
  39. package/src/components/LanguageSuggestion.astro +66 -69
  40. package/src/components/LeftSidebar.astro +10 -10
  41. package/src/components/MainColors.vue +2 -2
  42. package/src/components/MainInput.vue +6 -3
  43. package/src/components/Modal.astro +2 -2
  44. package/src/components/PartNumber.vue +2 -3
  45. package/src/components/Post/PostCategories.astro +2 -4
  46. package/src/components/Post/PostCategories.vue +2 -2
  47. package/src/components/PostHeader.astro +4 -6
  48. package/src/components/PrCode.vue +20 -19
  49. package/src/components/Product/ProductButton.vue +2 -5
  50. package/src/components/Product/ProductCarousel.astro +38 -27
  51. package/src/components/Product/ProductColors.vue +46 -42
  52. package/src/components/Product/ProductDetailName.vue +22 -22
  53. package/src/components/Product/ProductDetails.vue +115 -99
  54. package/src/components/Product/ProductDoc.vue +27 -25
  55. package/src/components/Product/ProductEngineType.vue +13 -10
  56. package/src/components/Product/ProductImage.astro +18 -19
  57. package/src/components/Product/ProductLink.astro +78 -57
  58. package/src/components/Product/ProductLink.vue +55 -58
  59. package/src/components/Product/ProductLinkInfo.astro +15 -18
  60. package/src/components/Product/ProductModel.vue +25 -24
  61. package/src/components/Product/ProductModels.vue +29 -33
  62. package/src/components/Product/ProductName.vue +15 -15
  63. package/src/components/Product/ProductNumber.astro +23 -31
  64. package/src/components/Product/ProductPositions.vue +32 -34
  65. package/src/components/ProductCarousel.astro +5 -5
  66. package/src/components/ProductCodes.vue +12 -14
  67. package/src/components/ProductDetailName.vue +18 -20
  68. package/src/components/ProductDetailsList.vue +48 -27
  69. package/src/components/ProductTile.astro +40 -36
  70. package/src/components/Quote.vue +8 -6
  71. package/src/components/ReloadPrompt.astro +39 -47
  72. package/src/components/SlimBanner.vue +44 -19
  73. package/src/components/Table.vue +4 -6
  74. package/src/components/Translations.vue +17 -8
  75. package/src/components/flags/FlagPL.vue +4 -3
  76. package/src/components/flags/FlagUA.vue +2 -2
  77. package/src/components/layout/CallToAction.astro +17 -12
  78. package/src/components/layout/Container.astro +3 -1
  79. package/src/components/layout/Header.astro +12 -21
  80. package/src/config.ts +43 -43
  81. package/src/design.config.ts +63 -63
  82. package/src/env.d.ts +4 -4
  83. package/src/layouts/Layout.astro +10 -19
  84. package/src/layouts/MainLayout.astro +13 -19
  85. package/src/layouts/partials/FooterCommon.astro +2 -2
  86. package/src/layouts/partials/HeadCommon.astro +9 -9
  87. package/src/layouts/partials/HeadSEO.astro +12 -5
  88. package/src/pages/components/icons.astro +130 -121
  89. package/src/pages/core/shadows.astro +18 -11
  90. package/src/pages/core/typography.astro +36 -36
  91. package/src/pages/index.astro +178 -75
  92. package/src/pwa.ts +4 -4
  93. package/src/styles/base/base.css +14 -19
  94. package/src/styles/base/grid.css +54 -58
  95. package/src/styles/base/typography.css +40 -40
  96. package/src/styles/content.css +25 -23
  97. package/src/styles/main.css +5 -6
  98. package/src/types/Product.ts +31 -31
  99. package/src/types/astro.d.ts +1 -1
  100. package/src/types/index.ts +234 -237
  101. package/src/utils/api/getCategories.ts +9 -9
  102. package/src/utils/category/getMainCategoryList.ts +22 -22
  103. package/src/utils/category/getSortedCategories.ts +7 -11
  104. package/src/utils/product/getPriceFormatted.ts +14 -11
  105. package/src/utils/product/getProductChecklist.ts +10 -11
  106. package/src/utils/product/useFormatProductNumber.ts +18 -9
  107. package/src/utils/seo/getShorterDescription.ts +6 -4
  108. package/src/utils/text/formatDate.ts +2 -3
  109. package/src/utils/text/formatLocaleNumber.ts +2 -2
  110. package/src/utils/text/formatPad.ts +2 -2
  111. package/src/utils/text/getNumberFormatted.ts +10 -10
  112. package/src/utils/text/getTranslatedLink.ts +3 -3
  113. package/src/utils/text.ts +11 -8
@@ -1,5 +1,5 @@
1
1
  <script lang="ts" setup>
2
- import type { PropType } from 'vue'
2
+ import type { PropType } from 'vue';
3
3
  import PrCode from './PrCode.vue';
4
4
 
5
5
  const props = defineProps({
@@ -13,27 +13,25 @@ const props = defineProps({
13
13
  default: false,
14
14
  required: false,
15
15
  },
16
- })
16
+ });
17
17
 
18
- const codes = props.prcodes || []
19
- const decodedCodes = codes ? codes.sort() : []
18
+ const codes = props.prcodes || [];
19
+ const decodedCodes = codes ? codes.sort() : [];
20
20
 
21
21
  const settings = {
22
22
  prcodes: decodedCodes,
23
- }
23
+ };
24
24
  </script>
25
25
 
26
26
  <template>
27
-
28
- <span
29
- v-for="(prcode, index) in settings.prcodes"
30
- :key="index"
31
- class="not-last:mr-1"
32
- >
27
+ <span v-for="(prcode, index) in settings.prcodes" :key="index" class="not-last:mr-1">
33
28
  <PrCode :prcode="prcode" v-if="!String(prcode).includes('+')" />
34
- <span v-else >
35
- <PrCode v-for="(splittedCode, index2) in String(prcode).split('+')" :key="index2" :prcode="splittedCode" />
29
+ <span v-else>
30
+ <PrCode
31
+ v-for="(splittedCode, index2) in String(prcode).split('+')"
32
+ :key="index2"
33
+ :prcode="splittedCode"
34
+ />
36
35
  </span>
37
36
  </span>
38
37
  </template>
39
-
@@ -3,7 +3,9 @@ import { PropType } from 'vue';
3
3
 
4
4
  const props = defineProps({
5
5
  as: {
6
- type: String as PropType< 'th'| 'td' | 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6' | 'p' | 'div' | 'span'>,
6
+ type: String as PropType<
7
+ 'th' | 'td' | 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6' | 'p' | 'div' | 'span'
8
+ >,
7
9
  default: 'div',
8
10
  required: true,
9
11
  },
@@ -16,8 +18,8 @@ const props = defineProps({
16
18
  type: String,
17
19
  default: '',
18
20
  required: false,
19
- }
20
- })
21
+ },
22
+ });
21
23
  </script>
22
24
 
23
25
  <template>
@@ -28,26 +30,22 @@ const props = defineProps({
28
30
  </component>
29
31
  </template>
30
32
 
31
-
32
33
  <style>
33
34
  .detail-name {
34
35
  @apply overflow-hidden relative;
35
36
 
36
- span {
37
- @apply block bg-white relative z-10 pr-1.5 w-full;
38
-
39
- &:before {
40
- /* // order: 2; */
41
- @apply text-gray-300 absolute select-none border-b border-gray-200 w-full -z-1 absolute content-empty left-0;
42
- height: 1em;
43
- white-space: nowrap;
44
- font-weight: 100;
45
- bottom: 2px;
46
- flex: 1;
47
- }
37
+ span {
38
+ @apply block bg-white relative z-10 pr-1.5 w-full;
39
+
40
+ &:before {
41
+ /* // order: 2; */
42
+ @apply text-gray-300 absolute select-none border-b border-gray-200 w-full -z-1 absolute content-empty left-0;
43
+ height: 1em;
44
+ white-space: nowrap;
45
+ font-weight: 100;
46
+ bottom: 2px;
47
+ flex: 1;
48
48
  }
49
-
50
-
49
+ }
51
50
  }
52
-
53
- </style>
51
+ </style>
@@ -1,6 +1,6 @@
1
1
  <script setup lang="ts">
2
- import { PropType, computed } from "vue";
3
- import ProductDetailName from "./ProductDetailName.vue";
2
+ import { PropType, computed } from 'vue';
3
+ import ProductDetailName from './ProductDetailName.vue';
4
4
 
5
5
  interface ColorCode {
6
6
  code: string;
@@ -30,7 +30,7 @@ interface GroupedLink {
30
30
 
31
31
  const props = defineProps({
32
32
  items: { type: Array as PropType<TableItem[]>, default: () => [] },
33
- caption: { type: String, default: null }
33
+ caption: { type: String, default: null },
34
34
  });
35
35
 
36
36
  // Function to check if a value is a link
@@ -60,7 +60,6 @@ const isForExteriorColour = (item: TableItem) => {
60
60
  return item.id === 'for-exterior-colour' && Array.isArray(item.value);
61
61
  };
62
62
 
63
-
64
63
  // Function to check if value is HTML string (fallback)
65
64
  const isHtmlValue = (value: unknown): boolean => {
66
65
  return typeof value === 'string' && (value.includes('<span') || value.includes('<br>'));
@@ -72,9 +71,12 @@ const getHeaderText = (row: TableItem | GroupedLink) => {
72
71
  return row.id.charAt(0).toUpperCase() + row.id.slice(1);
73
72
  }
74
73
  // Użyj `name` z obiektu `TableItem`, jeśli istnieje, w przeciwnym razie sformatuj `id`.
75
- return 'name' in row ? row.name : row.id.split('-')
76
- .map(word => word.charAt(0).toUpperCase() + word.slice(1))
77
- .join(' ');
74
+ return 'name' in row
75
+ ? row.name
76
+ : row.id
77
+ .split('-')
78
+ .map(word => word.charAt(0).toUpperCase() + word.slice(1))
79
+ .join(' ');
78
80
  };
79
81
 
80
82
  // Function to determine the icon class for a link type
@@ -110,14 +112,14 @@ const groupedItems = computed(() => {
110
112
  if (!linkGroups.has(item.id)) {
111
113
  linkGroups.set(item.id, {
112
114
  id: item.id,
113
- links: []
115
+ links: [],
114
116
  });
115
117
  }
116
118
 
117
119
  // Add link to the relevant group
118
120
  linkGroups.get(item.id)?.links.push({
119
121
  name: item.name,
120
- value: item.value as string
122
+ value: item.value as string,
121
123
  });
122
124
  } else {
123
125
  // If it's not a link, add it normally to the results
@@ -140,18 +142,26 @@ const groupedItems = computed(() => {
140
142
  <slot name="caption">{{ caption }}</slot>
141
143
  </caption>
142
144
  <colgroup>
143
- <col class="details-table-col">
144
- <col class="details-table-col">
145
+ <col class="details-table-col" />
146
+ <col class="details-table-col" />
145
147
  </colgroup>
146
148
  <tbody>
147
- <tr v-for="row, index in groupedItems" :key="index" class="details-table-row">
149
+ <tr v-for="(row, index) in groupedItems" :key="index" class="details-table-row">
148
150
  <ProductDetailName as="th" :text="getHeaderText(row)" class="details-table-header" />
149
151
 
150
152
  <td v-if="'links' in row" class="details-table-cell">
151
153
  <ul class="list-none p-0 m-0">
152
- <li v-for="(link, linkIndex) in row.links" :key="linkIndex" class="mb-2 last:mb-0 flex items-center">
154
+ <li
155
+ v-for="(link, linkIndex) in row.links"
156
+ :key="linkIndex"
157
+ class="mb-2 last:mb-0 flex items-center"
158
+ >
153
159
  <span
154
- :class="[getLinkIconClass(row.id), 'leading-none inline-block mr-2 w-4 min-w-4 h-4 text-gray-400']" />
160
+ :class="[
161
+ getLinkIconClass(row.id),
162
+ 'leading-none inline-block mr-2 w-4 min-w-4 h-4 text-gray-400',
163
+ ]"
164
+ />
155
165
  <a :href="link.value" target="_blank" rel="noopener noreferrer" class="link-primary">
156
166
  {{ link.name }}
157
167
  </a>
@@ -161,13 +171,15 @@ const groupedItems = computed(() => {
161
171
 
162
172
  <td v-else-if="'id' in row && isColorArray(row)" class="details-table-cell">
163
173
  <ul class="list-none p-0 m-0">
164
- <li v-for="(colorItem, colorIndex) in (row.value as ColorCode[])" :key="colorIndex"
165
- class="flex items-center gap-1 mb-1 last:mb-0">
166
-
174
+ <li
175
+ v-for="(colorItem, colorIndex) in row.value as ColorCode[]"
176
+ :key="colorIndex"
177
+ class="flex items-center gap-1 mb-1 last:mb-0"
178
+ >
167
179
  <template v-if="colorItem.code">
168
180
  <code class="font-mono text-sm">
169
- {{ colorItem.code }}
170
- </code>
181
+ {{ colorItem.code }}
182
+ </code>
171
183
  <span class="text-gray-400">-</span>
172
184
  </template>
173
185
  <span class="text-gray-700 dark:text-gray-300">{{ colorItem.name }}</span>
@@ -181,13 +193,15 @@ const groupedItems = computed(() => {
181
193
 
182
194
  <td v-else-if="'id' in row && isForExteriorColour(row)" class="details-table-cell">
183
195
  <ul class="list-none p-0 m-0">
184
- <li v-for="(colorEntry, colourIndex) in (row.value as ColorCode[])" :key="colourIndex"
185
- class="flex items-center gap-1 mb-1 last:mb-0">
186
-
196
+ <li
197
+ v-for="(colorEntry, colourIndex) in row.value as ColorCode[]"
198
+ :key="colourIndex"
199
+ class="flex items-center gap-1 mb-1 last:mb-0"
200
+ >
187
201
  <template v-if="colorEntry.code">
188
202
  <code class="font-mono text-sm">
189
- {{ colorEntry.code }}
190
- </code>
203
+ {{ colorEntry.code }}
204
+ </code>
191
205
  <span class="text-gray-400">-</span>
192
206
  </template>
193
207
  <span class="text-gray-700 dark:text-gray-300">{{ colorEntry.name }}</span>
@@ -197,15 +211,22 @@ const groupedItems = computed(() => {
197
211
 
198
212
  <td v-else-if="'id' in row && isGenericArray(row)" class="details-table-cell">
199
213
  <ul class="list-none p-0 m-0">
200
- <li v-for="(item, itemIndex) in (row.value as string[])" :key="itemIndex"
201
- class="flex items-start gap-2 mb-1 last:mb-0 leading-relaxed">
214
+ <li
215
+ v-for="(item, itemIndex) in row.value as string[]"
216
+ :key="itemIndex"
217
+ class="flex items-start gap-2 mb-1 last:mb-0 leading-relaxed"
218
+ >
202
219
  <span class="text-gray-500 font-bold flex-shrink-0 mt-0.5">·</span>
203
220
  <span class="text-gray-700 dark:text-gray-300 text-sm">{{ item }}</span>
204
221
  </li>
205
222
  </ul>
206
223
  </td>
207
224
 
208
- <td v-else-if="'id' in row && isHtmlValue(row.value)" class="details-table-cell" v-html="row.value"></td>
225
+ <td
226
+ v-else-if="'id' in row && isHtmlValue(row.value)"
227
+ class="details-table-cell"
228
+ v-html="row.value"
229
+ ></td>
209
230
 
210
231
  <slot v-else-if="'id' in row" :name="row.id">
211
232
  <td class="details-table-cell">{{ row.value }}</td>
@@ -1,47 +1,51 @@
1
1
  ---
2
2
  const { productObject, locale, index } = Astro.props;
3
- import Image from "./Image.astro"
4
- import ProductNumber from "./Product/ProductNumber.astro"
3
+ import Image from './Image.astro';
4
+ import ProductNumber from './Product/ProductNumber.astro';
5
5
  ---
6
6
 
7
- { productObject &&
8
- (
9
-
10
- <!-- product image -->
11
- <div class="img--4/3 img--small">
12
- { productObject.photo !== null ?
13
- <Image
14
- imageObject={
15
- {
7
+ {
8
+ productObject && (
9
+ <>
10
+ <div class="img--4/3 img--small">
11
+ {productObject.photo !== null ? (
12
+ <Image
13
+ imageObject={{
16
14
  src: 'https://img.freepik.com/darmowe-wektory/tlo-retro-modeli-geometrycznych_52683-17902.jpg?w=1380&t=st=1706311337',
17
15
  alt: 'Image Alt',
18
16
  height: '180',
19
17
  width: '240',
20
- class: 'img--overlay object-cover'
21
- }
22
- }
23
- />
24
- :
25
- <img src="/1x1.png" class="bg-gray-100/70" alt={productObject.name} />
26
- }
27
- </div>
28
-
29
- <!-- product deails -->
30
- <div class="sm:pl-4 flex flex-col" >
31
- <a class="font-light leading-none mb-2 pr-4 line-clamp-2 h-[2em] before:(content-empty absolute left-0 right-4 h-full top-0)"
32
- href={productObject.url} itemprop="url"
33
- title={productObject.number}
34
- >
35
- { productObject.name }
36
- </a>
18
+ class: 'img--overlay object-cover',
19
+ }}
20
+ />
21
+ ) : (
22
+ <img src="/1x1.png" class="bg-gray-100/70" alt={productObject.name} />
23
+ )}
24
+ </div>
37
25
 
38
- <ProductNumber productNumber={productObject.number} copyDisabled={false} buttonTexts={{ copy: 'Copy', copied: 'Copied' }} />
39
-
40
- { index !== null &&
41
- ( <meta itemprop="position" content={String(index)} />
42
- <meta itemprop="name" content={productObject.name} /> )
43
- }
44
- </div>
26
+ <div class="sm:pl-4 flex flex-col">
27
+ <a
28
+ class="font-light leading-none mb-2 pr-4 line-clamp-2 h-[2em] before:(content-empty absolute left-0 right-4 h-full top-0)"
29
+ href={productObject.url}
30
+ itemprop="url"
31
+ title={productObject.number}
32
+ >
33
+ {productObject.name}
34
+ </a>
45
35
 
46
- )}
36
+ <ProductNumber
37
+ productNumber={productObject.number}
38
+ copyDisabled={false}
39
+ buttonTexts={{ copy: 'Copy', copied: 'Copied' }}
40
+ />
47
41
 
42
+ {index !== null && (
43
+ <>
44
+ <meta itemprop="position" content={String(index)} />
45
+ <meta itemprop="name" content={productObject.name} />
46
+ </>
47
+ )}
48
+ </div>
49
+ </>
50
+ )
51
+ }
@@ -11,13 +11,15 @@ const props = defineProps({
11
11
  type: String,
12
12
  default: '',
13
13
  required: false,
14
- }
15
- })
14
+ },
15
+ });
16
16
  </script>
17
17
 
18
18
  <template>
19
- <component :is="props.as"
20
- class="px-8 sm:px-8 mx-4 sm:mx-6 lg:max-w-4xl drop-shadow-primary text-2xl md:text-4xl lg:text-4.5xl relative font-light after:left-0 after:content-empty after:rounded-3xl after:top-0 after:absolute after:h-full after:border-solid after:border-[var(--primary)] after:border-l-3 after:z-0">
21
- <slot>{{ props.text }}</slot>
22
- </component>
19
+ <component
20
+ :is="props.as"
21
+ class="px-8 sm:px-8 mx-4 sm:mx-6 lg:max-w-4xl drop-shadow-primary text-2xl md:text-4xl lg:text-4.5xl relative font-light after:left-0 after:content-empty after:rounded-3xl after:top-0 after:absolute after:h-full after:border-solid after:border-[var(--primary)] after:border-l-3 after:z-0"
22
+ >
23
+ <slot>{{ props.text }}</slot>
24
+ </component>
23
25
  </template>
@@ -1,51 +1,43 @@
1
1
  <script src="./../pwa.ts"></script>
2
- <div
3
- id="pwa-toast"
4
- role="alert"
5
- aria-labelledby="toast-message"
6
- >
7
- <div class="message">
8
- <span id="toast-message"></span>
9
- </div>
10
- <button id="pwa-refresh">
11
- Reload
12
- </button>
13
- <button id="pwa-close">
14
- Close
15
- </button>
2
+ <div id="pwa-toast" role="alert" aria-labelledby="toast-message">
3
+ <div class="message">
4
+ <span id="toast-message"></span>
5
+ </div>
6
+ <button id="pwa-refresh"> Reload </button>
7
+ <button id="pwa-close"> Close </button>
16
8
  </div>
17
9
 
18
10
  <style>
19
- #pwa-toast {
20
- visibility: hidden;
21
- position: fixed;
22
- right: 0;
23
- bottom: 0;
24
- margin: 16px;
25
- padding: 12px;
26
- border: 1px solid #8885;
27
- border-radius: 4px;
28
- z-index: 1;
29
- text-align: left;
30
- box-shadow: 3px 4px 5px 0 #8885;
31
- }
32
- #pwa-toast .message {
33
- margin-bottom: 8px;
34
- }
35
- #pwa-toast button {
36
- border: 1px solid #8885;
37
- outline: none;
38
- margin-right: 5px;
39
- border-radius: 2px;
40
- padding: 3px 10px;
41
- }
42
- #pwa-toast.show {
43
- visibility: visible;
44
- }
45
- button#pwa-refresh {
46
- display: none;
47
- }
48
- #pwa-toast.show.refresh button#pwa-refresh {
49
- display: inline-block;
50
- }
51
- </style>
11
+ #pwa-toast {
12
+ visibility: hidden;
13
+ position: fixed;
14
+ right: 0;
15
+ bottom: 0;
16
+ margin: 16px;
17
+ padding: 12px;
18
+ border: 1px solid #8885;
19
+ border-radius: 4px;
20
+ z-index: 1;
21
+ text-align: left;
22
+ box-shadow: 3px 4px 5px 0 #8885;
23
+ }
24
+ #pwa-toast .message {
25
+ margin-bottom: 8px;
26
+ }
27
+ #pwa-toast button {
28
+ border: 1px solid #8885;
29
+ outline: none;
30
+ margin-right: 5px;
31
+ border-radius: 2px;
32
+ padding: 3px 10px;
33
+ }
34
+ #pwa-toast.show {
35
+ visibility: visible;
36
+ }
37
+ button#pwa-refresh {
38
+ display: none;
39
+ }
40
+ #pwa-toast.show.refresh button#pwa-refresh {
41
+ display: inline-block;
42
+ }
43
+ </style>
@@ -7,36 +7,60 @@ const props = defineProps({
7
7
  default: true,
8
8
  required: false,
9
9
  },
10
- })
11
- const isShow = ref(true)
10
+ });
11
+ const isShow = ref(true);
12
12
  const toggleVisibility = () => {
13
- isShow.value = !isShow.value
14
- }
13
+ isShow.value = !isShow.value;
14
+ };
15
15
  </script>
16
16
 
17
17
  <template>
18
18
  <div v-if="isShow" data-pagefind-ignore class="slimbanner">
19
19
  <span
20
- class="inline-block text-4xl w-6 h-3.5 min-w-[1.25rem] mr-3 bg-gradient-to-b stops-[#0057b7_50%,50%,#ffd700_100%]" />
21
- <span class="leading-none "><span
22
- data-text="We stand with our friends and colleagues in Ukraine. To support Ukraine in their time of need visit " />
23
- <a href="https://polo.blue/support-ukraine/" target="_blank" rel="noopener" title="Support Ukraine"
24
- class="underline underline-offset-2 hover:text-blue-wrc">this page</a>.
20
+ class="inline-block text-4xl w-6 h-3.5 min-w-[1.25rem] mr-3 bg-gradient-to-b stops-[#0057b7_50%,50%,#ffd700_100%]"
21
+ />
22
+ <span class="leading-none"
23
+ ><span
24
+ data-text="We stand with our friends and colleagues in Ukraine. To support Ukraine in their time of need visit "
25
+ />
26
+ <a
27
+ href="https://polo.blue/support-ukraine/"
28
+ target="_blank"
29
+ rel="noopener"
30
+ title="Support Ukraine"
31
+ class="underline underline-offset-2 hover:text-blue-wrc"
32
+ >this page</a
33
+ >.
25
34
  </span>
26
35
 
27
- <button class="btn-close text-white" v-if="props.showCloseButton" @click="toggleVisibility()"
28
- aria-label="Toggle">
36
+ <button
37
+ class="btn-close text-white"
38
+ v-if="props.showCloseButton"
39
+ @click="toggleVisibility()"
40
+ aria-label="Toggle"
41
+ >
29
42
  <span class="close close-dark"></span>
30
43
  </button>
31
44
  </div>
32
- <div v-else data-pagefind-ignore
33
- class="px-4 sm:px-8 py-3 flex items-center justify-center text-xs sm:text-base leading-none text-white relative bg-black drop-shadow-md z-2 ">
45
+ <div
46
+ v-else
47
+ data-pagefind-ignore
48
+ class="px-4 sm:px-8 py-3 flex items-center justify-center text-xs sm:text-base leading-none text-white relative bg-black drop-shadow-md z-2"
49
+ >
34
50
  <div class="tracking-widest leading-none">
35
- <span data-text="RUSSIA IS A" /> <span class="underline decoration-red-600 decoration-1 underline-offset-3"
36
- data-text="TERRORIST" /> <span data-text="STATE" />
51
+ <span data-text="RUSSIA IS A" />
52
+ <span
53
+ class="underline decoration-red-600 decoration-1 underline-offset-3"
54
+ data-text="TERRORIST"
55
+ />
56
+ <span data-text="STATE" />
37
57
  </div>
38
- <button class="btn-close" v-if="props.showCloseButton" @click="toggleVisibility()"
39
- aria-label="Toggle">
58
+ <button
59
+ class="btn-close"
60
+ v-if="props.showCloseButton"
61
+ @click="toggleVisibility()"
62
+ aria-label="Toggle"
63
+ >
40
64
  <span class="close close-light"></span>
41
65
  </button>
42
66
  </div>
@@ -44,7 +68,7 @@ const toggleVisibility = () => {
44
68
 
45
69
  <style>
46
70
  .btn-close {
47
- @apply ml-3 relative w-5 h-5;
71
+ @apply ml-3 relative w-5 h-5;
48
72
  }
49
73
 
50
74
  .close {
@@ -70,4 +94,5 @@ const toggleVisibility = () => {
70
94
 
71
95
  .close:after {
72
96
  transform: rotate(-45deg);
73
- }</style>
97
+ }
98
+ </style>
@@ -3,19 +3,18 @@ const props = defineProps<{
3
3
  data: string;
4
4
  }>();
5
5
 
6
- const theads = Object.keys(Object.values(props.data)[0])
6
+ const theads = Object.keys(Object.values(props.data)[0]);
7
7
 
8
8
  const capitalizeFirstLetter = (text: String) => {
9
- return text[0].toUpperCase() + text.slice(1)
10
- }
11
-
9
+ return text[0].toUpperCase() + text.slice(1);
10
+ };
12
11
  </script>
13
12
 
14
13
  <template>
15
14
  <table class="table-auto text-left border bg-white shadow-md">
16
15
  <thead class="bg-gray-500 text-white">
17
16
  <tr class="border">
18
- <th class="px-4 py-2 font-semibold" v-for="thead, index in theads" :key="index">
17
+ <th class="px-4 py-2 font-semibold" v-for="(thead, index) in theads" :key="index">
19
18
  {{ capitalizeFirstLetter(thead) }}
20
19
  </th>
21
20
  </tr>
@@ -29,4 +28,3 @@ const capitalizeFirstLetter = (text: String) => {
29
28
  </tbody>
30
29
  </table>
31
30
  </template>
32
-
@@ -1,23 +1,32 @@
1
-
2
1
  <script setup lang="ts">
3
2
  import { PropType } from 'vue';
4
3
 
5
4
  const props = defineProps({
6
5
  lang: {
7
- type: String
6
+ type: String,
8
7
  },
9
8
  translations: {
10
- type: Object as PropType<{ uri: string | null, title: string | null, name: string | null } | null>
11
- }
9
+ type: Object as PropType<{
10
+ uri: string | null;
11
+ title: string | null;
12
+ name: string | null;
13
+ } | null>,
14
+ },
12
15
  });
13
16
  </script>
14
17
 
15
18
  <template>
16
19
  <div data-pagefind-ignore v-if="props.translations !== null && props.translations.uri">
17
- <a aria-label="Change language" type="button" :href="translations.uri"
20
+ <a
21
+ aria-label="Change language"
22
+ type="button"
23
+ :href="translations.uri"
18
24
  :title="translations.name ? translations.name : translations.title"
19
- :class="[lang === 'en' ? 'i-circle-flags:en' : '', lang === 'pl' ? 'i-circle-flags:pl' : '', 'w-5 hover:rotate--3']" />
25
+ :class="[
26
+ lang === 'en' ? 'i-circle-flags:en' : '',
27
+ lang === 'pl' ? 'i-circle-flags:pl' : '',
28
+ 'w-5 hover:rotate--3',
29
+ ]"
30
+ />
20
31
  </div>
21
32
  </template>
22
-
23
-
@@ -1,4 +1,5 @@
1
1
  <template>
2
- <span
3
- class="drop-shadow inline-block text-4xl w-6 h-3.5 min-w-[1.25rem] mr-3 bg-gradient-to-b stops-[#fff_50%,50%,#d4213d_100%]" />
4
- </template>
2
+ <span
3
+ class="drop-shadow inline-block text-4xl w-6 h-3.5 min-w-[1.25rem] mr-3 bg-gradient-to-b stops-[#fff_50%,50%,#d4213d_100%]"
4
+ />
5
+ </template>
@@ -1,3 +1,3 @@
1
1
  <template>
2
- <span class="flag-ua" />
3
- </template>
2
+ <span class="flag-ua" />
3
+ </template>