Skip to content

Commit c6b5c82

Browse files
committed
feat: polish ui
1 parent 146c677 commit c6b5c82

File tree

6 files changed

+25
-16
lines changed

6 files changed

+25
-16
lines changed

app/components/AppHeader.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ onKeyStroke(
109109
to="/"
110110
:aria-label="$t('header.home')"
111111
dir="ltr"
112-
class="inline-flex items-center gap-2 header-logo font-mono text-lg font-medium text-fg hover:text-fg transition-colors duration-200 rounded"
112+
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"
113113
>
114114
<AppLogo class="w-8 h-8 rounded-lg" />
115115
<span>npmx</span>

app/components/AppLogo.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ defineProps<{
1515
>
1616
<title>{{ $t('alt_logo') }}</title>
1717
<rect fill="var(--bg)" width="512" height="512" rx="64" />
18-
<rect fill="var(--fg)" x="110" y="310" width="60" height="60" />
18+
<rect fill="currentColor" x="110" y="310" width="60" height="60" />
1919
<text
2020
fill="var(--accent)"
2121
x="320"

app/components/Header/AccountMenu.client.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ function openAuthModal() {
144144
v-if="isNpmConnected && npmUser"
145145
type="button"
146146
role="menuitem"
147-
class="w-full px-3 py-2.5 flex items-center gap-3 hover:bg-bg-subtle transition-colors text-start"
147+
class="w-full px-3 py-2.5 flex items-center gap-3 hover:bg-bg-subtle transition-colors text-start rounded-md"
148148
@click="openConnectorModal"
149149
>
150150
<img
@@ -187,7 +187,7 @@ function openAuthModal() {
187187
v-if="atprotoUser"
188188
type="button"
189189
role="menuitem"
190-
class="w-full px-3 py-2.5 flex items-center gap-3 hover:bg-bg-subtle transition-colors text-start"
190+
class="w-full px-3 py-2.5 flex items-center gap-3 hover:bg-bg-subtle transition-colors text-start rounded-md"
191191
@click="openAuthModal"
192192
>
193193
<img

app/components/Header/SearchBox.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ defineExpose({ focus })
109109
<div class="relative group" :class="{ 'is-focused': isSearchFocused }">
110110
<div class="search-box relative flex items-center">
111111
<span
112-
class="absolute inset-is-3 text-fg-subtle font-mono text-sm pointer-events-none transition-colors duration-200 motion-reduce:transition-none group-focus-within:text-accent z-1"
112+
class="absolute inset-is-3 text-fg-subtle font-mono text-sm pointer-events-none transition-colors duration-200 motion-reduce:transition-none [.group:hover:not(:focus-within)_&]:text-fg/80 group-focus-within:text-accent z-1"
113113
>
114114
/
115115
</span>
@@ -122,7 +122,7 @@ defineExpose({ focus })
122122
name="q"
123123
:placeholder="$t('search.placeholder')"
124124
v-bind="noCorrect"
125-
class="w-full min-w-25 bg-bg-subtle border border-border rounded-md ps-7 pe-3 py-1.5 font-mono text-sm text-fg placeholder:text-fg-subtle transition-border-color duration-300 motion-reduce:transition-none focus:border-accent focus-visible:(outline-2 outline-accent/70)"
125+
class="w-full min-w-25 bg-bg-subtle border border-border rounded-md ps-7 pe-3 py-1.5 font-mono text-sm text-fg placeholder:text-fg-subtle transition-[border-color,outline-color] duration-300 hover:border-fg-subtle outline-2 outline-transparent focus:border-accent focus-visible:(outline-2 outline-accent/70)"
126126
@focus="handleSearchFocus"
127127
@blur="handleSearchBlur"
128128
/>

app/components/Tag/Button.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ const props = defineProps<{
1313

1414
<template>
1515
<button
16-
class="inline-flex items-center px-2 py-0.5 text-xs font-mono border rounded transition-colors duration-200 focus-visible:ring-2 focus-visible:ring-fg focus-visible:ring-offset-1"
16+
class="inline-flex items-center px-2 py-0.5 text-xs font-mono border border-solid rounded transition-colors duration-200 focus-visible:ring-2 focus-visible:ring-fg focus-visible:ring-offset-1"
1717
:class="[
1818
pressed
1919
? 'bg-fg text-bg border-fg hover:(text-text-bg/50)'

app/pages/index.vue

Lines changed: 18 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -43,17 +43,21 @@ defineOgImageComponent('Default', {
4343
<template>
4444
<main>
4545
<section class="container min-h-screen flex flex-col">
46-
<header class="flex-1 flex flex-col items-center justify-center text-center py-20">
46+
<header
47+
class="flex-1 flex flex-col items-center justify-center text-center pt-20 pb-4 md:pb-8 lg:pb-20"
48+
>
4749
<h1
4850
dir="ltr"
49-
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-4 motion-safe:animate-fade-in motion-safe:animate-fill-both"
51+
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"
5052
>
51-
<AppLogo class="w-12 h-12 sm:w-20 sm:h-20 md:w-24 md:h-24 rounded-2xl sm:rounded-3xl" />
53+
<AppLogo
54+
class="w-12 h-12 -ms-3 sm:w-20 sm:h-20 -ms-5 md:w-24 md:h-24 -ms-6 rounded-2xl sm:rounded-3xl"
55+
/>
5256
<span class="pb-4">npmx</span>
5357
</h1>
5458

5559
<p
56-
class="text-fg-muted text-lg sm:text-xl max-w-md mb-12 motion-safe:animate-slide-up motion-safe:animate-fill-both"
60+
class="text-fg-muted text-lg sm:text-xl max-w-md mb-12 lg:mb-14 motion-safe:animate-slide-up motion-safe:animate-fill-both"
5761
style="animation-delay: 0.1s"
5862
>
5963
{{ $t('tagline') }}
@@ -75,7 +79,7 @@ defineOgImageComponent('Default', {
7579

7680
<div class="search-box relative flex items-center">
7781
<span
78-
class="absolute inset-is-4 text-fg-subtle font-mono text-sm pointer-events-none transition-colors duration-200 group-focus-within:text-accent z-1"
82+
class="absolute inset-is-4 text-fg-subtle font-mono text-lg pointer-events-none transition-colors duration-200 motion-reduce:transition-none [.group:hover:not(:focus-within)_&]:text-fg/80 group-focus-within:text-accent z-1"
7983
>
8084
/
8185
</span>
@@ -89,16 +93,21 @@ defineOgImageComponent('Default', {
8993
autofocus
9094
:placeholder="$t('search.placeholder')"
9195
v-bind="noCorrect"
92-
class="w-full bg-bg-subtle border border-border rounded-lg ps-8 pe-24 py-4 font-mono text-base text-fg placeholder:text-fg-subtle transition-border-color duration-300 focus:border-accent focus-visible:(outline-2 outline-accent/70)"
96+
class="w-full bg-bg-subtle border border-border rounded-xl ps-8 pe-24 h-14 py-4 font-mono text-base text-fg placeholder:text-fg-subtle transition-[border-color,outline-color] duration-300 motion-reduce:transition-none hover:border-fg-subtle outline-2 outline-transparent focus:border-accent focus-visible:(outline-2 outline-accent/70)"
9397
@input="handleInput"
9498
/>
9599

96100
<button
97101
type="submit"
98-
class="absolute inset-ie-2 px-4 py-2 font-mono text-sm text-bg bg-fg rounded-md transition-[background-color,transform] duration-200 hover:bg-fg/90 active:scale-95 focus-visible:outline-accent/70"
102+
class="absolute group inset-ie-2.5 px-2.5 sm:ps-4 sm:pe-4 py-2 font-mono text-sm text-bg bg-fg/90 rounded-md transition-[background-color,transform] duration-200 hover:bg-fg! group-focus-within:bg-fg/80 active:scale-95 focus-visible:outline-accent/70"
99103
>
100-
<span class="i-carbon:search align-middle w-4 h-4" aria-hidden="true"></span>
101-
{{ $t('search.button') }}
104+
<span
105+
class="inline-block i-carbon:search align-middle w-4 h-4 sm:mr-2"
106+
aria-hidden="true"
107+
></span>
108+
<span class="sr-only sm:not-sr-only">
109+
{{ $t('search.button') }}
110+
</span>
102111
</button>
103112
</div>
104113
</div>

0 commit comments

Comments
 (0)