This document provides a comprehensive guide for developers to understand the structure, flow, and customization options of the GCT Bhakkar website.
gct-bhakkar-website-design/
├── index.html # Home page
├── pages/
│ ├── about.html # About Us page
│ ├── admissions.html # Admissions page
│ ├── campus-life.html # Campus Life page
│ ├── contact.html # Contact page
│ ├── programs.html # Programs overview
│ └── departments/
│ ├── cit.html # Computer IT department
│ ├── civil.html # Civil Technology
│ ├── electrical.html # Electrical Technology
│ ├── electronics.html # Electronics Technology
│ └── mechanical.html # Mechanical Technology
├── assets/
│ ├── css/
│ │ ├── main.css # CSS entry point (imports all)
│ │ ├── styles.css # Legacy/custom styles
│ │ ├── base/
│ │ │ ├── variables.css # Design tokens & CSS variables
│ │ │ ├── theme.css # Light/Dark theme system
│ │ │ ├── reset.css # CSS reset
│ │ │ └── typography.css # Font styles
│ │ ├── components/
│ │ │ ├── navbar.css # Header & navigation
│ │ │ ├── footer.css # Footer styles
│ │ │ ├── buttons.css # Button variants
│ │ │ ├── cards.css # Card components
│ │ │ └── hero.css # Hero sections
│ │ ├── layouts/
│ │ │ └── sections.css # Section layouts & grids
│ │ └── vendor/
│ │ └── bootstrap.min.css # Bootstrap framework
│ ├── js/
│ │ ├── main.js # Main application script
│ │ ├── components/
│ │ │ ├── navbar.js # Dynamic header component
│ │ │ └── footer.js # Dynamic footer component
│ │ └── utils/
│ │ ├── theme.js # Theme toggle & smooth scroll
│ │ ├── animations.js # Scroll animations
│ │ └── helpers.js # Utility functions
│ ├── images/ # Image assets
│ └── favicon/ # Favicon files
The header is dynamically generated using JavaScript. It auto-detects the current page and applies the active class.
Usage in HTML:
<header data-navbar data-base-path="./" data-current-page="home"></header>Data Attributes:
data-base-path: Path to root (e.g.,./,../,../../)data-current-page: Current page ID for active state
Available Page IDs:
home,about,programs,admissions,campus-life,contact
Usage in HTML:
<div data-footer data-base-path="./"></div>The theme system uses CSS variables and data-theme attribute on the <html> element.
Toggle Location: Sun/Moon button in navbar
Key Files:
assets/css/base/theme.css- All theme variables and overridesassets/js/utils/theme.js- ThemeManager class
Dark Theme (Default):
:root {
--color-bg-primary: #0f172a;
--color-text-primary: #ffffff;
--color-accent-primary: #3b82f6;
}Light Theme:
[data-theme="light"] {
--color-bg-primary: #ffffff;
--color-text-primary: #0f172a;
}- Add dark theme styles normally
- Add light theme override in
theme.css:
[data-theme="light"] .your-component {
background: #ffffff !important;
color: #0f172a !important;
}- Base: variables.css → theme.css → reset.css → typography.css
- Layouts: sections.css
- Components: buttons.css → cards.css → navbar.css → footer.css → hero.css
Located in variables.css:
| Category | Example |
|---|---|
| Colors | --color-accent-primary: #3b82f6 |
| Spacing | --space-4: 1rem, --space-8: 2rem |
| Typography | --text-lg: 1.125rem |
| Shadows | --shadow-lg: 0 10px 25px rgba(0,0,0,0.3) |
| Borders | --radius-lg: 0.75rem |
- Create HTML file in
pages/directory - Include required scripts:
<!-- In <head> -->
<link rel="stylesheet" href="../assets/css/main.css">
<link rel="stylesheet" href="../assets/css/styles.css">
<!-- Before </body> -->
<script src="../assets/js/vendor/bootstrap.bundle.min.js"></script>
<script src="../assets/js/components/navbar.js"></script>
<script src="../assets/js/components/footer.js"></script>
<script src="../assets/js/utils/theme.js"></script>
<script src="../assets/js/utils/animations.js"></script>
<script src="../assets/js/main.js"></script>- Add header and footer:
<header data-navbar data-base-path="../" data-current-page="your-page"></header>
<!-- Your content -->
<div data-footer data-base-path="../"></div>- Use section templates:
<section class="section">
<div class="container">
<div class="section-header">
<h2 class="section-title">Section Title</h2>
<p class="section-subtitle">Description</p>
</div>
<!-- Content here -->
</div>
</section>Add data-animate attribute to elements:
<div data-animate="fadeInUp" data-delay="200">
Content fades in when scrolled into view
</div>Available Animations:
fadeIn,fadeInUp,fadeInDown,fadeInLeft,fadeInRightscaleIn
<div class="card card-feature">
<div class="card-feature-icon"><i class="fas fa-laptop"></i></div>
<h5 class="card-title">Title</h5>
<p class="card-text">Description</p>
</div><div class="card card-department">
<img src="..." alt="..." class="card-img">
<div class="card-body">
<h4 class="card-title">Department Name</h4>
<p class="card-text">Description</p>
</div>
</div>| Breakpoint | Max Width | Usage |
|---|---|---|
| Large | 1200px | 4-column → 2-column grid |
| Medium | 991px | 2-column → 1-column |
| Small | 768px | Mobile layout |
| X-Small | 576px | Compact mobile |
- Edit
assets/css/base/variables.css:
--color-accent-primary: #your-color;- Update
assets/css/base/theme.cssfor light theme if needed
Edit assets/js/components/navbar.js:
getNavigation() {
return [
{ name: 'Home', href: '...', id: 'home' },
// Add/modify links here
];
}Edit assets/js/components/footer.js social links array.
- Lazy Loading: Images use
loading="lazy" - GPU Acceleration: Transforms use
will-change - Reduced Motion: Respects
prefers-reduced-motion - CSS Containment:
contain: layout styleon sections
- Chrome 80+
- Firefox 75+
- Safari 13+
- Edge 80+
For questions about this codebase, contact the development team.