File tree Expand file tree Collapse file tree
app/pages/package/[[org]] Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -38,6 +38,9 @@ const isReadmeHeaderPinned = shallowRef(false)
3838const navExtraOffset = shallowRef (0 )
3939const isMobile = useMediaQuery (' (max-width: 639.9px)' )
4040
41+ const headerBounds = useElementBounding (header )
42+ const readmeStickyTop = computed (() => ` ${56 + headerBounds .height .value }px ` )
43+
4144function isStickyPinned(el : HTMLElement | null ): boolean {
4245 if (! el ) return false
4346
@@ -1400,8 +1403,9 @@ const showSkeleton = shallowRef(false)
14001403 <section id =" readme" class =" min-w-0 scroll-mt-20" :class =" $style.areaReadme" >
14011404 <div
14021405 ref =" readmeHeader"
1403- class =" flex sticky top-34 z-10 flex-wrap items-center justify-between mb-3 py-2 -mx-1 px-2 transition-shadow duration-200"
1406+ class =" flex sticky z-10 flex-wrap items-center justify-between mb-3 py-2 -mx-1 px-2 transition-shadow duration-200"
14041407 :class =" { 'bg-bg border-border border-b': isReadmeHeaderPinned }"
1408+ :style =" { top: readmeStickyTop }"
14051409 >
14061410 <h2 id =" readme-heading" class =" group text-xs text-fg-subtle uppercase tracking-wider" >
14071411 <LinkBase to =" #readme" >
You can’t perform that action at this time.
0 commit comments