From ec311f26c628319a326d333dc5f951d8ac3b7447 Mon Sep 17 00:00:00 2001 From: Pavan Gandhi Date: Sun, 23 Aug 2020 13:12:53 +0530 Subject: [PATCH] Revert "Updated UI of the app" --- public/css/tailwind.css | 52 -- routes/api/addBalance.js | 7 +- routes/api/portfolio.js | 4 +- views/addBalance.ejs | 49 +- views/cart.ejs | 115 ++-- views/layouts/app.ejs | 48 +- views/partials/_nav.ejs | 123 ++-- views/portfolio.ejs | 1332 +++++++++++++++++++++----------------- views/view.ejs | 74 ++- 9 files changed, 971 insertions(+), 833 deletions(-) diff --git a/public/css/tailwind.css b/public/css/tailwind.css index f8da7c0..985abac 100644 --- a/public/css/tailwind.css +++ b/public/css/tailwind.css @@ -20,58 +20,6 @@ body { width: 75vw; } -.tradebyte-logo { - color: #1955E4; - text-shadow: 1px 2px 40px rgba(0, 0, 0, 0.5) -} - -.line { - border: 1.5px solid #8e9aad; -} - -.user-profile { - border-radius: 100px; - border: 10px solid #1955E4; - width: 130px; - height: 130px; -} - -.tick { - height: 22px; - width: 22px; - border-radius: 50%; - background-color: #38cda0; - color: white; -} - -.tick-background { - background: #a9f7e6; - border-radius: 29px; - color: #1b9b7f; -} - -.tab-color { - border-radius: 10px; - border-color: #1955E4; - color: #1955E4; - } - -.view-link { - color: #1955E4; -} - -.table-content { - overflow: scroll; - overflow-x: scroll; - overflow-y: auto; -} - -.transaction-companySymbol { - color: rgb(0, 0, 0); - font-weight: 700; - font-size: 1.1rem; -} - @tailwind components; .symbolicon { diff --git a/routes/api/addBalance.js b/routes/api/addBalance.js index 98bfc33..7fe0d7b 100644 --- a/routes/api/addBalance.js +++ b/routes/api/addBalance.js @@ -10,11 +10,10 @@ const User = require("../../models/User"); // @access Private router.get("/", ensureAuth, (req, res) => { let user = req.user; - res.status(200).render("addBalance", { - layout: "layouts/app", - href: "/addBalance", + res.status(200).render("addBalance"), + { user, - }); + }; }); // TODO diff --git a/routes/api/portfolio.js b/routes/api/portfolio.js index 291bc2f..1d28251 100644 --- a/routes/api/portfolio.js +++ b/routes/api/portfolio.js @@ -8,10 +8,10 @@ const { ensureAuth, ensureGuest } = require("../../middleware/auth"); // @route GET /portfolio // @access Private router.get("/", ensureAuth, (req, res) => { - let user = req.user; + let avatar = req.user.image; res .status(200) - .render("portfolio", { layout: "layouts/app", user, href: "/portfolio" }); + .render("portfolio", { layout: "layouts/app", avatar, href: "/portfolio" }); }); module.exports = router; diff --git a/views/addBalance.ejs b/views/addBalance.ejs index 5fc8037..2076304 100644 --- a/views/addBalance.ejs +++ b/views/addBalance.ejs @@ -1,24 +1,27 @@ -
-
-
-

Add Balance

+

ADD BALANCE

+
+

Your Current Balance: <%= user.balance%>

+
+
+
+
+ + +
-
-
-

Your Current Balance: <%= user.balance%>

- -
- - - -
- -
-
-
- + diff --git a/views/cart.ejs b/views/cart.ejs index 3aa8783..e803775 100644 --- a/views/cart.ejs +++ b/views/cart.ejs @@ -1,66 +1,97 @@
-
- - - - - - -
-
+

- Buy Stock : + Buy Stock :

- -
+ class="new grid grid-flow-col grid-cols-3 md:grid-cols-4 grid-rows-2 grig-gap-0 md:gap-4 lg:grid-rows-3 bg-white shadow-md p-2 lg:p-6 text-center" + > +
Company Name
-
+
- -

+ +

<%= companyName %>

-