Skip to content

Commit e11f602

Browse files
calderbuildclaude
andcommitted
全面优化博客UI/UX:现代化设计、流畅动画、完美响应式
🎨 设计优化: - 现代化导航栏,带图标和渐变效果 - 文章头部渐变背景和动画效果 - 优化文章排版和视觉层次 - 美化侧边栏和标签云 - 增强代码块和引用块样式 ⚡ 交互增强: - 添加平滑滚动和过渡动画 - 实现滚动显示动画 - 优化搜索功能和目录导航 - 添加悬停效果和微交互 📱 响应式设计: - 完美适配移动端、平板和桌面 - 优化移动端触摸体验 - 提升移动端性能 🔧 技术改进: - 更新 CLAUDE.md 开发文档 - 优化 Less 样式结构 - 增强JavaScript交互功能 - 改进 PWA 支持 🚀 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
1 parent af775aa commit e11f602

Some content is hidden

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

68 files changed

+27395
-26008
lines changed

.github/workflows/jekyll.yml

Lines changed: 65 additions & 65 deletions
Original file line numberDiff line numberDiff line change
@@ -1,65 +1,65 @@
1-
# This workflow uses actions that are not certified by GitHub.
2-
# They are provided by a third-party and are governed by
3-
# separate terms of service, privacy policy, and support
4-
# documentation.
5-
6-
# Sample workflow for building and deploying a Jekyll site to GitHub Pages
7-
name: Deploy Jekyll site to Pages
8-
9-
on:
10-
# Runs on pushes targeting the default branch
11-
push:
12-
branches: ["master"]
13-
14-
# Allows you to run this workflow manually from the Actions tab
15-
workflow_dispatch:
16-
17-
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
18-
permissions:
19-
contents: read
20-
pages: write
21-
id-token: write
22-
23-
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
24-
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
25-
concurrency:
26-
group: "pages"
27-
cancel-in-progress: false
28-
29-
jobs:
30-
# Build job
31-
build:
32-
runs-on: ubuntu-latest
33-
steps:
34-
- name: Checkout
35-
uses: actions/checkout@v4
36-
- name: Setup Ruby
37-
# https://github.com/ruby/setup-ruby/releases/tag/v1.207.0
38-
uses: ruby/setup-ruby@4a9ddd6f338a97768b8006bf671dfbad383215f4
39-
with:
40-
ruby-version: '3.1' # Not needed with a .ruby-version file
41-
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
42-
cache-version: 0 # Increment this number if you need to re-download cached gems
43-
- name: Setup Pages
44-
id: pages
45-
uses: actions/configure-pages@v5
46-
- name: Build with Jekyll
47-
# Outputs to the './_site' directory by default
48-
run: bundle exec jekyll build --baseurl "${{ steps.pages.outputs.base_path }}"
49-
env:
50-
JEKYLL_ENV: production
51-
- name: Upload artifact
52-
# Automatically uploads an artifact from the './_site' directory by default
53-
uses: actions/upload-pages-artifact@v3
54-
55-
# Deployment job
56-
deploy:
57-
environment:
58-
name: github-pages
59-
url: ${{ steps.deployment.outputs.page_url }}
60-
runs-on: ubuntu-latest
61-
needs: build
62-
steps:
63-
- name: Deploy to GitHub Pages
64-
id: deployment
65-
uses: actions/deploy-pages@v4
1+
# This workflow uses actions that are not certified by GitHub.
2+
# They are provided by a third-party and are governed by
3+
# separate terms of service, privacy policy, and support
4+
# documentation.
5+
6+
# Sample workflow for building and deploying a Jekyll site to GitHub Pages
7+
name: Deploy Jekyll site to Pages
8+
9+
on:
10+
# Runs on pushes targeting the default branch
11+
push:
12+
branches: ["master"]
13+
14+
# Allows you to run this workflow manually from the Actions tab
15+
workflow_dispatch:
16+
17+
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
18+
permissions:
19+
contents: read
20+
pages: write
21+
id-token: write
22+
23+
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
24+
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
25+
concurrency:
26+
group: "pages"
27+
cancel-in-progress: false
28+
29+
jobs:
30+
# Build job
31+
build:
32+
runs-on: ubuntu-latest
33+
steps:
34+
- name: Checkout
35+
uses: actions/checkout@v4
36+
- name: Setup Ruby
37+
# https://github.com/ruby/setup-ruby/releases/tag/v1.207.0
38+
uses: ruby/setup-ruby@4a9ddd6f338a97768b8006bf671dfbad383215f4
39+
with:
40+
ruby-version: '3.1' # Not needed with a .ruby-version file
41+
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
42+
cache-version: 0 # Increment this number if you need to re-download cached gems
43+
- name: Setup Pages
44+
id: pages
45+
uses: actions/configure-pages@v5
46+
- name: Build with Jekyll
47+
# Outputs to the './_site' directory by default
48+
run: bundle exec jekyll build --baseurl "${{ steps.pages.outputs.base_path }}"
49+
env:
50+
JEKYLL_ENV: production
51+
- name: Upload artifact
52+
# Automatically uploads an artifact from the './_site' directory by default
53+
uses: actions/upload-pages-artifact@v3
54+
55+
# Deployment job
56+
deploy:
57+
environment:
58+
name: github-pages
59+
url: ${{ steps.deployment.outputs.page_url }}
60+
runs-on: ubuntu-latest
61+
needs: build
62+
steps:
63+
- name: Deploy to GitHub Pages
64+
id: deployment
65+
uses: actions/deploy-pages@v4

.gitignore

Lines changed: 21 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,21 @@
1-
_site
2-
_posts/_draft
3-
_posts/_archive
4-
_archive
5-
node_modules
6-
.vscode
7-
*.log
8-
*.lock
9-
*.sh
10-
.DS_Store
11-
.jekyll-cache
12-
*/.DS_Store
13-
*/*/.DS_Store
1+
_site
2+
_posts/_draft
3+
_posts/_archive
4+
_archive
5+
node_modules
6+
.vscode
7+
*.log
8+
*.lock
9+
*.sh
10+
.DS_Store
11+
.jekyll-cache
12+
.jekyll-metadata
13+
.sass-cache
14+
*.tmp
15+
*.temp
16+
Thumbs.db
17+
*.bak
18+
*.swp
19+
*~
20+
preview.html
21+
start.sh

404.html

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
1-
---
2-
layout: default
3-
title: 404
4-
hide-in-nav: true
5-
description: "你来到了没有知识的荒原 :("
6-
header-img: "img/404-bg.jpg"
7-
permalink: /404.html
8-
---
9-
10-
11-
<!-- Page Header -->
12-
{% include intro-header.html type="page" short='true' %}
13-
14-
<script>
15-
document.body.classList.add('page-fullscreen');
16-
</script>
1+
---
2+
layout: default
3+
title: 404
4+
hide-in-nav: true
5+
description: "你来到了没有知识的荒原 :("
6+
header-img: "img/404-bg.jpg"
7+
permalink: /404.html
8+
---
9+
10+
11+
<!-- Page Header -->
12+
{% include intro-header.html type="page" short='true' %}
13+
14+
<script>
15+
document.body.classList.add('page-fullscreen');
16+
</script>

CLAUDE.md

Lines changed: 105 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,105 @@
1+
# CLAUDE.md
2+
3+
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
4+
5+
## Project Overview
6+
7+
This is Jason's personal technical blog built with Jekyll, a static site generator. The blog focuses on AI development, Agent applications, full-stack development, and hackathon projects. The site features a modern, responsive design with PWA support and tech-enhanced styling.
8+
9+
## Development Commands
10+
11+
### Prerequisites
12+
- Ruby 2.7+
13+
- Node.js 14+
14+
- Git
15+
16+
### Local Development
17+
```bash
18+
# Install Ruby dependencies
19+
bundle install
20+
21+
# Install Node.js dependencies (if package.json exists)
22+
npm install --legacy-peer-deps
23+
24+
# Build assets (uses Less preprocessing)
25+
# Note: The project uses Less files in the /less directory that compile to /css
26+
# Main Less file: less/jason-blog.less
27+
28+
# Start local development server
29+
bundle exec jekyll serve
30+
31+
# Build for production
32+
bundle exec jekyll build
33+
34+
# Clean generated files
35+
bundle exec jekyll clean
36+
```
37+
38+
### Deployment
39+
The site uses GitHub Actions for automatic deployment to GitHub Pages. The workflow is in `.github/workflows/jekyll.yml`.
40+
41+
## Architecture
42+
43+
### Core Structure
44+
- **Jekyll**: Static site generator using Liquid templating
45+
- **Bootstrap 3**: Responsive CSS framework (customized)
46+
- **jQuery**: JavaScript library for interactions
47+
- **Less**: CSS preprocessor for maintainable styles
48+
49+
### Key Directories
50+
- `_posts/`: Blog posts in Markdown format (YYYY-MM-DD-title.markdown)
51+
- `_includes/`: Reusable components (header, footer, navigation, etc.)
52+
- `_layouts/`: Page templates (default, post, page, keynote)
53+
- `less/`: Source Less files that compile to CSS
54+
- `js/`: JavaScript files (custom scripts in jason-blog.js)
55+
- `css/`: Compiled CSS files (do not edit directly)
56+
57+
### Styling Architecture
58+
- **Main stylesheet**: `less/jason-blog.less` imports all other Less files
59+
- **Tech enhancements**: `less/tech-enhancements.less` contains modern UI components
60+
- **Variables**: `less/variables.less` defines color schemes and design tokens
61+
- **Components**: Modular Less files for specific features (sidebar, search, etc.)
62+
63+
### Frontend Features
64+
- Responsive navigation with scroll effects
65+
- Search functionality using Simple Jekyll Search
66+
- Syntax highlighting with Rouge
67+
- MathJax support for mathematical formulas
68+
- PWA (Progressive Web App) capabilities
69+
- Tech-themed visual enhancements with gradients and animations
70+
71+
### Content Structure
72+
Posts use Front Matter for metadata:
73+
```yaml
74+
---
75+
title: Post Title
76+
subtitle: Optional subtitle
77+
date: YYYY-MM-DD HH:MM:SS
78+
author: Jason
79+
header-img: img/path/to/image.jpg
80+
tags: [tag1, tag2, tag3]
81+
catalog: true
82+
---
83+
```
84+
85+
## Key Configuration
86+
87+
### Jekyll Configuration (_config.yml)
88+
- Site settings, SEO metadata
89+
- Social media links
90+
- Pagination (10 posts per page)
91+
- Markdown processor (Kramdown with GitHub Flavored Markdown)
92+
- Syntax highlighting (Rouge)
93+
94+
### PWA Configuration
95+
- Manifest: `pwa/manifest.json`
96+
- Service Worker: `sw.js`
97+
- Registration: `js/sw-registration.js`
98+
99+
## Important Notes
100+
101+
- All Less files in `/less` directory need to be compiled to `/css` (currently using manual compilation)
102+
- The blog supports both English and Chinese content
103+
- Images should be placed in `/img` directory
104+
- Custom JavaScript is minimal and focused on essential interactions
105+
- The design emphasizes a tech/modern aesthetic with gradient backgrounds and smooth animations

CNAME

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
jasonrobert.me
1+
jasonrobert.me

Gemfile

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
source 'https://rubygems.org'
2-
gem 'jekyll-paginate'
3-
4-
gem "jekyll", "~> 4.0"
5-
gem "rake"
6-
7-
gem "webrick", "~> 1.7"
1+
source 'https://rubygems.org'
2+
gem 'jekyll-paginate'
3+
4+
gem "jekyll", "~> 4.0"
5+
gem "rake"
6+
7+
gem "webrick", "~> 1.7"

0 commit comments

Comments
 (0)