diff --git a/config/routes/routes.js b/config/routes/routes.js index a28f568..7b4a8b1 100644 --- a/config/routes/routes.js +++ b/config/routes/routes.js @@ -11,7 +11,7 @@ function checkAuthenticated(req, res, next) { function indexRoute(req, res, dbo) { dbo.collection('categories').find().toArray((err, result) => { const categories = result.map(category => category.title[0].toUpperCase() + category.title.slice(1)); - res.render('index', { + res.render('main/index', { pageName: 'index', title: 'Digital-Store | Главная', categories @@ -114,7 +114,7 @@ function onePageItemRoute(req, res, dbo) { const item = result[0]; dbo.collection('categories').find({title: item.category}).toArray((err, result) => { const category = result[0]; - res.render('product', { + res.render('main/product', { title: item.title, image: category.img, count: item.count, @@ -129,33 +129,33 @@ function onePageItemRoute(req, res, dbo) { }); }) } catch { - res.render('404'); + res.render('main/404'); } } function howToBuyRoute(req, res) { - res.render('how-to-buy', { + res.render('main/how-to-buy', { pageName: 'how-to-buy', title: 'Digital-Store | Как купить товар' }); } function contactsRoute(req, res) { - res.render('contacts', { + res.render('main/contacts', { pageName: 'contacts', title: 'Digital-Store | Контакты' }); } function commentsRoute(req, res) { - res.render('comments', { + res.render('main/comments', { pageName: 'comments', title: 'Digital-Store | Отзывы' }); } function myOrdersRoute(req, res) { - res.render('my-orders', { + res.render('main/my-orders', { pageName: 'my-orders', title: 'Digital-Store | Мои покупки' }); diff --git a/dist/views/404.pug b/dist/views/main/404.pug similarity index 100% rename from dist/views/404.pug rename to dist/views/main/404.pug diff --git a/dist/views/assets/head.pug b/dist/views/main/assets/head.pug similarity index 100% rename from dist/views/assets/head.pug rename to dist/views/main/assets/head.pug diff --git a/dist/views/assets/scripts.pug b/dist/views/main/assets/scripts.pug similarity index 100% rename from dist/views/assets/scripts.pug rename to dist/views/main/assets/scripts.pug diff --git a/dist/views/assets/templates/footer.pug b/dist/views/main/assets/templates/footer.pug similarity index 100% rename from dist/views/assets/templates/footer.pug rename to dist/views/main/assets/templates/footer.pug diff --git a/dist/views/assets/templates/header.pug b/dist/views/main/assets/templates/header.pug similarity index 100% rename from dist/views/assets/templates/header.pug rename to dist/views/main/assets/templates/header.pug diff --git a/dist/views/assets/templates/modals/cart.pug b/dist/views/main/assets/templates/modals/cart.pug similarity index 100% rename from dist/views/assets/templates/modals/cart.pug rename to dist/views/main/assets/templates/modals/cart.pug diff --git a/dist/views/assets/templates/modals/pay.pug b/dist/views/main/assets/templates/modals/pay.pug similarity index 100% rename from dist/views/assets/templates/modals/pay.pug rename to dist/views/main/assets/templates/modals/pay.pug diff --git a/dist/views/comments.pug b/dist/views/main/comments.pug similarity index 100% rename from dist/views/comments.pug rename to dist/views/main/comments.pug diff --git a/dist/views/contacts.pug b/dist/views/main/contacts.pug similarity index 100% rename from dist/views/contacts.pug rename to dist/views/main/contacts.pug diff --git a/dist/views/how-to-buy.pug b/dist/views/main/how-to-buy.pug similarity index 100% rename from dist/views/how-to-buy.pug rename to dist/views/main/how-to-buy.pug diff --git a/dist/views/index.pug b/dist/views/main/index.pug similarity index 100% rename from dist/views/index.pug rename to dist/views/main/index.pug diff --git a/dist/views/my-orders.pug b/dist/views/main/my-orders.pug similarity index 100% rename from dist/views/my-orders.pug rename to dist/views/main/my-orders.pug diff --git a/dist/views/product.pug b/dist/views/main/product.pug similarity index 100% rename from dist/views/product.pug rename to dist/views/main/product.pug diff --git a/dist/views/register.pug b/dist/views/main/register.pug similarity index 100% rename from dist/views/register.pug rename to dist/views/main/register.pug