spoko-design-system 0.9.0 → 0.9.1
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/package.json +1 -1
- package/src/components/Breadcrumbs.vue +39 -25
package/package.json
CHANGED
|
@@ -41,40 +41,54 @@ const isLast = (index: number) => {
|
|
|
41
41
|
<nav>
|
|
42
42
|
<ul class="breadcrumbs-base">
|
|
43
43
|
<li v-if="props.showBack" class="breadcrumb-item">
|
|
44
|
-
<button
|
|
45
|
-
|
|
44
|
+
<button
|
|
45
|
+
class="breadcrumb-back-btn"
|
|
46
|
+
:title="props.textBack"
|
|
47
|
+
onclick="history.back()"
|
|
48
|
+
>
|
|
46
49
|
<span class="block px-3" i-bx-bx-arrow-back />
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
<ul class="breadcrumbs-base overflow-x-auto overflow-y-hidden sm:mr-12"
|
|
51
|
-
|
|
50
|
+
</button>
|
|
51
|
+
</li>
|
|
52
|
+
</ul>
|
|
53
|
+
<ul class="breadcrumbs-base overflow-x-auto overflow-y-hidden sm:mr-12"
|
|
54
|
+
itemscope itemtype="https://schema.org/BreadcrumbList">
|
|
52
55
|
<li v-if="props.showHome" class="breadcrumb-item">
|
|
53
56
|
<a href="/"
|
|
54
57
|
class="breadcrumb-link flex items-center px-3 sm:px-0 py-4.25 sm:py-1 hover:text-brand-secondary whitespace-nowrap translate-y-0 text-sm my-auto"
|
|
55
|
-
:title="props.textBack"
|
|
56
|
-
|
|
57
|
-
|
|
58
|
+
:title="props.textBack"
|
|
59
|
+
itemprop="item"
|
|
60
|
+
i-carbon-home>
|
|
61
|
+
</a>
|
|
58
62
|
<meta itemprop="position" content="1">
|
|
59
|
-
|
|
60
63
|
</li>
|
|
61
|
-
<li v-for="(crumb, index) in breadcrumbs"
|
|
62
|
-
|
|
64
|
+
<li v-for="(crumb, index) in breadcrumbs"
|
|
65
|
+
:key="index"
|
|
66
|
+
class="breadcrumb-item"
|
|
67
|
+
itemprop="itemListElement"
|
|
68
|
+
itemscope
|
|
69
|
+
itemtype="https://schema.org/ListItem">
|
|
63
70
|
<span v-if="index > 0 || props.showHome" class="text-gray-400 px-1 py-4.25 sm:py-1">/</span>
|
|
64
|
-
|
|
65
|
-
<a v-if="!isLast(index)"
|
|
66
|
-
|
|
71
|
+
|
|
72
|
+
<a v-if="!isLast(index)"
|
|
73
|
+
:href="crumb.path"
|
|
74
|
+
class="breadcrumb-link"
|
|
75
|
+
itemprop="item"
|
|
76
|
+
:title="`Polo 6R ${crumb.name}`">
|
|
67
77
|
<strong class="font-normal" itemprop="name">{{ crumb.name }}</strong>
|
|
68
|
-
|
|
69
|
-
<
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
78
|
+
</a>
|
|
79
|
+
<a v-else
|
|
80
|
+
:href="crumb.path"
|
|
81
|
+
class="breadcrumb-link breadcrumb-link-disabled"
|
|
82
|
+
:title="`Polo 6R ${crumb.name} ${productNumber}`"
|
|
83
|
+
itemprop="item">
|
|
84
|
+
<span class="font-normal" itemprop="name">
|
|
85
|
+
<span v-html="crumb.name"></span>
|
|
86
|
+
<b v-if="productNumber" class="hidden sm:inline font-normal ml-1"> {{ productNumber }}</b>
|
|
73
87
|
</span>
|
|
74
|
-
|
|
88
|
+
</a>
|
|
89
|
+
|
|
75
90
|
<meta itemprop="position" :content="String(props.showHome ? index + 2 : index + 1)">
|
|
76
|
-
|
|
77
91
|
</li>
|
|
78
|
-
|
|
79
|
-
|
|
92
|
+
</ul>
|
|
93
|
+
</nav>
|
|
80
94
|
</template>
|