mirror of
https://git.kh3group.com/georgebiri/khy_website.git
synced 2026-07-02 06:23:33 +00:00
No description
|
All checks were successful
continuous-integration/drone/push Build is passing
|
||
|---|---|---|
| assets | ||
| data | ||
| scripts | ||
| src | ||
| styles | ||
| .drone.yml | ||
| .gitignore | ||
| contact.html | ||
| index.html | ||
| package-lock.json | ||
| package.json | ||
| product-catalog.html | ||
| product-comparison.html | ||
| product-detail.html | ||
| README.md | ||
| tailwind.config.js | ||
khy_website
A clean, minimal static website built with HTML, JavaScript, and Tailwind CSS.
Quick Start
Prerequisites
- Node.js (for Tailwind CSS CLI)
- npm (comes with Node.js)
Setup Instructions
-
Clone or download the project
git clone <repository-url> cd khy_website -
Install Tailwind CSS
npm install -D tailwindcss@^3.4.0 -
Generate the optimized CSS
npx tailwindcss -i ./src/input.css -o ./styles/main.css -
Open the website
- Open
index.htmlin your web browser - Or serve it with a local server
- Open
Project Structure
my-site/
├─ index.html # Main website page
├─ src/
│ └─ input.css # Tailwind directives
├─ styles/
│ └─ main.css # Generated optimized CSS
├─ scripts/
│ └─ main.js # JavaScript functionality
├─ assets/
│ ├─ images/ # Image assets
│ └─ fonts/ # Font assets
├─ tailwind.config.js # Tailwind configuration
└─ package.json # Dependencies
Development
For Active Development
If you're making frequent changes to the HTML, you can use watch mode to automatically regenerate CSS:
npx tailwindcss -i ./src/input.css -o ./styles/main.css --watch
Keep this running in a terminal while you work. It will automatically rebuild the CSS whenever you save changes to your HTML files.
Manual Regeneration
If watch mode doesn't work or you prefer manual control:
# One-time build
npx tailwindcss -i ./src/input.css -o ./styles/main.css
# Watch mode (auto-regenerate on changes)
npx tailwindcss -i ./src/input.css -o ./styles/main.css --watch
Note: If watch mode doesn't work, just run the one-time build command after each change.
What This Does
- Scans your HTML files for used Tailwind classes
- Generates only the CSS you need (purges unused styles)
- Creates a tiny, optimized CSS file (~1KB vs ~3MB CDN)
Features
- Clean, minimal design with Tailwind CSS
- Optimized performance with purged CSS
- Responsive layout that works on all devices
- No build tools required for production
- Easy maintenance with Tailwind utility classes
Customization
To add new Tailwind classes:
- Add the classes to your HTML
- Run the CSS generation command
- The new styles will be included in the output
To modify the design:
- Change Tailwind classes in
index.html - Regenerate CSS with the CLI command
- Refresh your browser to see changes