Skip to content

Commit 9b92023

Browse files
committed
Add event, gallery, and league data; implement event detail and events pages
- Created eventsData.js with event details including workshops, hackathons, and study groups. - Developed galleryData.js for event images organized by categories. - Introduced leaguesData.js for various learning leagues with descriptions and topics. - Implemented EventDetailPage.jsx to display event details, images, and a modal for image viewing. - Created EventsPage.jsx to list all events with a modern card layout and loading state. - Enhanced user experience with loading indicators and error handling for data fetching.
1 parent e873af9 commit 9b92023

20 files changed

+1766
-39
lines changed

docs/components/gallery-system.md

Lines changed: 214 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,214 @@
1+
# Minimal Gallery System Documentation
2+
3+
## Overview
4+
The OpenLearn Gallery is redesigned with Apple's minimal design philosophy, featuring ultra-clean typography, generous white space, and seamless interactions. The gallery emphasizes content over decoration with a Pinterest-style masonry layout.
5+
6+
## Design Philosophy
7+
8+
### **Apple Minimal Design**
9+
- **Pure White Background**: Clean, distraction-free viewing
10+
- **Generous Spacing**: Breathing room between all elements
11+
- **Subtle Interactions**: Gentle hover effects and smooth transitions
12+
- **Content First**: Images and typography are the heroes
13+
- **Rounded Corners**: Consistent 24px radius for modern feel
14+
15+
### **Key Features**
16+
- **Hero Section**: Large typography with minimal description
17+
- **Category Filters**: Simple pill-shaped buttons with smooth transitions
18+
- **Masonry Layout**: Pinterest-style responsive grid
19+
- **Full-Screen Modal**: Clean image viewer with white background
20+
- **Smooth Animations**: 60fps performance with easing curves
21+
22+
### 🎨 **Visual Hierarchy**
23+
- **Typography**: Ultra-large headings (text-8xl) with light weight descriptions
24+
- **Colors**: Pure whites, soft grays, and deep black for contrast
25+
- **Spacing**: 24px+ margins and padding throughout
26+
- **Shadows**: Subtle depth with soft shadow effects
27+
28+
## Technical Implementation
29+
30+
### Data Structure (Simplified)
31+
```javascript
32+
// Minimal Gallery Data Schema
33+
{
34+
events: [
35+
{
36+
id: 'unique-event-id',
37+
title: 'Event Name',
38+
category: 'Workshop|Hackathon|Study Group|Guest Lecture|Showcase',
39+
date: 'YYYY-MM-DD',
40+
description: 'Event description',
41+
images: [
42+
{
43+
id: 'unique-image-id',
44+
url: 'image-url',
45+
alt: 'accessibility description',
46+
caption: 'image caption'
47+
}
48+
],
49+
featured: boolean,
50+
location: 'Event location'
51+
}
52+
],
53+
categories: [
54+
{ id: 'category-id', name: 'Category Name' }
55+
]
56+
}
57+
```
58+
59+
### Key Components
60+
61+
#### `GalleryHero`
62+
- **Minimal Header**: Large typography (text-8xl) with single subtitle
63+
- **No Background Patterns**: Pure white background
64+
- **Centered Layout**: Maximum focus on typography
65+
- **Smooth Entry Animation**: Gentle fade-in with custom easing
66+
67+
#### `CategoryFilter`
68+
- **Pill Buttons**: Rounded-full design with subtle shadows
69+
- **Active State**: Dark background with scale animation
70+
- **Hover Effects**: Gentle scaling and background changes
71+
- **Simplified Categories**: Reduced from 7 to 6 categories
72+
73+
#### `EventCard`
74+
- **Pinterest Layout**: CSS columns for masonry effect
75+
- **Large Event Headers**: 4xl typography with generous spacing
76+
- **Minimal Metadata**: Date and location with subtle icons
77+
- **Image Grid**: Natural aspect ratios with hover effects
78+
79+
#### `ImageModal`
80+
- **White Background**: Clean viewing environment
81+
- **Rounded Corners**: 3xl border radius for modern feel
82+
- **Subtle Close Button**: Gray background with hover states
83+
- **Caption Display**: Light typography below image
84+
85+
### Animation Details
86+
- **Custom Easing**: `[0.16, 1, 0.3, 1]` Apple-style bezier curves
87+
- **Stagger Timing**: 200ms delays for natural flow
88+
- **Scale Effects**: Subtle 1.02 scale on hover
89+
- **Duration**: 400-800ms for smooth interactions
90+
91+
### Layout System
92+
- **Masonry Grid**: CSS columns for Pinterest-style layout
93+
- 1 column on mobile
94+
- 2 columns on tablet
95+
- 3 columns on desktop
96+
- 4 columns on large screens
97+
- **Container Width**: max-w-7xl with 6px padding
98+
- **Image Spacing**: 6px gaps with break-inside-avoid
99+
100+
### Performance Optimizations
101+
- **Lazy Loading**: Images load as needed
102+
- **Optimized Images**: Unsplash URLs with quality parameters
103+
- **Efficient Animations**: GPU-accelerated transforms
104+
- **Minimal DOM**: Reduced component complexity
105+
106+
## Removed Features (Minimal Approach)
107+
- ❌ Statistics dashboard
108+
- ❌ Featured badges
109+
- ❌ Background patterns
110+
- ❌ Color-coded categories
111+
- ❌ Complex gradients
112+
- ❌ Orientation events category
113+
114+
## Current Event Categories
115+
1. **All** - Shows all events
116+
2. **Workshops** - Educational sessions
117+
3. **Hackathons** - Coding competitions
118+
4. **Study Groups** - Collaborative learning
119+
5. **Talks** - Guest lectures (simplified name)
120+
6. **Showcases** - Project demonstrations
121+
122+
## Color Palette (Minimal)
123+
```css
124+
/* Pure Minimal Colors */
125+
--background: #ffffff;
126+
--text-primary: #111827; /* gray-900 */
127+
--text-secondary: #6b7280; /* gray-500 */
128+
--text-tertiary: #9ca3af; /* gray-400 */
129+
--surface: #f9fafb; /* gray-50 */
130+
--surface-hover: #f3f4f6; /* gray-100 */
131+
--border: #e5e7eb; /* gray-200 */
132+
```
133+
134+
## Typography Scale
135+
```css
136+
/* Large Typography Hierarchy */
137+
h1: text-8xl (128px) font-bold /* Hero title */
138+
h2: text-4xl (36px) font-bold /* Event titles */
139+
body: text-lg (18px) font-light /* Descriptions */
140+
small: text-sm (14px) font-medium /* Metadata */
141+
```
142+
143+
## Responsive Breakpoints
144+
- **Mobile**: < 640px (1 column masonry)
145+
- **Tablet**: 640px-1024px (2 columns)
146+
- **Desktop**: 1024px-1280px (3 columns)
147+
- **Large**: > 1280px (4 columns)
148+
149+
## Accessibility Features
150+
- **High Contrast**: WCAG AA compliant color ratios
151+
- **Large Touch Targets**: 44px minimum button sizes
152+
- **Keyboard Navigation**: Full modal keyboard support
153+
- **Screen Reader**: Comprehensive alt text and ARIA labels
154+
- **Focus Management**: Proper focus trapping in modal
155+
156+
## Browser Support
157+
- Chrome 90+ ✅
158+
- Firefox 88+ ✅
159+
- Safari 14+ ✅
160+
- Edge 90+ ✅
161+
- iOS Safari 14+ ✅
162+
163+
## File Structure
164+
```
165+
src/
166+
├── data/
167+
│ └── galleryData.js # Simplified data structure
168+
├── pages/
169+
│ └── GalleryPage.jsx # Minimal gallery component
170+
└── docs/
171+
└── components/
172+
└── gallery-system.md # This documentation
173+
```
174+
175+
## Adding New Events
176+
177+
### 1. Add to Gallery Data
178+
```javascript
179+
{
180+
id: 'new-event-2024',
181+
title: 'New Workshop',
182+
category: 'Workshop',
183+
date: '2024-12-01',
184+
description: 'Brief description of the event...',
185+
images: [
186+
{
187+
id: 'img-1',
188+
url: 'https://images.unsplash.com/photo-id?w=800&h=600&fit=crop&q=80',
189+
alt: 'Descriptive alt text',
190+
caption: 'Image caption'
191+
}
192+
],
193+
featured: false,
194+
location: 'Event venue'
195+
}
196+
```
197+
198+
### 2. Image Guidelines
199+
- **Source**: High-quality Unsplash images preferred
200+
- **Dimensions**: Natural aspect ratios (no fixed sizes)
201+
- **Quality**: &q=80 parameter for optimized loading
202+
- **Size**: &w=800&h=600 for consistent quality
203+
- **Alt Text**: Descriptive accessibility text
204+
- **Captions**: Brief, meaningful descriptions
205+
206+
## Future Minimal Enhancements
207+
- [ ] Infinite scroll pagination
208+
- [ ] Image lazy loading improvements
209+
- [ ] Advanced image compression
210+
- [ ] Gesture navigation in modal
211+
- [ ] Search functionality
212+
- [ ] Admin upload interface
213+
214+
The gallery now embodies true Apple minimalism with focus on content, generous white space, and seamless user experience.

public/leagues/cp-cover.jpg

31.3 KB
Loading

public/leagues/finance-cover.jpg

Lines changed: 1 addition & 0 deletions
Loading

public/leagues/iot-cover.jpg

Lines changed: 1 addition & 0 deletions
Loading

public/leagues/ml-cover.jpg

27.8 KB
Loading

public/leagues/quantum-cover.jpg

37.8 KB
Loading
24 KB
Loading

src/App.jsx

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@ import LandingPage from './pages/LandingPage'
44
import AboutPage from './pages/AboutPage'
55
import CohortsPage from './pages/CohortsPage'
66
import CommunityPage from './pages/CommunityPage'
7-
import GalleryPage from './pages/GalleryPage'
7+
import EventsPage from './pages/EventsPage'
8+
import EventDetailPage from './pages/EventDetailPage'
89
import SignInPage from './pages/SignInPage'
910
import SignUpPage from './pages/SignUpPage'
1011
import DashboardPage from './pages/DashboardPage'
@@ -42,7 +43,10 @@ const App = () => {
4243
<Route path="/about" element={<AboutPage />} />
4344
<Route path="/cohorts" element={<CohortsPage />} />
4445
<Route path="/community" element={<CommunityPage />} />
45-
<Route path="/gallery" element={<GalleryPage />} />
46+
<Route path="/events" element={<EventsPage />} />
47+
<Route path="/events/:eventId" element={<EventDetailPage />} />
48+
{/* Backward compatibility - redirect old gallery route */}
49+
<Route path="/gallery" element={<Navigate to="/events" replace />} />
4650
<Route path="/signin" element={<SignInPage />} />
4751
<Route path="/signup" element={<SignUpPage />} />
4852
<Route path="/privacy" element={<PrivacyPolicyPage />} />

src/components/common/Navbar.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ const Navbar = () => {
4141
{ name: 'About', href: '/about' },
4242
{ name: 'Cohorts', href: '/cohorts' },
4343
{ name: 'Community', href: '/community' },
44-
{ name: 'Gallery', href: '/gallery' },
44+
{ name: 'Events', href: '/events' },
4545
];
4646

4747
const isActivePath = (path) => {

0 commit comments

Comments
 (0)