Skip to content

arshadbajil/vanila-js-with-router

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Simple VanillaJS Routing App

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).

Features

  • 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.

How to Use

  1. Clone this repository to your local machine:

    git clone https://github.com/your-username/vanillajs-routing-app.git
    
  2. 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.

  1. Install http-server-spa globally (if not installed):
npm install -g http-server-spa
  1. Build and serve the SPA using http-server-spa:
http-server-spa . ./index.html
  1. Open your web browser and navigate to http://localhost:8080 (or the provided address) to see the app in action.

  2. Navigate between different views (home, about, wall) by clicking on the navigation links.

  3. 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!

About

Simple VanillaJS Routing App: SPA LIKE

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published