Skip to content

Commit

Permalink
Merge pull request #25 from fac-13/api-call
Browse files Browse the repository at this point in the history
fix navbar home icon display for home page
  • Loading branch information
Nicos authored Apr 19, 2018
2 parents 252890d + 1c367d6 commit 4a269c4
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
4 changes: 4 additions & 0 deletions public/css/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,10 @@ width: 100%;
.coin__logo {
}

.hidden {
display: none;
}

.coin-article {
background-color: lightGray;
width: 400px;
Expand Down
2 changes: 1 addition & 1 deletion src/controllers/home.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ const getAllCoins = require('./../model/queries/get_all_coins');
exports.get = (req, res) => {
getAllCoins()
.then(allCoins => {
res.render('home', { allCoins });
res.render('home', { activePage: { home: true }, allCoins });
})
.catch(console.log);
};
6 changes: 3 additions & 3 deletions src/views/partials/navbar.hbs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<nav class="nav__container">
<nav class="{{#if activePage.home }}hidden{{/if}} nav__container">
<ul class="nav__list">
<a class="nav__link" href="/">
<img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAAAyCAYAAAAeP4ixAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAKFSURBVGhD7dpLqE1RHMfx4xGSSArdzMgreSe37owSAxQllIwMGChKBgaSwlySkgwMrgFlYGLiLYoiMZRnIjJB3r6/0123f7v/Oufea+9z1tH61afuOfu1fneftc++59xaxVmBR9iFYXqi0zIeJ/Ebf/pcxXR0TFbhOUIB6zN2YziSzQSchj0LMTcxE8llDV7BG3TMF+zFCLQ9E3EW3kAH6g7moG1ZhzfwBmfdx8/Cc0VfsR8j0bJMwjl4A7I+YhuU5XgCbz3rHuah8mzAW3iDsC5iKmzG4Ah+wNsm+IYDqOTsTEYvvANb77EZjbIEepP0trceYAFKyya8g3cw6zxUeCAZhUP4Dm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NuppUmvyf8v0VzQnNDc8I4RaG4dxmg0TRcuwduR9RprUWZ0tdJVyzue9RjLEM126JLpbWydgd4Iq4jOzj7ofcU7dqCzcwy6EvZnGi7D28B6idVoRWbjNrxxWE/RjXo+wVsp0E3gKeimsJXRHfIe6I7ZG1fwC7pouAsDnYWVaGdm4Ba88QU9cBcEJ5BCtsAbX/B/FtFcuG4eS6zILOhWwzMXZadY5C7090x43F/kGTQX9ERYKLEiN2DXs3QfVXaKRXTLr7lzre9xvchxjNMPpJOKKPpkRp/QLKo/Mum0ItHkIkYu0iC5SBArolv4HREbUXYqK9LqJFVkPfR3fTNekiqig9t9x3jJRYJcxEkuQnKRIBdxkouQXCTIRZzkIiQXCfRt0tGS6H9R7L5jvG2L39kMukiqmhaZD2/D1OxEw+g7iSvwNk7FC+iL2qZRmaXQZ8Gp0Ut/LAqp1f4CE2pxmSVOz6wAAAAASUVORK5CYII=">
</a>
</ul>
</nav>

0 comments on commit 4a269c4

Please sign in to comment.