Files
dangrubb.net/ASTRO_CONVERSION_COMPLETE.md
dangrubbb 2cd6f70b99 Convert dangrubb.net to Astro framework
- Migrated main site, blog, CV, and music sections to Astro
- Component-based architecture with layouts
- JSON-based blog posts
- Static site generation
- Preserved original styling and functionality
2026-04-23 21:07:44 -04:00

7.5 KiB

dangrubb.net Astro Conversion - Complete

Project Status

Conversion: Complete
Build: Successful
Serving: Active on port 4321
URL: http://macmini.local:4321 (or http://localhost:4321 on the Mac Mini)


Completed Tasks

1. Astro Project Structure

  • Initialized clean Astro v6.1.9 project in the repo
  • Preserved /music/ directory completely untouched
  • Maintained .git/ for version control
  • Clean separation: source code in src/, output in dist/

2. Pages Converted

Landing Page (/)

  • File: src/pages/index.astro
  • Features:
    • Glitch bard animation (all 17 strips with proper CSS animations)
    • Site title and announcement link
    • Blog preview showing latest post (Status)
    • Bottom navigation with external links
    • Fully mobile-responsive with media queries

Blog Listing (/blog)

  • File: src/pages/blog/index.astro
  • Features:
    • Dynamic post rendering from src/data/posts.json
    • Currently displays 1 post (Status, dated 2026-02-28)
    • Hash-based navigation to individual posts
    • Responsive card layout with image, title, date, excerpt
    • "Read more" link functionality

CV Pages

  • Main CV (/cv): src/pages/cv/index.astro

    • Left sidebar: Home, Profile, Education, Skills
    • Right sidebar: Experience (3 roles), Certificates, References, Languages, Interests
    • Experience has link to "More Information"
  • Extended Experience (/cv/more-information): src/pages/cv/more-information.astro

    • Full 6 job history entries
    • Back link to main CV

404 Page

  • File: src/pages/404.astro
  • Styling: Dark green background with centered text

3. Components

  • GlitchBard (src/components/GlitchBard.astro): Reusable glitch animation component with 17 animated strips

4. Styling System

Global Styles

  • Base Layout (src/layouts/Base.astro): Dark theme, monospace font (#9d9aa4 text on #0d0a14 background)
  • Glitch Animations (src/styles/glitch.css): 6 keyframe animations (glitch-5 through glitch-10)
  • Bard Component (src/styles/bard.css): Strip animation and responsive sizing

Page-Specific Styles

  • Landing Page (src/pages/index.astro): Scoped styles for announcement, blog preview, navigation
  • Blog Page (src/pages/blog/index.astro): Card layouts, post styling
  • CV Pages (src/styles/cv.css): Comprehensive CV styling with responsive layout
    • Light/dark theme toggle support
    • PDF export scaling
    • Mobile-first responsive design (media queries at 320px, 768px, 968px)

5. Mobile Responsiveness

All pages include responsive design:

  • Mobile-first approach with breakpoints at:
    • 400px: Very small devices (adjust font sizes, bard aspect ratio)
    • 768px: Tablets (adjust padding, navigation)
    • 968px: Desktop (full 2-column CV layout)

Key responsive features:

  • .bard scales with font-size and aspect-ratio adjustments
  • Announcement, blog previews, navigation adapt to viewport
  • CV uses fixed nav on mobile, hidden on desktop (shows at bottom)
  • All text sizes scale appropriately

6. Data Management

  • Posts Data: src/data/posts.json (1 post currently)
    • Structure: id, title, date, excerpt, content, image, slug
    • Can be extended with more blog posts

7. Build & Deployment

# Build
npm run build
# Output: dist/ (88KB, containing all static HTML/CSS/JS)

# Serve
npx serve dist -l 4321
# Running: http://localhost:4321

Architecture

dangrubb.net/
├── src/
│   ├── pages/
│   │   ├── index.astro           # Landing page
│   │   ├── 404.astro             # 404 page
│   │   ├── blog/
│   │   │   └── index.astro       # Blog listing
│   │   └── cv/
│   │       ├── index.astro       # Main CV
│   │       └── more-information.astro  # Extended experience
│   ├── components/
│   │   └── GlitchBard.astro      # Glitch animation component
│   ├── layouts/
│   │   └── Base.astro            # Base HTML layout
│   ├── styles/
│   │   ├── glitch.css            # Glitch animations
│   │   ├── bard.css              # Bard styling
│   │   └── cv.css                # CV styling (9.7KB)
│   └── data/
│       └── posts.json            # Blog posts data
├── public/                        # Static assets (images, PDFs, JS libs)
│   ├── src/img/                  # Favicon, logos
│   ├── blog/src/img/             # Blog images
│   └── cv/
│       ├── assets/img/           # Profile, CV favicons
│       ├── assets/pdf/           # Resume PDFs
│       └── js/                   # html2pdf library
├── dist/                         # Built output (static HTML/CSS/JS)
├── astro.config.mjs              # Astro configuration
├── package.json                  # Dependencies & scripts
└── tsconfig.json                 # TypeScript config

Key Features Preserved

Dark Aesthetic: #0d0a14 background, #9d9aa4 text, cyan links (#6be1e9)
Glitch Animations: All 17 strip animations with varying durations (5-10 seconds)
Monospace Font: "Cascadia Code", "Source Code Pro", Menlo, Consolas fallbacks
Blog System: JSON-driven, easily extensible
CV Functionality:

  • Theme toggle (light/dark)
  • PDF export button (requires html2pdf.bundle.min.js in public/)
  • Responsive mobile navigation
  • Smooth scrolling with active link highlighting

Important Notes

Missing Assets

The following assets need to be restored from the original repo or re-created:

  • public/src/img/favicon.ico
  • public/src/img/DanGrubbLogoWhite.png
  • public/blog/src/img/CannotConnect.JPEG
  • public/cv/assets/img/perfil-example.jpg
  • public/cv/assets/img/favicon.ico
  • public/cv/assets/pdf/DanGrubbResume.pdf
  • public/cv/assets/pdf/ResumeCv.pdf
  • public/cv/js/html2pdf.bundle.min.js (for PDF generation)

Current Status: Site serves without errors, but images won't load and PDF export won't function until assets are restored.

Music Directory

Completely untouched at /music/

Next Steps

  1. Restore asset files to public/ directory
  2. Test all pages in browser
  3. Verify PDF export functionality
  4. Push to Gitea repo (https://pi.dangrubb.net/dangit/dangrubbb/dangrubb.net)

Testing Commands

# Build
npm run build

# Verify pages
curl -s http://localhost:4321/ | grep "dangrubb.net" | head -1
curl -s http://localhost:4321/blog/ | grep "blog-post" | head -1
curl -s http://localhost:4321/cv/ | grep "home__title" | head -1

# Check all routes return 200
curl -o /dev/null -w "%{http_code}" http://localhost:4321/
curl -o /dev/null -w "%{http_code}" http://localhost:4321/blog/
curl -o /dev/null -w "%{http_code}" http://localhost:4321/cv/
curl -o /dev/null -w "%{http_code}" http://localhost:4321/cv/more-information

Summary

Conversion Complete: Plain HTML/CSS/JS → Astro project with component architecture
Mobile Responsive: Properly designed for 320px to 1920px+ viewports
Dark Aesthetic Preserved: All color scheme, fonts, animations intact
Build Successful: npm run build completes with no errors
Serving: Running on http://macmini.local:4321
All Pages Live:

  • / - Landing page with glitch bard
  • /blog - Blog listing
  • /cv - Main CV
  • /cv/more-information - Extended experience
  • /404 - Not found page

Ready for asset restoration and live deployment!