ArticleCard
A card component for displaying blog posts with hover effects and metadata.Props
Props
The article title
Brief description or excerpt of the article
Publication date of the article
Array of tag strings (displays first 3)
URL slug for the article
Optional cover image URL
Usage
Features
Visual Effects
Visual Effects
- Glow effect on hover that follows mouse cursor
- Theme-aware glow colors (gold for retro, white for dark, black for light)
- Cover image with scale-on-hover effect
- Smooth transitions for all interactions
- View transitions for page navigation
Content Display
Content Display
- Displays up to 3 tags with pill styling
- Formatted date in “Month Day, Year” format
- Line-clamped title (2 lines max)
- Line-clamped description (3 lines max)
- “Read more” link with arrow icon
Glow Effect Implementation
The component includes JavaScript for an interactive glow effect:NewsletterForm
A newsletter subscription form with validation and API integration.Props
Props
Unique identifier for the form
Whether to show the section title and description
Custom title text
Custom description text (defaults to standard newsletter pitch)
Form layout orientation
Usage
Features
Form Validation
Form Validation
- Email format validation
- Required field checking
- Client-side validation before submission
- Error messages with auto-hide (5 seconds)
- Success messages with auto-hide (5 seconds)
API Integration
API Integration
The form submits to Expected API response:
/api/newsletter with this structure:Loading States
Loading States
- Button disabled during submission
- Text changes to “Subscribing…”
- Returns to “Subscribe” after completion
- Form cleared on success
Styling Variations
The component adapts its styling based on layout: Horizontal:- Input and button side-by-side
- Rounded-left input, rounded-right button
- Compact on mobile, full-width on desktop
- Stacked input and button
- Both elements fully rounded
- Full-width button
- Better for narrow containers
ShareModal
A modal for sharing articles on social media with copy-to-clipboard functionality.Props
Props
Usage
Share Options
The modal includes 6 sharing platforms:- X (Twitter)
- Facebook
- LinkedIn
- WhatsApp
- Reddit
- Email
Opens Twitter intent with pre-filled text and URL
Features
Copy to Clipboard
Copy to Clipboard
- One-click URL copying
- Visual success feedback
- Button text changes to “Copied!”
- Auto-resets after 2 seconds
- Success message with checkmark icon
Modal Behavior
Modal Behavior
- Opens via trigger button
- Closes on backdrop click
- Closes on Escape key
- Closes via X button
- Smooth fade and scale animations
- Prevents body scroll when open
Platform-Specific Styling
Each share button has unique branding:ThemeSwitcher
A theme toggle button that cycles between light, dark, and retro themes.Usage
Features
Theme Cycling
Theme Cycling
The component cycles through three themes in order:
- Light - Default light theme with standard colors
- Dark - Dark mode with inverted colors
- Retro - Custom retro theme with vintage styling
Icon Transitions
Icon Transitions
Three icons rotate based on active theme:
- Sun icon - Visible in light mode
- Moon icon - Visible in dark mode
- Retro icon - Visible in retro mode
Theme Persistence
Themes are stored in localStorage:Theme Detection
On load, the component checks:- localStorage for saved theme
- System preference (
prefers-color-scheme) as fallback - Defaults to user’s OS setting if no preference saved
Integration with Astro
Reinitializes after page transitions:SocialLink
Renders a social media icon link with hover effects.Props
Props
Usage
Supported Platforms
The component maps platform names to icon components:github→ GitHubIcontwitter→ XIconlinkedin→ LinkedInIcondevto→ DevToIconemail→ EmailIcon
Features
- Opens in new tab (except email)
noopener noreferrerfor security- Scale animation on hover (1.1x)
- Rounded full circle design
- Border and shadow transitions
- 24x24px icon size
SectionHeader
A reusable section header with accent line and subtitle.Props
Props
Usage
Features
- Vertical accent bar (8px height, 4px width)
- Responsive typography (2xl to 3xl on md+)
- Indented subtitle (pl-7)
- Muted foreground for subtitle
- Bottom margin spacing (mb-16)
Other Shared Components
BackgroundArt
BackgroundArt
Decorative background gradients and patterns for visual interest. Used sparingly throughout the site for depth.
LanguageSwitcher
LanguageSwitcher
Language selection component for internationalization. Currently commented out in the navbar but ready for i18n implementation.Located at:
~/workspace/source/src/components/shared/LanguageSwitcher.astroNewsletterModal
NewsletterModal
ResourceItem
ResourceItem
Component for displaying resource links with metadata. Used on the resources page.Located at:
~/workspace/source/src/components/shared/ResourceItem.astroStickySocials
StickySocials