@eox/pages-theme-eox 0.5.3 → 0.5.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.5.3",
3
+ "version": "0.5.5",
4
4
  "type": "module",
5
5
  "description": "Vitepress Theme with EOX branding",
6
6
  "main": "src/index.js",
@@ -11,7 +11,7 @@
11
11
  },
12
12
  "dependencies": {
13
13
  "@eox/eslint-config": "^2.0.0",
14
- "@eox/ui": "^0.1.9",
14
+ "@eox/ui": "^0.3.4",
15
15
  "vitepress": "^1.6.3"
16
16
  }
17
17
  }
package/src/Layout.vue CHANGED
@@ -52,7 +52,7 @@
52
52
  :rel="item.rel"
53
53
  :class="
54
54
  item.action
55
- ? `button responsive large ${item.action === 'primary' || item.action === 'secondary' ? `${item.action} medium-elevate` : 'border no-elevate'}`
55
+ ? `button responsive large ${item.action} ${item.action === 'primary' || item.action === 'secondary' ? 'medium-elevate' : 'border no-elevate'}`
56
56
  : 'primary-text'
57
57
  "
58
58
  >
@@ -99,11 +99,11 @@
99
99
  <li v-for="item in theme.nav.filter((item) => item.action)">
100
100
  <a
101
101
  class="button right-align"
102
- :class="
102
+ :class="`${item.action} ${
103
103
  item.action === 'primary' || item.action === 'secondary'
104
104
  ? item.action
105
105
  : 'border'
106
- "
106
+ }`"
107
107
  :href="withBase(item.link)"
108
108
  :target="item.target"
109
109
  :rel="item.rel"
@@ -136,6 +136,15 @@
136
136
  frameborder="0"
137
137
  allowfullscreen
138
138
  />
139
+ <video
140
+ v-else-if="frontmatter.hero.video"
141
+ class="hero-image large-elevate small-round"
142
+ :src="withBase(frontmatter.hero.video.src)"
143
+ style="grid-area: image; aspect-ratio: 16/9"
144
+ autoplay
145
+ muted
146
+ loop
147
+ />
139
148
  <img
140
149
  v-else-if="frontmatter.hero.image"
141
150
  class="hero-image large-elevate small-round"
@@ -284,7 +293,8 @@ if (!import.meta.env.SSR) {
284
293
  box-shadow: none;
285
294
  }
286
295
  .Layout.layout-home .top-nav.at-top .nav-desktop .button.primary,
287
- .Layout.layout-home .top-nav.at-top .nav-desktop .button.secondary {
296
+ .Layout.layout-home .top-nav.at-top .nav-desktop .button.secondary,
297
+ .Layout.layout-home .top-nav.at-top .nav-desktop .button.alt {
288
298
  display: none;
289
299
  }
290
300
  .Layout.layout-home .top-nav.at-top nav.actions {
@@ -1,45 +1,43 @@
1
1
  <template>
2
- <section class="cta-section">
3
- <div
4
- class="center-align full-width"
5
- :class="
6
- dark !== undefined
7
- ? 'primary primary-gradient-background'
8
- : 'surface-container-low'
9
- "
10
- >
11
- <div class="large-space"></div>
12
- <div class="large-space"></div>
13
- <div class="holder large-padding">
14
- <h3 class="large bold">
15
- {{ title }}
16
- </h3>
17
- <p class="large-text">{{ tagline }}</p>
18
- <a
19
- v-if="primaryButton"
20
- class="button extra small-margin"
21
- :class="dark !== undefined ? 'surface' : 'primary'"
22
- :href="primaryLink"
23
- >{{ primaryButton }} <i class="mdi mdi-arrow-right"></i
24
- ></a>
25
- <a
26
- v-if="secondaryButton"
27
- class="button extra small-margin secondary"
28
- :href="secondaryLink"
29
- >{{ secondaryButton }}<i class="mdi mdi-arrow-right"></i
30
- ></a>
31
- <a
32
- v-if="altButton"
33
- class="button border extra small-margin"
34
- :class="dark !== undefined ? 'white-text' : ''"
35
- :href="altLink"
36
- >{{ altButton }}</a
37
- >
38
- </div>
39
- <div class="large-space"></div>
40
- <div class="large-space"></div>
41
- <div class="large-space"></div>
2
+ <section
3
+ class="cta-section center-align full-width"
4
+ :class="
5
+ dark !== undefined
6
+ ? 'primary primary-gradient-background'
7
+ : 'surface-container-low'
8
+ "
9
+ >
10
+ <div class="large-space"></div>
11
+ <div class="large-space"></div>
12
+ <div class="holder large-padding">
13
+ <h3 class="large bold">
14
+ {{ title }}
15
+ </h3>
16
+ <p class="large-text">{{ tagline }}</p>
17
+ <a
18
+ v-if="primaryButton"
19
+ class="button extra small-margin"
20
+ :class="dark !== undefined ? 'surface' : 'primary'"
21
+ :href="primaryLink"
22
+ >{{ primaryButton }} <i class="mdi mdi-arrow-right"></i
23
+ ></a>
24
+ <a
25
+ v-if="secondaryButton"
26
+ class="button extra small-margin secondary"
27
+ :href="secondaryLink"
28
+ >{{ secondaryButton }}<i class="mdi mdi-arrow-right"></i
29
+ ></a>
30
+ <a
31
+ v-if="altButton"
32
+ class="button border extra small-margin"
33
+ :class="dark !== undefined ? 'white-text' : ''"
34
+ :href="altLink"
35
+ >{{ altButton }}</a
36
+ >
42
37
  </div>
38
+ <div class="large-space"></div>
39
+ <div class="large-space"></div>
40
+ <div class="large-space"></div>
43
41
  </section>
44
42
  </template>
45
43
 
@@ -50,10 +50,19 @@
50
50
  </div>
51
51
  </div>
52
52
  <img
53
+ v-if="image"
53
54
  :src="withBase(image)"
54
55
  :alt="title"
55
56
  class="small-round medium-elevate"
56
57
  />
58
+ <video
59
+ v-if="video"
60
+ :src="withBase(video)"
61
+ class="small-round medium-elevate"
62
+ autoplay
63
+ muted
64
+ loop
65
+ />
57
66
  </div>
58
67
  </section>
59
68
  </template>
@@ -64,6 +73,7 @@ const props = defineProps([
64
73
  "dark",
65
74
  "icon",
66
75
  "image",
76
+ "video",
67
77
  "landing",
68
78
  "primaryButton",
69
79
  "primaryLink",
@@ -24,8 +24,8 @@ const featuresExcerpts = features.map((f) => {
24
24
  </script>
25
25
 
26
26
  <template>
27
- <div class="large-space"></div>
28
- <div class="primary primary-gradient-background full-width">
27
+ <section class="primary primary-gradient-background full-width">
28
+ <div class="large-space"></div>
29
29
  <div class="large-space"></div>
30
30
  <div class="holder large-padding">
31
31
  <h5>More {{ site.title }} features:</h5>
@@ -45,9 +45,9 @@ const featuresExcerpts = features.map((f) => {
45
45
  :src="withBase(feature.image)"
46
46
  />
47
47
  <div class="max">
48
- <h5 class="small">
48
+ <h6 class="small">
49
49
  <strong>{{ feature.title }}</strong>
50
- </h5>
50
+ </h6>
51
51
  <p>{{ feature.description }}</p>
52
52
  <div class="max"></div>
53
53
  <nav>
@@ -63,7 +63,8 @@ const featuresExcerpts = features.map((f) => {
63
63
  </div>
64
64
  </div>
65
65
  <div class="large-space"></div>
66
- </div>
66
+ <div class="large-space"></div>
67
+ </section>
67
68
  </template>
68
69
 
69
70
  <style scoped>
@@ -58,10 +58,10 @@
58
58
  <div
59
59
  v-for="(plan, index) in localPlans"
60
60
  :key="'head-' + index"
61
- class="cell surface-container-low small-top-round bold top-margin"
61
+ class="cell surface-container-low top-cell bold top-margin"
62
62
  :class="`orig-col-${index + 2}`"
63
63
  >
64
- <h6 class="primary-text bold">{{ plan.name }}</h6>
64
+ <h6 class="primary-text bold top-margin">{{ plan.name }}</h6>
65
65
  </div>
66
66
 
67
67
  <div class="cell orig-col-1 m l">Price (per month):</div>
@@ -90,7 +90,7 @@
90
90
  v-for="(plan, planIndex) in localPlans"
91
91
  :key="`${planIndex}-${row}`"
92
92
  class="bold surface-container-low"
93
- :class="`cell orig-col-${planIndex + 2} ${rowIndex === getRowKeys(localPlans).length - 1 && !config.showSales ? 'small-bottom-round' : ''}`"
93
+ :class="`cell orig-col-${planIndex + 2} ${rowIndex === getRowKeys(localPlans).length - 1 && !config.showSales ? 'bottom-cell' : ''}`"
94
94
  >
95
95
  <div
96
96
  v-if="typeof plan.details[row] === 'string'"
@@ -108,7 +108,9 @@
108
108
  <input
109
109
  type="checkbox"
110
110
  :id="`${plan.name}-${row}`"
111
+ v-model="plan.details[row].alternative.checked"
111
112
  @input="$forceUpdate()"
113
+ @change="updatePrices"
112
114
  />
113
115
  <span :for="`${plan.name}-${row}`"
114
116
  ><h6 class="small bold">
@@ -132,7 +134,7 @@
132
134
  <div
133
135
  v-for="(plan, index) in localPlans"
134
136
  :key="'cta-' + index"
135
- :class="`surface-container-low small-bottom-round cell orig-col-${index + 2} center-align`"
137
+ :class="`surface-container-low cell bottom-cell orig-col-${index + 2} center-align`"
136
138
  >
137
139
  <a v-if="plan.link" :href="plan.link"
138
140
  >See all features
@@ -154,7 +156,7 @@
154
156
  v-if="showSales"
155
157
  v-for="(plan, index) in localPlans"
156
158
  :key="'cta-' + index"
157
- :class="`surface-container-low small-bottom-round cell orig-col-${index + 2} center-align`"
159
+ :class="`surface-container-low cell bottom-cell orig-col-${index + 2} center-align`"
158
160
  >
159
161
  <ClientOnly>
160
162
  <a
@@ -183,7 +185,7 @@
183
185
  <div
184
186
  v-for="(plan, detailPlanIndex) in detail.plans"
185
187
  :key="detailPlanIndex"
186
- class="surface-container-low primary-text bold small-top-round top-margin"
188
+ class="surface-container-low primary-text bold top-margin top-cell"
187
189
  :class="`cell orig-col-${detailPlanIndex + 2}`"
188
190
  >
189
191
  <h6 class="primary-text bold s">{{ plan.name }}</h6>
@@ -204,7 +206,7 @@
204
206
  v-for="(plan, planIndex) in detail.plans"
205
207
  :key="`${planIndex}-${row}`"
206
208
  class="bold surface-container-low"
207
- :class="`cell orig-col-${planIndex + 2} ${rowIndex === getRowKeys(detail.plans).length - 1 && !config.showSales ? 'small-bottom-round' : ''}`"
209
+ :class="`cell orig-col-${planIndex + 2} ${rowIndex === getRowKeys(detail.plans).length - 1 && !config.showSales ? 'bottom-cell' : ''}`"
208
210
  >
209
211
  <div class="s grey-text" v-html="row + ':'"></div>
210
212
  <template
@@ -278,11 +280,25 @@ export default {
278
280
  methods: {
279
281
  calculatePrice(plan) {
280
282
  const basePrice = plan.basePrice;
281
- const additionalPrice = this.localOptions
283
+ const additionalOptionPrice = this.localOptions
282
284
  .filter((option) => option.checked)
283
285
  .reduce((sum, option) => sum + (option.modifier || 0), 0);
284
286
 
285
- return basePrice + additionalPrice;
287
+ let additionalPlanModifier = 0;
288
+ if (plan.details) {
289
+ Object.values(plan.details).forEach((value) => {
290
+ if (value && typeof value === "object") {
291
+ if (
292
+ "alternative" in value &&
293
+ "modifier" in value.alternative &&
294
+ "checked" in value.alternative &&
295
+ value.alternative.checked
296
+ )
297
+ additionalPlanModifier += value.alternative.modifier;
298
+ }
299
+ });
300
+ }
301
+ return basePrice + additionalOptionPrice + additionalPlanModifier;
286
302
  },
287
303
  getRowKeys(plansArray) {
288
304
  const keys = new Set();
@@ -410,14 +426,14 @@ export default {
410
426
  overflow: hidden;
411
427
  }
412
428
 
413
- .small-top-round {
414
- border-top-left-radius: 16px;
415
- border-top-right-radius: 16px;
429
+ .top-cell {
430
+ border-top-left-radius: 0.5rem;
431
+ border-top-right-radius: 0.5rem;
416
432
  }
417
433
 
418
- .small-bottom-round {
419
- border-bottom-left-radius: 16px;
420
- border-bottom-right-radius: 16px;
434
+ .bottom-cell {
435
+ border-bottom-left-radius: 0.5rem;
436
+ border-bottom-right-radius: 0.5rem;
421
437
  }
422
438
 
423
439
  @media screen and (min-width: 769px) {
package/src/style.css CHANGED
@@ -1,7 +1,7 @@
1
1
  @import "@eox/ui/style.css";
2
2
 
3
3
  :root {
4
- --vp-nav-height: 88px;
4
+ --vp-nav-height: 90px;
5
5
  }
6
6
 
7
7
  body {
@@ -213,8 +213,7 @@ button.text:hover,
213
213
  background: var(--surface-bright);
214
214
  }
215
215
  @media (min-width: 1024px) {
216
- .feature-section.landing,
217
- .cta-section {
216
+ .feature-section.landing {
218
217
  padding: 64px;
219
218
  padding: clamp(64px, 10%, 128px);
220
219
  }
@@ -309,3 +308,8 @@ button.text:hover,
309
308
  hsl(from var(--primary) h s calc(l - 20)) 100%
310
309
  ) !important;
311
310
  }
311
+
312
+ header[class*="background"],
313
+ section[class*="background"] {
314
+ border-radius: 0 !important;
315
+ }