Skip to content
Snippets Groups Projects
Select Git revision
  • 55aea2a6290bb5bf808346709f5ebeae000faf1c
  • main default protected
2 results

data.sql

Blame
  • Router.js 327 B
    export default class Router {
    	static titleElement;
    	static contentElement;
    	static routes = [];
    
    	static navigate(path) {
    		const route = this.routes.find(route => route.path === path);
    		if (route) {
    			this.titleElement.innerHTML = `<h1>${route.title}</h1>`;
    			this.contentElement.innerHTML = route.page.render();
    		}
    	}
    }