@mundogamernetwork/shared-ui 1.1.30 → 1.1.33

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.
@@ -132,11 +132,13 @@ onUnmounted(() => {
132
132
  .mg-campaign-banner-indicators {
133
133
  position: absolute;
134
134
  bottom: 8px;
135
- left: 50%;
136
- transform: translateX(-50%);
135
+ left: 0;
136
+ right: 0;
137
137
  display: flex;
138
+ justify-content: center;
138
139
  gap: 6px;
139
140
  align-items: center;
141
+ pointer-events: none;
140
142
 
141
143
  button {
142
144
  width: 8px;
@@ -145,6 +147,7 @@ onUnmounted(() => {
145
147
  border: 0;
146
148
  background: rgba(255, 255, 255, 0.5);
147
149
  cursor: pointer;
150
+ pointer-events: all;
148
151
  transition: background 0.2s;
149
152
 
150
153
  &.active {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mundogamernetwork/shared-ui",
3
- "version": "1.1.30",
3
+ "version": "1.1.33",
4
4
  "description": "Mundo Gamer Network - Shared UI Layer (Nuxt 3)",
5
5
  "type": "module",
6
6
  "main": "./nuxt.config.ts",
@@ -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()
@@ -51,6 +51,14 @@ const hasEcosystem = computed(() =>
51
51
  kit.value?.community_url
52
52
  )
53
53
 
54
+ // Sanitize community URL: legacy data may store /games/[slug] (old route).
55
+ // The canonical community game route is /game/[slug].
56
+ const communityUrl = computed(() =>
57
+ kit.value?.community_url
58
+ ? kit.value.community_url.replace(/\/games\//, '/game/')
59
+ : null
60
+ )
61
+
54
62
  onMounted(async () => {
55
63
  try {
56
64
  const { data } = await fetchPublicPressKit(slug)
@@ -66,19 +74,64 @@ onMounted(async () => {
66
74
  }
67
75
  })
68
76
 
77
+ const canonicalUrl = computed(() =>
78
+ typeof window !== 'undefined' ? window.location.href : ''
79
+ )
80
+ const ogDescription = computed(() =>
81
+ kit.value?.tagline ?? kit.value?.description?.substring(0, 160) ?? ''
82
+ )
83
+ const ogImage = computed(() =>
84
+ kit.value?.cover_image_url ?? kit.value?.hero_image_url ?? ''
85
+ )
86
+
69
87
  useHead(() => ({
70
- title: kit.value?.name ?? t('press_kit.loading'),
88
+ title: kit.value?.name
89
+ ? `${kit.value.name} — Press Kit`
90
+ : t('press_kit.loading'),
71
91
  meta: [
72
- { name: 'description', content: kit.value?.tagline ?? kit.value?.description?.substring(0, 160) ?? '' },
92
+ // Standard
93
+ { name: 'description', content: ogDescription.value },
94
+ { name: 'robots', content: 'index, follow' },
95
+ // Open Graph
96
+ { property: 'og:type', content: 'website' },
97
+ { property: 'og:site_name', content: 'Mundo Gamer Agency' },
73
98
  { property: 'og:title', content: kit.value?.name ?? '' },
74
- { property: 'og:description', content: kit.value?.tagline ?? '' },
75
- { property: 'og:image', content: kit.value?.cover_image_url ?? kit.value?.hero_image_url ?? '' },
99
+ { property: 'og:description', content: ogDescription.value },
100
+ { property: 'og:image', content: ogImage.value },
101
+ { property: 'og:image:width', content: '1200' },
102
+ { property: 'og:image:height', content: '630' },
103
+ { property: 'og:url', content: canonicalUrl.value },
104
+ // Twitter / X Card
105
+ { name: 'twitter:card', content: 'summary_large_image' },
106
+ { name: 'twitter:title', content: kit.value?.name ?? '' },
107
+ { name: 'twitter:description', content: ogDescription.value },
108
+ { name: 'twitter:image', content: ogImage.value },
76
109
  ],
110
+ link: [
111
+ { rel: 'canonical', href: canonicalUrl.value },
112
+ ],
113
+ script: kit.value ? [
114
+ {
115
+ type: 'application/ld+json',
116
+ innerHTML: JSON.stringify({
117
+ '@context': 'https://schema.org',
118
+ '@type': 'VideoGame',
119
+ name: kit.value.name,
120
+ description: ogDescription.value,
121
+ image: ogImage.value,
122
+ ...(kit.value.developer ? { author: { '@type': 'Organization', name: kit.value.developer } } : {}),
123
+ ...(kit.value.publisher ? { publisher: { '@type': 'Organization', name: kit.value.publisher } } : {}),
124
+ ...(kit.value.release_date ? { datePublished: kit.value.release_date } : {}),
125
+ ...(kit.value.steam_url ? { sameAs: [kit.value.steam_url] } : {}),
126
+ ...(kit.value.website_url ? { url: kit.value.website_url } : {}),
127
+ }),
128
+ },
129
+ ] : [],
77
130
  }))
78
131
  </script>
79
132
 
80
133
  <template>
81
- <div class="pk-page">
134
+ <div class="pk-page" :data-theme="kit?.theme || 'default'">
82
135
 
83
136
  <!-- Loading -->
84
137
  <div v-if="loading" class="pk-loading">
@@ -189,7 +242,7 @@ useHead(() => ({
189
242
  </div>
190
243
 
191
244
  <!-- Links -->
192
- <div class="pk-card" v-if="kit.website_url || kit.steam_url || kit.epic_url || kit.ventures_url || kit.community_url">
245
+ <div class="pk-card" v-if="kit.website_url || kit.steam_url || kit.epic_url || kit.ventures_url || communityUrl">
193
246
  <h2 class="pk-card__title">{{ $t('press_kit.available_on') }}</h2>
194
247
  <div class="pk-links">
195
248
  <a v-if="kit.website_url" :href="kit.website_url" target="_blank" rel="noopener" class="pk-link" @click="trackPressKitEvent(slug, { event_type: 'click', metadata: { target: 'website' } })">
@@ -204,7 +257,7 @@ useHead(() => ({
204
257
  <a v-if="kit.ventures_url" :href="kit.ventures_url" target="_blank" rel="noopener" class="pk-link">
205
258
  Ventures
206
259
  </a>
207
- <a v-if="kit.community_url" :href="kit.community_url" target="_blank" rel="noopener" class="pk-link" @click="trackPressKitEvent(slug, { event_type: 'click', metadata: { target: 'community' } })">
260
+ <a v-if="communityUrl" :href="communityUrl" target="_blank" rel="noopener" class="pk-link" @click="trackPressKitEvent(slug, { event_type: 'click', metadata: { target: 'community' } })">
208
261
  {{ $t('press_kit.follow_community') }}
209
262
  </a>
210
263
  </div>
@@ -460,10 +513,10 @@ useHead(() => ({
460
513
  </a>
461
514
 
462
515
  <!-- Community follow -->
463
- <div v-if="kit.community_url" class="pk-eco-card">
516
+ <div v-if="communityUrl" class="pk-eco-card">
464
517
  <p class="pk-eco-card__text">{{ $t('press_kit.follow_community_desc', { name: kit.name }) }}</p>
465
518
  <a
466
- :href="kit.community_url"
519
+ :href="communityUrl"
467
520
  target="_blank"
468
521
  rel="noopener"
469
522
  class="pk-btn pk-btn--sm"
@@ -495,7 +548,7 @@ useHead(() => ({
495
548
  <!-- ═══ Brand footer ════════════════════════════════════════════ -->
496
549
  <p class="pk-brand-footer">
497
550
  {{ $t('press_kit.made_with') }} {{ $t('press_kit.brand_sub') }} —
498
- <a href="https://agency.mundogamer.network/dashboard/press-kit" target="_blank" rel="noopener">{{ $t('press_kit.create_yours_cta') }}</a>
551
+ <a href="https://agency.mundogamer.network/press" target="_blank" rel="noopener">{{ $t('press_kit.create_yours_cta') }}</a>
499
552
  </p>
500
553
 
501
554
  </template>
@@ -522,10 +575,83 @@ useHead(() => ({
522
575
  </template>
523
576
 
524
577
  <style lang="scss" scoped>
578
+ // ── Self-contained theme system ────────────────────────────────────
579
+ // All tokens are declared directly on .pk-page so the press kit is
580
+ // always correctly styled regardless of the host platform's
581
+ // light/dark mode. Studios choose a theme in the editor; the value
582
+ // is stored in kit.theme and applied via data-theme attribute.
583
+ //
584
+ // Available themes:
585
+ // default · light · blade · aurora · ember · nova
586
+ // ──────────────────────────────────────────────────────────────────
525
587
  .pk-page {
588
+ // ── default (dark gold) ──────────────────────────────────────
589
+ --background: #0e1015;
590
+ --card-background: #191b20;
591
+ --divider: #2a2d35;
592
+ --text-primary: #ffffff;
593
+ --text-secondary: #8a8f9e;
594
+ --primary: #fcb216;
595
+ --primary-contrast: #13161c;
596
+
526
597
  min-height: 100vh;
527
- background: var(--background, #0e1015);
528
- color: var(--text-primary, #fff);
598
+ background: var(--background);
599
+ color: var(--text-primary);
600
+
601
+ // ── light (white + slate) ────────────────────────────────────
602
+ &[data-theme="light"] {
603
+ --background: #f5f6f8;
604
+ --card-background: #ffffff;
605
+ --divider: #e2e5ea;
606
+ --text-primary: #111318;
607
+ --text-secondary: #5a6070;
608
+ --primary: #fcb216;
609
+ --primary-contrast: #ffffff;
610
+ }
611
+
612
+ // ── blade (dark navy + electric blue) ───────────────────────
613
+ &[data-theme="blade"] {
614
+ --background: #0d1b2a;
615
+ --card-background: #112236;
616
+ --divider: #1e3a52;
617
+ --text-primary: #e0f0ff;
618
+ --text-secondary: #7aabce;
619
+ --primary: #3a86ff;
620
+ --primary-contrast: #ffffff;
621
+ }
622
+
623
+ // ── aurora (deep purple + neon green) ───────────────────────
624
+ &[data-theme="aurora"] {
625
+ --background: #0f0c1a;
626
+ --card-background: #1a1428;
627
+ --divider: #2d2040;
628
+ --text-primary: #f0ecff;
629
+ --text-secondary: #9d87c4;
630
+ --primary: #a855f7;
631
+ --primary-contrast: #ffffff;
632
+ }
633
+
634
+ // ── ember (deep brown + fire orange) ────────────────────────
635
+ &[data-theme="ember"] {
636
+ --background: #1a0900;
637
+ --card-background: #251100;
638
+ --divider: #3d1f00;
639
+ --text-primary: #ffedd5;
640
+ --text-secondary: #c4875a;
641
+ --primary: #f97316;
642
+ --primary-contrast: #ffffff;
643
+ }
644
+
645
+ // ── nova (true black + gold) ─────────────────────────────────
646
+ &[data-theme="nova"] {
647
+ --background: #0d0d0d;
648
+ --card-background: #161616;
649
+ --divider: #2a2a2a;
650
+ --text-primary: #fff8dc;
651
+ --text-secondary: #a89060;
652
+ --primary: #ffd700;
653
+ --primary-contrast: #0d0d0d;
654
+ }
529
655
  }
530
656
 
531
657
  // ── Loading ───────────────────────────────────────────────────────