Improved Taxonomy UI - Hướng dẫn sử dụng

Tổng quan

Tôi đã cải tiến hoàn toàn UI cho trang Categories và Tags của blog với các tính năng sau:

🎨 Tính năng mới

1. Modern Card-based Design

2. Multiple View Modes

3. Advanced Search & Filtering

4. Intelligent Pagination

5. Enhanced Tag Cloud

6. Modal System

7. Performance Optimizations

🎮 Keyboard Shortcuts

📱 Responsive Design

🚀 Files đã thay đổi

Layouts:

Pages:

Assets:

Config:

🎯 Cách sử dụng

  1. Trang Categories (/categories/)
    • Hiển thị tất cả categories dạng grid
    • Có thể search và sort
    • Chuyển đổi giữa Grid/List view
    • Click vào category để xem details
  2. Trang Tags (/tags/)
    • Tag Cloud view mặc định
    • Có thể chuyển sang Grid/List view
    • Popular tags section
    • Interactive tag cloud với size scaling

💡 Best Practices

  1. Performance:
    • Pagination kicks in khi có >12 categories hoặc >15 tags
    • Search được debounced 300ms
    • Cards được lazy loaded
  2. UX:
    • Clear visual hierarchy
    • Consistent color scheme
    • Accessible keyboard navigation
    • Mobile-optimized touch targets
  3. SEO:
    • Proper heading structure
    • Semantic HTML
    • Fast loading times

🔧 Customization

Colors:

Chỉnh sửa trong improved-taxonomy.scss:

// Primary colors
$primary-color: #3b82f6;
$secondary-color: #8b5cf6;
$accent-color: #06b6d4;

Layout:

// Grid settings
$cards-per-row: 3;
$card-gap: 1.5rem;
$mobile-breakpoint: 768px;

Performance:

// Pagination settings
this.itemsPerPage = type === 'tags' ? 15 : 12;

// Search debounce
timeout = setTimeout(() => {
  // Search logic
}, 300);

🐛 Troubleshooting

  1. JavaScript không hoạt động:
    • Kiểm tra console có lỗi không
    • Đảm bảo improved-taxonomy.js được load
  2. CSS không apply:
    • Build lại site: bundle exec jekyll build
    • Check main.scss có import đúng không
  3. Search không hoạt động:
    • Kiểm tra data attributes trên cards
    • Verify JavaScript initialization

📈 Performance Metrics

🔄 Migration từ old layout

Layout cũ vẫn được giữ lại trong .traditional-taxonomy (hidden) để backup. Để revert:

  1. Thay layout: categories thành layout: archive
  2. Uncomment old include: `

`

  1. Remove custom CSS/JS imports

Happy blogging! 🎉