@@ -3,15 +3,18 @@ Copyright (c) 2025 The Linux Foundation and each contributor.
33SPDX-License-Identifier: MIT
44-->
55<template >
6- <div :style =" headerBackgroundStyle" >
6+ <div
7+ :style =" headerBackgroundStyle"
8+ class =" z-50"
9+ >
710 <section
811 class =" container pt-3 md:pt-5 pb-3"
9- :class =" scrollTop > 50 ? 'md:pb-5' : 'md:pb-12'"
12+ :class =" scrollTop > 250 ? 'md:pb-5' : 'md:pb-12'"
1013 >
1114 <!-- Mobile top row: back link + action icons -->
1215 <div
1316 class =" flex md:hidden items-center justify-between transition-all"
14- :class =" scrollTop > 50 ? 'mb-0' : 'mb-4'"
17+ :class =" scrollTop > 250 ? 'mb-0' : 'mb-4'"
1518 >
1619 <nuxt-link
1720 :to =" { name: collectionTab?.route }"
@@ -23,7 +26,7 @@ SPDX-License-Identifier: MIT
2326 />
2427 <span
2528 class =" text-sm font-medium transition-all"
26- :class =" scrollTop > 50 ? 'hidden' : 'block'"
29+ :class =" scrollTop > 250 ? 'hidden' : 'block'"
2730 >
2831 {{ collectionTab?.detailsLabel }}
2932 </span >
@@ -90,7 +93,7 @@ SPDX-License-Identifier: MIT
9093
9194 <!-- Desktop back link (expanded state: its own row above the title) -->
9295 <div
93- v-if =" scrollTop <= 50 "
96+ v-if =" scrollTop <= 250 "
9497 class =" transition-all hidden md:block mb-6"
9598 >
9699 <nuxt-link
@@ -114,12 +117,12 @@ SPDX-License-Identifier: MIT
114117 <div
115118 class =" flex-grow flex w-full"
116119 :class ="
117- scrollTop > 50 ? 'flex-row gap-3 items-center' : 'flex-col md:flex-row md:items-stretch gap-3 md:gap-8'
120+ scrollTop > 250 ? 'flex-row gap-3 items-center' : 'flex-col md:flex-row md:items-stretch gap-3 md:gap-8'
118121 "
119122 >
120123 <!-- Compact-only: back arrow inline with title, vertically centered -->
121124 <nuxt-link
122- v-if =" scrollTop > 50 "
125+ v-if =" scrollTop > 250 "
123126 :to =" { name: collectionTab?.route }"
124127 class =" hidden md:flex items-center shrink-0"
125128 >
@@ -132,7 +135,7 @@ SPDX-License-Identifier: MIT
132135 <div
133136 v-if =" loading || props.collection?.logoUrl"
134137 class =" shrink-0 flex items-center justify-start"
135- :class =" scrollTop > 50 ? 'h-8 md:h-10' : 'h-12 md:h-30'"
138+ :class =" scrollTop > 250 ? 'h-8 md:h-10' : 'h-12 md:h-30'"
136139 >
137140 <img
138141 v-if =" props.collection?.logoUrl"
@@ -142,18 +145,18 @@ SPDX-License-Identifier: MIT
142145 height =" 120"
143146 fetchpriority =" high"
144147 decoding =" async"
145- :class =" scrollTop > 50 ? 'h-8 w-8 md:h-10 md:w-10' : 'h-12 md:h-30 w-auto'"
148+ :class =" scrollTop > 250 ? 'h-8 w-8 md:h-10 md:w-10' : 'h-12 md:h-30 w-auto'"
146149 />
147150 <lfx-skeleton
148151 v-else
149- :class =" scrollTop > 50 ? 'h-8 w-8 md:h-10 md:w-10' : 'h-12 w-12 md:h-30 md:w-30'"
152+ :class =" scrollTop > 250 ? 'h-8 w-8 md:h-10 md:w-10' : 'h-12 w-12 md:h-30 md:w-30'"
150153 class =" rounded-md"
151154 />
152155 </div >
153156 <div class =" w-full flex flex-col justify-center min-w-0" >
154157 <!-- Mobile only: visibility badge above title for my-collections -->
155158 <div
156- v-if =" props.type === CollectionTypeEnum.MY_COLLECTIONS && props.collection && scrollTop <= 50 "
159+ v-if =" props.type === CollectionTypeEnum.MY_COLLECTIONS && props.collection && scrollTop <= 250 "
157160 class =" flex md:hidden items-center gap-1.5 mb-2"
158161 >
159162 <lfx-icon
@@ -172,13 +175,13 @@ SPDX-License-Identifier: MIT
172175 v-if =" loading"
173176 width =" 80%"
174177 class =" rounded-sm"
175- :class =" scrollTop > 50 ? 'h-6 md:h-9' : 'h-9 md:h-13'"
178+ :class =" scrollTop > 250 ? 'h-6 md:h-9' : 'h-9 md:h-13'"
176179 />
177180 <h1
178181 v-else-if =" props.collection"
179182 class =" font-secondary font-light transition-all text-neutral-900"
180183 :class ="
181- scrollTop > 50
184+ scrollTop > 250
182185 ? 'text-lg md:text-2xl md:leading-9 truncate'
183186 : 'text-3xl md:text-4xl md:leading-[56px]'
184187 "
@@ -194,7 +197,7 @@ SPDX-License-Identifier: MIT
194197 class =" hidden md:flex transition-all ease-linear items-center gap-4 lg:w-auto shrink-0 mt-4 lg:mt-0"
195198 >
196199 <lfx-toggle
197- v-if =" scrollTop > 50 "
200+ v-if =" scrollTop > 250 && isProjectsTab "
198201 v-model =" isOnlyLFProjects"
199202 >
200203 Only Linux Foundation projects
@@ -227,7 +230,7 @@ SPDX-License-Identifier: MIT
227230 class =" !rounded-full shadow-sm"
228231 />
229232 <lfx-button
230- v-if =" scrollTop <= 50 "
233+ v-if =" scrollTop <= 250 "
231234 type =" outline"
232235 class =" !rounded-full shadow-sm"
233236 @click =" handleShare"
@@ -272,7 +275,7 @@ SPDX-License-Identifier: MIT
272275 <!-- Loading placeholder keeps meta-row height reserved so data resolution doesn't reflow the page -->
273276 <div
274277 v-if =" loading"
275- :class =" scrollTop > 50 ? 'h-0 opacity-0 invisible pt-0' : 'h-auto opacity-100 visible mt-3 md:mt-10'"
278+ :class =" scrollTop > 250 ? 'h-0 opacity-0 invisible pt-0' : 'h-auto opacity-100 visible mt-3 md:mt-10'"
276279 class =" flex items-center gap-2 w-full transition-all ease-linear"
277280 >
278281 <lfx-skeleton
@@ -284,7 +287,7 @@ SPDX-License-Identifier: MIT
284287 <!-- Owner + project count + LF toggle (desktop only for toggle) -->
285288 <div
286289 v-if =" !loading && props.collection"
287- :class =" scrollTop > 50 ? 'h-0 opacity-0 invisible pt-0' : 'h-auto opacity-100 visible mt-2'"
290+ :class =" scrollTop > 250 ? 'h-0 opacity-0 invisible pt-0' : 'h-auto opacity-100 visible mt-2'"
288291 class =" flex items-center gap-2 justify-between w-full flex-wrap transition-all ease-linear"
289292 >
290293 <div class =" flex items-center gap-1 md:gap-2 flex-wrap" >
@@ -319,7 +322,7 @@ SPDX-License-Identifier: MIT
319322
320323 <!-- Description paragraph -->
321324 <div
322- :class =" scrollTop > 50 ? 'h-0 opacity-0 invisible pt-0' : 'h-auto opacity-100 visible mt-1 md:mt-3'"
325+ :class =" scrollTop > 250 ? 'h-0 opacity-0 invisible pt-0' : 'h-auto opacity-100 visible mt-1 md:mt-3'"
323326 class =" w-full transition-all ease-linear"
324327 >
325328 <div
@@ -348,15 +351,15 @@ SPDX-License-Identifier: MIT
348351 <!-- Aggregate metrics row + LF toggle (desktop only for toggle) -->
349352 <div
350353 v-if =" showMetricsRow"
351- :class =" scrollTop > 50 ? 'h-0 opacity-0 invisible pt-0' : 'h-auto opacity-100 visible mt-10'"
354+ :class =" scrollTop > 250 ? 'h-0 opacity-0 invisible pt-0' : 'h-auto opacity-100 visible mt-10'"
352355 class =" w-full flex items-center justify-between gap-2 flex-wrap transition-all ease-linear"
353356 >
354357 <lfx-collection-metrics-row
355358 :metrics =" props.metrics"
356359 :loading =" props.metricsLoading"
357360 />
358361 <lfx-toggle
359- v-if =" scrollTop <= 50 "
362+ v-if =" scrollTop <= 250 && isProjectsTab "
360363 v-model =" isOnlyLFProjects"
361364 class =" !hidden md:!flex"
362365 >
@@ -385,7 +388,7 @@ SPDX-License-Identifier: MIT
385388<script lang="ts" setup>
386389import { computed , ref } from ' vue' ;
387390import { storeToRefs } from ' pinia' ;
388- import { useRouter } from ' nuxt/app' ;
391+ import { useRoute , useRouter } from ' nuxt/app' ;
389392import { useQueryClient } from ' @tanstack/vue-query' ;
390393import { collectionTabs , headerBackground , CollectionTypeEnum } from ' ../../config/collection-type-config' ;
391394import LfxCollectionMetricsRow from ' ./collection-metrics-row.vue' ;
@@ -425,8 +428,14 @@ const authStore = useAuthStore();
425428const { user } = storeToRefs (authStore );
426429
427430const router = useRouter ();
431+ const route = useRoute ();
428432const { openShareModal } = useShareStore ();
429433
434+ // The LF-projects toggle filters the Projects tab's table - it has no effect on the
435+ // Contributors/Popularity/Development tabs, which show collection-wide aggregate widgets
436+ // instead of a filterable project list, so it's hidden there.
437+ const isProjectsTab = computed (() => route .name === LfxRoutes .COLLECTION );
438+
430439const props = defineProps <{
431440 collection? : Collection ;
432441 loading? : boolean ;
0 commit comments