@@ -3,7 +3,7 @@ Copyright (c) 2025 The Linux Foundation and each contributor.
33SPDX-License-Identifier: MIT
44-->
55<template >
6- <div class =" flex flex-col gap-6 items-start w-full pb-6" >
6+ <div class =" flex flex-col gap-3 md:gap- 6 items-start w-full pb-6" >
77 <div
88 v-if =" scrollTop < scrollThreshold"
99 class =" md:hidden block"
@@ -20,8 +20,12 @@ SPDX-License-Identifier: MIT
2020 </router-link >
2121 </div >
2222 <!-- Icon and Share button -->
23- <div class =" flex justify-between w-full items-start" >
24- <div class =" flex transition-all ease-linear flex-col gap-3" >
23+
24+ <div class =" w-full" >
25+ <div
26+ class =" flex justify-between w-full items-start"
27+ :class =" [scrollTop > scrollThreshold ? '' : 'pb-3']"
28+ >
2529 <div
2630 :class =" [scrollTop > scrollThreshold ? 'size-10' : 'size-12']"
2731 class =" transition-all ease-linear bg-white border border-neutral-200 rounded-lg flex items-center justify-center"
@@ -32,30 +36,13 @@ SPDX-License-Identifier: MIT
3236 :size =" scrollTop > scrollThreshold ? 20 : 24"
3337 />
3438 </div >
35-
36- <div class =" flex flex-col gap-1" >
37- <h1
38- :class =" [scrollTop > scrollThreshold ? 'text-2xl ml-13 -mt-12' : 'text-3xl']"
39- class =" transition-all ease-linear font-light font-secondary text-neutral-900 md:block hidden"
40- >
41- {{ config?.name }}
42- </h1 >
43- <!-- mobile navigation -->
44- <div
45- class =" md:hidden flex justify-start"
46- :class =" [scrollTop > scrollThreshold ? 'ml-13 -mt-12' : '']"
47- >
48- <lfx-leaderboard-mobile-nav :leaderboard-key =" config.key" />
49- </div >
50- </div >
51- </div >
52- <div class =" mt-1" >
5339 <div class =" md:block hidden" >
5440 <lfx-button
55- type =" tertiary "
41+ type =" ghost "
5642 size =" small"
5743 button-style =" pill"
5844 class =" h-9"
45+ :class =" [scrollTop > scrollThreshold ? 'invisible' : 'visible']"
5946 @click =" handleShare"
6047 >
6148 <lfx-icon
@@ -68,19 +55,51 @@ SPDX-License-Identifier: MIT
6855 <div class =" md:!hidden block" >
6956 <lfx-icon-button
7057 icon =" share-nodes"
58+ type =" transparent"
7159 @click =" handleShare"
7260 />
7361 </div >
7462 </div >
63+ <div
64+ class =" hidden justify-between w-full items-center md:flex"
65+ :class =" [scrollTop > scrollThreshold ? '' : 'pb-2']"
66+ >
67+ <h1
68+ :class =" [scrollTop > scrollThreshold ? 'text-2xl ml-13 -mt-10' : 'text-3xl']"
69+ class =" transition-all ease-linear font-light font-secondary text-neutral-900 md:block hidden"
70+ >
71+ {{ config?.name }}
72+ </h1 >
73+ <lfx-collections-filter
74+ v-model =" selectedCollection"
75+ width =" 350px"
76+ :size =" scrollTop < scrollThreshold ? 'medium' : 'small'"
77+ type =" filled"
78+ class =" transition-all ease-linear"
79+ :class =" [scrollTop > scrollThreshold ? '-mt-10' : '']"
80+ />
81+ </div >
82+ <div
83+ class =" md:hidden flex justify-start transition-all ease-linear"
84+ :class =" [scrollTop > scrollThreshold ? 'ml-13 -mt-9 mb-2' : '']"
85+ >
86+ <lfx-leaderboard-mobile-nav :leaderboard-key =" config.key" />
87+ </div >
88+ <p
89+ :class =" [scrollTop < scrollThreshold ? 'block' : 'hidden']"
90+ class =" transition-all ease-linear text-sm text-neutral-500 w-full whitespace-pre-wrap min-h-10"
91+ >
92+ {{ config?.description }}
93+ </p >
7594 </div >
7695
77- <p
78- :class = " [scrollTop < scrollThreshold ? 'block' : 'hidden'] "
79- class =" -mt-5 transition-all ease-linear text-sm text-neutral-500 w-full whitespace-pre-wrap min-h-10 "
80- >
81- {{ config?.description }}
82- </ p >
83-
96+ <lfx-collections-filter
97+ v-model = " selectedCollection "
98+ class =" flex md:hidden ! w-full"
99+ width = " 100% "
100+ size = " medium "
101+ type = " filled "
102+ />
84103 <div class =" relative w-full md:block hidden" >
85104 <lfx-leaderboard-search
86105 :config =" config"
@@ -90,7 +109,7 @@ SPDX-License-Identifier: MIT
90109 </div >
91110 <div class =" md:hidden block w-full" >
92111 <div
93- class =" rounded-full border border-solid border-neutral-200 cursor-pointer flex items-center gap-2 px-3 py-2"
112+ class =" rounded-full bg-neutral-50 border border-solid border-neutral-200 cursor-pointer flex items-center gap-2 px-3 py-2"
94113 @click =" isSearchOpen = true"
95114 >
96115 <lfx-icon
@@ -111,7 +130,6 @@ SPDX-License-Identifier: MIT
111130 <div class =" p-1 bg-white rounded-lg" >
112131 <lfx-leaderboard-search
113132 ref =" searchComponentRef"
114- class =" bg-white"
115133 in-modal
116134 :config =" config"
117135 @item-click =" handleItemClick"
@@ -124,7 +142,7 @@ SPDX-License-Identifier: MIT
124142import { ref , watch , nextTick } from ' vue' ;
125143import pluralize from ' pluralize' ;
126144import type { LeaderboardConfig } from ' ../../config/types/leaderboard.types' ;
127- import LfxLeaderboardMobileNav from ' ./leaderboard-mobile-nav .vue' ;
145+ import LfxCollectionsFilter from ' ../filters/collections-filter .vue' ;
128146import LfxLeaderboardSearch from ' ./leaderboard-search.vue' ;
129147import LfxButton from ' ~/components/uikit/button/button.vue' ;
130148import LfxIconButton from ' ~/components/uikit/icon-button/icon-button.vue' ;
@@ -134,12 +152,15 @@ import { useShareStore } from '~/components/shared/modules/share/store/share.sto
134152import { LfxRoutes } from ' ~/components/shared/types/routes' ;
135153import LfxModal from ' ~/components/uikit/modal/modal.vue' ;
136154import type { Leaderboard } from ' ~~/types/leaderboard/leaderboard' ;
155+ import LfxLeaderboardMobileNav from ' ~/components/modules/leaderboards/components/sections/leaderboard-mobile-nav.vue' ;
137156
138157const { openShareModal } = useShareStore ();
139158const props = defineProps <{
140159 config: LeaderboardConfig ;
141160}>();
142161
162+ const selectedCollection = defineModel <string >(' collectionSlug' , { default: ' ' });
163+
143164const { scrollTop } = useScroll ();
144165
145166const isSearchOpen = ref (false );
0 commit comments