Skip to content

Commit 720ee85

Browse files
committed
Refactor software page to use SoftwareTabs component; update software data to remove featured status and clean up team member entries.
1 parent 7394592 commit 720ee85

File tree

6 files changed

+193
-300
lines changed

6 files changed

+193
-300
lines changed

CLAUDE.md

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
# CLAUDE.md
2+
3+
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
4+
5+
## Commands
6+
7+
### Development
8+
- `pnpm dev` - Start development server (http://localhost:4321)
9+
- `pnpm build` - Build for production
10+
- `pnpm preview` - Preview production build
11+
12+
### Installation
13+
- `pnpm install` - Install dependencies (Node.js 18+ required)
14+
15+
## Architecture
16+
17+
This is an Astro-based academic research group website with React components for interactivity.
18+
19+
### Key Technologies
20+
- **Astro 5.6.1** - Static site generator with partial hydration
21+
- **React 19** - Interactive components (client:load directive)
22+
- **Tailwind CSS v4** - Styling with shadcn/ui components
23+
- **TypeScript** - Full type safety
24+
- **MDX** - Rich content with components
25+
26+
### Content Architecture
27+
Content is managed through multiple sources:
28+
1. **Static JSON files** in `src/content/`:
29+
- `team/team.json` - Team members (current & alumni)
30+
- `software/software.json` - Software tools & databases
31+
- `partners/partners.json` - Collaborators
32+
33+
2. **Dynamic loaders** in `src/content/loaders/`:
34+
- `pmc.ts` - Fetches publications from PubMed
35+
- `funding.ts` - Fetches funding data
36+
- `github.ts` - Fetches GitHub team data
37+
38+
3. **MDX files** in `src/content/home_page/` for rich homepage content
39+
40+
### Page Structure
41+
- **File-based routing** in `src/pages/`
42+
- **Dynamic routes**: `/person/[slug]` for team member profiles
43+
- **Single layout** (`src/layouts/Layout.astro`) handles navigation, dark mode, and SEO
44+
45+
### Component Strategy
46+
- **Astro components** (`.astro`) for static content
47+
- **React components** (`.tsx`) for interactivity (tabs, dialogs, mobile nav)
48+
- **UI components** from shadcn/ui in `src/components/ui/`
49+
50+
### Environment Variables
51+
- `GH_TOKEN` - Required for GitHub API loader (team data)
52+
53+
### Deployment
54+
- Site URL: `https://saezlab.org`
55+
- Static output to `dist/` directory
56+
- GitHub Pages deployment via Actions

src/components/SoftwareTabs.tsx

Lines changed: 94 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,94 @@
1+
import { Badge } from '@/components/ui/badge';
2+
import { Tabs, TabsContent, TabsList, TabsTrigger } from '@/components/ui/tabs';
3+
import type { Software } from '@/types/types';
4+
import SoftwareCard from './SoftwareCard';
5+
6+
interface SoftwareTabsProps {
7+
software: Software[];
8+
}
9+
10+
export default function SoftwareTabs({ software }: SoftwareTabsProps) {
11+
// Filter software by category
12+
const featuredSoftware = software.filter(item => item.categories.featured);
13+
const tools = software.filter(item => item.categories.tool);
14+
const databases = software.filter(item => item.categories.database);
15+
16+
return (
17+
<Tabs defaultValue="featured" className="w-full">
18+
<TabsList className="grid w-full grid-cols-3 mb-8">
19+
<TabsTrigger value="featured" className="flex items-center gap-2">
20+
Featured
21+
<Badge variant="secondary" className="ml-1">
22+
{featuredSoftware.length}
23+
</Badge>
24+
</TabsTrigger>
25+
<TabsTrigger value="tools" className="flex items-center gap-2">
26+
Tools
27+
<Badge variant="secondary" className="ml-1">
28+
{tools.length}
29+
</Badge>
30+
</TabsTrigger>
31+
<TabsTrigger value="databases" className="flex items-center gap-2">
32+
Databases
33+
<Badge variant="secondary" className="ml-1">
34+
{databases.length}
35+
</Badge>
36+
</TabsTrigger>
37+
</TabsList>
38+
39+
<TabsContent value="featured">
40+
<div className="grid gap-6 md:grid-cols-2">
41+
{featuredSoftware.map((item) => (
42+
<SoftwareCard
43+
key={item.name}
44+
name={item.name}
45+
short_description={item.short_description}
46+
long_description={item.long_description}
47+
code_repository={item.code_repository}
48+
website={item.website}
49+
publication={item.publication}
50+
image={item.image}
51+
categories={item.categories}
52+
/>
53+
))}
54+
</div>
55+
</TabsContent>
56+
57+
<TabsContent value="tools">
58+
<div className="grid gap-6 md:grid-cols-2">
59+
{tools.map((item) => (
60+
<SoftwareCard
61+
key={item.name}
62+
name={item.name}
63+
short_description={item.short_description}
64+
long_description={item.long_description}
65+
code_repository={item.code_repository}
66+
website={item.website}
67+
publication={item.publication}
68+
image={item.image}
69+
categories={item.categories}
70+
/>
71+
))}
72+
</div>
73+
</TabsContent>
74+
75+
<TabsContent value="databases">
76+
<div className="grid gap-6 md:grid-cols-2">
77+
{databases.map((item) => (
78+
<SoftwareCard
79+
key={item.name}
80+
name={item.name}
81+
short_description={item.short_description}
82+
long_description={item.long_description}
83+
code_repository={item.code_repository}
84+
website={item.website}
85+
publication={item.publication}
86+
image={item.image}
87+
categories={item.categories}
88+
/>
89+
))}
90+
</div>
91+
</TabsContent>
92+
</Tabs>
93+
);
94+
}

src/content/software/software.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
"publication": "https://academic.oup.com/bioinformatics/advance-article/doi/10.1093/bioinformatics/btaa561/5855133",
3737
"image": "cellnopt.png",
3838
"categories": {
39-
"featured": true,
39+
"featured": false,
4040
"tool": true,
4141
"database": false
4242
}

0 commit comments

Comments
 (0)