diff --git a/routes/homepage.js b/routes/homepage.js index e8057a7..cc2dbc9 100644 --- a/routes/homepage.js +++ b/routes/homepage.js @@ -9,12 +9,17 @@ async function handler(req, res) { where: { hidden: false } }); + let articles = await Sequelize.Article.findAll({ + limit: 5 + }); + res.send( await Helpers.ViewLoader.load( 'main.pug', { current_route: '/', - gb_entries + gb_entries, + articles } ) ); diff --git a/view/main.pug b/view/main.pug index 89089a2..b81d285 100644 --- a/view/main.pug +++ b/view/main.pug @@ -35,11 +35,11 @@ block content td(width='50%' style='border-left:1px solid #c2c4c2;border-right:1px solid #c2c4c2;padding:0 1%') h3 Blog ul - each i in [0,0,0,0,0] + each article in articles li(style='font-size:16pt') - | entry + h5= article.title ul - li data + li= article.shortText td(width='20%') h4 Links