A modern, multilingual website for the LKC Verification Platform built with Astro 5, featuring dynamic content, interactive carousels, and internationalization support.
- Modern Tech Stack: Built with Astro 5, Tailwind CSS 4, and Bun
- Multilingual Support: Full i18n support for Traditional Chinese (zh-tw) and English (en)
- Interactive Components:
- Dynamic hero text animation
- Swiper.js carousels for services and dialogs
- Modal dialogs with image carousels
- Language switcher
- Responsive Design: Mobile-first approach with Tailwind CSS
- Performance Optimized: Static site generation with optimized images
- SEO Ready: Meta tags, structured data, and semantic HTML
- Framework: Astro 5
- Styling: Tailwind CSS 4
- Package Manager: Bun
- Carousel: Swiper.js
- Fonts: Inter (local fonts)
- Build Tool: Vite
src/
βββ assets/
β βββ css/ # Global styles and components
β βββ fonts/ # Local font files
βββ components/
β βββ about/ # About page components
β βββ home/ # Homepage components
β βββ DialogModal.astro
β βββ FooterMain.astro
β βββ HeaderMain.astro
βββ data/
β βββ en/ # English content
β βββ zh-tw/ # Traditional Chinese content
βββ layouts/
β βββ Layout.astro # Main layout component
βββ pages/
βββ en/ # English pages
βββ zh-tw/ # Traditional Chinese pages
- Bun (recommended) or Node.js 18+
- Git
-
Clone the repository
git clone <repository-url> cd AGH3-WEBSITE
-
Install dependencies
bun install # or npm install -
Start development server
bun run dev # or npm run dev -
Open your browser Navigate to
http://localhost:4321
bun run dev- Start development serverbun run build- Build for productionbun run preview- Preview production buildbun run astro- Run Astro CLI commands
The website supports two languages:
- Traditional Chinese (zh-tw): Default language, accessible at root
/ - English (en): Available at
/en/
Users can switch languages using the language switcher in the footer. The switcher:
- Detects current language from URL path
- Prevents navigation when selecting the current language
- Maintains page context during language switches
-
Add locale to
astro.config.mjs:i18n: { locales: ["zh-tw", "en", "new-lang"], defaultLocale: "zh-tw" }
-
Create language-specific pages in
src/pages/new-lang/ -
Add language data in
src/data/new-lang/ -
Update language switcher in
FooterMain.astro
All content is managed through JSON files in the src/data/ directory:
global_settings.json- Site-wide settingshome/- Homepage contentabout/- About page contentfooter.json- Footer content
The project uses Tailwind CSS 4 with custom CSS variables:
- Global styles:
src/assets/css/global.css - Component styles:
src/assets/css/ - Custom properties defined in CSS files
Key components include:
- HeroSection: Animated text carousel
- ServicesSection: Swiper carousel for services
- DialogModal: Modal with image carousel
- UseCaseSection: Use case showcase
- LanguageSwitcher: Built into FooterMain
The project is configured for GitHub Pages deployment with GitHub Actions:
- Push to
mainbranch - GitHub Actions automatically builds and deploys
- Site available at
https://username.github.io/repository-name
-
Build the project
bun run build
-
Deploy the
dist/folder to your hosting provider
No environment variables are required for basic functionality.
- Use TypeScript for type safety
- Follow Astro component conventions
- Use semantic HTML elements
- Implement proper accessibility features
- Create component in appropriate directory
- Import and use in pages
- Add TypeScript interfaces if needed
- Update documentation
- Images are optimized using Astro's Image component
- Swiper instances are properly destroyed to prevent memory leaks
- CSS animations use
prefers-reduced-motionmedia query - Static site generation for optimal performance
- Chrome 90+
- Firefox 88+
- Safari 14+
- Edge 90+
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
- Email: sales@lkc-lab.com
- Website: LKC Lab
- Demo: Book a Demo
- Astro for the amazing framework
- Tailwind CSS for utility-first CSS
- Swiper.js for carousel functionality
- Inter Font for typography