Skip to content

Commit f3052de

Browse files
authored
fix: layout shift during code nav from root to any file/dir (npmx-dev#75)
1 parent 0299db3 commit f3052de

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

app/pages/code/[...path].vue

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -339,16 +339,17 @@ useSeoMeta({
339339

340340
<!-- Breadcrumb navigation -->
341341
<nav
342-
v-if="filePath"
343342
aria-label="File path"
344343
class="flex items-center gap-1 font-mono text-sm overflow-x-auto"
345344
>
346345
<NuxtLink
346+
v-if="filePath"
347347
:to="getCodeUrl()"
348348
class="text-fg-muted hover:text-fg transition-colors shrink-0"
349349
>
350350
root
351351
</NuxtLink>
352+
<span v-else class="text-fg shrink-0">root</span>
352353
<template v-for="(crumb, i) in breadcrumbs" :key="crumb.path">
353354
<span class="text-fg-subtle">/</span>
354355
<NuxtLink

0 commit comments

Comments
 (0)