This project uses Vite as the build tool with Handlebars for templating. This guide helps you understand the setup and common tasks.
concept-modern/
├── src/ # Source files
│ ├── assets/ # Static assets (images, fonts)
│ ├── js/ # JavaScript files
│ │ ├── app.js # Main entry point
│ │ ├── components/ # Reusable JS components
│ │ └── pages/ # Page-specific JS
│ ├── scss/ # SCSS stylesheets
│ │ ├── main.scss # Main stylesheet
│ │ ├── components/ # Component styles
│ │ └── pages/ # Page-specific styles
│ ├── pages/ # HTML pages
│ ├── partials/ # Handlebars partials
│ │ └── layouts/ # Layout partials (header, sidebar, etc.)
│ └── index.html # Main entry page
├── dist/ # Build output (git-ignored)
├── vite.config.js # Vite configuration
└── package.json # Dependencies and scripts
All dependencies are bundled locally:
Create the HTML file in the appropriate directory:
src/pages/your-new-page.html
Use the standard template structure:
<!doctype html>
<html lang="en">
<head>
{{> layouts/head pageTitle="Your Page Title" }}
</head>
<body>
<div class="dashboard-main-wrapper">
{{> layouts/header }}
{{> layouts/sidebar activeMenu="menu-id" activePage="page-id" }}
<div class="dashboard-wrapper">
<div class="dashboard-content">
<!-- Your content here -->
</div>
{{> layouts/footer }}
</div>
</div>
{{> layouts/scripts }}
<!-- Page specific JS if needed -->
<script type="module" src="../js/pages/your-page.js"></script>
</body>
</html>
Add to vite.config.js:
rollupOptions: {
input: {
// ... existing entries
'your-new-page': resolve(__dirname, 'src/pages/your-new-page.html'),
}
}
Update navigation in src/partials/layouts/sidebar.hbs
Create a new SCSS file:
src/scss/pages/_your-page.scss
Import it in src/scss/main.scss:
@import "pages/your-page";
Create a new JS file:
src/js/pages/your-page.js
Import Bootstrap if needed:
import * as bootstrap from 'bootstrap';
Reference it in your HTML page:
<script type="module" src="../js/pages/your-page.js"></script>
# Development server with hot reload
npm run dev
# Production build
npm run build
# Preview production build
npm run preview
Run the build utility to find missing HTML files:
node scripts/build-utils.js
This will scan for all HTML files and show which ones need to be added to the Vite config.