diff --git a/public/img/atm.png b/public/img/atm.png index fba2257..7c16890 100644 Binary files a/public/img/atm.png and b/public/img/atm.png differ diff --git a/public/stylesheets/login.css b/public/stylesheets/login.css index 90cc93e..a363ac7 100644 --- a/public/stylesheets/login.css +++ b/public/stylesheets/login.css @@ -10,7 +10,7 @@ body { align-items: center; padding-top: 40px; padding-bottom: 40px; - background-color: #f5f5f5; + background-color: #FFFCF9; } .form-signin { diff --git a/routes/index.js b/routes/index.js index bedfabd..df19d16 100644 --- a/routes/index.js +++ b/routes/index.js @@ -27,14 +27,14 @@ const Order = require("../models/order"); /* GET home page. */ indexRouter.get('/', function (req, res, next) { - res.render('index.ejs', { + res.render('buy.ejs', { title: 'Express' }); }); /* GET withdraw page. */ indexRouter.get('/withdraw', function (req, res, next) { - res.render('congrats.ejs', { + res.render('withdraw.ejs', { title: 'Express' }); }); @@ -66,12 +66,16 @@ indexRouter.post('/withdraw', function (req, res, next) { $set: {orderCompleted: true} }, {}, (err, doc) => { console.log("ERROR:", err); + if(err) + res.render('withdraw.ejs', { + title: 'Express', error: err + }); + res.render('withdraw.ejs', { + title: 'Express', res : doc + }); }) } - - res.render('withdraw.ejs', { - title: 'Express' - }); + }); diff --git a/views/buy.ejs b/views/buy.ejs index f5bde52..12ec350 100644 --- a/views/buy.ejs +++ b/views/buy.ejs @@ -1,137 +1,323 @@ - - - <%= title %> - - - - - - + + <%= title %> + + + + + - - + + + + + + +
+
+
+

+ How much Bitcoin do you want to buy? +

+
+ + + + + +
+
+ + + +
+
+ + + +
+
+ + + +
+
+ + + +
+
+
+

USD:

+

0.00

+
+ +
+ + +
- - - -
-
-
-

How much Bitcoin do you want to buy?

-
- - - - - -
- -
- - - -
-
- - - -
-
- - - -
-
- - - -
-
-
-
-

USD:

-
-
-

0.00

-
-
- -
- - -
- - + + + + + - - - - - - \ No newline at end of file + + + + + + diff --git a/views/congrats.ejs b/views/congrats.ejs index 0e162ab..a93fd06 100644 --- a/views/congrats.ejs +++ b/views/congrats.ejs @@ -17,7 +17,28 @@ console.log('yooooo') } - + @@ -55,14 +76,20 @@ - +
+ + + + Choose QR code image to read/scan: + +
-

Withdraw your Bitcoin heer

+

Congrats

diff --git a/views/withdraw.ejs b/views/withdraw.ejs index 01abe98..b49385e 100644 --- a/views/withdraw.ejs +++ b/views/withdraw.ejs @@ -1,75 +1,159 @@ - - <%= title %> - - - + + + <%= title %> + + + + + + + - - + + + + - - - + + + - - +
+
+

+ Withdraw your Bitcoin here! +

+
+ + +
+ +
- - + + + + + + + - - + $(window).on("load", function () { + // code here + $("#btn_secret").click(function (e) { + e.preventDefault(); + let secret_code = $("#codeInput").text() + validaSecretCode(secret_code, function(err, res){ + if(err){ + alert("An error has occured:\n", err) + } else { + $("#secret_code_form").hide(); + $("#take_cash").show(); + $("#withdraw_amount").text("USD: " + res + "$"); + + } + }) + }); + }); + - + \ No newline at end of file