Skip to content

Commit 3faaf04

Browse files
shuuji3alexdln
andauthored
feat: put env string next to 'npmx' (#657)
Co-authored-by: Vordgi <sasha2822222@gmail.com>
1 parent e6f9eef commit 3faaf04

File tree

2 files changed

+19
-4
lines changed

2 files changed

+19
-4
lines changed

app/components/AppHeader.vue

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,7 @@ const mobileLinks = computed<NavigationConfigWithGroups>(() => [
124124
125125
const showFullSearch = shallowRef(false)
126126
const showMobileMenu = shallowRef(false)
127+
const { env } = useAppConfig().buildInfo
127128
128129
// On mobile, clicking logo+search button expands search
129130
const route = useRoute()
@@ -212,10 +213,16 @@ onKeyStroke(
212213
:to="{ name: 'index' }"
213214
:aria-label="$t('header.home')"
214215
dir="ltr"
215-
class="inline-flex items-center gap-1 header-logo font-mono text-lg font-medium text-fg hover:text-fg/90 transition-colors duration-200 rounded"
216+
class="relative inline-flex items-center gap-1 header-logo font-mono text-lg font-medium text-fg hover:text-fg/90 transition-colors duration-200 rounded"
216217
>
217-
<AppLogo class="w-8 h-8 rounded-lg" />
218-
<span>npmx</span>
218+
<AppLogo class="w-7 h-7 rounded-lg" />
219+
<span class="pb-0.5">npmx</span>
220+
<span
221+
aria-hidden="true"
222+
class="scale-35 transform-origin-br font-mono tracking-wide text-accent absolute bottom-0.5 -inset-ie-1"
223+
>
224+
{{ env === 'release' ? 'alpha' : env }}
225+
</span>
219226
</NuxtLink>
220227
</div>
221228
<!-- Spacer when logo is hidden on desktop -->

app/pages/index.vue

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ async function search() {
88
flushUpdateUrlQuery()
99
}
1010
11+
const { env } = useAppConfig().buildInfo
12+
1113
useSeoMeta({
1214
title: () => $t('seo.home.title'),
1315
ogTitle: () => $t('seo.home.title'),
@@ -32,12 +34,18 @@ defineOgImageComponent('Default', {
3234
>
3335
<h1
3436
dir="ltr"
35-
class="flex items-center justify-center gap-2 header-logo font-mono text-5xl sm:text-7xl md:text-8xl font-medium tracking-tight mb-2 motion-safe:animate-fade-in motion-safe:animate-fill-both"
37+
class="relative flex items-center justify-center gap-2 header-logo font-mono text-5xl sm:text-7xl md:text-8xl font-medium tracking-tight mb-2 motion-safe:animate-fade-in motion-safe:animate-fill-both"
3638
>
3739
<AppLogo
3840
class="w-12 h-12 -ms-3 sm:w-20 sm:h-20 sm:-ms-5 md:w-24 md:h-24 md:-ms-6 rounded-2xl sm:rounded-3xl"
3941
/>
4042
<span class="pb-4">npmx</span>
43+
<span
44+
aria-hidden="true"
45+
class="scale-15 transform-origin-br font-mono tracking-widest text-accent absolute bottom-3 -inset-ie-1.5"
46+
>
47+
{{ env === 'release' ? 'alpha' : env }}
48+
</span>
4149
</h1>
4250

4351
<p

0 commit comments

Comments
 (0)