diff --git a/public/css/style.css b/public/css/style.css index 7ebae53..4f5d604 100644 --- a/public/css/style.css +++ b/public/css/style.css @@ -14,13 +14,25 @@ main { .nav__container { position: fixed; - display: block; - top: 0; +display: block; +top: 0; +height: 9vh; +background: white; +width: 100%; } .nav__list { + margin: 0px; + padding: 1vh; } .nav__link { + text-decoration: none; } +.nav__link img { + height: 30px; + padding:1vh; +} + + .nav__item { } .section__banner { @@ -31,6 +43,8 @@ main { .section__coins { } .coins__list { + background-color: white; + margin: 200px; } .coin__list--item { } @@ -40,7 +54,7 @@ main { .coin-article { background-color: lightGray; width: 400px; - margin: auto; + margin: 9vh auto; padding: 15px; } @@ -74,9 +88,10 @@ margin: auto; .coin-article__footer { background-color: gray; } -/* .footer__container {} + +/* .footer__container {} .error {} -.error__desc {} +.error__desc {} .error__msg {} .error__image {} diff --git a/src/controllers/coin.js b/src/controllers/coin.js index ad5e309..3ef3a33 100644 --- a/src/controllers/coin.js +++ b/src/controllers/coin.js @@ -10,13 +10,17 @@ function appendApiData(url, callback) { }) } +function addHyphen(thing) { + return thing.replace(' ', '-'); +} + exports.get = (req, res, next) => { const { coinSym } = req.params; coinDetial(coinSym) .then(coinRecord => { if (coinRecord && coinRecord.length > 0) { coinRecord = coinRecord[0]; - appendApiData(`https://api.coinmarketcap.com/v1/ticker/${coinRecord.name}/?convert=GBP`, function(err, result) { + appendApiData(`https://api.coinmarketcap.com/v1/ticker/${addHyphen(coinRecord.name)}/?convert=GBP`, function(err, result) { if (err) next(); else { result = JSON.parse(result); diff --git a/src/views/home.hbs b/src/views/home.hbs index 72a7512..ac6892e 100644 --- a/src/views/home.hbs +++ b/src/views/home.hbs @@ -2,10 +2,7 @@

The future is FACoin!!

And the future looks rich

- - - -
+
-
\ No newline at end of file + + diff --git a/src/views/partials/navbar.hbs b/src/views/partials/navbar.hbs index 9a651f3..6ea0ccf 100644 --- a/src/views/partials/navbar.hbs +++ b/src/views/partials/navbar.hbs @@ -1,7 +1,7 @@ \ No newline at end of file +