@inizioevoke/astro-core 1.0.0 → 1.1.0
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
CHANGED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
---
|
|
2
|
+
interface Props {
|
|
3
|
+
url: URL;
|
|
4
|
+
paths: string[];
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
const {
|
|
8
|
+
url,
|
|
9
|
+
paths
|
|
10
|
+
} = Astro.props;
|
|
11
|
+
|
|
12
|
+
const path = url.pathname;
|
|
13
|
+
const currentIndex = paths.findIndex(u => u === path);
|
|
14
|
+
const prev = currentIndex > 0 ? paths[currentIndex - 1] : undefined;
|
|
15
|
+
const next = currentIndex !== -1 && currentIndex < paths.length - 1 ? paths[currentIndex + 1] : undefined;
|
|
16
|
+
---
|
|
17
|
+
<div class="evo-pagination">
|
|
18
|
+
<div class="evo-pagination-wrapper">
|
|
19
|
+
<div class="evo-pagination-link evo-pagination-link-previous">{prev && <a href={prev}><slot name="previous">Previous</slot></a>}</div>
|
|
20
|
+
<div class="evo-pagination-link evo-pagination-link-next">{next && <a href={next}><slot name="next">Next</slot></a>}</div>
|
|
21
|
+
</div>
|
|
22
|
+
</div>
|
|
@@ -75,7 +75,7 @@ if (height) {
|
|
|
75
75
|
</button>
|
|
76
76
|
<button class="evo-pdf-viewer-toolbar-zoom-reset">
|
|
77
77
|
<slot name="toolbar-zoom-reset">
|
|
78
|
-
<svg width="16px" height="16px" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
78
|
+
<svg class="evo-pdf-viewer-toolbar-icon" width="16px" height="16px" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
79
79
|
<path d="M3 3V8M3 8H8M3 8L6 5.29168C7.59227 3.86656 9.69494 3 12 3C16.9706 3 21 7.02944 21 12C21 16.9706 16.9706 21 12 21C7.71683 21 4.13247 18.008 3.22302 14" stroke="#000000" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
|
|
80
80
|
</svg>
|
|
81
81
|
</slot>
|
|
@@ -191,8 +191,10 @@
|
|
|
191
191
|
}
|
|
192
192
|
}
|
|
193
193
|
.evo-pdf-viewer-container {
|
|
194
|
-
|
|
195
|
-
|
|
194
|
+
.evo-scroll-container {
|
|
195
|
+
--evo-scroll-container-track-color: #666666;
|
|
196
|
+
--evo-scroll-container-thumb-color: #dddddd;
|
|
197
|
+
}
|
|
196
198
|
}
|
|
197
199
|
}
|
|
198
200
|
}
|
|
@@ -13,10 +13,9 @@ const {
|
|
|
13
13
|
} = Astro.props;
|
|
14
14
|
const tabTitle = await Astro.slots.render('title');
|
|
15
15
|
const attrs = { ...tabAttrs, title: tabTitle };
|
|
16
|
-
console.log(attrs);
|
|
17
16
|
---
|
|
18
17
|
<div
|
|
19
|
-
data-tab-attrs={attrs ? JSON.stringify(attrs) : undefined}
|
|
18
|
+
data-tab-attrs={attrs ? btoa(JSON.stringify(attrs)) : undefined}
|
|
20
19
|
data-tab-active={active ?? false}
|
|
21
20
|
{...panelAttrs}
|
|
22
21
|
role="tabpanel"
|
|
@@ -38,8 +38,7 @@ const itemHtml = html.replace(
|
|
|
38
38
|
const tabAttrs: HTMLAttributes<'div'> = {};
|
|
39
39
|
const attrs = getAttr('data-tab-attrs') ?? '';
|
|
40
40
|
if (attrs) {
|
|
41
|
-
|
|
42
|
-
Object.assign(tabAttrs, JSON.parse(attrs));
|
|
41
|
+
Object.assign(tabAttrs, JSON.parse(atob(attrs)));
|
|
43
42
|
}
|
|
44
43
|
// const encodedTitle = getAttr('data-tab-title') ?? '';
|
|
45
44
|
// const cssClass = getAttr('data-tab-class');
|
|
@@ -47,7 +46,7 @@ const itemHtml = html.replace(
|
|
|
47
46
|
|
|
48
47
|
tabs.push({
|
|
49
48
|
...tabAttrs,
|
|
50
|
-
title: tabAttrs.title ?? `Tab ${
|
|
49
|
+
title: tabAttrs.title ?? `Tab ${currentIndex + 1}`,
|
|
51
50
|
index: currentIndex,
|
|
52
51
|
active,
|
|
53
52
|
});
|