@eox/pages-theme-eox 1.5.1 → 1.7.0

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/CHANGELOG.md CHANGED
@@ -1,5 +1,24 @@
1
1
  # Changelog
2
2
 
3
+ # [1.7.0](https://gitlab.eox.at/eox/hub/eoxhub-portal/compare/v1.6.0...v1.7.0) (2026-05-11)
4
+
5
+ ### Bug Fixes
6
+
7
+ - **style:** card link/border/elevation ([004611f](https://gitlab.eox.at/eox/hub/eoxhub-portal/commit/004611f20e46dd47030a6c835bd6380fd045369b))
8
+ - **style:** nav menu rounding harmonization ([a5ff2e7](https://gitlab.eox.at/eox/hub/eoxhub-portal/commit/a5ff2e7a3b63e98b44f7b763ad79c2111c748286))
9
+ - **style:** sizing adjustments for prices and plan names ([d61ef7a](https://gitlab.eox.at/eox/hub/eoxhub-portal/commit/d61ef7a37ae0a3cede844875b582965eb820e704))
10
+
11
+ # [1.6.0](https://gitlab.eox.at/eox/hub/eoxhub-portal/compare/v1.5.1...v1.6.0) (2026-04-30)
12
+
13
+ ### Bug Fixes
14
+
15
+ - **style:** link display in sidebar and footer ([766d4f4](https://gitlab.eox.at/eox/hub/eoxhub-portal/commit/766d4f40ec9a185c270211f40280848b90c32fe5))
16
+ - **style:** more compact footer layout ([b190cb9](https://gitlab.eox.at/eox/hub/eoxhub-portal/commit/b190cb9038887ad19cffc2419aea93762aee98a2))
17
+
18
+ ### Features
19
+
20
+ - custom CTAs in pricing table ([8900a3c](https://gitlab.eox.at/eox/hub/eoxhub-portal/commit/8900a3c148630e86ef84cf433b7d8008daeba8f5))
21
+
3
22
  ## [1.5.1](https://gitlab.eox.at/eox/hub/eoxhub-portal/compare/v1.5.0...v1.5.1) (2026-04-30)
4
23
 
5
24
  ### Bug Fixes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eox/pages-theme-eox",
3
- "version": "1.5.1",
3
+ "version": "1.7.0",
4
4
  "type": "module",
5
5
  "description": "Vitepress Theme with EOX branding",
6
6
  "main": "src/index.js",
@@ -40,7 +40,10 @@ const iconStyle = {
40
40
  };
41
41
  </script>
42
42
  <template>
43
- <article class="vertical large-padding">
43
+ <article
44
+ class="vertical large-padding no-margin"
45
+ :class="link && !link.text ? 'small-elevate' : 'no-elevate'"
46
+ >
44
47
  <div>
45
48
  <i
46
49
  v-if="typeof icon === 'string' && icon.startsWith('mdi-')"
@@ -92,10 +95,10 @@ const iconStyle = {
92
95
  <nav
93
96
  v-if="link || secondaryLink"
94
97
  class="row wrap align-center"
95
- style="gap: 1.5rem; margin-right: auto"
98
+ style="gap: 1.5rem; margin-right: auto; position: relative; z-index: 11"
96
99
  >
97
100
  <a
98
- v-if="link"
101
+ v-if="link && !!link.text"
99
102
  :href="link.href"
100
103
  :target="link.target ?? '_blank'"
101
104
  class="button transparent bold primary-text no-padding"
@@ -48,7 +48,8 @@ const cardStyle = computed(() => ({
48
48
 
49
49
  <template>
50
50
  <article
51
- class="no-padding fill small-elevate image-overlay-card"
51
+ class="no-padding no-margin fill image-overlay-card"
52
+ :class="link && !link.text ? 'small-elevate' : 'no-elevate'"
52
53
  :style="cardStyle"
53
54
  >
54
55
  <img v-if="image" :src="image" alt="" class="image-overlay-card-image" />
@@ -97,10 +98,10 @@ const cardStyle = computed(() => ({
97
98
  <nav
98
99
  v-if="link || secondaryLink"
99
100
  class="row wrap align-center"
100
- style="gap: 0.5rem"
101
+ style="gap: 0.5rem; position: relative; z-index: 11"
101
102
  >
102
103
  <a
103
- v-if="link"
104
+ v-if="link && link.text"
104
105
  class="button small white black-text"
105
106
  :href="link.href"
106
107
  :target="link.target ?? '_blank'"
@@ -179,19 +179,19 @@ section {
179
179
  }
180
180
 
181
181
  .link-card {
182
- display: block;
182
+ display: flex;
183
+ flex: 1;
183
184
  text-decoration: none;
184
- border: 0.0625rem solid transparent;
185
185
  position: relative;
186
186
  }
187
187
  .link-overlay {
188
188
  position: absolute;
189
189
  inset: 0;
190
- z-index: 1;
190
+ z-index: 10;
191
191
  }
192
192
  .link-card:hover article {
193
- box-shadow: none;
194
- border: 0.0625rem solid var(--outline-variant);
193
+ box-shadow: var(--elevate2);
194
+ transform: translateY(-2px);
195
195
  }
196
196
 
197
197
  .card-wrapper {
@@ -3,32 +3,34 @@
3
3
  <div class="holder large-padding">
4
4
  <div class="large-space"></div>
5
5
  <div class="grid">
6
- <div class="s12 l6">
7
- <img
8
- :src="withBase(theme.logo.light)"
9
- :alt="`${site.title} logo`"
10
- class="logo"
11
- />
12
- <div class="small-space"></div>
13
- <a
14
- v-if="theme.nav.find((i) => i.link && i.link.includes('contact'))"
15
- :href="
16
- theme.nav.find((i) => i.link && i.link.includes('contact')).link
17
- "
18
- class="button small border no-margin"
19
- style="color: var(--on-surface)"
20
- @click="trackEvent(['CTA', 'Click', 'Footer', action.text])"
21
- >{{
22
- theme.nav.find((i) => i.link && i.link.includes("contact")).text
23
- }}</a
24
- >
25
- <p v-html="theme.footer.message"></p>
26
- <p v-html="theme.footer.copyright"></p>
6
+ <div class="s12 l6 footer-info">
7
+ <div class="footer-info-content">
8
+ <img
9
+ :src="withBase(theme.logo.light)"
10
+ :alt="`${site.title} logo`"
11
+ class="logo"
12
+ />
13
+ <div class="small-space"></div>
14
+ <a
15
+ v-if="theme.nav.find((i) => i.link && i.link.includes('contact'))"
16
+ :href="
17
+ theme.nav.find((i) => i.link && i.link.includes('contact')).link
18
+ "
19
+ class="button small border no-margin"
20
+ style="color: var(--on-surface)"
21
+ @click="trackEvent(['CTA', 'Click', 'Footer', action.text])"
22
+ >{{
23
+ theme.nav.find((i) => i.link && i.link.includes("contact")).text
24
+ }}</a
25
+ >
26
+ <p v-html="theme.footer.message"></p>
27
+ </div>
28
+ <p class="footer-copyright" v-html="theme.footer.copyright"></p>
27
29
  </div>
28
30
  <div class="s12 l6">
29
- <div class="grid large-line">
31
+ <div class="footer-columns">
30
32
  <div
31
- class="s6 l4"
33
+ class="footer-column-item"
32
34
  v-if="theme.nav.filter((i) => !i.action && i.link).length"
33
35
  >
34
36
  <p class="bold">{{ t("About", theme.i18n) }}</p>
@@ -42,7 +44,10 @@
42
44
  >
43
45
  </p>
44
46
  </div>
45
- <div class="s6 l4" v-for="item in theme.nav.filter((i) => i.items)">
47
+ <div
48
+ class="footer-column-item"
49
+ v-for="item in theme.nav.filter((i) => i.items)"
50
+ >
46
51
  <p class="bold">{{ item.text }}</p>
47
52
  <p v-for="subItem in getFlatList(item.items)">
48
53
  <a
@@ -54,7 +59,7 @@
54
59
  >
55
60
  </p>
56
61
  </div>
57
- <div class="s6 l4">
62
+ <div class="footer-column-item">
58
63
  <p class="bold">{{ t("Legal", theme.i18n) }}</p>
59
64
  <p>
60
65
  <a
@@ -123,9 +128,66 @@ const termsLinks = computed(() => {
123
128
  </script>
124
129
 
125
130
  <style>
126
- @media screen and (max-width: 600px) {
127
- footer > .holder > .grid > div:first-child {
131
+ footer .grid > div:not(:first-child) p,
132
+ .footer-column-item p {
133
+ margin: 0 !important;
134
+ }
135
+
136
+ footer .link {
137
+ text-decoration: none;
138
+ }
139
+
140
+ .footer-columns {
141
+ columns: 1;
142
+ column-gap: 2rem;
143
+ }
144
+
145
+ .footer-column-item {
146
+ break-inside: avoid;
147
+ margin-bottom: 2rem;
148
+ }
149
+
150
+ @media screen and (min-width: 601px) {
151
+ .footer-columns {
152
+ columns: 2;
153
+ }
154
+ }
155
+
156
+ @media screen and (min-width: 993px) {
157
+ .footer-columns {
158
+ columns: 3;
159
+ }
160
+ }
161
+
162
+ .footer-info {
163
+ display: flex;
164
+ flex-direction: column;
165
+ justify-content: space-between;
166
+ }
167
+
168
+ @media screen and (max-width: 992px) {
169
+ footer .grid {
170
+ display: flex;
171
+ flex-direction: column;
172
+ }
173
+ .footer-info {
174
+ order: -1;
175
+ margin-bottom: 0;
176
+ display: contents;
177
+ }
178
+ .footer-info-content {
179
+ order: -2;
180
+ margin-bottom: 2rem;
181
+ }
182
+ .footer-columns {
128
183
  order: 1;
129
184
  }
185
+ .footer-copyright {
186
+ order: 2;
187
+ margin-top: 2rem !important;
188
+ }
189
+ }
190
+
191
+ @media screen and (max-width: 600px) {
130
192
  }
131
193
  </style>
@@ -138,19 +138,19 @@
138
138
  <li v-for="item in theme.nav.filter((i) => !i.action)">
139
139
  <div v-if="item.items">
140
140
  <button
141
- class="button text"
141
+ class="button text no-round"
142
142
  :class="{ active: isActive(item, route.path) }"
143
143
  >
144
144
  <span>{{ t(item.text, theme.i18n) }}</span>
145
145
  <i class="mdi mdi-chevron-down"></i>
146
146
  </button>
147
- <menu class="no-wrap surface-container-lowest">
147
+ <menu class="no-wrap surface-container-lowest no-round">
148
148
  <NavDropdown :items="item.items" />
149
149
  </menu>
150
150
  </div>
151
151
  <a
152
152
  v-else
153
- class="button text"
153
+ class="button text no-round"
154
154
  :class="{ active: isActive(item, route.path) }"
155
155
  :href="withBase(item.link)"
156
156
  :target="item.target"
@@ -199,7 +199,7 @@
199
199
  <ul class="left-align no-margin" v-if="langs && langs.length > 1">
200
200
  <li>
201
201
  <div>
202
- <button class="button text">
202
+ <button class="button text no-round">
203
203
  <i class="mdi mdi-translate small"></i>
204
204
  <i class="mdi mdi-chevron-down small"></i>
205
205
  </button>
@@ -42,13 +42,19 @@
42
42
  :key="`header-${index}`"
43
43
  class="s12 m3 center-align"
44
44
  >
45
- <h6 class="primary-text bold">{{ plan.name }}</h6>
45
+ <h6 class="primary-text bold" style="word-break: break-word">
46
+ {{ plan.name }}
47
+ </h6>
46
48
  <ClientOnly>
47
49
  <a
48
50
  :href="addPlanConfig(contactLink, plan)"
49
51
  class="button responsive bold margin-top-1 margin-bottom-2"
50
52
  >
51
- {{ t("Contact us", theme.i18n) }}
53
+ {{
54
+ plan.salesCTA
55
+ ? t(plan.salesCTA, theme.i18n)
56
+ : t("Contact us", theme.i18n)
57
+ }}
52
58
  </a>
53
59
  </ClientOnly>
54
60
  </div>
@@ -68,7 +74,9 @@
68
74
  class="cell surface-container-low top-cell bold top-margin"
69
75
  :class="`orig-col-${index + 2}`"
70
76
  >
71
- <h6 class="primary-text bold top-margin">{{ plan.name }}</h6>
77
+ <h6 class="primary-text bold top-margin" style="word-break: break-word">
78
+ {{ plan.name }}
79
+ </h6>
72
80
  </div>
73
81
 
74
82
  <div v-if="showDescriptionColumn" class="cell orig-col-1 l">
@@ -84,10 +92,11 @@
84
92
  <h6
85
93
  v-if="typeof plan.basePrice === 'string'"
86
94
  class="primary-text bold"
95
+ :style="dynamicPriceStyleH6"
87
96
  >
88
97
  {{ t(plan.basePrice, theme.i18n) }}
89
98
  </h6>
90
- <h4 v-else class="primary-text bold">
99
+ <h4 v-else class="primary-text bold" :style="dynamicPriceStyleH4">
91
100
  € {{ calculatePrice(plan) }},-
92
101
  </h4>
93
102
  <span
@@ -159,7 +168,7 @@
159
168
  <div v-if="showDescriptionColumn" class="cell orig-col-1 l"></div>
160
169
  <div
161
170
  v-for="(plan, index) in localPlans"
162
- :key="'cta-' + index"
171
+ :key="'features-' + index"
163
172
  :class="`surface-container-low cell bottom-cell orig-col-${index + 2} center-align`"
164
173
  >
165
174
  <a v-if="plan.link" :href="plan.link"
@@ -181,7 +190,7 @@
181
190
  <div
182
191
  v-if="showSales"
183
192
  v-for="(plan, index) in localPlans"
184
- :key="'cta-' + index"
193
+ :key="'sales-' + index"
185
194
  :class="`surface-container-low cell bottom-cell orig-col-${index + 2} center-align`"
186
195
  >
187
196
  <ClientOnly>
@@ -189,8 +198,13 @@
189
198
  v-if="showSales"
190
199
  :href="addPlanConfig(contactLink, plan)"
191
200
  class="button responsive bold"
192
- >{{ t("Contact us", theme.i18n) }}</a
193
201
  >
202
+ {{
203
+ plan.salesCTA
204
+ ? t(plan.salesCTA, theme.i18n)
205
+ : t("Contact us", theme.i18n)
206
+ }}
207
+ </a>
194
208
  </ClientOnly>
195
209
  </div>
196
210
  </div>
@@ -214,8 +228,14 @@
214
228
  class="surface-container-low primary-text bold top-margin top-cell"
215
229
  :class="`cell orig-col-${detailPlanIndex + 2}`"
216
230
  >
217
- <h6 class="primary-text bold s">{{ plan.name }}</h6>
218
- <h6 v-if="plan.additionalPrice" class="primary-text bold">
231
+ <h6 class="primary-text bold s" style="word-break: break-word">
232
+ {{ plan.name }}
233
+ </h6>
234
+ <h6
235
+ v-if="plan.additionalPrice"
236
+ class="primary-text bold"
237
+ :style="dynamicPriceStyleH6"
238
+ >
219
239
  + € {{ plan.additionalPrice }},-
220
240
  </h6>
221
241
  </div>
@@ -319,6 +339,73 @@ export default {
319
339
  };
320
340
  }
321
341
  },
342
+ maxPriceLength() {
343
+ let maxLen = 0;
344
+ this.localPlans.forEach((plan) => {
345
+ let text = "";
346
+ if (typeof plan.basePrice === "string") {
347
+ text = this.t(plan.basePrice, this.theme.i18n) || "";
348
+ } else {
349
+ text = `€ ${this.calculatePrice(plan)},-`;
350
+ }
351
+ if (text.length > maxLen) maxLen = text.length;
352
+ });
353
+ this.localDetails.forEach((detail) => {
354
+ if (detail.plans) {
355
+ detail.plans.forEach((plan) => {
356
+ if (plan.additionalPrice) {
357
+ const text = `+ € ${plan.additionalPrice},-`;
358
+ if (text.length > maxLen) maxLen = text.length;
359
+ }
360
+ });
361
+ }
362
+ });
363
+ return maxLen || 1;
364
+ },
365
+ dynamicPriceStyleH4() {
366
+ let fontSize = "";
367
+ if (!this.isMobile) {
368
+ // "€ 18000,-" is 11 chars. We want container to define this perfectly without pure JS guessing.
369
+ // Wait, pure CSS container queries / fluid typography is better here.
370
+ // Instead of calculating ratios manually, we can utilize container width scaling or vw based scaling
371
+ // if it exceeds length. Let's do a more robust JS calc.
372
+
373
+ const cols =
374
+ this.localPlans.length + (this.showDescriptionColumn ? 1 : 0);
375
+
376
+ // Base max chars before scaling based on how many cols are squished together
377
+ // 2 cols: allows ~16 chars
378
+ // 3 cols: allows ~12 chars
379
+ // 4 cols: allows ~9 chars
380
+ // 5 cols: allows ~7 chars
381
+ const maxCharsAtDefault = 19 - cols * 2.5;
382
+
383
+ if (this.maxPriceLength > maxCharsAtDefault) {
384
+ const ratio = maxCharsAtDefault / this.maxPriceLength;
385
+ fontSize = `${Math.max(ratio * 2.125, 0.8)}rem`; // Scale down, min ~12px equivalent
386
+ }
387
+ }
388
+ return {
389
+ whiteSpace: "nowrap",
390
+ ...(fontSize ? { fontSize } : {}),
391
+ };
392
+ },
393
+ dynamicPriceStyleH6() {
394
+ let fontSize = "";
395
+ if (!this.isMobile) {
396
+ const cols =
397
+ this.localPlans.length + (this.showDescriptionColumn ? 1 : 0);
398
+ const maxCharsAtDefault = 24 - cols * 3;
399
+ if (this.maxPriceLength > maxCharsAtDefault) {
400
+ const ratio = maxCharsAtDefault / this.maxPriceLength;
401
+ fontSize = `${Math.max(ratio * 1.25, 0.6)}rem`;
402
+ }
403
+ }
404
+ return {
405
+ whiteSpace: "nowrap",
406
+ ...(fontSize ? { fontSize } : {}),
407
+ };
408
+ },
322
409
  },
323
410
  methods: {
324
411
  calculatePrice(plan) {
@@ -357,13 +444,13 @@ export default {
357
444
  this.$forceUpdate();
358
445
  },
359
446
  initializeData() {
360
- this.title = this.config.title ?? this.title;
361
- this.showSales = this.config.showSales ?? this.showSales;
362
- this.contactLink = this.config.contactLink ?? this.contactLink;
363
- this.showVAT = this.config.showVAT ?? this.showVAT;
364
- this.localOptions = this.config.options ?? this.localOptions;
365
- this.localPlans = this.config.plans ?? this.localPlans;
366
- this.localDetails = this.config.details ?? this.localDetails;
447
+ this.title = this.config.title ?? "Pricing Options";
448
+ this.showSales = this.config.showSales ?? true;
449
+ this.contactLink = this.config.contactLink ?? "";
450
+ this.showVAT = this.config.showVAT ?? "2025-06-30";
451
+ this.localOptions = this.config.options ?? [];
452
+ this.localPlans = this.config.plans ?? [];
453
+ this.localDetails = this.config.details ?? [];
367
454
  },
368
455
  handleResize() {
369
456
  if (typeof window !== "undefined") {
@@ -386,35 +473,52 @@ export default {
386
473
  }
387
474
  },
388
475
  addPlanConfig(contactLink, plan) {
389
- if (typeof document === "undefined") {
390
- return contactLink; // Return original link as fallback
476
+ const baseLink = plan.salesLink || contactLink;
477
+ if (!baseLink) {
478
+ return "";
391
479
  }
392
- const parts = contactLink.split("?");
393
- let search = parts[1] || "";
480
+
481
+ const [url, ...searchParts] = baseLink.split("?");
482
+ let search = searchParts.join("?");
394
483
  const params = new URLSearchParams(search);
395
- params.append("plan", plan.name);
396
- const alternative = Object.entries(plan.details).find(
397
- ([key, value]) => value.alternative,
398
- );
399
- if (alternative) {
400
- const checked = document.querySelector(
401
- `[id='${plan.name}-${alternative[0]}']`,
402
- )?.checked;
403
- if (checked) {
404
- params.append("alternative", alternative[1].alternative.name);
484
+
485
+ // Only automatically add "plan" if it's the default contact link
486
+ // and not already present
487
+ if (!plan.salesLink && !params.has("plan") && plan.name) {
488
+ params.append("plan", plan.name);
489
+ }
490
+
491
+ // Add alternatives if they are checked
492
+ if (plan.details) {
493
+ Object.entries(plan.details).forEach(([key, value]) => {
494
+ if (
495
+ value &&
496
+ typeof value === "object" &&
497
+ value.alternative?.checked
498
+ ) {
499
+ params.append("alternative", value.alternative.name);
500
+ }
501
+ });
502
+ }
503
+
504
+ // Add global options
505
+ if (this.localOptions && this.localOptions.length > 0) {
506
+ this.localOptions.forEach((o) => {
507
+ if (o.checked) {
508
+ params.append("option", o.label);
509
+ }
510
+ });
511
+ }
512
+
513
+ // Add custom salesParams
514
+ if (plan.salesParams) {
515
+ for (const [key, value] of Object.entries(plan.salesParams)) {
516
+ params.set(key, value);
405
517
  }
406
518
  }
407
- if (this.localOptions.length > 0)
408
- [
409
- this.localOptions.forEach((o) => {
410
- const checked = document.querySelector(`input#${o.id}`)?.checked;
411
- if (checked) {
412
- params.append("option", o.label);
413
- }
414
- }),
415
- ];
519
+
416
520
  search = params.toString();
417
- return `${parts[0]}${search ? `?${search}` : ""}`;
521
+ return `${url}${search ? `?${search}` : ""}`;
418
522
  },
419
523
  },
420
524
  created() {
@@ -431,19 +535,7 @@ export default {
431
535
  window.removeEventListener("resize", this.handleResize);
432
536
  },
433
537
  watch: {
434
- options: {
435
- handler() {
436
- this.initializeData();
437
- },
438
- deep: true,
439
- },
440
- plans: {
441
- handler() {
442
- this.initializeData();
443
- },
444
- deep: true,
445
- },
446
- details: {
538
+ config: {
447
539
  handler() {
448
540
  this.initializeData();
449
541
  },
package/src/style.css CHANGED
@@ -201,7 +201,7 @@ details[open] > summary > i.mdi-chevron-down {
201
201
  top: var(--vp-nav-height) !important;
202
202
  padding-top: 0 !important;
203
203
  padding-left: 0 !important;
204
- margin-top: -2px;
204
+ margin-top: -2px !important;
205
205
  }
206
206
 
207
207
  .VPSidebar > nav,
@@ -238,6 +238,11 @@ details[open] > summary > i.mdi-chevron-down {
238
238
  padding: 3px 0 !important;
239
239
  font-size: 14px;
240
240
  line-height: 20px;
241
+ text-decoration: none;
242
+ }
243
+
244
+ .VPSidebar .VPLink p {
245
+ margin: 0;
241
246
  }
242
247
 
243
248
  .social-links {