This repository contains a lightweight JavaScript application that demonstrates client-side routing using VanillaJS. The app features a simple page structure with multiple views (home, about, wall) and an authentication section (login, register).
-
Client-Side Routing: Utilizes VanillaJS for client-side routing, providing a seamless and dynamic user experience without full-page reloads.
-
Clean Directory Structure: Organized project files into a clear directory structure for better code organization and maintainability.
-
Responsive Design: Uses basic CSS for styling, ensuring a responsive design that works well on various screen sizes.
-
Clone this repository to your local machine:
git clone https://github.com/your-username/vanillajs-routing-app.git
-
Open the project folder in your code editor.
Explore the pages directory: Each page has its own JavaScript file (home.js, about.js). Modify these files to customize the content of each page.
- Install http-server-spa globally (if not installed):
npm install -g http-server-spa
- Build and serve the SPA using http-server-spa:
http-server-spa . ./index.html
-
Open your web browser and navigate to http://localhost:8080 (or the provided address) to see the app in action.
-
Navigate between different views (home, about, wall) by clicking on the navigation links.
-
Feel free to use this repository as a starting point for your VanillaJS projects with client-side routing. If you have any feedback or suggestions, please open an issue or contribute to the project!