How nirravv/hospital-management-html works
1. This repository is a static, client-rendered hospital website: each route is a separate HTML file, and there is no backend, API layer, database, or build pipeline. The site is meant to run directly from the filesystem or a static host such as GitHub Pages.
2. The architecture has three main layers: page content in the root HTML files, shared presentation in assets/css/modern.css, and shared interaction logic in assets/js/modern.js. Those two asset files are the common dependency for nearly every page.
3. The navigation is not a framework component; it is part of the shared front-end shell behavior. The JavaScript handles nav injection/behavior, mobile drawer interaction, and auto-hide-on-scroll behavior, so the same navigation experience is reused across pages.
4. The site uses a dark-first visual system with an optional light mode. Theme persistence is handled on the client side, likely through browser storage, so the appearance state survives refreshes without any server involvement.
5. Core “marketing” and informational content is split into dedicated pages: index.html for the landing page, about.html for hospital background and values, doctors.html for staff profiles, gallery.html for media, blog.html for articles, and contact.html for contact details plus a message form. privacy.html and terms.html are standalone legal/prose pages.
6. The action-oriented pages form a separate functional cluster: appointment.html is the booking flow, while registration.html and login.html are authentication-style entry points. In this repo they are front-end-only forms, so they function as UI demos rather than wired transactional systems.
7. The JavaScript adds progressive enhancement rather than application state management. According to the README, it drives scroll-reveal animations, animated counters, the gallery lightbox, hover interactions, theme toggling, and form demos. There is no SPA routing or client-side data fetching.
8. The CSS is the main source of layout and visual system design. It uses a single stylesheet with custom properties, grid-based layouts, backdrop blur/glass effects, and keyframe animations. That means the visual language is centralized and shared, rather than repeated per page.
9. Asset organization is content-based rather than component-based. Images are grouped by purpose under assets/img/bg, blogs, gallery, slider, and team, which maps directly to page sections like hero backgrounds, blog cards, gallery items, hero sliders, and doctor portraits.
10. The primary data flow is static: browser loads an HTML page, that page pulls in the shared CSS/JS, the JS enhances the DOM after load, and user actions like theme toggling or gallery viewing stay entirely in the browser. The only durable client state called out is the theme preference.
11. From an architecture-diagram perspective, the key boundaries are: page content vs shared assets, presentation vs behavior, and static public pages vs interactive UI affordances. The repo is deliberately simple and monolithic at the source level, but functionally organized by page type and shared enhancement layer.
Main entry points: modern.js Modern JS · modern.css Modern CSS · index.html Home · doctors.html Doctors
Components 21
Page content
Standalone HTML pages for the public site and form entry points.
- Home · Primary entry page with hero content and site overview.
index.html - About · Hospital background, values, and organization story.
about.html - Doctors · Provider profiles and team presentation.
doctors.html - Gallery · Photo and visual showcase with enhanced viewing.
gallery.html - Blog · Informational posts and editorial content.
blog.html - Contact · Contact details and message form.
contact.html - Appointment · Front-end booking flow presented as a static form.
appointment.html - Login · Client-side sign-in style entry screen.
login.html - Register · Client-side registration style entry screen.
registration.html - Privacy · Standalone privacy policy content.
privacy.html - Terms · Standalone terms and conditions content.
terms.html
Shared assets
Common presentation and interaction layer reused across pages.
- Modern CSS · Single shared stylesheet defining layout, theme, and visual system.
assets/css/modern.css - Modern JS · Shared front-end shell logic for navigation, theme, animations, and demos.
assets/js/modern.js - Theme state · Persistent dark/light mode preference stored in the browser.
- Nav shell · Injected and reused navigation with mobile drawer and scroll behavior.
- Enhancements · Scroll reveals, counters, lightbox, hover effects, and form demos.
Media library
Static image folders organized by page purpose.
- Backgrounds · Hero and section background imagery.
assets/img/bg - Blog images · Images used in article cards and posts.
assets/img/blogs - Gallery images · Photos used in gallery sections and lightbox.
assets/img/gallery - Slider images · Carousel and hero slider artwork.
assets/img/slider - Team images · Doctor and staff portrait assets.
assets/img/team
Connections 34
- Home → Modern CSS: styles · Uses the shared visual system.
- Home → Modern JS: behavior · Uses shared navigation and enhancement logic.
- About → Modern CSS: styles · Uses the shared visual system.
- About → Modern JS: behavior · Uses shared navigation and enhancement logic.
- Doctors → Modern CSS: styles · Uses the shared visual system.
- Doctors → Modern JS: behavior · Uses shared navigation and enhancement logic.
- Gallery → Modern CSS: styles · Uses the shared visual system.
- Gallery → Modern JS: behavior · Uses shared navigation and enhancement logic.
- Blog → Modern CSS: styles · Uses the shared visual system.
- Blog → Modern JS: behavior · Uses shared navigation and enhancement logic.
- Contact → Modern CSS: styles · Uses the shared visual system.
- Contact → Modern JS: behavior · Uses shared navigation and enhancement logic.
- Appointment → Modern CSS: styles · Uses the shared visual system.
- Appointment → Modern JS: behavior · Uses shared navigation and enhancement logic.
- Login → Modern CSS: styles · Uses the shared visual system.
- Login → Modern JS: behavior · Uses shared navigation and enhancement logic.
- Register → Modern CSS: styles · Uses the shared visual system.
- Register → Modern JS: behavior · Uses shared navigation and enhancement logic.
- Privacy → Modern CSS: styles · Uses the shared visual system.
- Terms → Modern CSS: styles · Uses the shared visual system.
- Modern JS → Nav shell: injects · Builds shared navigation and mobile drawer behavior.
- Modern JS → Theme state: persists · Stores and restores client-side theme preference.
- Modern JS → Enhancements: drives · Provides scroll reveals, counters, lightbox, hover, and form demos.
- Modern JS → Backgrounds: uses · Loads background imagery where needed.
- Modern JS → Blog images: uses · Loads blog imagery where needed.
- Modern JS → Gallery images: uses · Loads gallery imagery where needed.
- Modern JS → Slider images: uses · Loads slider imagery where needed.
- Modern JS → Team images: uses · Loads team portraits where needed.
- Gallery → Gallery images: renders · Consumes gallery photos for the gallery page.
- Blog → Blog images: renders · Consumes blog images for article presentation.
- Doctors → Team images: renders · Consumes team portraits for staff profiles.
- Home → Slider images: renders · Consumes hero/slider imagery on the landing page.
- Home → Backgrounds: renders · Uses background art for page sections.
- Contact → Backgrounds: renders · Uses background art for section presentation.