feat: add official website with bilingual support#7
Merged
Scofieldfree merged 8 commits intomainfrom Jan 26, 2026
Merged
Conversation
Initialize new Astro-based website in website/ directory for the official project website. Adds npm scripts for website development and updates .gitignore to exclude website dependencies and build artifacts.
Add comprehensive Chinese translation with language switcher component. Integrate lucide-react icons for consistent iconography. Add GitHub Actions workflow for automatic deployment to GitHub Pages. Update UI with shadcn-style theming and improved responsive design. Features: - Bilingual EN/ZH pages with LanguageSwitch component - GitHub Actions deploy workflow for website/ directory - Enhanced UI with lucide-react icons - Improved theming with shadcn-style design tokens - Logo asset integration
Remove privacy policy and terms of service links from both English and Chinese pages as these pages are not yet implemented.
Complete UI overhaul with modern technical/developer-focused design featuring grid patterns, corner accents, and monospace typography. Highlights: - Grid pattern background with radial gradient masking - Version badge with animated ping indicator - Feature data arrays for cleaner component structure - Corner accent decorations on feature cards - Geek-style buttons with rounded-md and font-mono - Enhanced hover effects with scale and glow transitions - Minimalist footer with status indicator - Improved text spacing and leading for readability - OS support badges with Command/Monitor icons
Add client-side theme switching with localStorage persistence. Theme preference is initialized inline to prevent flash of unstyled content (FOUC). Toggle component positioned in top-right controls alongside language switcher. Features: - ThemeToggle component with Sun/Moon icons - Inline theme initialization script in BaseLayout - localStorage persistence for theme preference - System preference detection (prefers-color-scheme) - Responsive positioning with flexbox layout - Smooth transitions between themes - Default to dark mode
Exclude website directory from root project ESLint, Prettier, and GitHub Actions CI since it's an independent subproject with its own configuration and tooling. Changes: - Add paths-ignore to CI workflow for website, markdown, and images - Add website/ and temp-docs/ to .prettierignore - Add website/ and temp-docs/ to ESLint ignores
Contributor
Author
Code reviewFound 1 issue:
voicekey/website/src/layouts/BaseLayout.astro Lines 64 to 77 in b42292a The script accesses Recommend wrapping localStorage operations in try-catch: const getTheme = () => {
try {
if (typeof localStorage !== 'undefined') {
const stored = localStorage.getItem('theme');
if (stored) return stored;
}
} catch (e) {
// Silently fail - localStorage unavailable
}
// Fallback to system preference or default
return window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light';
};
const theme = getTheme();
document.documentElement.classList.toggle('dark', theme === 'dark');
try {
if (typeof localStorage !== 'undefined') {
localStorage.setItem('theme', theme);
}
} catch (e) {
// Silently fail
}This pattern follows the same defensive approach used for 🤖 Generated with Claude Code - If this code review was useful, please react with 👍. Otherwise, react with 👎. |
Fix typo in site URL from buildwithaIs to BuildWithAIs (matching GitHub organization name). Add missing setup-pages action in GitHub workflow for proper GitHub Pages deployment configuration. Changes: - Correct site URL to use proper capitalization - Add actions/configure-pages@v5 step before build - Ensure proper GitHub Pages configuration
Wrap localStorage operations in try-catch to prevent crashes in private browsing mode or when storage quota is exceeded. Follows the same defensive pattern used for i18n fallback (commit 0ee7adc). Changes: - Add try-catch around localStorage.getItem in BaseLayout - Add try-catch around localStorage.setItem in both files - Gracefully handle SecurityError and QuotaExceededError - Prevents theme initialization from crashing in restricted modes
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Add a modern, responsive official website for Voice Key with bilingual English/Chinese support.
Features
Tech Stack
Website Structure
CI/CD Changes
.github/workflows/deploy-website.ymlfor automatic deploymentwebsite/from root project CI/linting (independent subproject).prettierignoreandeslint.config.mjsPreview
Website will be deployed to:
https://buildwithais.github.io/voicekey/Testing
🤖 Generated with Claude Code