|
| 1 | +# John's Web Dev Blog |
| 2 | + |
| 3 | +A modern blog website built with Astro, TypeScript, and Tailwind CSS, featuring responsive design and custom typography scaling. |
| 4 | + |
| 5 | +## 🚀 Project Structure |
| 6 | + |
| 7 | +``` |
| 8 | +/ |
| 9 | +├── public/ |
| 10 | +│ └── favicon.svg |
| 11 | +├── src/ |
| 12 | +│ ├── components/ |
| 13 | +│ │ ├── Header.astro |
| 14 | +│ │ └── Footer.astro |
| 15 | +│ ├── layouts/ |
| 16 | +│ │ └── Layout.astro |
| 17 | +│ ├── pages/ |
| 18 | +│ │ ├── index.astro (Home page) |
| 19 | +│ │ ├── about.astro (About page) |
| 20 | +│ │ └── post.astro (Single post page) |
| 21 | +│ └── styles/ |
| 22 | +│ └── global.css |
| 23 | +├── astro.config.mjs |
| 24 | +├── postcss.config.js |
| 25 | +├── package.json |
| 26 | +└── tsconfig.json |
| 27 | +``` |
| 28 | + |
| 29 | +## 🛠️ Tech Stack |
| 30 | + |
| 31 | +- **Astro** - Static site generator |
| 32 | +- **TypeScript** - Type safety |
| 33 | +- **Tailwind CSS** - Utility-first CSS framework |
| 34 | +- **PostCSS** - CSS processing |
| 35 | +- **Vite** - Build tool |
| 36 | + |
| 37 | +## 🎨 Design Features |
| 38 | + |
| 39 | +### Typography Scale |
| 40 | + |
| 41 | +The project uses a responsive typography scale generated with Utopia: |
| 42 | + |
| 43 | +- Scales from 360px to 1440px viewport |
| 44 | +- Base sizes: 17px to 19px |
| 45 | +- Scale ratios: 1.125 to 1.2 |
| 46 | +- Custom CSS variables for all text sizes |
| 47 | + |
| 48 | +### Design System |
| 49 | + |
| 50 | +- **Colors**: Custom green palette (#EAF4F0, #318C66, #236348) |
| 51 | +- **Fonts**: Instrument Sans (headings) and Geist (body text) |
| 52 | +- **Components**: Header, Footer, Article cards, Sidebar widgets |
| 53 | +- **Layouts**: Responsive grid with sidebar |
| 54 | + |
| 55 | +### Pages |
| 56 | + |
| 57 | +1. **Home** - Blog listing with hero section, article grid, and sidebar |
| 58 | +2. **About** - Personal profile with experience and skills sections |
| 59 | +3. **Post** - Single article layout with content and sidebar |
| 60 | + |
| 61 | +## 🚀 Getting Started |
| 62 | + |
| 63 | +1. Install dependencies: |
| 64 | + |
| 65 | + ```bash |
| 66 | + npm install |
| 67 | + ``` |
| 68 | + |
| 69 | +2. Start the development server: |
| 70 | + |
| 71 | + ```bash |
| 72 | + npm run dev |
| 73 | + ``` |
| 74 | + |
| 75 | +3. Open [http://localhost:4321](http://localhost:4321) in your browser |
| 76 | + |
| 77 | +## 📦 Available Scripts |
| 78 | + |
| 79 | +- `npm run dev` - Start development server |
| 80 | +- `npm run build` - Build for production |
| 81 | +- `npm run preview` - Preview production build |
| 82 | +- `npm run astro` - Run Astro CLI commands |
| 83 | + |
| 84 | +## 🎯 Design Reference |
| 85 | + |
| 86 | +This project was built based on Figma designs: |
| 87 | + |
| 88 | +- **Home page**: Blog listing with article cards and sidebar |
| 89 | +- **Post page**: Single article layout with hero image |
| 90 | +- **About page**: Personal profile with experience timeline |
| 91 | + |
| 92 | +## 📱 Responsive Design |
| 93 | + |
| 94 | +The website is fully responsive and adapts to different screen sizes: |
| 95 | + |
| 96 | +- Mobile-first approach |
| 97 | +- Flexible grid layouts |
| 98 | +- Scalable typography |
| 99 | +- Touch-friendly interactions |
| 100 | + |
| 101 | +## 🔧 Configuration |
| 102 | + |
| 103 | +### Tailwind CSS |
| 104 | + |
| 105 | +Configured with custom colors and typography. See `astro.config.mjs` for Vite plugin setup. |
| 106 | + |
| 107 | +### PostCSS |
| 108 | + |
| 109 | +Basic configuration with Tailwind CSS and Autoprefixer. See `postcss.config.js`. |
| 110 | + |
| 111 | +### Typography |
| 112 | + |
| 113 | +Custom CSS variables defined in `src/styles/global.css` for fluid typography scaling. |
| 114 | + |
| 115 | +## 📄 License |
| 116 | + |
| 117 | +This project is for educational and demonstration purposes. |
0 commit comments