@eox/pages-theme-eox 0.4.7 → 0.4.9
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/Layout.vue +10 -5
- package/src/components/FeatureSection.vue +18 -7
- package/src/components/FeaturesGallery.vue +55 -0
- package/src/features.data.js +11 -0
- package/src/index.js +2 -0
package/package.json
CHANGED
package/src/Layout.vue
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
<a href="/">
|
|
9
9
|
<img
|
|
10
10
|
:src="withBase(theme.logo)"
|
|
11
|
-
:alt="`${
|
|
11
|
+
:alt="`${site.title} logo`"
|
|
12
12
|
class="logo"
|
|
13
13
|
/>
|
|
14
14
|
</a>
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
<a data-ui="#mobile-menu" href="/">
|
|
22
22
|
<img
|
|
23
23
|
:src="withBase(theme.logo)"
|
|
24
|
-
:alt="`${
|
|
24
|
+
:alt="`${site.title} logo`"
|
|
25
25
|
class="logo margin"
|
|
26
26
|
/>
|
|
27
27
|
</a>
|
|
@@ -76,7 +76,7 @@
|
|
|
76
76
|
<a href="/">
|
|
77
77
|
<img
|
|
78
78
|
:src="withBase(theme.logo)"
|
|
79
|
-
:alt="`${
|
|
79
|
+
:alt="`${site.title} logo`"
|
|
80
80
|
class="logo"
|
|
81
81
|
/>
|
|
82
82
|
</a>
|
|
@@ -137,6 +137,11 @@
|
|
|
137
137
|
</div>
|
|
138
138
|
</header>
|
|
139
139
|
</template>
|
|
140
|
+
<template #page-bottom>
|
|
141
|
+
<FeaturesGallery
|
|
142
|
+
v-if="page.relativePath.startsWith('features/')"
|
|
143
|
+
></FeaturesGallery>
|
|
144
|
+
</template>
|
|
140
145
|
<template #layout-bottom>
|
|
141
146
|
<footer class="surface row center-align">
|
|
142
147
|
<div class="holder">
|
|
@@ -144,7 +149,7 @@
|
|
|
144
149
|
<nav class="padding right-align">
|
|
145
150
|
<img
|
|
146
151
|
:src="withBase(theme.logo)"
|
|
147
|
-
:alt="`${
|
|
152
|
+
:alt="`${site.title} logo`"
|
|
148
153
|
class="logo"
|
|
149
154
|
/>
|
|
150
155
|
<ul>
|
|
@@ -179,7 +184,7 @@
|
|
|
179
184
|
import DefaultTheme from "vitepress/theme";
|
|
180
185
|
const { Layout } = DefaultTheme;
|
|
181
186
|
import { useData, withBase } from "vitepress";
|
|
182
|
-
const { frontmatter, theme } = useData();
|
|
187
|
+
const { frontmatter, page, site, theme } = useData();
|
|
183
188
|
|
|
184
189
|
if (!import.meta.env.SSR) {
|
|
185
190
|
const scrollListener = () => {
|
|
@@ -11,12 +11,22 @@
|
|
|
11
11
|
<h5 :class="`title primary-text large`">{{ tagline }}</h5>
|
|
12
12
|
<p><slot></slot></p>
|
|
13
13
|
<nav>
|
|
14
|
-
<a
|
|
15
|
-
|
|
14
|
+
<a
|
|
15
|
+
v-if="primaryLink !== undefined"
|
|
16
|
+
:href="withBase(primaryLink)"
|
|
17
|
+
:target="primaryLink.includes('https://') ? '_blank' : '_self'"
|
|
18
|
+
:class="`button primary medium-elevate`"
|
|
19
|
+
>
|
|
20
|
+
<span>{{ primaryButton || `Read more about ${title}` }}</span>
|
|
16
21
|
<i class="mdi mdi-arrow-right"></i>
|
|
17
22
|
</a>
|
|
18
|
-
<a
|
|
19
|
-
|
|
23
|
+
<a
|
|
24
|
+
v-if="secondaryLink !== undefined"
|
|
25
|
+
:href="withBase(secondaryLink)"
|
|
26
|
+
:target="secondaryLink.includes('https://') ? '_blank' : '_self'"
|
|
27
|
+
class="button border"
|
|
28
|
+
>
|
|
29
|
+
<span>{{ secondaryButton || "Contact sales" }}</span>
|
|
20
30
|
<i class="mdi mdi-arrow-right"></i>
|
|
21
31
|
</a>
|
|
22
32
|
</nav>
|
|
@@ -27,14 +37,15 @@
|
|
|
27
37
|
</template>
|
|
28
38
|
|
|
29
39
|
<script setup>
|
|
30
|
-
import { defineProps } from "vue";
|
|
31
40
|
import { withBase } from "vitepress";
|
|
32
41
|
const props = defineProps([
|
|
33
|
-
"button",
|
|
34
42
|
"icon",
|
|
35
43
|
"image",
|
|
36
44
|
"landing",
|
|
37
|
-
"
|
|
45
|
+
"primaryButton",
|
|
46
|
+
"primaryLink",
|
|
47
|
+
"secondaryButton",
|
|
48
|
+
"secondaryLink",
|
|
38
49
|
"tagline",
|
|
39
50
|
"title",
|
|
40
51
|
]);
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import { useData, withBase } from "vitepress";
|
|
3
|
+
import { data as features } from "../features.data.js";
|
|
4
|
+
|
|
5
|
+
const { site } = useData();
|
|
6
|
+
|
|
7
|
+
const featuresExcerpts = features.map((f) => {
|
|
8
|
+
const el = document.createElement("html");
|
|
9
|
+
el.innerHTML = f.html;
|
|
10
|
+
const featureSection = el.querySelector("featuresection");
|
|
11
|
+
return featureSection
|
|
12
|
+
? {
|
|
13
|
+
title: featureSection.title,
|
|
14
|
+
description: featureSection.textContent,
|
|
15
|
+
image: featureSection.getAttribute("image"),
|
|
16
|
+
link: f.url,
|
|
17
|
+
}
|
|
18
|
+
: false;
|
|
19
|
+
});
|
|
20
|
+
</script>
|
|
21
|
+
|
|
22
|
+
<template>
|
|
23
|
+
<h2>Read more about these other {{ site.title }} features:</h2>
|
|
24
|
+
<div class="grid">
|
|
25
|
+
<a
|
|
26
|
+
v-for="(feature, index) in features.filter((f, i) => featuresExcerpts[i])"
|
|
27
|
+
class="feature s12 m3"
|
|
28
|
+
:href="feature.url"
|
|
29
|
+
>
|
|
30
|
+
<article class="no-padding">
|
|
31
|
+
<img
|
|
32
|
+
v-if="featuresExcerpts[index].image"
|
|
33
|
+
class="responsive small"
|
|
34
|
+
:src="withBase(featuresExcerpts[index].image)"
|
|
35
|
+
/>
|
|
36
|
+
<div class="padding">
|
|
37
|
+
<h5 class="small">{{ featuresExcerpts[index].title }}</h5>
|
|
38
|
+
<p>{{ featuresExcerpts[index].description }}</p>
|
|
39
|
+
<nav>
|
|
40
|
+
<a class="button" :href="featuresExcerpts[index].link">
|
|
41
|
+
<span>Read more</span>
|
|
42
|
+
<i class="mdi mdi-arrow-right"></i>
|
|
43
|
+
</a>
|
|
44
|
+
</nav>
|
|
45
|
+
</div>
|
|
46
|
+
</article>
|
|
47
|
+
</a>
|
|
48
|
+
</div>
|
|
49
|
+
</template>
|
|
50
|
+
|
|
51
|
+
<style scoped>
|
|
52
|
+
h2 {
|
|
53
|
+
margin-top: 8rem;
|
|
54
|
+
}
|
|
55
|
+
</style>
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { createContentLoader } from "vitepress";
|
|
2
|
+
|
|
3
|
+
export default createContentLoader("features/*.md", {
|
|
4
|
+
includeSrc: true,
|
|
5
|
+
render: true,
|
|
6
|
+
transform(rawData) {
|
|
7
|
+
return rawData.filter(
|
|
8
|
+
(d) => d.url !== "/features/" && d.url !== "/features/README",
|
|
9
|
+
);
|
|
10
|
+
},
|
|
11
|
+
});
|
package/src/index.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import DefaultTheme from "vitepress/theme";
|
|
2
2
|
import FeatureSection from "./components/FeatureSection.vue";
|
|
3
|
+
import FeaturesGallery from "./components/FeaturesGallery.vue";
|
|
3
4
|
import Layout from "./Layout.vue";
|
|
4
5
|
import "@eox/ui";
|
|
5
6
|
import "./style.css";
|
|
@@ -9,6 +10,7 @@ export default {
|
|
|
9
10
|
Layout,
|
|
10
11
|
enhanceApp({ app, router, siteData }) {
|
|
11
12
|
app.component("FeatureSection", FeatureSection);
|
|
13
|
+
app.component("FeaturesGallery", FeaturesGallery);
|
|
12
14
|
|
|
13
15
|
router.onAfterRouteChanged = () => {
|
|
14
16
|
if (!import.meta.env.SSR) {
|