Skip to content

Commit 9b966c5

Browse files
committed
fix: improve install command
1 parent 152ddb3 commit 9b966c5

2 files changed

Lines changed: 21 additions & 11 deletions

File tree

app/pages/package/[...name].vue

Lines changed: 19 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -470,16 +470,26 @@ defineOgImageComponent('Package', {
470470
</div>
471471
</div>
472472
<div class="relative group">
473-
<!-- Syntax highlighted install command -->
474-
<pre class="code-block"><code><span class="line"><ClientOnly><span class="text-syntax-fn">{{ selectedPMLabel }}</span><span class="text-syntax-str"> {{ selectedPMAction }}</span><span
475-
v-if="selectedPM !== 'deno'"
476-
class="text-syntax-str"
477-
> {{ pkg.name }}</span><span
478-
v-else
479-
class="text-syntax-str"
480-
>{{ pkg.name }}</span><template #fallback><span class="text-syntax-fn">npm</span><span class="text-syntax-str"> install</span><span class="text-syntax-str"> {{ pkg.name }}</span></template></ClientOnly></span></code></pre>
473+
<!-- Terminal-style install command -->
474+
<div class="bg-[#0d0d0d] border border-border rounded-lg overflow-hidden">
475+
<div class="flex gap-1.5 px-4 pt-3">
476+
<span class="w-2.5 h-2.5 rounded-full bg-[#333]" />
477+
<span class="w-2.5 h-2.5 rounded-full bg-[#333]" />
478+
<span class="w-2.5 h-2.5 rounded-full bg-[#333]" />
479+
</div>
480+
<div class="flex items-center gap-2 px-4 pt-3 pb-4">
481+
<span class="text-fg-subtle font-mono text-sm select-none">$</span>
482+
<code class="font-mono text-sm"><ClientOnly><span class="text-fg">{{ selectedPMLabel }}</span> <span class="text-fg-muted">{{ selectedPMAction }}</span><span
483+
v-if="selectedPM !== 'deno'"
484+
class="text-fg-muted"
485+
> {{ pkg.name }}</span><span
486+
v-else
487+
class="text-fg-muted"
488+
>{{ pkg.name }}</span><template #fallback><span class="text-fg">npm</span> <span class="text-fg-muted">install {{ pkg.name }}</span></template></ClientOnly></code>
489+
</div>
490+
</div>
481491
<button
482-
class="absolute top-3 right-3 px-2 py-1 font-mono text-xs text-fg-muted bg-bg-elevated border border-border rounded transition-all duration-200 hover:(text-fg border-border-hover) active:scale-95"
492+
class="absolute top-3 right-3 px-2 py-1 font-mono text-xs text-fg-muted bg-bg-subtle/80 border border-border rounded transition-all duration-200 hover:(text-fg border-border-hover) active:scale-95"
483493
@click="copyInstallCommand"
484494
>
485495
<ClientOnly>

app/pages/search.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,7 @@ defineOgImageComponent('Default', {
237237
/>
238238

239239
<div class="search-box relative flex items-center">
240-
<span class="absolute left-4 text-fg-subtle font-mono text-sm pointer-events-none transition-colors duration-200 group-focus-within:text-fg-muted">
240+
<span class="absolute left-4 text-fg-subtle font-mono text-base pointer-events-none transition-colors duration-200 group-focus-within:text-fg-muted">
241241
/
242242
</span>
243243
<input
@@ -248,7 +248,7 @@ defineOgImageComponent('Default', {
248248
name="q"
249249
placeholder="search packages..."
250250
autocomplete="off"
251-
class="w-full max-w-full bg-bg-subtle border border-border rounded-lg pl-8 pr-4 py-3 font-mono text-sm text-fg placeholder:text-fg-subtle transition-all duration-300 focus:(border-border-hover outline-none) appearance-none"
251+
class="w-full max-w-full bg-bg-subtle border border-border rounded-lg pl-8 pr-4 py-3 font-mono text-base text-fg placeholder:text-fg-subtle transition-all duration-300 focus:(border-border-hover outline-none) appearance-none"
252252
@focus="isSearchFocused = true"
253253
@blur="isSearchFocused = false"
254254
>

0 commit comments

Comments
 (0)