Skip to content

Commit 72ab6d6

Browse files
committed
demote ranger
1 parent 37079bf commit 72ab6d6

File tree

9 files changed

+442
-23
lines changed

9 files changed

+442
-23
lines changed
127 KB
Loading

src/components/Navbar.tsx

Lines changed: 42 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,7 @@ import { SearchButton } from './SearchButton'
1919
import { Authenticated, Unauthenticated, useQuery } from 'convex/react'
2020
import { AuthLoading } from 'convex/react'
2121
import { api } from 'convex/_generated/api'
22-
import {
23-
MdLibraryBooks,
24-
MdLineAxis,
25-
MdMenu,
26-
MdPerson,
27-
MdSupport,
28-
} from 'react-icons/md'
22+
import { MdLibraryBooks, MdLineAxis, MdPerson, MdSupport } from 'react-icons/md'
2923
import { CgClose, CgMenuLeft, CgMusicSpeaker } from 'react-icons/cg'
3024
import { BiSolidCheckShield } from 'react-icons/bi'
3125
import { PiHammerFill } from 'react-icons/pi'
@@ -232,7 +226,21 @@ export function Navbar({ children }: { children: React.ReactNode }) {
232226
<div className="md:flex gap-2 [&>*]:flex-1 lg:block">
233227
<div>
234228
{sortBy(
235-
libraries.filter((d) => d.to),
229+
libraries.filter((d) => {
230+
const sidebarLibraryIds = [
231+
'start',
232+
'router',
233+
'query',
234+
'table',
235+
'form',
236+
'db',
237+
'virtual',
238+
'pacer',
239+
'store',
240+
'devtools',
241+
]
242+
return d.to && sidebarLibraryIds.includes(d.id)
243+
}),
236244
(d) => !d.name.includes('TanStack')
237245
).map((library, i) => {
238246
const [prefix, name] = library.name.split(' ')
@@ -344,6 +352,32 @@ export function Navbar({ children }: { children: React.ReactNode }) {
344352
</div>
345353
)
346354
})}
355+
<Link
356+
to="/libraries"
357+
className={twMerge(linkClasses, 'font-normal')}
358+
activeProps={{
359+
className: twMerge('font-bold! bg-gray-500/10 dark:bg-gray-500/30'),
360+
}}
361+
>
362+
<div className="flex items-center gap-2">
363+
<div className="flex items-center gap-4 justify-between">
364+
<svg
365+
className="w-4 h-4"
366+
fill="none"
367+
viewBox="0 0 24 24"
368+
stroke="currentColor"
369+
>
370+
<path
371+
strokeLinecap="round"
372+
strokeLinejoin="round"
373+
strokeWidth={2}
374+
d="M9 5l7 7-7 7"
375+
/>
376+
</svg>
377+
</div>
378+
<div>More Libraries</div>
379+
</div>
380+
</Link>
347381
<div className="py-2">
348382
<div className="bg-gray-500/10 h-px" />
349383
</div>

src/libraries/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ export const librariesByGroup = {
139139
storeProject,
140140
pacerProject,
141141
],
142-
headlessUI: [tableProject, formProject, virtualProject, rangerProject],
142+
headlessUI: [tableProject, formProject, virtualProject],
143143
other: [devtoolsProject, configProject],
144144
}
145145

src/libraries/ranger.tsx

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,27 +9,27 @@ import { twMerge } from 'tailwind-merge'
99

1010
const repo = 'tanstack/ranger'
1111

12-
const textStyles = 'text-pink-600 dark:text-pink-400'
12+
const textStyles = 'text-gray-700 dark:text-gray-500'
1313

1414
export const rangerProject = {
1515
id: 'ranger',
1616
name: 'TanStack Ranger',
17-
cardStyles: `shadow-xl shadow-pink-700/20 dark:shadow-lg dark:shadow-pink-500/30 text-pink-500 border-2 border-transparent hover:border-current`,
17+
cardStyles: `shadow-xl shadow-slate-700/20 dark:shadow-lg dark:shadow-slate-500/30 text-slate-500 border-2 border-transparent hover:border-current`,
1818
to: '/ranger',
1919
tagline: `Headless range and multi-range slider utilities.`,
2020
description: `Headless, lightweight, and extensible primitives for building range and multi-range sliders.`,
2121
ogImage: 'https://github.com/tanstack/ranger/raw/main/media/headerv1.png',
2222
badge: undefined,
23-
bgStyle: 'bg-pink-500',
24-
textStyle: 'text-pink-500',
23+
bgStyle: 'bg-slate-500',
24+
textStyle: 'text-slate-500',
2525
repo,
2626
latestBranch: 'main',
2727
latestVersion: 'v0',
2828
availableVersions: ['v0'],
29-
bgRadial: 'from-pink-500 via-pink-600/50 to-transparent',
30-
colorFrom: 'from-pink-400',
31-
colorTo: 'to-pink-500',
32-
textColor: 'text-pink-500',
29+
bgRadial: 'from-gray-500 via-gray-700/50 to-transparent',
30+
colorFrom: 'from-gray-500',
31+
colorTo: 'to-gray-700',
32+
textColor: 'text-gray-700',
3333
frameworks: ['react'],
3434
scarfId: 'dd278e06-bb3f-420c-85c6-6e42d14d8f61',
3535
menu: [

src/routeTree.gen.ts

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ import { Route as rootRouteImport } from './routes/__root'
1212
import { Route as SponsorsEmbedRouteImport } from './routes/sponsors-embed'
1313
import { Route as PartnersEmbedRouteImport } from './routes/partners-embed'
1414
import { Route as MerchRouteImport } from './routes/merch'
15+
import { Route as LibrariesRouteImport } from './routes/libraries'
1516
import { Route as BuilderRouteImport } from './routes/builder'
1617
import { Route as AdminRouteRouteImport } from './routes/admin/route'
1718
import { Route as LibrariesRouteRouteImport } from './routes/_libraries/route'
@@ -78,6 +79,11 @@ const MerchRoute = MerchRouteImport.update({
7879
path: '/merch',
7980
getParentRoute: () => rootRouteImport,
8081
} as any)
82+
const LibrariesRoute = LibrariesRouteImport.update({
83+
id: '/libraries',
84+
path: '/libraries',
85+
getParentRoute: () => rootRouteImport,
86+
} as any)
8187
const BuilderRoute = BuilderRouteImport.update({
8288
id: '/builder',
8389
path: '/builder',
@@ -353,6 +359,7 @@ export interface FileRoutesByFullPath {
353359
'/$libraryId': typeof LibraryIdRouteRouteWithChildren
354360
'/admin': typeof AdminRouteRouteWithChildren
355361
'/builder': typeof BuilderRoute
362+
'/libraries': typeof LibrariesRoute
356363
'/merch': typeof MerchRoute
357364
'/partners-embed': typeof PartnersEmbedRoute
358365
'/sponsors-embed': typeof SponsorsEmbedRoute
@@ -405,6 +412,7 @@ export interface FileRoutesByFullPath {
405412
}
406413
export interface FileRoutesByTo {
407414
'/builder': typeof BuilderRoute
415+
'/libraries': typeof LibrariesRoute
408416
'/merch': typeof MerchRoute
409417
'/partners-embed': typeof PartnersEmbedRoute
410418
'/sponsors-embed': typeof SponsorsEmbedRoute
@@ -459,6 +467,7 @@ export interface FileRoutesById {
459467
'/_libraries': typeof LibrariesRouteRouteWithChildren
460468
'/admin': typeof AdminRouteRouteWithChildren
461469
'/builder': typeof BuilderRoute
470+
'/libraries': typeof LibrariesRoute
462471
'/merch': typeof MerchRoute
463472
'/partners-embed': typeof PartnersEmbedRoute
464473
'/sponsors-embed': typeof SponsorsEmbedRoute
@@ -515,6 +524,7 @@ export interface FileRouteTypes {
515524
| '/$libraryId'
516525
| '/admin'
517526
| '/builder'
527+
| '/libraries'
518528
| '/merch'
519529
| '/partners-embed'
520530
| '/sponsors-embed'
@@ -567,6 +577,7 @@ export interface FileRouteTypes {
567577
fileRoutesByTo: FileRoutesByTo
568578
to:
569579
| '/builder'
580+
| '/libraries'
570581
| '/merch'
571582
| '/partners-embed'
572583
| '/sponsors-embed'
@@ -620,6 +631,7 @@ export interface FileRouteTypes {
620631
| '/_libraries'
621632
| '/admin'
622633
| '/builder'
634+
| '/libraries'
623635
| '/merch'
624636
| '/partners-embed'
625637
| '/sponsors-embed'
@@ -676,6 +688,7 @@ export interface RootRouteChildren {
676688
LibrariesRouteRoute: typeof LibrariesRouteRouteWithChildren
677689
AdminRouteRoute: typeof AdminRouteRouteWithChildren
678690
BuilderRoute: typeof BuilderRoute
691+
LibrariesRoute: typeof LibrariesRoute
679692
MerchRoute: typeof MerchRoute
680693
PartnersEmbedRoute: typeof PartnersEmbedRoute
681694
SponsorsEmbedRoute: typeof SponsorsEmbedRoute
@@ -707,6 +720,13 @@ declare module '@tanstack/react-router' {
707720
preLoaderRoute: typeof MerchRouteImport
708721
parentRoute: typeof rootRouteImport
709722
}
723+
'/libraries': {
724+
id: '/libraries'
725+
path: '/libraries'
726+
fullPath: '/libraries'
727+
preLoaderRoute: typeof LibrariesRouteImport
728+
parentRoute: typeof rootRouteImport
729+
}
710730
'/builder': {
711731
id: '/builder'
712732
path: '/builder'
@@ -1216,6 +1236,7 @@ const rootRouteChildren: RootRouteChildren = {
12161236
LibrariesRouteRoute: LibrariesRouteRouteWithChildren,
12171237
AdminRouteRoute: AdminRouteRouteWithChildren,
12181238
BuilderRoute: BuilderRoute,
1239+
LibrariesRoute: LibrariesRoute,
12191240
MerchRoute: MerchRoute,
12201241
PartnersEmbedRoute: PartnersEmbedRoute,
12211242
SponsorsEmbedRoute: SponsorsEmbedRoute,

src/routes/_libraries/index.tsx

Lines changed: 26 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ import discordImage from '~/images/discord-logo-white.svg'
1010
import { useMutation } from '~/hooks/useMutation'
1111
import { librariesByGroup, librariesGroupNamesMap, Library } from '~/libraries'
1212
import bytesImage from '~/images/bytes.svg'
13-
import { partners } from '../../utils/partners'
1413
import { PartnersGrid } from '~/components/PartnersGrid'
1514
import OpenSourceStats from '~/components/OpenSourceStats'
1615
// Using public asset URLs for splash images
@@ -170,7 +169,7 @@ function Index() {
170169
to={library.to ?? '#'}
171170
params
172171
className={twMerge(
173-
`border-2 border-gray-200 dark:border-gray-800/50 rounded-xl shadow-md p-8 transition-all duration-300
172+
`border-2 border-gray-200 dark:border-gray-800/50 rounded-xl shadow-md p-8 transition-all duration-300 ease-out
174173
bg-white/90 dark:bg-black/40 backdrop-blur-sm`,
175174
'hover:shadow-2xl hover:shadow-current/20 hover:border-current/50 hover:-translate-y-1',
176175
'relative group',
@@ -179,10 +178,11 @@ function Index() {
179178
)}
180179
style={{
181180
zIndex: i,
181+
willChange: 'transform',
182182
}}
183183
>
184184
{/* Background content that will blur on hover */}
185-
<div className="z-0 relative group-hover:blur-[0.5px] transition-[filter] duration-200">
185+
<div className="z-0 relative group-hover:blur-[0.5px] transition-[filter] duration-300 ease-out">
186186
<div className="flex gap-2 justify-between items-center">
187187
<MatchRoute
188188
pending
@@ -228,7 +228,7 @@ function Index() {
228228
<div
229229
className="absolute inset-0 z-30 bg-white/95 dark:bg-black/95 p-6 rounded-xl
230230
backdrop-blur-sm flex flex-col justify-center opacity-0 group-hover:opacity-100
231-
transition-opacity duration-300"
231+
transition-opacity duration-300 ease-out pointer-events-none group-hover:pointer-events-auto"
232232
>
233233
<div
234234
className={`text-sm text-gray-800 dark:text-gray-200 leading-relaxed`}
@@ -290,6 +290,28 @@ function Index() {
290290
)}
291291
</div>
292292

293+
<div className="px-4 lg:max-w-(--breakpoint-lg) md:mx-auto mt-8 text-center">
294+
<Link
295+
to="/libraries"
296+
className="inline-flex items-center gap-2 px-6 py-3 rounded-xl border-2 border-gray-300 dark:border-gray-700 bg-white/90 dark:bg-black/40 backdrop-blur-sm shadow-md hover:shadow-xl hover:border-gray-400/70 dark:hover:border-gray-600/70 hover:-translate-y-1 transition-all duration-300 text-gray-900 dark:text-gray-100 font-medium"
297+
>
298+
<span>More Libraries</span>
299+
<svg
300+
className="w-4 h-4"
301+
fill="none"
302+
viewBox="0 0 24 24"
303+
stroke="currentColor"
304+
>
305+
<path
306+
strokeLinecap="round"
307+
strokeLinejoin="round"
308+
strokeWidth={2}
309+
d="M9 5l7 7-7 7"
310+
/>
311+
</svg>
312+
</Link>
313+
</div>
314+
293315
<div className="px-4 lg:max-w-(--breakpoint-lg) md:mx-auto">
294316
<h3 className={`text-4xl font-light mb-6`}>Partners</h3>
295317
<PartnersGrid />

src/routes/_libraries/partners.tsx

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -446,6 +446,34 @@ function RouteComp() {
446446
Get in Touch
447447
</a>
448448
</div>
449+
450+
<div className="text-center py-8 border-t border-gray-200 dark:border-gray-700">
451+
<a
452+
href="#total-support-share"
453+
className="anchor-heading *:scroll-my-20 *:lg:scroll-my-4"
454+
>
455+
<h2
456+
id="total-support-share"
457+
className="text-2xl font-semibold mb-4"
458+
>
459+
Total Support Share
460+
</h2>
461+
</a>
462+
<p className="text-gray-600 dark:text-gray-300 mb-6 max-w-xl mx-auto">
463+
This chart is a percentage-based visualization of the total support
464+
each partner has rendered to TanStack ever. It is updated every 6
465+
months.
466+
</p>
467+
<div className="flex justify-center">
468+
<img
469+
src="/images/total-support-share.png"
470+
alt="Total Support Share chart showing percentage-based contribution of partners to TanStack"
471+
className="rounded-lg shadow-lg"
472+
width={600}
473+
height={706}
474+
/>
475+
</div>
476+
</div>
449477
</div>
450478
<Footer />
451479
</div>

src/routes/_libraries/ranger.$version.index.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ function VersionIndex() {
4646
params: { libraryId: library.id, version },
4747
},
4848
label: 'Get Started',
49-
className: 'bg-pink-500 text-white',
49+
className: 'bg-slate-500 text-white',
5050
}}
5151
/>
5252

@@ -98,7 +98,7 @@ function VersionIndex() {
9898
params: { libraryId: library.id, version },
9999
}}
100100
label="Get Started!"
101-
className="bg-pink-500 text-white"
101+
className="bg-slate-500 text-white"
102102
/>
103103
<Footer />
104104
</div>

0 commit comments

Comments
 (0)