@eox/pages-theme-eox 0.4.9 → 0.4.11

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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eox/pages-theme-eox",
3
- "version": "0.4.9",
3
+ "version": "0.4.11",
4
4
  "type": "module",
5
5
  "description": "Vitepress Theme with EOX branding",
6
6
  "main": "src/index.js",
@@ -2,13 +2,14 @@
2
2
  import { useData, withBase } from "vitepress";
3
3
  import { data as features } from "../features.data.js";
4
4
 
5
- const { site } = useData();
5
+ const { page, site } = useData();
6
6
 
7
7
  const featuresExcerpts = features.map((f) => {
8
8
  const el = document.createElement("html");
9
9
  el.innerHTML = f.html;
10
10
  const featureSection = el.querySelector("featuresection");
11
- return featureSection
11
+ return featureSection &&
12
+ !page.value.relativePath.includes(f.url.replace("/", ""))
12
13
  ? {
13
14
  title: featureSection.title,
14
15
  description: featureSection.textContent,
@@ -23,21 +24,21 @@ const featuresExcerpts = features.map((f) => {
23
24
  <h2>Read more about these other {{ site.title }} features:</h2>
24
25
  <div class="grid">
25
26
  <a
26
- v-for="(feature, index) in features.filter((f, i) => featuresExcerpts[i])"
27
+ v-for="(feature, index) in featuresExcerpts.filter((f) => f)"
27
28
  class="feature s12 m3"
28
- :href="feature.url"
29
+ :href="feature.link"
29
30
  >
30
31
  <article class="no-padding">
31
32
  <img
32
- v-if="featuresExcerpts[index].image"
33
+ v-if="feature.image"
33
34
  class="responsive small"
34
- :src="withBase(featuresExcerpts[index].image)"
35
+ :src="withBase(feature.image)"
35
36
  />
36
37
  <div class="padding">
37
- <h5 class="small">{{ featuresExcerpts[index].title }}</h5>
38
- <p>{{ featuresExcerpts[index].description }}</p>
38
+ <h5 class="small">{{ feature.title }}</h5>
39
+ <p>{{ feature.description }}</p>
39
40
  <nav>
40
- <a class="button" :href="featuresExcerpts[index].link">
41
+ <a class="button" :href="feature.link">
41
42
  <span>Read more</span>
42
43
  <i class="mdi mdi-arrow-right"></i>
43
44
  </a>