@eox/pages-theme-eox 0.11.0 → 0.11.2
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
|
@@ -34,17 +34,18 @@ const { page, site } = useData();
|
|
|
34
34
|
const featuresExcerpts =
|
|
35
35
|
cards && cards.length
|
|
36
36
|
? cards
|
|
37
|
-
: features
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
37
|
+
: features
|
|
38
|
+
.map((f) => {
|
|
39
|
+
if (import.meta.env.SSR) {
|
|
40
|
+
return [];
|
|
41
|
+
}
|
|
42
|
+
const el = document.createElement("html");
|
|
43
|
+
el.innerHTML = f.html;
|
|
44
|
+
/** @type {HTMLElement} */
|
|
45
|
+
const featureSection = el.querySelector("featuresection");
|
|
46
|
+
return (
|
|
47
|
+
featureSection &&
|
|
48
|
+
!page.value.relativePath.includes(f.url.replace("/", "")) && {
|
|
48
49
|
id: Symbol(),
|
|
49
50
|
title: featureSection.title,
|
|
50
51
|
content: featureSection.textContent,
|
|
@@ -61,29 +62,47 @@ const featuresExcerpts =
|
|
|
61
62
|
target: "_self",
|
|
62
63
|
},
|
|
63
64
|
}
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
65
|
+
);
|
|
66
|
+
})
|
|
67
|
+
.filter((f) => f);
|
|
68
|
+
const siteTitle = sectionTitle !== false ? (sectionTitle || `More ${site.value.title} features:`) : false;
|
|
67
69
|
</script>
|
|
68
70
|
|
|
69
71
|
<template>
|
|
70
72
|
<section :class="`${background} full-width`">
|
|
71
|
-
<
|
|
72
|
-
|
|
73
|
+
<template v-if="sectionTitle">
|
|
74
|
+
<div class="large-space"></div>
|
|
75
|
+
<div class="large-space"></div>
|
|
76
|
+
</template>
|
|
73
77
|
<div class="holder large-padding">
|
|
74
|
-
<
|
|
75
|
-
|
|
78
|
+
<template v-if="siteTitle">
|
|
79
|
+
<h5>{{ siteTitle }}</h5>
|
|
80
|
+
<div class="medium-space"></div>
|
|
81
|
+
</template>
|
|
76
82
|
<div class="cards-gallery">
|
|
77
83
|
<div
|
|
78
84
|
v-for="feature in featuresExcerpts"
|
|
79
85
|
:key="feature.id"
|
|
80
86
|
class="card-wrapper"
|
|
81
87
|
>
|
|
88
|
+
<a
|
|
89
|
+
v-if="feature.link && !feature.link.text"
|
|
90
|
+
:href="feature.link.href"
|
|
91
|
+
:target="feature.link.target"
|
|
92
|
+
class="link-card"
|
|
93
|
+
>
|
|
94
|
+
<FeatureCard
|
|
95
|
+
:title="feature.title"
|
|
96
|
+
:content="feature.content"
|
|
97
|
+
:icon="feature.icon"
|
|
98
|
+
/>
|
|
99
|
+
</a>
|
|
82
100
|
<FeatureCard
|
|
101
|
+
v-else
|
|
83
102
|
:title="feature.title"
|
|
84
103
|
:content="feature.content"
|
|
85
104
|
:icon="feature.icon"
|
|
86
|
-
:link="feature.link"
|
|
105
|
+
:link="feature.link.text ? feature.link : undefined"
|
|
87
106
|
/>
|
|
88
107
|
</div>
|
|
89
108
|
</div>
|
|
@@ -101,6 +120,16 @@ const siteTitle = sectionTitle || `More ${site.value.title} features:`;
|
|
|
101
120
|
margin-top: 16px;
|
|
102
121
|
}
|
|
103
122
|
|
|
123
|
+
.link-card {
|
|
124
|
+
display: block;
|
|
125
|
+
text-decoration: none;
|
|
126
|
+
border: .0625rem solid transparent;
|
|
127
|
+
}
|
|
128
|
+
.link-card:hover article {
|
|
129
|
+
box-shadow: none;
|
|
130
|
+
border: .0625rem solid var(--outline-variant);
|
|
131
|
+
}
|
|
132
|
+
|
|
104
133
|
.card-wrapper {
|
|
105
134
|
display: flex;
|
|
106
135
|
flex: 0 0 calc(25% - 18px);
|