Skip to content

Commit 7ed93b7

Browse files
committed
fix: update logo beta badge & version access
1 parent 314a552 commit 7ed93b7

File tree

1 file changed

+5
-4
lines changed
  • packages/nimiq-vitepress-theme/src/layout

1 file changed

+5
-4
lines changed

packages/nimiq-vitepress-theme/src/layout/Logo.vue

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@ const removeNimiqPrefix = (str: string) => str.toLocaleLowerCase().startsWith('n
1010
const name = computed(() => removeNimiqPrefix(site.value.title))
1111
1212
// Get version from Vite config
13-
const version = (window as any).__NIMIQ_VITEPRESS_CONFIG__?.version
13+
declare const __NIMIQ_VITEPRESS_CONFIG__: { version?: string, repoURL?: string, contentPath?: string } | undefined
14+
const version = __NIMIQ_VITEPRESS_CONFIG__?.version
1415
1516
// Context menu configuration
1617
const showVersion = computed(() => theme.value.logoContextMenu?.showVersion !== false)
@@ -41,7 +42,7 @@ function handleItemClick(item: LogoContextMenuItem) {
4142
<img v-if="theme.logo" class="logo" :src="theme.logo">
4243
<div v-else i-nimiq:logos-nimiq-horizontal text-20 dark:i-nimiq:logos-nimiq-white-horizontal />
4344
<span translate-y--1 text-16 font-light tracking-wide>{{ name }}</span>
44-
<span v-if="theme.betaBadge" nq-label absolute right--2 top--8 lh-none px-4 py-3 bg-gradient-blue text-white rounded-4 outline="1.5 white/10 offset--1.5">BETA</span>
45+
<span v-if="theme.betaBadge" nq-label absolute right--50 top--8 w-35 text-9 lh-none px-4 py-3 bg-gradient-blue text-white rounded-4 outline="1.5 white/10 offset--1.5">BETA</span>
4546
</a>
4647
</ContextMenu.Trigger>
4748

@@ -54,7 +55,7 @@ function handleItemClick(item: LogoContextMenuItem) {
5455
shadow-lg
5556
py-4
5657
min-w-150
57-
z-200
58+
z-1000
5859
>
5960
<!-- Version -->
6061
<div
@@ -106,6 +107,6 @@ function handleItemClick(item: LogoContextMenuItem) {
106107
<img v-if="theme.logo" class="logo" :src="theme.logo">
107108
<div v-else i-nimiq:logos-nimiq-horizontal text-20 dark:i-nimiq:logos-nimiq-white-horizontal />
108109
<span translate-y--1 text-16 font-light tracking-wide>{{ name }}</span>
109-
<span v-if="theme.betaBadge" text-10 font-semibold absolute right-8 top-7 lh-none px-3 py-6 bg-gradient-blue text-white rounded-4 outline="1.5 ~ white/10 offset--1.5">BETA</span>
110+
<span v-if="theme.betaBadge" text-9 font-semibold absolute right--50 top-7 w-35 lh-none px-3 py-6 bg-gradient-blue text-white rounded-4 outline="1.5 ~ white/10 offset--1.5">BETA</span>
110111
</a>
111112
</template>

0 commit comments

Comments
 (0)