@eox/pages-theme-eox 1.9.0 → 2.0.0-alpha.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/README.md CHANGED
@@ -239,6 +239,19 @@ A Call-to-Action section typically placed at the bottom of a page to encourage u
239
239
  />
240
240
  ```
241
241
 
242
+ #### Section Header
243
+
244
+ A standardized three-tier header block for page sections, matching EOX design tokens with a tag badge, a large display title, and an optional subtitle description. Supports light/dark context modes automatically.
245
+
246
+ ```html
247
+ <SectionHeader
248
+ tag="Viewing Ready & Basic"
249
+ icon="mdi-star-check-outline"
250
+ title="What our users say about Viewing Products"
251
+ subtitle="Optional paragraph providing context and detail for this section."
252
+ />
253
+ ```
254
+
242
255
  #### Logo Section
243
256
 
244
257
  Displays a grid of client or partner logos. It automatically handles logo sizing.
@@ -1,4 +1,11 @@
1
- import { reactive, ref } from "vue";
1
+ import { reactive, ref, defineComponent, h } from "vue";
2
+
3
+ export const VPNavBarSearch = defineComponent({
4
+ name: "VPNavBarSearch",
5
+ render() {
6
+ return h("div", { class: "VPNavBarSearch" }, "Search");
7
+ },
8
+ });
2
9
 
3
10
  const site = ref({
4
11
  title: "Test Site",
package/cypress.config.js CHANGED
@@ -10,6 +10,11 @@ export default defineConfig({
10
10
  viteConfig: {
11
11
  resolve: {
12
12
  alias: {
13
+ // Alias vitepress/theme to our mock
14
+ "vitepress/theme": path.resolve(
15
+ __dirname,
16
+ "cypress/support/mocks/vitepress.js",
17
+ ),
13
18
  // Alias vitepress to our mock
14
19
  vitepress: path.resolve(
15
20
  __dirname,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eox/pages-theme-eox",
3
- "version": "1.9.0",
3
+ "version": "2.0.0-alpha.2",
4
4
  "type": "module",
5
5
  "description": "Vitepress Theme with EOX branding",
6
6
  "main": "src/index.js",
package/src/Layout.vue CHANGED
@@ -1,5 +1,53 @@
1
1
  <template>
2
- <Layout :class="`layout-${frontmatter.layout}`">
2
+ <div
3
+ v-if="frontmatter.layout === 'blog'"
4
+ class="layout-blog min-h-screen flex flex-col"
5
+ >
6
+ <NavBar />
7
+ <NewsBanner v-if="theme.newsBanner" :content="theme.newsBanner" />
8
+ <main class="flex-grow">
9
+ <BlogList />
10
+ </main>
11
+ <Footer v-if="frontmatter.footer !== false" />
12
+ <CookieBanner v-if="theme.theme.brandConfig?.analytics"></CookieBanner>
13
+ </div>
14
+ <div
15
+ v-else-if="frontmatter.layout === 'tags'"
16
+ class="layout-tags min-h-screen flex flex-col"
17
+ >
18
+ <NavBar />
19
+ <NewsBanner v-if="theme.newsBanner" :content="theme.newsBanner" />
20
+ <main class="flex-grow">
21
+ <TagList />
22
+ </main>
23
+ <Footer v-if="frontmatter.footer !== false" />
24
+ <CookieBanner v-if="theme.theme.brandConfig?.analytics"></CookieBanner>
25
+ </div>
26
+ <div
27
+ v-else-if="frontmatter.layout === 'team'"
28
+ class="layout-team min-h-screen flex flex-col"
29
+ >
30
+ <NavBar />
31
+ <NewsBanner v-if="theme.newsBanner" :content="theme.newsBanner" />
32
+ <main class="flex-grow">
33
+ <TeamPage />
34
+ </main>
35
+ <Footer v-if="frontmatter.footer !== false" />
36
+ <CookieBanner v-if="theme.theme.brandConfig?.analytics"></CookieBanner>
37
+ </div>
38
+ <div
39
+ v-else-if="frontmatter.layout === 'post' || isBlogPost"
40
+ class="layout-post min-h-screen flex flex-col"
41
+ >
42
+ <NavBar />
43
+ <NewsBanner v-if="theme.newsBanner" :content="theme.newsBanner" />
44
+ <main class="flex-grow">
45
+ <BlogPost />
46
+ </main>
47
+ <Footer v-if="frontmatter.footer !== false" />
48
+ <CookieBanner v-if="theme.theme.brandConfig?.analytics"></CookieBanner>
49
+ </div>
50
+ <Layout v-else :class="`layout-${frontmatter.layout}`">
3
51
  <template #layout-top>
4
52
  <slot name="layout-top"></slot>
5
53
  <NavBar />
@@ -33,11 +81,20 @@
33
81
  </template>
34
82
 
35
83
  <script setup>
84
+ import { computed } from "vue";
36
85
  import DefaultTheme from "vitepress/theme";
37
86
  import { useData, useRouter } from "vitepress";
38
87
  const { Layout } = DefaultTheme;
39
88
  const { frontmatter, page, theme } = useData();
40
89
  const router = useRouter();
90
+
91
+ const isBlogPost = computed(() => {
92
+ return (
93
+ frontmatter.value.layout === "post" ||
94
+ page.value.relativePath.startsWith("_posts/") ||
95
+ /^\d{4}\/\d{2}\//.test(page.value.relativePath)
96
+ );
97
+ });
41
98
  </script>
42
99
 
43
100
  <style>
@@ -0,0 +1,14 @@
1
+ import { createContentLoader } from "vitepress";
2
+
3
+ export default createContentLoader("_team/*.md", {
4
+ transform(rawData) {
5
+ return rawData.map((page) => {
6
+ return {
7
+ id: page.frontmatter.id || "",
8
+ name: page.frontmatter.title || "",
9
+ url: page.url,
10
+ guest: page.frontmatter.guest || false,
11
+ };
12
+ });
13
+ },
14
+ });