File tree Expand file tree Collapse file tree
pages/package-code/[[org]]/[packageName]/v/[version] Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -120,7 +120,7 @@ useEventListener('keydown', (event: KeyboardEvent) => {
120120 :to =" getCodeUrlWithPath()"
121121 class =" text-fg-muted hover:text-fg transition-colors shrink-0"
122122 >
123- ..
123+ ~
124124 </NuxtLink >
125125 <span class =" max-md:hidden" >
126126 <template v-for =" crumb in breadcrumbs .items " :key =" crumb .path " >
@@ -139,11 +139,11 @@ useEventListener('keydown', (event: KeyboardEvent) => {
139139 <span ref =" pathDropdownButtonRef" >
140140 <ButtonBase
141141 size =" sm"
142- class =" px-2 mx-1"
142+ class =" px-2 py-1 mx-1"
143143 :aria-label =" $t('code.open_path_dropdown')"
144144 :aria-expanded =" isPathDropdownOpen"
145145 aria-haspopup =" true"
146- @click =" togglePathDropdown"
146+ @click =" togglePathDropdown() "
147147 >
148148 ...
149149 </ButtonBase >
@@ -211,7 +211,7 @@ useEventListener('keydown', (event: KeyboardEvent) => {
211211 v-for =" mode in markdownViewModes"
212212 :key =" mode.key"
213213 role =" tab"
214- class =" px-2 py-1.5 font-mono text-xs rounded transition-colors duration-150 focus-visible:outline-accent/70 inline-flex items-center gap-1.5"
214+ class =" px-2 py-1.5 font-mono text-xs rounded transition-colors duration-150 inline-flex items-center gap-1.5"
215215 :class ="
216216 markdownViewMode === mode.key
217217 ? 'bg-bg-muted shadow text-fg'
Original file line number Diff line number Diff line change @@ -287,6 +287,15 @@ defineOgImageComponent('Default', {
287287 description : () => pkg .value ?.license ?? ' ' ,
288288 primaryColor: ' #60a5fa' ,
289289})
290+
291+ onPrehydrate (() => {
292+ const settingsSaved = JSON .parse (localStorage .getItem (' npmx-settings' ) || ' {}' )
293+ const container = document .getElementById (' code-page-container' )
294+
295+ if (settingsSaved ?.codeContainerFull === true && container ) {
296+ container ! .classList .add (' max-w-full' , ' border-0' )
297+ }
298+ })
290299 </script >
291300
292301<template >
@@ -325,13 +334,14 @@ defineOgImageComponent('Default', {
325334 <!-- Main content: file tree + file viewer -->
326335 <div
327336 v-else-if =" !!fileTree"
337+ id =" code-page-container"
328338 class =" container w-full grid grid-cols-[18rem_1fr] max-lg:grid-cols-[16rem_1fr] max-md:grid-cols-[1fr] border-border border-is border-ie transition-mix-width duration-200 ease-in-out px-0"
329339 :class =" { 'max-w-full border-0': codeContainerFull }"
330340 dir =" ltr"
331341 >
332342 <!-- File tree sidebar - sticky with internal scroll -->
333343 <aside
334- class =" sticky top-25 w-64 lg:w-72 hidden md:block h-full shrink-0 self-start bg-bg-subtle border-ie border-border"
344+ class =" sticky top-25 w-64 lg:w-72 hidden md:block h-[calc(100vh-10.5rem)] shrink-0 self-start bg-bg-subtle border-ie border-border"
335345 >
336346 <div class =" h-[calc(100vh-10.5rem)] overflow-y-auto" >
337347 <CodeFileTree
You can’t perform that action at this time.
0 commit comments