spoko-design-system 0.0.2 → 0.0.6
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.
- package/.astro/icon.d.ts +10291 -2199
- package/.vscode/extensions.json +2 -1
- package/.vscode/settings.json +6 -0
- package/Layout/Header.astro +3 -3
- package/README.md +38 -13
- package/astro.config.mjs +24 -18
- package/package.json +79 -75
- package/public/favicon.ico +0 -0
- package/public/favicon.svg +0 -0
- package/public/locales/en/translation.json +5 -2
- package/public/locales/pl/translation.json +5 -2
- package/src/components/Badge.vue +1 -1
- package/src/components/Badges.vue +1 -1
- package/src/components/Button.vue +17 -8
- package/src/components/ButtonCopy.vue +52 -0
- package/src/components/Card.astro +25 -0
- package/src/components/HandDrive.astro +0 -1
- package/src/components/Header/Header.astro +1 -1
- package/src/components/Headline.vue +37 -5
- package/src/components/Image.astro +30 -0
- package/src/components/Jumbatron.vue +23 -8
- package/src/components/LeftSidebar.astro +9 -8
- package/src/components/PrCode.vue +156 -0
- package/src/components/ProductNumber.astro +117 -0
- package/src/components/ProductTile.astro +54 -0
- package/src/components/layout/Header.astro +1 -1
- package/src/config.ts +4 -1
- package/src/layouts/Layout.astro +0 -8
- package/src/layouts/MainLayout.astro +6 -14
- package/src/pages/components/badges.mdx +39 -7
- package/src/pages/components/breadcrumbs.mdx +37 -1
- package/src/pages/components/buttons.mdx +92 -11
- package/src/pages/components/card.mdx +94 -0
- package/src/pages/components/flags.mdx +15 -7
- package/src/pages/components/hand-drive.mdx +6 -1
- package/src/pages/components/headline.mdx +20 -3
- package/src/pages/components/icons.astro +23 -21
- package/src/pages/components/image.mdx +502 -0
- package/src/pages/components/jumbatron.mdx +33 -10
- package/src/pages/components/modal.mdx +8 -2
- package/src/pages/components/post-header.mdx +24 -2
- package/src/pages/components/pr-code.mdx +41 -0
- package/src/pages/components/product-number.mdx +65 -0
- package/src/pages/components/product-tile.mdx +39 -0
- package/src/pages/components/table.mdx +19 -0
- package/src/pages/core/introduction.mdx +3 -3
- package/src/pages/index.astro +25 -22
- package/src/styles/base/_base.scss +8 -0
- package/src/styles/content.scss +17 -1
- package/uno.config.ts +26 -7
|
@@ -1,16 +1,31 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { useSlots } from 'vue';
|
|
3
|
+
|
|
4
|
+
const slots = useSlots()
|
|
5
|
+
const hasSlot = (name) => {
|
|
6
|
+
return !!slots[name];
|
|
7
|
+
}
|
|
8
|
+
const props = defineProps({
|
|
9
|
+
small: {
|
|
10
|
+
type: Boolean,
|
|
11
|
+
default: null,
|
|
12
|
+
required: false,
|
|
13
|
+
},
|
|
14
|
+
})
|
|
15
|
+
</script>
|
|
16
|
+
|
|
17
|
+
|
|
1
18
|
<template>
|
|
2
|
-
<div class="relative bg-vw md:min-h-md">
|
|
3
|
-
<div class="max-w-7xl mx-auto">
|
|
4
|
-
<div class="
|
|
5
|
-
<header class="mx-auto max-w-7xl px-4 sm:
|
|
19
|
+
<div class="relative flex bg-vw " :class="props.small ? 'md:min-h-xs' : 'md:min-h-md' ">
|
|
20
|
+
<div class="max-w-7xl mx-auto my-auto">
|
|
21
|
+
<div class="py-8 lg:w-full" :class="props.small ? 'sm:py-12 md:py-14 lg:py-16 xl:py-20' : 'sm:py-16 md:py-20 lg:py-28 xl:py-32' ">
|
|
22
|
+
<header class="mx-auto max-w-7xl px-4 sm:px-6 lg:px-8"> <!-- sm:pt-12 md:pt-16 lg:pt-20 xl:pt-28 -->
|
|
6
23
|
<div class="text-center">
|
|
7
|
-
<h1 class="text-
|
|
24
|
+
<h1 class="text-3xl tracking-tight sm:(text-4xl pt-0) md:text-5xl lg:text-6xl font-headlight text-white">
|
|
8
25
|
<slot name="intro" />
|
|
9
|
-
<!-- <span v-html="t('home.intro')"></span> -->
|
|
10
|
-
<!-- <small class="block text-2xl">aaa</small> -->
|
|
11
26
|
</h1>
|
|
12
27
|
<slot name="subtitle" />
|
|
13
|
-
<div class="mt-5 sm:mt-8 sm:flex sm:justify-center">
|
|
28
|
+
<div class="mt-5 sm:mt-8 sm:flex sm:justify-center" v-if="hasSlot('cta')">
|
|
14
29
|
<div>
|
|
15
30
|
<slot name="cta" />
|
|
16
31
|
</div>
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
import { SIDEBAR } from '../config';
|
|
3
|
+
import { Astronav, MenuItems} from "astro-navbar";
|
|
3
4
|
const { currentPage } = Astro.props;
|
|
4
5
|
const currentPageMatch = currentPage.slice(1);
|
|
5
6
|
|
|
@@ -11,7 +12,7 @@ const isCurrentPage = (item) => {
|
|
|
11
12
|
};
|
|
12
13
|
|
|
13
14
|
const getLinkClasses = (link) => {
|
|
14
|
-
const baseClasses = "block py-
|
|
15
|
+
const baseClasses = "block py-1.5 px-6 my-1 transition-colors border-l hover:border-slate-400 text-slate-500 hover:text-slate-900"
|
|
15
16
|
|
|
16
17
|
if (isCurrentPage(link)) {
|
|
17
18
|
return baseClasses + " border-slate-500 text-slate-900";
|
|
@@ -20,18 +21,18 @@ const getLinkClasses = (link) => {
|
|
|
20
21
|
}
|
|
21
22
|
}
|
|
22
23
|
---
|
|
23
|
-
<
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
<ul>
|
|
24
|
+
<Astronav>
|
|
25
|
+
<MenuItems class="hidden z-20 bg-blue-gray-100 w-64 h-full overflow-y-auto px-4 border-r pb-3 absolute lg:(relative bg-blue-500 bg-opacity-5 flex)">
|
|
26
|
+
<ul class="mt-0 mb-auto">
|
|
27
27
|
{SIDEBAR.map(item => (item.header ?
|
|
28
28
|
<h2 class="mt-4 font-semibold text-slate-700">{item.text}</h2> :
|
|
29
29
|
<li class={getLinkClasses(item)}>
|
|
30
30
|
<a href={item.link}>{item.text}</a>
|
|
31
|
-
</li>
|
|
31
|
+
</li>
|
|
32
|
+
))}
|
|
32
33
|
</ul>
|
|
33
|
-
</
|
|
34
|
-
</
|
|
34
|
+
</MenuItems>
|
|
35
|
+
</Astronav>
|
|
35
36
|
|
|
36
37
|
<script is:inline>
|
|
37
38
|
window.addEventListener('DOMContentLoaded', (event) => {
|
|
@@ -0,0 +1,156 @@
|
|
|
1
|
+
<script lang="ts" setup>
|
|
2
|
+
/*
|
|
3
|
+
VAG group (VW/Audi/Skoda/Seat/Porsche/Bentley/Lamborghini/Ducati/Cupra/Scania/MAN) manufacturer PR-Code
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
import type { PropType } from 'vue'
|
|
7
|
+
|
|
8
|
+
const props = defineProps({
|
|
9
|
+
prcode: {
|
|
10
|
+
type: Object as PropType<string[] | null>,
|
|
11
|
+
default: null,
|
|
12
|
+
required: true,
|
|
13
|
+
},
|
|
14
|
+
isPdp: {
|
|
15
|
+
type: Boolean,
|
|
16
|
+
default: false,
|
|
17
|
+
required: false,
|
|
18
|
+
},
|
|
19
|
+
})
|
|
20
|
+
</script>
|
|
21
|
+
|
|
22
|
+
<template>
|
|
23
|
+
<span data-pagefind-filter="PR-Code" class="btn-prcode " :class="`btn-prcode--${props.prcode} ${props.isPdp ? ' btn-prcode--pdp' : ''}`">
|
|
24
|
+
{{ props.prcode }}
|
|
25
|
+
</span>
|
|
26
|
+
</template>
|
|
27
|
+
|
|
28
|
+
<style lang="scss" scoped>
|
|
29
|
+
.btn-prcode {
|
|
30
|
+
|
|
31
|
+
&--pdp {
|
|
32
|
+
@apply mb-1
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
&:before {
|
|
36
|
+
@apply rounded-2 shadow-sm py-0.5 px-2 bg-gray-100 whitespace-nowrap text-xs dark:text-black dark:bg-lightBlue-500 text-center z-50;
|
|
37
|
+
|
|
38
|
+
display: none;
|
|
39
|
+
position: absolute;
|
|
40
|
+
top: -10px;
|
|
41
|
+
transform: translateY(-50%) translateX(-50%);
|
|
42
|
+
left: 50%;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
&:hover:before {
|
|
46
|
+
display: block;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
&--2JK {
|
|
50
|
+
color: #f3881d;
|
|
51
|
+
|
|
52
|
+
&:before {
|
|
53
|
+
content: 'CROSS';
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
&--1LR,
|
|
58
|
+
&--1ZG,
|
|
59
|
+
&--1ZJ {
|
|
60
|
+
&:before {
|
|
61
|
+
content: '⌀ 256 mm';
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
&--1KD,
|
|
66
|
+
&--1ZP,
|
|
67
|
+
&--1ZR {
|
|
68
|
+
&:before {
|
|
69
|
+
content: '⌀ 310 mm';
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
&--1ZD,
|
|
74
|
+
&--1ZC,
|
|
75
|
+
&--1LN {
|
|
76
|
+
&:before {
|
|
77
|
+
content: '⌀ 288 mm; LUCAS';
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
&--2JZ {
|
|
82
|
+
@apply: text-lightBlue-500;
|
|
83
|
+
|
|
84
|
+
&:before {
|
|
85
|
+
content: 'Bluemotion';
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
&--7L6 {
|
|
90
|
+
@apply: text-lightBlue-500;
|
|
91
|
+
|
|
92
|
+
&:before {
|
|
93
|
+
content: 'Bluemotion (CFWA + start-stop)';
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
&--1KK,
|
|
98
|
+
&--1KT,
|
|
99
|
+
&--1KV,
|
|
100
|
+
&--1LV,
|
|
101
|
+
&--2EJ {
|
|
102
|
+
&:before {
|
|
103
|
+
content: '⌀ 230 mm';
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
&--2JE {
|
|
108
|
+
@apply text-lightBlue-700;
|
|
109
|
+
|
|
110
|
+
&:before {
|
|
111
|
+
content: 'BlueGT';
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
&--2JP {
|
|
116
|
+
&:before {
|
|
117
|
+
content: 'R-Line';
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
// WRC Street R
|
|
122
|
+
&--E5M,
|
|
123
|
+
|
|
124
|
+
// emblems/stickers
|
|
125
|
+
&--1KD,
|
|
126
|
+
|
|
127
|
+
//brakes
|
|
128
|
+
&--1ZP,
|
|
129
|
+
|
|
130
|
+
//brakes
|
|
131
|
+
&--2JQ,
|
|
132
|
+
|
|
133
|
+
//bumpers / engine parts
|
|
134
|
+
&--TA2 {
|
|
135
|
+
color: blue;
|
|
136
|
+
|
|
137
|
+
&:before {
|
|
138
|
+
content: 'R WRC Street';
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
// GTI
|
|
143
|
+
&--1KV,
|
|
144
|
+
&--1ZD,
|
|
145
|
+
&--1ZR,
|
|
146
|
+
&--0NH,
|
|
147
|
+
&--2JD {
|
|
148
|
+
color: red;
|
|
149
|
+
|
|
150
|
+
&:before {
|
|
151
|
+
content: 'GTI';
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
}
|
|
156
|
+
</style>
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
---
|
|
2
|
+
import { t } from "i18next";
|
|
3
|
+
import ButtonCopy from "./ButtonCopy.vue";
|
|
4
|
+
|
|
5
|
+
const {
|
|
6
|
+
copyDisabled,
|
|
7
|
+
productNumber,
|
|
8
|
+
isPdp,
|
|
9
|
+
small,
|
|
10
|
+
big,
|
|
11
|
+
class: className,
|
|
12
|
+
} = Astro.props;
|
|
13
|
+
|
|
14
|
+
const butonTexts = {
|
|
15
|
+
copy: t("copy"),
|
|
16
|
+
copied: t("copied"),
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
const isLetter = (string: string) => {
|
|
20
|
+
return string.toLowerCase() !== string.toUpperCase();
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
const niceName = (string: string, separator = "\u00A0") => {
|
|
24
|
+
let word = string; //e.g. to 6Q0947106EY20 .split('+')
|
|
25
|
+
|
|
26
|
+
if (
|
|
27
|
+
isLetter(string[0]) === true &&
|
|
28
|
+
isLetter(string[1]) === false &&
|
|
29
|
+
string.length === 9
|
|
30
|
+
) {
|
|
31
|
+
// mainly liquids
|
|
32
|
+
word = string
|
|
33
|
+
.replace(
|
|
34
|
+
/^(\w{1})(\w{3})(\w{3})(.*)$/,
|
|
35
|
+
`$1${separator}$2${separator}$3${separator}$4`,
|
|
36
|
+
)
|
|
37
|
+
.replace(/(^\s+|\s+$)/, "");
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
// wheels / emblems e.g. 6R0601025AK8Z8 --> 6R0 601 025 AB 8Z8 || 6C0601025DFZZ --> 6C0 601 025 D FZZ || 6R0853433ADA1 -> 6R0 853 433 A DA1
|
|
41
|
+
else if (string.length >= 13) {
|
|
42
|
+
// console.log('part number: wheels / emblems', word)
|
|
43
|
+
word = string
|
|
44
|
+
.replace(
|
|
45
|
+
/^(\w{3})(\w{3})(\w{3})(.*)(\w{3})$/,
|
|
46
|
+
`$1${separator}$2${separator}$3${separator}$4${separator}$5`,
|
|
47
|
+
)
|
|
48
|
+
.replace(/(^\s+|\s+$)/, "");
|
|
49
|
+
} else if (string.length > 12) {
|
|
50
|
+
// accessories / mats
|
|
51
|
+
word = string
|
|
52
|
+
.replace(
|
|
53
|
+
/^(\w{3})(\w{3})(\w{3})(\w{1})(.*)$/,
|
|
54
|
+
`$1${separator}$2${separator}$3${separator}$4${separator}$5`,
|
|
55
|
+
)
|
|
56
|
+
.replace(/(^\s+|\s+$)/, "");
|
|
57
|
+
} else {
|
|
58
|
+
// other parts
|
|
59
|
+
word = string
|
|
60
|
+
.replace(/(\w{3})/g, `$1${separator}`)
|
|
61
|
+
.replace(/(^\s+|\s+$)/, "");
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
return word.replace(" ", separator);
|
|
65
|
+
};
|
|
66
|
+
---
|
|
67
|
+
|
|
68
|
+
{
|
|
69
|
+
productNumber !== null && (
|
|
70
|
+
<div
|
|
71
|
+
class={`product-number ${
|
|
72
|
+
big ? "text-lg" : `text-sm ${className ? className : "mt-2 sm:mt-0"}`
|
|
73
|
+
}`}
|
|
74
|
+
>
|
|
75
|
+
<div
|
|
76
|
+
class={`inline-flex leading-none relative ${small ? "w-full" : ""}`}
|
|
77
|
+
itemprop="identifier"
|
|
78
|
+
>
|
|
79
|
+
{isPdp ? (
|
|
80
|
+
<h2 id={productNumber} class="product-code">
|
|
81
|
+
{productNumber}
|
|
82
|
+
</h2>
|
|
83
|
+
) : (
|
|
84
|
+
<div id={productNumber} class="product-code">
|
|
85
|
+
{productNumber}
|
|
86
|
+
</div>
|
|
87
|
+
)}
|
|
88
|
+
|
|
89
|
+
{ copyDisabled && (
|
|
90
|
+
<ButtonCopy
|
|
91
|
+
productNumber={String(productNumber)}
|
|
92
|
+
texts={butonTexts}
|
|
93
|
+
tooltipClasses=""
|
|
94
|
+
client:only
|
|
95
|
+
/>
|
|
96
|
+
)}
|
|
97
|
+
|
|
98
|
+
</div>
|
|
99
|
+
|
|
100
|
+
<div
|
|
101
|
+
class={`code-formatted ${small ? "tracking-wide" : "tracking-tight"}`}
|
|
102
|
+
>
|
|
103
|
+
<div class="relative inset-0" data-pagefind-ignore>
|
|
104
|
+
{niceName(productNumber, ".")}
|
|
105
|
+
</div>
|
|
106
|
+
<div class="absolute inset-0" data-pagefind-ignore>
|
|
107
|
+
{niceName(productNumber, "-")}
|
|
108
|
+
</div>
|
|
109
|
+
{isPdp ? (
|
|
110
|
+
<h3 class="number-secondary">{niceName(productNumber)}</h3>
|
|
111
|
+
) : (
|
|
112
|
+
<div class="number-secondary">{niceName(productNumber)}</div>
|
|
113
|
+
)}
|
|
114
|
+
</div>
|
|
115
|
+
</div>
|
|
116
|
+
)
|
|
117
|
+
}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
---
|
|
2
|
+
const { productObject, locale, index } = Astro.props;
|
|
3
|
+
import i18next, { t } from "i18next";
|
|
4
|
+
import Image from "./Image.astro"
|
|
5
|
+
import ProductNumber from "./ProductNumber.astro"
|
|
6
|
+
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
{ productObject &&
|
|
10
|
+
(
|
|
11
|
+
|
|
12
|
+
<div class="flex flex-wrap sm:flex-nowrap content-between w-64 md:(w-96 min-w-96) ml-1 lg:ml-1.5 relative bg-white mb-4">
|
|
13
|
+
<!-- product image -->
|
|
14
|
+
<div>
|
|
15
|
+
{ productObject.photo !== null ?
|
|
16
|
+
<div class="img--4/3 img--small">
|
|
17
|
+
<Image
|
|
18
|
+
imageObject={
|
|
19
|
+
{
|
|
20
|
+
src: 'https://img.freepik.com/darmowe-wektory/tlo-retro-modeli-geometrycznych_52683-17902.jpg?w=1380&t=st=1706311337',
|
|
21
|
+
alt: 'Image Alt',
|
|
22
|
+
height: '180',
|
|
23
|
+
width: '240',
|
|
24
|
+
class: 'img--overlay object-cover'
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
/>
|
|
28
|
+
</div>
|
|
29
|
+
:
|
|
30
|
+
<img src="/1x1.png" class="bg-gray-100/70" alt={productObject.name} />
|
|
31
|
+
}
|
|
32
|
+
</div>
|
|
33
|
+
|
|
34
|
+
<!-- product deails -->
|
|
35
|
+
<div class="sm:pl-4 flex flex-col" >
|
|
36
|
+
<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)"
|
|
37
|
+
href={productObject.url} itemprop="url"
|
|
38
|
+
title={productObject.number}
|
|
39
|
+
>
|
|
40
|
+
{ productObject.name }
|
|
41
|
+
</a>
|
|
42
|
+
|
|
43
|
+
<ProductNumber productNumber={productObject.number} copyDisabled={true} />
|
|
44
|
+
|
|
45
|
+
{ index !== null &&
|
|
46
|
+
( <meta itemprop="position" content={String(index)} />
|
|
47
|
+
<meta itemprop="name" content={productObject.name} /> )
|
|
48
|
+
}
|
|
49
|
+
</div>
|
|
50
|
+
|
|
51
|
+
</div>
|
|
52
|
+
|
|
53
|
+
)}
|
|
54
|
+
|
package/src/config.ts
CHANGED
|
@@ -26,17 +26,20 @@ export const SIDEBAR = [
|
|
|
26
26
|
{ text: "Badges", link: "/components/badges" },
|
|
27
27
|
{ text: "Breadcrumbs", link: "/components/breadcrumbs" },
|
|
28
28
|
{ text: "Buttons", link: "/components/buttons" },
|
|
29
|
+
{ text: "Card", link: "/components/card" },
|
|
29
30
|
{ text: "Copyright", link: "/components/copyright" },
|
|
30
31
|
{ text: "HandDrive", link: "/components/hand-drive" },
|
|
31
32
|
{ text: "Headline", link: "/components/headline" },
|
|
32
33
|
{ text: "Icons", link: "/components/icons" },
|
|
34
|
+
{ text: "Image", link: "/components/image" },
|
|
33
35
|
{ text: "Input", link: "/components/input" },
|
|
34
36
|
{ text: "Jumbatron", link: "/components/jumbatron" },
|
|
35
37
|
{ text: "Modal", link: "/components/modal" },
|
|
36
38
|
{ text: "PostHeader", link: "/components/post-header" },
|
|
39
|
+
{ text: "PR-Code", link: "/components/pr-code" },
|
|
40
|
+
{ text: "Product Number", link: "/components/product-number" },
|
|
37
41
|
{ text: "Table", link: "/components/table" },
|
|
38
42
|
|
|
39
|
-
|
|
40
43
|
{ text: "Extras", header: true },
|
|
41
44
|
{ text: "Flags", link: "/components/flags" },
|
|
42
45
|
{ text: "SlimBanner", link: "/components/slimbanner" },
|
package/src/layouts/Layout.astro
CHANGED
|
@@ -1,22 +1,14 @@
|
|
|
1
1
|
---
|
|
2
2
|
import HeadCommon from '../components/HeadCommon.astro';
|
|
3
3
|
import HeadSEO from '../components/HeadSEO.astro';
|
|
4
|
-
import Header from '../components/Header/Header.astro';
|
|
5
|
-
import PageContent from '../components/PageContent.astro';
|
|
6
|
-
import LeftSidebar from '../components/LeftSidebar.astro';
|
|
7
|
-
import { Astronav, MenuItems} from "astro-navbar";
|
|
8
4
|
import * as CONFIG from '../config';
|
|
9
5
|
import { t, changeLanguage } from "i18next";
|
|
10
6
|
import '../styles/main.scss';
|
|
11
7
|
import Copyright from '../components/Copyright.astro'
|
|
12
8
|
const locale = "en";
|
|
13
9
|
changeLanguage(locale);
|
|
14
|
-
const year = new Date().getFullYear()
|
|
15
10
|
const { content = {} } = Astro.props;
|
|
16
|
-
const currentPage = Astro.url.pathname;
|
|
17
|
-
// const currentFile = `src/pages${currentPage.replace(/\/$/, '')}.md`;
|
|
18
11
|
const canonicalURL = new URL(Astro.url.pathname, Astro.site).toString();
|
|
19
|
-
console.log('canonicalURL', canonicalURL)
|
|
20
12
|
---
|
|
21
13
|
|
|
22
14
|
<html dir={content.dir ?? 'ltr'} lang={content.lang ?? 'en-us'} class="initial">
|
|
@@ -4,19 +4,15 @@ import HeadSEO from '../components/HeadSEO.astro';
|
|
|
4
4
|
import Header from '../components/Header/Header.astro';
|
|
5
5
|
import PageContent from '../components/PageContent.astro';
|
|
6
6
|
import LeftSidebar from '../components/LeftSidebar.astro';
|
|
7
|
-
import { Astronav, MenuItems} from "astro-navbar";
|
|
8
7
|
import * as CONFIG from '../config';
|
|
9
8
|
import { t, changeLanguage } from "i18next";
|
|
10
9
|
import '../styles/main.scss';
|
|
11
10
|
import Copyright from '../components/Copyright.astro'
|
|
12
11
|
const locale = "en";
|
|
13
12
|
changeLanguage(locale);
|
|
14
|
-
const year = new Date().getFullYear()
|
|
15
13
|
const { content = {} } = Astro.props;
|
|
16
14
|
const currentPage = Astro.url.pathname;
|
|
17
|
-
// const currentFile = `src/pages${currentPage.replace(/\/$/, '')}.md`;
|
|
18
15
|
const canonicalURL = new URL(Astro.url.pathname, Astro.site).toString();
|
|
19
|
-
console.log('canonicalURL', canonicalURL)
|
|
20
16
|
---
|
|
21
17
|
|
|
22
18
|
<html dir={content.dir ?? 'ltr'} lang={content.lang ?? 'en-us'} class="initial">
|
|
@@ -31,14 +27,10 @@ console.log('canonicalURL', canonicalURL)
|
|
|
31
27
|
<Header currentPage={currentPage} />
|
|
32
28
|
</div>
|
|
33
29
|
|
|
34
|
-
<div class="flex
|
|
35
|
-
<div class="sticky top-0 flex
|
|
36
|
-
<div class="mr-auto
|
|
37
|
-
<
|
|
38
|
-
<MenuItems class="hidden z-20 bg-white absolute sm:(static bg-blue-500 bg-opacity-5 lg:flex)">
|
|
39
|
-
<LeftSidebar currentPage={currentPage} />
|
|
40
|
-
</MenuItems>
|
|
41
|
-
</Astronav>
|
|
30
|
+
<div class="flex bg-white z-10 mb-11 relative">
|
|
31
|
+
<div class="sticky top-0 flex lg:(h-screen w-64) z-50 ">
|
|
32
|
+
<div class="mr-auto ">
|
|
33
|
+
<LeftSidebar currentPage={currentPage} />
|
|
42
34
|
</div>
|
|
43
35
|
</div>
|
|
44
36
|
<main class="pb-4 px-4 sm:px-8 col-auto sm:(pb-32) overflow-auto w-full">
|
|
@@ -51,11 +43,11 @@ console.log('canonicalURL', canonicalURL)
|
|
|
51
43
|
</div>
|
|
52
44
|
<footer>
|
|
53
45
|
<Copyright class="fixed bottom-0 z-0 w-full">
|
|
54
|
-
<a slot="middle-item" href=
|
|
46
|
+
<a slot="middle-item" href="https://spoko.space" target="_blank" rel="follow noopener" class="flex my-auto items-center mx-auto" title={`Proudly made in Poland by spoko.space`}>
|
|
55
47
|
<div class="text-xxs md:text-xs mr-1 mt-0.5 whitespace-nowrap">createdy by</div>
|
|
56
48
|
<img
|
|
57
49
|
class="h-4 md:h-5 w-min"
|
|
58
|
-
src=
|
|
50
|
+
src="/spoko.space.svg"
|
|
59
51
|
alt="Modern Websites"
|
|
60
52
|
width="126"
|
|
61
53
|
height="23"
|
|
@@ -4,34 +4,66 @@ layout: "../../layouts/MainLayout.astro"
|
|
|
4
4
|
---
|
|
5
5
|
import Badges from '../../components/Badges.vue'
|
|
6
6
|
|
|
7
|
-
##
|
|
7
|
+
## Product badges
|
|
8
8
|
|
|
9
|
-
###
|
|
9
|
+
### Badge - GTI
|
|
10
10
|
<div class="component-preview">
|
|
11
|
-
<div class="relative min-h-
|
|
11
|
+
<div class="relative min-h-10">
|
|
12
12
|
<Badges badges={['GTI']} class="top-2" />
|
|
13
13
|
</div>
|
|
14
14
|
</div>
|
|
15
15
|
```js
|
|
16
|
-
<div class="relative min-h-
|
|
16
|
+
<div class="relative min-h-10">
|
|
17
17
|
<Badges badges={['GTI']} class="top-2" />
|
|
18
18
|
</div>
|
|
19
19
|
|
|
20
20
|
```
|
|
21
21
|
|
|
22
22
|
|
|
23
|
-
###
|
|
23
|
+
### Badge - Motorsport
|
|
24
24
|
<div class="component-preview">
|
|
25
|
-
<div class="relative min-h-
|
|
25
|
+
<div class="relative min-h-10">
|
|
26
26
|
<Badges badges={['Motorsport']} class="top-2" />
|
|
27
27
|
</div>
|
|
28
28
|
</div>
|
|
29
29
|
|
|
30
30
|
```js
|
|
31
|
-
<div class="relative min-h-
|
|
31
|
+
<div class="relative min-h-10">
|
|
32
32
|
<Badges badges={['Motorsport']} class="top-2" />
|
|
33
33
|
</div>
|
|
34
34
|
|
|
35
35
|
```
|
|
36
36
|
|
|
37
37
|
|
|
38
|
+
### Badge on image - Motorsport
|
|
39
|
+
<div class="component-preview">
|
|
40
|
+
<div class="relative">
|
|
41
|
+
<img src="https://placehold.co/300x200" alt="image alt" />
|
|
42
|
+
<Badges badges={['Motorsport']} class="top-2" />
|
|
43
|
+
</div>
|
|
44
|
+
</div>
|
|
45
|
+
|
|
46
|
+
```js
|
|
47
|
+
<div class="relative">
|
|
48
|
+
<img src="https://placehold.co/300x200" alt="image alt" />
|
|
49
|
+
<Badges badges={['Motorsport']} class="top-2" />
|
|
50
|
+
</div>
|
|
51
|
+
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
### Few badges on image
|
|
56
|
+
<div class="component-preview">
|
|
57
|
+
<div class="relative">
|
|
58
|
+
<img src="https://placehold.co/300x200" alt="image alt" />
|
|
59
|
+
<Badges badges={['Motorsport', 'Lorem ipsum', 'GTI']} class="top-2" />
|
|
60
|
+
</div>
|
|
61
|
+
</div>
|
|
62
|
+
|
|
63
|
+
```js
|
|
64
|
+
<div class="relative">
|
|
65
|
+
<img src="https://placehold.co/300x200" alt="image alt" />
|
|
66
|
+
<Badges badges={['Motorsport', 'Lorem ipsum', 'GTI']} class="top-2" />
|
|
67
|
+
</div>
|
|
68
|
+
|
|
69
|
+
```
|
|
@@ -8,7 +8,10 @@ import Breadcrumbs from '../../components/Breadcrumbs.vue'
|
|
|
8
8
|
|
|
9
9
|
## Breadcrumbs
|
|
10
10
|
|
|
11
|
-
Breadcrumbs component with BreadcrumbList Microdata
|
|
11
|
+
Breadcrumbs component with BreadcrumbList Microdata.
|
|
12
|
+
|
|
13
|
+
Structured Data for Breadcrumbs that produce a Rich Snippet (in this case breadcrumbs) in search results that are clickable, too!
|
|
14
|
+
|
|
12
15
|
#
|
|
13
16
|
|
|
14
17
|
https://schema.org/BreadcrumbList
|
|
@@ -98,3 +101,36 @@ https://schema.org/ListItem
|
|
|
98
101
|
text-back="Back"
|
|
99
102
|
/>
|
|
100
103
|
```
|
|
104
|
+
|
|
105
|
+
|
|
106
|
+
### Schema example:
|
|
107
|
+
- https://validator.schema.org/?hl=en-US#url=https%3A%2F%2Fcatalog.polo.blue%2FN10733102%2F
|
|
108
|
+
#
|
|
109
|
+
|
|
110
|
+
| @type | BreadcrumbList |
|
|
111
|
+
| ---------------- | --------------------------------------------------------------------------------- |
|
|
112
|
+
| **itemListElement** | |
|
|
113
|
+
| **@type** | ListItem |
|
|
114
|
+
| **name** | Electrical, Lighting, Telematics |
|
|
115
|
+
| **position** | 1 |
|
|
116
|
+
| **item** | |
|
|
117
|
+
| **@type** | Thing |
|
|
118
|
+
| **@id** | https://catalog.polo.blue/electrical-lighting-telematics/ |
|
|
119
|
+
| **itemListElement** | |
|
|
120
|
+
| **@type** | ListItem |
|
|
121
|
+
| **name** | Exterior Lighting |
|
|
122
|
+
| **position** | 2 |
|
|
123
|
+
| **item** | |
|
|
124
|
+
| **@type** | Thing |
|
|
125
|
+
| **@id** | https://catalog.polo.blue/electrical-lighting-telematics/exterior-lighting/ |
|
|
126
|
+
| **itemListElement** | |
|
|
127
|
+
| **@type** | ListItem |
|
|
128
|
+
| **name** | Bulbs |
|
|
129
|
+
| **position** | 3 |
|
|
130
|
+
| **item** | |
|
|
131
|
+
| **@type** | Thing |
|
|
132
|
+
| **@id** | https://catalog.polo.blue/electrical-lighting-telematics/exterior-lighting/bulbs/ |
|
|
133
|
+
| **itemListElement** | |
|
|
134
|
+
| **@type** | ListItem |
|
|
135
|
+
| **name** | Bulb carrier with bulb; silver lens |
|
|
136
|
+
| **position** | 4 |
|