@mundogamernetwork/shared-ui 1.1.30 → 1.1.32
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 +1 -1
- package/pages/presskit/[slug].vue +126 -8
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
2
|
import { fetchPublicPressKit, trackPressKitEvent } from '~/services/pressKitService'
|
|
3
3
|
|
|
4
|
-
definePageMeta({ ssr: false })
|
|
4
|
+
definePageMeta({ ssr: false, layout: 'blank' })
|
|
5
5
|
|
|
6
6
|
const route = useRoute()
|
|
7
7
|
const { t } = useI18n()
|
|
@@ -66,19 +66,64 @@ onMounted(async () => {
|
|
|
66
66
|
}
|
|
67
67
|
})
|
|
68
68
|
|
|
69
|
+
const canonicalUrl = computed(() =>
|
|
70
|
+
typeof window !== 'undefined' ? window.location.href : ''
|
|
71
|
+
)
|
|
72
|
+
const ogDescription = computed(() =>
|
|
73
|
+
kit.value?.tagline ?? kit.value?.description?.substring(0, 160) ?? ''
|
|
74
|
+
)
|
|
75
|
+
const ogImage = computed(() =>
|
|
76
|
+
kit.value?.cover_image_url ?? kit.value?.hero_image_url ?? ''
|
|
77
|
+
)
|
|
78
|
+
|
|
69
79
|
useHead(() => ({
|
|
70
|
-
title: kit.value?.name
|
|
80
|
+
title: kit.value?.name
|
|
81
|
+
? `${kit.value.name} — Press Kit`
|
|
82
|
+
: t('press_kit.loading'),
|
|
71
83
|
meta: [
|
|
72
|
-
|
|
84
|
+
// Standard
|
|
85
|
+
{ name: 'description', content: ogDescription.value },
|
|
86
|
+
{ name: 'robots', content: 'index, follow' },
|
|
87
|
+
// Open Graph
|
|
88
|
+
{ property: 'og:type', content: 'website' },
|
|
89
|
+
{ property: 'og:site_name', content: 'Mundo Gamer Agency' },
|
|
73
90
|
{ property: 'og:title', content: kit.value?.name ?? '' },
|
|
74
|
-
{ property: 'og:description', content:
|
|
75
|
-
{ property: 'og:image', content:
|
|
91
|
+
{ property: 'og:description', content: ogDescription.value },
|
|
92
|
+
{ property: 'og:image', content: ogImage.value },
|
|
93
|
+
{ property: 'og:image:width', content: '1200' },
|
|
94
|
+
{ property: 'og:image:height', content: '630' },
|
|
95
|
+
{ property: 'og:url', content: canonicalUrl.value },
|
|
96
|
+
// Twitter / X Card
|
|
97
|
+
{ name: 'twitter:card', content: 'summary_large_image' },
|
|
98
|
+
{ name: 'twitter:title', content: kit.value?.name ?? '' },
|
|
99
|
+
{ name: 'twitter:description', content: ogDescription.value },
|
|
100
|
+
{ name: 'twitter:image', content: ogImage.value },
|
|
76
101
|
],
|
|
102
|
+
link: [
|
|
103
|
+
{ rel: 'canonical', href: canonicalUrl.value },
|
|
104
|
+
],
|
|
105
|
+
script: kit.value ? [
|
|
106
|
+
{
|
|
107
|
+
type: 'application/ld+json',
|
|
108
|
+
innerHTML: JSON.stringify({
|
|
109
|
+
'@context': 'https://schema.org',
|
|
110
|
+
'@type': 'VideoGame',
|
|
111
|
+
name: kit.value.name,
|
|
112
|
+
description: ogDescription.value,
|
|
113
|
+
image: ogImage.value,
|
|
114
|
+
...(kit.value.developer ? { author: { '@type': 'Organization', name: kit.value.developer } } : {}),
|
|
115
|
+
...(kit.value.publisher ? { publisher: { '@type': 'Organization', name: kit.value.publisher } } : {}),
|
|
116
|
+
...(kit.value.release_date ? { datePublished: kit.value.release_date } : {}),
|
|
117
|
+
...(kit.value.steam_url ? { sameAs: [kit.value.steam_url] } : {}),
|
|
118
|
+
...(kit.value.website_url ? { url: kit.value.website_url } : {}),
|
|
119
|
+
}),
|
|
120
|
+
},
|
|
121
|
+
] : [],
|
|
77
122
|
}))
|
|
78
123
|
</script>
|
|
79
124
|
|
|
80
125
|
<template>
|
|
81
|
-
<div class="pk-page">
|
|
126
|
+
<div class="pk-page" :data-theme="kit?.theme || 'default'">
|
|
82
127
|
|
|
83
128
|
<!-- Loading -->
|
|
84
129
|
<div v-if="loading" class="pk-loading">
|
|
@@ -522,10 +567,83 @@ useHead(() => ({
|
|
|
522
567
|
</template>
|
|
523
568
|
|
|
524
569
|
<style lang="scss" scoped>
|
|
570
|
+
// ── Self-contained theme system ────────────────────────────────────
|
|
571
|
+
// All tokens are declared directly on .pk-page so the press kit is
|
|
572
|
+
// always correctly styled regardless of the host platform's
|
|
573
|
+
// light/dark mode. Studios choose a theme in the editor; the value
|
|
574
|
+
// is stored in kit.theme and applied via data-theme attribute.
|
|
575
|
+
//
|
|
576
|
+
// Available themes:
|
|
577
|
+
// default · light · blade · aurora · ember · nova
|
|
578
|
+
// ──────────────────────────────────────────────────────────────────
|
|
525
579
|
.pk-page {
|
|
580
|
+
// ── default (dark gold) ──────────────────────────────────────
|
|
581
|
+
--background: #0e1015;
|
|
582
|
+
--card-background: #191b20;
|
|
583
|
+
--divider: #2a2d35;
|
|
584
|
+
--text-primary: #ffffff;
|
|
585
|
+
--text-secondary: #8a8f9e;
|
|
586
|
+
--primary: #fcb216;
|
|
587
|
+
--primary-contrast: #13161c;
|
|
588
|
+
|
|
526
589
|
min-height: 100vh;
|
|
527
|
-
background: var(--background
|
|
528
|
-
color: var(--text-primary
|
|
590
|
+
background: var(--background);
|
|
591
|
+
color: var(--text-primary);
|
|
592
|
+
|
|
593
|
+
// ── light (white + slate) ────────────────────────────────────
|
|
594
|
+
&[data-theme="light"] {
|
|
595
|
+
--background: #f5f6f8;
|
|
596
|
+
--card-background: #ffffff;
|
|
597
|
+
--divider: #e2e5ea;
|
|
598
|
+
--text-primary: #111318;
|
|
599
|
+
--text-secondary: #5a6070;
|
|
600
|
+
--primary: #fcb216;
|
|
601
|
+
--primary-contrast: #ffffff;
|
|
602
|
+
}
|
|
603
|
+
|
|
604
|
+
// ── blade (dark navy + electric blue) ───────────────────────
|
|
605
|
+
&[data-theme="blade"] {
|
|
606
|
+
--background: #0d1b2a;
|
|
607
|
+
--card-background: #112236;
|
|
608
|
+
--divider: #1e3a52;
|
|
609
|
+
--text-primary: #e0f0ff;
|
|
610
|
+
--text-secondary: #7aabce;
|
|
611
|
+
--primary: #3a86ff;
|
|
612
|
+
--primary-contrast: #ffffff;
|
|
613
|
+
}
|
|
614
|
+
|
|
615
|
+
// ── aurora (deep purple + neon green) ───────────────────────
|
|
616
|
+
&[data-theme="aurora"] {
|
|
617
|
+
--background: #0f0c1a;
|
|
618
|
+
--card-background: #1a1428;
|
|
619
|
+
--divider: #2d2040;
|
|
620
|
+
--text-primary: #f0ecff;
|
|
621
|
+
--text-secondary: #9d87c4;
|
|
622
|
+
--primary: #a855f7;
|
|
623
|
+
--primary-contrast: #ffffff;
|
|
624
|
+
}
|
|
625
|
+
|
|
626
|
+
// ── ember (deep brown + fire orange) ────────────────────────
|
|
627
|
+
&[data-theme="ember"] {
|
|
628
|
+
--background: #1a0900;
|
|
629
|
+
--card-background: #251100;
|
|
630
|
+
--divider: #3d1f00;
|
|
631
|
+
--text-primary: #ffedd5;
|
|
632
|
+
--text-secondary: #c4875a;
|
|
633
|
+
--primary: #f97316;
|
|
634
|
+
--primary-contrast: #ffffff;
|
|
635
|
+
}
|
|
636
|
+
|
|
637
|
+
// ── nova (true black + gold) ─────────────────────────────────
|
|
638
|
+
&[data-theme="nova"] {
|
|
639
|
+
--background: #0d0d0d;
|
|
640
|
+
--card-background: #161616;
|
|
641
|
+
--divider: #2a2a2a;
|
|
642
|
+
--text-primary: #fff8dc;
|
|
643
|
+
--text-secondary: #a89060;
|
|
644
|
+
--primary: #ffd700;
|
|
645
|
+
--primary-contrast: #0d0d0d;
|
|
646
|
+
}
|
|
529
647
|
}
|
|
530
648
|
|
|
531
649
|
// ── Loading ───────────────────────────────────────────────────────
|