@@ -11,9 +11,9 @@ definePageMeta({
1111const route = useRoute (' changes' )
1212// Parse package name & version
1313// Patterns:
14- // /changes/nuxt/v/4.2.0 → packageName: "nuxt", version: "4.2.0"
15- // /changes/nuxt/v/4.2.0/src/index.ts → packageName: "nuxt", version: "4.2.0"
16- // /changes/@nuxt/kit/v/1.0.0 → packageName: "@nuxt/kit", version: "1.0.0"
14+ // /package- changes/nuxt/v/4.2.0 → packageName: "nuxt", version: "4.2.0"
15+ // /package- changes/nuxt/v/4.2.0/src/index.ts → packageName: "nuxt", version: "4.2.0"
16+ // /package- changes/@nuxt/kit/v/1.0.0 → packageName: "@nuxt/kit", version: "1.0.0"
1717const parsedRoute = computed (() => {
1818 const { org, name } = route .params
1919
@@ -50,17 +50,6 @@ const latestVersion = computed(() => {
5050 return pkg .value .versions [latestTag ] ?? null
5151})
5252
53- // watch(
54- // [version, () => latestVersion.value?.version, packageName],
55- // ([v, latest, name]) => {
56- // if (!v && latest && name) {
57- // const pathSegments = [...name.split('/'), 'v', latest]
58- // navigateTo({ name: 'changes', params: { path: pathSegments as [string, ...string[]] } })
59- // }
60- // },
61- // { immediate: true },
62- // )
63-
6453// getting info
6554const { data : changelog, pending } = usePackageChangelog (packageName , version )
6655
@@ -104,10 +93,9 @@ defineOgImageComponent('Default', {
10493 />
10594 <section class =" container w-full pt-3" >
10695 <div
107- class =" pa-3 z-2 flex justify-between gap-4 h-14 b-b-1"
96+ class =" pa-3 z-2 flex justify-between gap-4 h-14 b-b-1 border-border bg-bg top-[--combined-header-height] "
10897 :class =" {
109- [$style.tocHeader]: true,
110- sticky: changelog?.type == 'md',
98+ sticky: changelog?.type === 'md',
11199 }"
112100 >
113101 <LinkBase
@@ -118,13 +106,13 @@ defineOgImageComponent('Default', {
118106 >
119107 {{ changelog.provider }}
120108 </LinkBase >
121- <div v-if =" changelog?.type == 'md'" ref =" tptoc" class =" w-14 h-8" >
122- <!- prevents layout shift while loading - >
109+ <div v-if =" changelog?.type === 'md'" ref =" tptoc" class =" w-14 h-8" >
110+ <!-- prevents layout shift while loading - ->
123111 </div >
124112 </div >
125113 <section v-if =" pending || resolvingPending" class =" flex flex-col gap-2 py-3" >
126114 <SkeletonBlock class =" h-8 w-40 rounded" />
127- <ul class =" ms-3 list-disc my-[1rem] ps-[1.5rem] marker:color-[--border-hover]" >
115+ <ul class =" ms-3 list-disc my-4 ps-6 marker:color-[--border-hover]" >
128116 <li class =" mb-1" v-for =" _n in 5" >
129117 <SkeletonBlock class =" h-7 w-full max-w-2xl rounded" />
130118 </li >
@@ -137,11 +125,10 @@ defineOgImageComponent('Default', {
137125 <Suspense v-else >
138126 <template #default >
139127 <LazyChangelogReleases
140- v-if =" changelog?.type == 'release'"
128+ v-if =" changelog?.type === 'release'"
141129 :info =" changelog"
142130 :requestedDate =" versionDate"
143131 :requested-version =" version"
144- :tocHeaderClass =" $style.tocHeader"
145132 #error
146133 >
147134 <LazyChangelogErrorMsg
@@ -151,7 +138,7 @@ defineOgImageComponent('Default', {
151138 />
152139 </LazyChangelogReleases >
153140 <LazyChangelogMarkdown
154- v-else-if =" changelog?.type == 'md'"
141+ v-else-if =" changelog?.type === 'md'"
155142 :info =" changelog"
156143 :tpTarget =" tptoc"
157144 :requested-version =" version"
@@ -182,12 +169,3 @@ defineOgImageComponent('Default', {
182169 </section >
183170 </main >
184171</template >
185-
186- <style module>
187- .tocHeader {
188- /* border-bottom-width: 1px; */
189- border-color : color-mix(in srgb , var (--border ) var (--un-border-opacity ), transparent );
190- background-color : color-mix(in srgb , var (--bg ) var (--un-bg-opacity ), transparent );
191- top : var (--combined-header-height ); /* top is only used when sticky is used */
192- }
193- </style >
0 commit comments