update home
This commit is contained in:
		| @@ -1,3 +1,5 @@ | ||||
| import { routes } from './routes.js'; | ||||
|  | ||||
| /* main */ | ||||
| window.onload = function () { | ||||
|   let app = document.documentElement; | ||||
| @@ -54,26 +56,3 @@ const location_handler = async () => { | ||||
|     .querySelector('meta[name="description"]') | ||||
|     .setAttribute('content', route.description); | ||||
| }; | ||||
|  | ||||
| const routes = { | ||||
|   404: { | ||||
|     template: '/pages/404.html', | ||||
|     title: '404', | ||||
|     description: 'Page not found', | ||||
|   }, | ||||
|   '/': { | ||||
|     template: '/pages/home.html', | ||||
|     title: 'Home', | ||||
|     description: '...', | ||||
|   }, | ||||
|   about: { | ||||
|     template: '/pages/about.html', | ||||
|     title: 'About Us', | ||||
|     description: '...', | ||||
|   }, | ||||
|   games: { | ||||
|     template: '/pages/games.html', | ||||
|     title: 'Games', | ||||
|     description: '...', | ||||
|   }, | ||||
| }; | ||||
|   | ||||
							
								
								
									
										22
									
								
								app/assets/js/routes.js
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										22
									
								
								app/assets/js/routes.js
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,22 @@ | ||||
| export const routes = { | ||||
|   404: { | ||||
|     template: '/pages/404.html', | ||||
|     title: '404', | ||||
|     description: 'Page not found', | ||||
|   }, | ||||
|   '/': { | ||||
|     template: '/pages/home.html', | ||||
|     title: 'a2s', | ||||
|     description: '...', | ||||
|   }, | ||||
|   about: { | ||||
|     template: '/pages/about.html', | ||||
|     title: 'О сайте', | ||||
|     description: '...', | ||||
|   }, | ||||
|   games: { | ||||
|     template: '/pages/games.html', | ||||
|     title: 'Games', | ||||
|     description: '...', | ||||
|   }, | ||||
| }; | ||||
		Reference in New Issue
	
	Block a user