Skip to content

Commit cdff946

Browse files
vladhalexdln
andauthored
fix(ui): improve logo (#1770)
Co-authored-by: Vordgi <sasha2822222@gmail.com>
1 parent 983ccd1 commit cdff946

16 files changed

Lines changed: 129 additions & 70 deletions

File tree

app/components/AppHeader.vue

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -213,9 +213,9 @@ onKeyStroke(
213213
v-if="!isSearchExpanded && !isOnHomePage"
214214
to="/"
215215
:aria-label="$t('header.home')"
216-
class="sm:hidden flex-shrink-0 font-mono text-lg font-medium text-fg hover:text-fg transition-colors duration-200 focus-ring"
216+
class="sm:hidden flex-shrink-0 font-mono text-lg font-medium text-fg hover:text-fg transition-colors duration-200 focus-ring me-4"
217217
>
218-
<AppLogo class="w-8 h-8 rounded-lg" />
218+
<AppMark class="w-6 h-auto" />
219219
</NuxtLink>
220220

221221
<!-- Desktop: Logo (navigates home) -->
@@ -224,13 +224,12 @@ onKeyStroke(
224224
:to="{ name: 'index' }"
225225
:aria-label="$t('header.home')"
226226
dir="ltr"
227-
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"
227+
class="relative inline-flex items-center gap-1 py-2 header-logo font-mono text-lg font-medium text-fg hover:text-fg/90 transition-colors duration-200 me-4"
228228
>
229-
<AppLogo class="w-7 h-7 rounded-lg" />
230-
<span class="pb-0.5">npmx</span>
229+
<AppLogo class="h-4.5 w-auto" />
231230
<span
232231
aria-hidden="true"
233-
class="scale-35 transform-origin-br font-mono tracking-wide text-accent absolute bottom-0.5 -inset-ie-1"
232+
class="scale-35 transform-origin-br font-mono tracking-wide text-accent absolute bottom-0.75 -inset-ie-1"
234233
>
235234
{{ env === 'release' ? 'alpha' : env }}
236235
</span>

app/components/AppLogo.vue

Lines changed: 26 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -8,25 +8,34 @@ defineProps<{
88
<svg
99
aria-hidden="true"
1010
xmlns="http://www.w3.org/2000/svg"
11-
viewBox="0 0 512 512"
12-
width="96"
13-
height="96"
11+
viewBox="0 0 602 170"
12+
width="602"
13+
height="170"
1414
:class="class"
1515
>
1616
<title>{{ $t('alt_logo') }}</title>
17-
<rect fill="var(--bg)" width="512" height="512" rx="64" />
18-
<rect fill="currentColor" x="110" y="310" width="60" height="60" />
19-
<text
20-
fill="var(--accent)"
21-
x="320"
22-
y="370"
23-
font-family="'Geist Mono',ui-monospace, SFMono-Regular, 'SF Mono', Menlo, Consolas, monospace"
24-
font-size="420"
25-
font-weight="500"
26-
text-anchor="middle"
27-
style="user-select: none"
28-
>
29-
<tspan>/</tspan>
30-
</text>
17+
<g transform="translate(0 14.602)">
18+
<path d="m0.93476 97.205h24.081v23.693h-24.081z" fill="currentColor" />
19+
<path
20+
d="m176.66 17.97h14.954l0.3884 18.449q4.0783-10.293 12.817-15.536 8.9334-5.2435 20.003-5.2435 17.09 0 26.412 11.07 9.3218 10.875 9.3218 27.965v66.223h-16.313v-61.562q0-29.325-22.916-29.325-12.429 0-20.391 7.7681-7.9623 7.7681-7.9623 21.557v61.562h-16.313z"
21+
fill="currentColor"
22+
/>
23+
<path
24+
d="m386.95 17.97h14.954l0.38842 15.148q2.7188-8.3507 7.9624-12.817 5.2435-4.6609 12.429-4.6609 15.925 0 19.42 20.197 2.5246-9.516 8.3507-14.759 5.8261-5.4377 13.788-5.4377 12.429 0 18.061 8.7392 5.6319 8.545 5.6319 28.159v68.36h-16.313v-66.029q0-13.4-2.9131-19.032-2.913-5.8261-9.1276-5.8261-6.4087 0-10.293 6.4087-3.6899 6.2145-3.6899 18.838v65.641h-16.313v-66.029q0-13.206-2.913-19.032-2.7188-5.8261-9.1276-5.8261t-10.293 6.4087q-3.6899 6.2145-3.6899 18.838v65.641h-16.313z"
25+
fill="currentColor"
26+
/>
27+
<path
28+
d="m279.21 17.97h15.148l0.19415 16.507q4.6609-9.1276 12.817-13.983 8.3508-4.8551 18.838-4.8551 14.759 0 24.664 7.3797 9.9044 7.1855 14.759 19.42t4.8551 26.994q0 14.759-4.8551 26.994t-14.759 19.615q-9.9044 7.1855-24.664 7.1855-10.099 0-18.449-4.2725-8.1565-4.2725-12.235-11.652v42.725h-16.313zm45.444 89.722q13.4 0 20.974-10.099 7.7682-10.099 7.7682-28.159 0-18.061-7.7682-28.159-7.5739-10.099-20.974-10.099-13.594 0-21.362 9.9044-7.7682 9.7102-7.7682 28.354 0 18.644 7.5739 28.548 7.7682 9.7102 21.557 9.7102z"
29+
fill="currentColor"
30+
/>
31+
<path
32+
d="m543.04 68.074-35.928-50.104h19.032l26.994 38.841 26.412-38.841h19.42l-35.733 50.493 37.481 52.435h-19.032l-28.548-41.56-28.548 41.56h-19.42z"
33+
fill="currentColor"
34+
/>
35+
<path
36+
d="m103.12-9.2307-3.6211 10.246-46.309 131-3.6211 10.246h15.537l3.6211-10.246 11.717-33.148 38.211-108.1z"
37+
fill="var(--accent)"
38+
/>
39+
</g>
3140
</svg>
3241
</template>

app/components/AppMark.vue

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
<script setup lang="ts">
2+
defineProps<{
3+
class?: string
4+
}>()
5+
</script>
6+
7+
<template>
8+
<svg
9+
aria-hidden="true"
10+
xmlns="http://www.w3.org/2000/svg"
11+
viewBox="0 0 153 153"
12+
width="153"
13+
height="153"
14+
:class="class"
15+
>
16+
<title>{{ $t('alt_logo') }}</title>
17+
<g transform="translate(16.704 9.9827)">
18+
<path d="m0.93476 97.205h24.081v23.693h-24.081z" fill="currentColor" />
19+
<path
20+
d="m103.12-9.2307-3.6211 10.246-46.309 131-3.6211 10.246h15.537l3.6211-10.246 11.717-33.148 38.211-108.1z"
21+
fill="var(--accent)"
22+
/>
23+
</g>
24+
</svg>
25+
</template>

app/pages/index.vue

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -34,15 +34,12 @@ defineOgImageComponent('Default', {
3434
>
3535
<h1
3636
dir="ltr"
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"
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-6 motion-safe:animate-fade-in motion-safe:animate-fill-both"
3838
>
39-
<AppLogo
40-
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"
41-
/>
42-
<span class="pb-4">npmx</span>
39+
<AppLogo class="w-42 h-auto sm:w-58 md:w-70" />
4340
<span
4441
aria-hidden="true"
45-
class="scale-15 transform-origin-br font-mono tracking-widest text-accent absolute bottom-3 -inset-ie-1.5"
42+
class="text-sm sm:text-base md:text-lg transform-origin-br font-mono tracking-widest text-accent absolute -bottom-4 -inset-ie-1.5"
4643
>
4744
{{ env === 'release' ? 'alpha' : env }}
4845
</span>

public-dev/logo-icon.svg

Lines changed: 13 additions & 0 deletions
Loading

public-dev/logo-mark.svg

Lines changed: 2 additions & 0 deletions
Loading

public-dev/logo.svg

Lines changed: 2 additions & 13 deletions
Loading

public-staging/logo-icon.svg

Lines changed: 13 additions & 0 deletions
Loading

public-staging/logo-mark.svg

Lines changed: 2 additions & 0 deletions
Loading

public-staging/logo.svg

Lines changed: 2 additions & 13 deletions
Loading

0 commit comments

Comments
 (0)