Skip to content

Commit 015a492

Browse files
authored
Merge pull request #133 from celenium-io/dev
Some hot fixes
2 parents 99edbf1 + 515d838 commit 015a492

File tree

18 files changed

+240
-210
lines changed

18 files changed

+240
-210
lines changed

components/OgImage/AddressImage.vue

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,6 @@ const props = defineProps({
1717
const bgStyles = computed(() => {
1818
return {
1919
style: {
20-
position: "absolute",
21-
top: "0",
22-
left: "0",
2320
filter: "grayscale(1)",
2421
opacity: "0.05",
2522
},
@@ -28,8 +25,8 @@ const bgStyles = computed(() => {
2825
</script>
2926

3027
<template>
31-
<div class="w-full h-full" :style="{ background: '#111111', padding: '100px 120px', fontFamily: 'IBM+Plex+Mono' }">
32-
<img src="/img/bg.png" v-bind="bgStyles" />
28+
<div class="w-full h-full" :style="{ background: '#111111', padding: '100px', fontFamily: 'IBM+Plex+Mono', overflow: 'hidden' }">
29+
<img src="/img/bg.png" width="1200" height="600" class="absolute" v-bind="bgStyles" />
3330

3431
<div :style="{ height: '100%', display: 'flex', flexDirection: 'column', gap: '40px' }">
3532
<div :style="{ display: 'flex', alignItems: 'center' }">

components/OgImage/BlockImage.vue

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,6 @@ const props = defineProps({
1717
const bgStyles = computed(() => {
1818
return {
1919
style: {
20-
position: "absolute",
21-
top: "0",
22-
left: "0",
2320
filter: "grayscale(1)",
2421
opacity: "0.05",
2522
},
@@ -30,8 +27,8 @@ const messages = computed(() => [...new Set(props.block.message_types)])
3027
</script>
3128

3229
<template>
33-
<div class="w-full h-full" :style="{ background: '#111111', padding: '100px 120px', fontFamily: 'IBM+Plex+Mono' }">
34-
<img src="/img/bg.png" v-bind="bgStyles" />
30+
<div class="w-full h-full" :style="{ background: '#111111', padding: '100px', fontFamily: 'IBM+Plex+Mono', overflow: 'hidden' }">
31+
<img src="/img/bg.png" width="1200" height="600" class="absolute" v-bind="bgStyles" />
3532

3633
<div :style="{ height: '100%', display: 'flex', flexDirection: 'column', gap: '40px' }">
3734
<div :style="{ display: 'flex' }">

components/OgImage/NamespaceImage.vue

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,6 @@ const props = defineProps({
1414
const bgStyles = computed(() => {
1515
return {
1616
style: {
17-
position: "absolute",
18-
top: "0",
19-
left: "0",
2017
filter: "grayscale(1)",
2118
opacity: "0.05",
2219
},
@@ -25,8 +22,8 @@ const bgStyles = computed(() => {
2522
</script>
2623

2724
<template>
28-
<div class="w-full h-full" :style="{ background: '#111111', padding: '100px 120px', fontFamily: 'IBM+Plex+Mono' }">
29-
<img src="/img/bg.png" v-bind="bgStyles" />
25+
<div class="w-full h-full" :style="{ background: '#111111', padding: '100px', fontFamily: 'IBM+Plex+Mono', overflow: 'hidden' }">
26+
<img src="/img/bg.png" width="1200" height="600" class="absolute" v-bind="bgStyles" />
3027

3128
<div :style="{ height: '100%', display: 'flex', flexDirection: 'column', gap: '40px' }">
3229
<div :style="{ display: 'flex', alignItems: 'center' }">

components/OgImage/RollupImage.vue

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,6 @@ const props = defineProps({
1717
const bgStyles = computed(() => {
1818
return {
1919
style: {
20-
position: "absolute",
21-
top: "0",
22-
left: "0",
2320
filter: "grayscale(1)",
2421
opacity: "0.05",
2522
},
@@ -28,8 +25,8 @@ const bgStyles = computed(() => {
2825
</script>
2926

3027
<template>
31-
<div class="w-full h-full" :style="{ background: '#111111', padding: '100px 120px', fontFamily: 'IBM+Plex+Mono' }">
32-
<img src="/img/bg.png" v-bind="bgStyles" />
28+
<div class="w-full h-full" :style="{ background: '#111111', padding: '100px', fontFamily: 'IBM+Plex+Mono', overflow: 'hidden' }">
29+
<img src="/img/bg.png" width="1200" height="600" class="absolute" v-bind="bgStyles" />
3330

3431
<div :style="{ height: '100%', display: 'flex', flexDirection: 'column', gap: '80px' }">
3532
<div :style="{ display: 'flex', alignItems: 'center' }">

components/OgImage/StatsMetricImage.vue

Lines changed: 0 additions & 37 deletions
This file was deleted.

components/OgImage/TxImage.vue

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,6 @@ const props = defineProps({
1717
const bgStyles = computed(() => {
1818
return {
1919
style: {
20-
position: "absolute",
21-
top: "0",
22-
left: "0",
2320
filter: "grayscale(1)",
2421
opacity: "0.05",
2522
},
@@ -30,12 +27,12 @@ const messages = computed(() => [...new Set(props.tx.message_types)])
3027
</script>
3128

3229
<template>
33-
<div class="w-full h-full" :style="{ background: '#111111', padding: '100px 120px', fontFamily: 'IBM+Plex+Mono' }">
34-
<img src="/img/bg.png" v-bind="bgStyles" />
30+
<div class="w-full h-full" :style="{ background: '#111111', padding: '100px', fontFamily: 'IBM+Plex+Mono', overflow: 'hidden' }">
31+
<img src="/img/bg.png" width="1200" height="600" class="absolute" v-bind="bgStyles" />
3532

3633
<div :style="{ height: '100%', display: 'flex', flexDirection: 'column', gap: '40px' }">
37-
<div :style="{ display: 'flex', alignItems: 'center', gap: '24px' }">
38-
<div :style="{ display: 'flex', alignItems: 'center' }">
34+
<div class="flex flex-row items-center" :style="{ gap: '24px' }">
35+
<div class="flex items-center flex-nowrap">
3936
<span :style="{ fontSize: '70px', color: 'rgba(255,255,255, 0.9)' }"> tx </span>
4037
<span :style="{ fontSize: '70px', color: 'rgba(255,255,255, 0.3)' }">('</span>
4138
<span :style="{ fontSize: '70px', color: '#FF8351' }">
@@ -76,9 +73,11 @@ const messages = computed(() => [...new Set(props.tx.message_types)])
7673
</span>
7774
</div>
7875

79-
<span :style="{ fontSize: '40px', color: 'rgba(255,255,255, 0.4)' }">{{ DateTime.fromISO(tx.time).toFormat("ff") }}</span>
76+
<span :style="{ fontSize: '40px', marginBottom: '40px', color: 'rgba(255,255,255, 0.4)' }">{{
77+
DateTime.fromISO(tx.time).toFormat("ff")
78+
}}</span>
8079

81-
<div :style="{ display: 'flex', flexDirection: 'column', gap: '24px' }">
80+
<div class="flex flex-col" :style="{ gap: '24px' }">
8281
<div :style="{ display: 'flex', gap: '12px' }">
8382
<span :style="{ fontSize: '40px', color: 'rgba(255,255,255, 0.3)' }">Fee: </span>
8483
<span :style="{ fontSize: '40px', color: 'rgba(255,255,255, 0.6)' }">{{ tia(tx.fee) }} </span>

components/OgImage/ValidatorImage.vue

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,6 @@ const props = defineProps({
1414
const bgStyles = computed(() => {
1515
return {
1616
style: {
17-
position: "absolute",
18-
top: "0",
19-
left: "0",
2017
filter: "grayscale(1)",
2118
opacity: "0.05",
2219
},
@@ -25,18 +22,18 @@ const bgStyles = computed(() => {
2522
</script>
2623

2724
<template>
28-
<div class="w-full h-full" :style="{ background: '#111111', padding: '100px 80px', fontFamily: 'IBM+Plex+Mono' }">
29-
<img src="/img/bg.png" v-bind="bgStyles" />
25+
<div class="w-full h-full" :style="{ background: '#111111', padding: '100px 50px', fontFamily: 'IBM+Plex+Mono', overflow: 'hidden' }">
26+
<img src="/img/bg.png" width="1200" height="600" class="absolute" v-bind="bgStyles" />
3027

3128
<div :style="{ height: '100%', display: 'flex', flexDirection: 'column', gap: '50px' }">
3229
<div :style="{ display: 'flex', alignItems: 'center' }">
3330
<span :style="{ fontSize: '60px', color: 'rgba(255,255,255, 0.9)' }">validator</span>
3431
<span :style="{ fontSize: '60px', color: 'rgba(255,255,255, 0.3)' }">('</span>
35-
<span :style="{ fontSize: '40px', color: '#FF8351' }"> celestiavaloper•••{{ validator.address.slice(-4) }} </span>
32+
<span :style="{ fontSize: '40px', color: '#FF8351' }"> celestiavaloper•••{{ validator.address.hash.slice(-4) }} </span>
3633
<span :style="{ fontSize: '60px', color: 'rgba(255,255,255, 0.3)' }">')</span>
3734
</div>
3835

39-
<span :style="{ fontSize: '46px', color: 'rgba(255,255,255, 0.9)' }">
36+
<span v-if="validator.moniker" :style="{ fontSize: '46px', color: 'rgba(255,255,255, 0.9)' }">
4037
{{ validator.moniker }}
4138
</span>
4239

nuxt.config.ts

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,19 @@
11
import { nodePolyfills } from "vite-plugin-node-polyfills"
22
import wasm from "vite-plugin-wasm"
33
import topLevelAwait from "vite-plugin-top-level-await"
4+
import { updateSiteConfig } from "nuxt-site-config/kit"
45

56
import path from "path"
67

78
export default defineNuxtConfig({
8-
modules: ["@pinia/nuxt", "nuxt-og-image", "@nuxtjs/sitemap"],
9+
modules: ["nuxt-site-config", "@pinia/nuxt", "nuxt-og-image", "@nuxtjs/sitemap"],
910

10-
site: {
11-
url: "https://celenium.io",
11+
hooks: {
12+
"site-config:resolve": () => {
13+
updateSiteConfig({
14+
url: process.env.CF_PAGES_URL ?? "https://celenium.io",
15+
})
16+
},
1217
},
1318

1419
sitemap: {
@@ -149,4 +154,4 @@ export default defineNuxtConfig({
149154
},
150155

151156
compatibilityDate: "2025-04-02",
152-
})
157+
})

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
"@unhead/vue": "^2.0.0-rc.1",
1919
"cross-env": "^7.0.3",
2020
"nuxt": "3.16.2",
21-
"nuxt-og-image": "5.1.1",
21+
"nuxt-og-image": "5.1.3",
2222
"sass": "1.66.1",
2323
"sass-loader": "13.3.2",
2424
"unenv": "^1.9.0",
@@ -45,6 +45,7 @@
4545
"lean-qr": "^2.3.2",
4646
"long": "^5.2.3",
4747
"luxon": "3.4.3",
48+
"nuxt-site-config": "^3.1.9",
4849
"pinia": "3.0.2",
4950
"protobufjs": "^7.2.6",
5051
"qrcode": "^1.5.3",

pages/address/[hash].vue

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,9 @@ if (!rawAddress.value) {
2424
cacheStore.current.address = address.value
2525
}
2626
27-
defineOgImage({
27+
defineOgImageComponent("AddressImage", {
2828
title: "Address",
2929
address: address.value,
30-
component: "AddressImage",
3130
cacheKey: `${address.value?.hash.slice(-4)}-${address.value?.balance.spendable}-${address.value?.first_height}-${
3231
address.value?.last_height
3332
}`,
@@ -38,7 +37,7 @@ useHead({
3837
link: [
3938
{
4039
rel: "canonical",
41-
href: `https://celenium.io${route.path}`,
40+
href: `${useRequestURL().origin}${useRequestURL().pathname}`,
4241
},
4342
],
4443
meta: [
@@ -56,11 +55,7 @@ useHead({
5655
},
5756
{
5857
property: "og:url",
59-
content: `https://celenium.io${route.path}`,
60-
},
61-
{
62-
property: "og:image",
63-
content: `https://celenium.io${route.path}__og_image__/og.png`,
58+
content: `${useRequestURL().origin}${useRequestURL().pathname}`,
6459
},
6560
{
6661
name: "twitter:title",

0 commit comments

Comments
 (0)