Skip to content

Commit ecfcb1d

Browse files
committed
Add demo
1 parent b65ab69 commit ecfcb1d

54 files changed

Lines changed: 7298 additions & 0 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/deploy.yml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: Production deploy
2+
3+
on:
4+
repository_dispatch:
5+
types:
6+
- deploy-production
7+
8+
env:
9+
CONTENT_ISLAND_SECRET_TOKEN: ${{ secrets.CONTENT_ISLAND_SECRET_TOKEN }}
10+
11+
jobs:
12+
deploy:
13+
runs-on: ubuntu-latest
14+
environment:
15+
name: Production
16+
url: https://gentle-forest-01f461703.3.azurestaticapps.net
17+
18+
steps:
19+
- uses: actions/checkout@v4
20+
21+
- name: Build
22+
run: |
23+
npm ci
24+
npm run build
25+
26+
- name: Deploy
27+
uses: Azure/static-web-apps-deploy@v1
28+
with:
29+
azure_static_web_apps_api_token: ${{ secrets.AZURE_STATIC_WEB_APPS_API_TOKEN_GENTLE_FOREST_01F461703 }}
30+
repo_token: ${{ secrets.GITHUB_TOKEN }}
31+
action: 'upload'
32+
app_location: 'dist'
33+
output_location: 'dist'
34+
skip_app_build: true
35+
skip_api_build: true
36+
env:
37+
NODE_VERSION: 22.21.0

.gitignore

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# build output
2+
dist/
3+
# generated types
4+
.astro/
5+
6+
# dependencies
7+
node_modules/
8+
9+
# logs
10+
npm-debug.log*
11+
yarn-debug.log*
12+
yarn-error.log*
13+
pnpm-debug.log*
14+
15+
16+
# environment variables
17+
.env
18+
.env.production
19+
20+
# macOS-specific files
21+
.DS_Store
22+
23+
# jetbrains setting folder
24+
.idea/

.prettierrc

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
{
2+
"printWidth": 120,
3+
"singleQuote": true,
4+
"useTabs": false,
5+
"tabWidth": 2,
6+
"semi": true,
7+
"bracketSpacing": true,
8+
"trailingComma": "es5",
9+
"arrowParens": "avoid",
10+
"endOfLine": "lf",
11+
"plugins": ["prettier-plugin-astro", "prettier-plugin-tailwindcss"],
12+
"overrides": [
13+
{
14+
"files": "*.astro",
15+
"options": {
16+
"parser": "astro"
17+
}
18+
}
19+
]
20+
}

.vscode/extensions.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"recommendations": ["astro-build.astro-vscode"],
3+
"unwantedRecommendations": []
4+
}

.vscode/launch.json

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"version": "0.2.0",
3+
"configurations": [
4+
{
5+
"command": "./node_modules/.bin/astro dev",
6+
"name": "Development server",
7+
"request": "launch",
8+
"type": "node-terminal"
9+
}
10+
]
11+
}

README.md

Lines changed: 117 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,117 @@
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.

astro.config.mjs

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
import tailwindcss from '@tailwindcss/vite';
2+
import { defineConfig, envField } from 'astro/config';
3+
4+
// https://astro.build/config
5+
export default defineConfig({
6+
vite: {
7+
plugins: [tailwindcss()],
8+
},
9+
env: {
10+
schema: {
11+
CONTENT_ISLAND_SECRET_TOKEN: envField.string({
12+
context: 'server',
13+
access: 'secret',
14+
optional: false,
15+
default: 'INFORM_VALID_TOKEN',
16+
}),
17+
},
18+
},
19+
});

0 commit comments

Comments
 (0)