Skip to content

Commit 7ed101d

Browse files
committed
fix: compare page style issue
1 parent bf0c8f7 commit 7ed101d

File tree

3 files changed

+27
-11
lines changed

3 files changed

+27
-11
lines changed

app/components/Compare/FacetCard.vue

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -75,12 +75,13 @@ function getShortName(header: string): string {
7575
<!-- Facet header -->
7676
<div class="flex items-center gap-1.5 px-3 py-2 bg-bg-subtle border-b border-border">
7777
<span class="text-xs text-fg-muted uppercase tracking-wider font-medium">{{ label }}</span>
78-
<span
79-
v-if="description"
80-
class="i-carbon:information w-3 h-3 text-fg-subtle"
81-
:title="description"
82-
aria-hidden="true"
83-
/>
78+
<TooltipApp v-if="description" :text="description" position="top">
79+
<span
80+
class="i-carbon:information w-3 h-3 text-fg-subtle"
81+
:title="description"
82+
aria-hidden="true"
83+
/>
84+
</TooltipApp>
8485
</div>
8586

8687
<!-- Package values -->

app/components/Compare/PackageSelector.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ function handleBlur() {
7575
:aria-label="$t('compare.selector.remove_package', { package: pkg })"
7676
@click="removePackage(pkg)"
7777
>
78-
<span class="i-carbon:close w-3.5 h-3.5" aria-hidden="true" />
78+
<span class="i-carbon:close flex items-center w-3.5 h-3.5" aria-hidden="true" />
7979
</button>
8080
</div>
8181
</div>

app/pages/compare.vue

Lines changed: 19 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ definePageMeta({
55
name: 'compare',
66
})
77
8+
const router = useRouter()
9+
810
// Sync packages with URL query param (stable ref - doesn't change on other query changes)
911
const packagesParam = useRouteQuery<string>('packages', '', { mode: 'replace' })
1012
@@ -61,9 +63,19 @@ useSeoMeta({
6163
<main class="container flex-1 py-12 sm:py-16 w-full">
6264
<div class="max-w-2xl mx-auto">
6365
<header class="mb-12">
64-
<h1 class="font-mono text-3xl sm:text-4xl font-medium mb-4">
65-
{{ $t('compare.packages.title') }}
66-
</h1>
66+
<div class="flex items-baseline justify-between gap-4 mb-4">
67+
<h1 class="font-mono text-3xl sm:text-4xl font-medium mb-4">
68+
{{ $t('compare.packages.title') }}
69+
</h1>
70+
<button
71+
type="button"
72+
class="inline-flex items-center gap-2 font-mono text-sm text-fg-muted hover:text-fg transition-colors duration-200 rounded focus-visible:outline-accent/70 shrink-0"
73+
@click="router.back()"
74+
>
75+
<span class="i-carbon:arrow-left rtl-flip w-4 h-4" aria-hidden="true" />
76+
<span class="hidden sm:inline">{{ $t('nav.back') }}</span>
77+
</button>
78+
</div>
6779
<p class="text-fg-muted text-lg">
6880
{{ $t('compare.packages.tagline') }}
6981
</p>
@@ -170,7 +182,10 @@ useSeoMeta({
170182
</section>
171183

172184
<!-- Empty state -->
173-
<section v-else class="text-center py-16 border border-dashed border-border rounded-lg">
185+
<section
186+
v-else
187+
class="text-center px-1.5 py-16 border border-dashed border-border rounded-lg"
188+
>
174189
<div class="i-carbon:compare w-12 h-12 text-fg-subtle mx-auto mb-4" aria-hidden="true" />
175190
<h2 class="font-mono text-lg text-fg-muted mb-2">
176191
{{ $t('compare.packages.empty_title') }}

0 commit comments

Comments
 (0)