update home

This commit is contained in:
2023-08-03 21:52:50 +03:00
parent 5420715adc
commit ec67c82886
6 changed files with 41 additions and 31 deletions

View File

@@ -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
View 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: '...',
},
};