@eox/pages-theme-eox 0.4.3 → 0.4.5

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.3",
3
+ "version": "0.4.5",
4
4
  "type": "module",
5
5
  "description": "Vitepress Theme with EOX branding",
6
6
  "main": "src/index.js",
package/src/Layout.vue CHANGED
@@ -7,7 +7,7 @@
7
7
  <nav class="large-padding no-margin center-align nav-mobile">
8
8
  <a href="/">
9
9
  <img
10
- :src="theme.logo"
10
+ :src="withBase(theme.logo)"
11
11
  :alt="`${theme.siteTitle} logo`"
12
12
  class="logo"
13
13
  />
@@ -20,7 +20,7 @@
20
20
  <nav>
21
21
  <a data-ui="#mobile-menu" href="/">
22
22
  <img
23
- :src="theme.logo"
23
+ :src="withBase(theme.logo)"
24
24
  :alt="`${theme.siteTitle} logo`"
25
25
  class="logo margin"
26
26
  />
@@ -31,15 +31,39 @@
31
31
  </button>
32
32
  </nav>
33
33
  <ul class="list border large-space">
34
- <li v-for="item in theme.nav">
34
+ <li v-for="item in theme.nav.filter((item) => !item.action)">
35
35
  <a
36
36
  data-ui="#mobile-menu"
37
37
  :href="item.link"
38
- class="primary-text"
39
- >{{ item.text }}</a
38
+ :class="
39
+ item.action
40
+ ? 'button large medium-elevate cta'
41
+ : 'primary-text'
42
+ "
40
43
  >
44
+ <span>{{ item.text }}</span>
45
+ <i v-if="item.action" class="mdi mdi-arrow-right"></i>
46
+ </a>
41
47
  </li>
42
48
  </ul>
49
+ <div class="grid">
50
+ <div class="s12">
51
+ <nav v-for="item in theme.nav.filter((item) => item.action)">
52
+ <a
53
+ data-ui="#mobile-menu"
54
+ :href="item.link"
55
+ :class="
56
+ item.action
57
+ ? `button responsive large medium-elevate cta ${item.action}`
58
+ : 'primary-text'
59
+ "
60
+ >
61
+ <span>{{ item.text }}</span>
62
+ <i v-if="item.action" class="mdi mdi-arrow-right"></i>
63
+ </a>
64
+ </nav>
65
+ </div>
66
+ </div>
43
67
  </dialog>
44
68
  </nav>
45
69
  <nav
@@ -47,7 +71,7 @@
47
71
  >
48
72
  <a href="/">
49
73
  <img
50
- :src="theme.logo"
74
+ :src="withBase(theme.logo)"
51
75
  :alt="`${theme.siteTitle} logo`"
52
76
  class="logo"
53
77
  />
@@ -55,27 +79,33 @@
55
79
  <div class="space"></div>
56
80
  <nav>
57
81
  <ul class="left-align no-margin">
58
- <li v-for="item in theme.nav">
82
+ <li v-for="item in theme.nav.filter((i) => !i.action)">
59
83
  <a :href="item.link">{{ item.text }}</a>
60
84
  </li>
61
85
  </ul>
62
86
  </nav>
63
87
  <div class="max"></div>
64
- <a class="button text right-align" href="">
65
- <span>Contact sales</span>
66
- <i class="mdi mdi-arrow-right"></i>
67
- </a>
68
- <a class="button right-align" href="">
69
- <span>Log in</span>
70
- <i class="mdi mdi-arrow-right"></i>
71
- </a>
88
+ <nav>
89
+ <ul class="left-align no-margin">
90
+ <li v-for="item in theme.nav.filter((item) => item.action)">
91
+ <a
92
+ class="button right-align"
93
+ :class="item.action === 'primary' ? '' : 'text'"
94
+ :href="item.link"
95
+ >
96
+ <span>{{ item.text }}</span>
97
+ <i class="mdi mdi-arrow-right"></i>
98
+ </a>
99
+ </li>
100
+ </ul>
101
+ </nav>
72
102
  </nav>
73
103
  </div>
74
104
  <header v-if="frontmatter.hero" class="primary center-align">
75
105
  <img
76
106
  v-if="frontmatter.hero.image"
77
107
  class="background-image"
78
- :src="frontmatter.hero.image.src"
108
+ :src="withBase(frontmatter.hero.image.src)"
79
109
  />
80
110
  <h1 class="large bold" style="font-size: clamp(3rem, 5vw, 94px)">
81
111
  {{ frontmatter.hero.text }}
@@ -100,7 +130,7 @@
100
130
  <div class="">
101
131
  <nav class="padding right-align">
102
132
  <img
103
- :src="theme.logo"
133
+ :src="withBase(theme.logo)"
104
134
  :alt="`${theme.siteTitle} logo`"
105
135
  class="logo"
106
136
  />
@@ -130,7 +160,7 @@
130
160
  <script setup>
131
161
  import DefaultTheme from "vitepress/theme";
132
162
  const { Layout } = DefaultTheme;
133
- import { useData } from "vitepress";
163
+ import { useData, withBase } from "vitepress";
134
164
  const { frontmatter, theme } = useData();
135
165
 
136
166
  if (!import.meta.env.SSR) {
@@ -239,6 +269,7 @@ header .cta.alt {
239
269
  footer {
240
270
  padding: 0;
241
271
  }
272
+ .top-nav > nav,
242
273
  .top-nav > .holder,
243
274
  footer > .holder {
244
275
  width: 100%;
@@ -21,13 +21,14 @@
21
21
  </a>
22
22
  </nav>
23
23
  </div>
24
- <img :src="image" :alt="title" />
24
+ <img :src="withBase(image)" :alt="title" />
25
25
  </div>
26
26
  </section>
27
27
  </template>
28
28
 
29
29
  <script setup>
30
30
  import { defineProps } from "vue";
31
+ import { withBase } from "vitepress";
31
32
  const props = defineProps([
32
33
  "button",
33
34
  "icon",
package/src/index.js CHANGED
@@ -8,6 +8,9 @@ export default {
8
8
  extends: DefaultTheme,
9
9
  Layout,
10
10
  enhanceApp({ app, router, siteData }) {
11
+ document.body.classList.remove("dark");
12
+ document.body.classList.add("light");
13
+
11
14
  app.component("FeatureSection", FeatureSection);
12
15
 
13
16
  router.onAfterRouteChanged = () => {