From 32a729182ee757d6e13d75a977869105fc7bcf35 Mon Sep 17 00:00:00 2001 From: Harshi Sharma <45699555+HarshiSharma@users.noreply.github.com> Date: Mon, 25 Mar 2024 17:25:18 +0000 Subject: [PATCH] UI overlook changes (#22) * nav change manage ui change colour change and journal icon change * removing dummy data part oops * login and signup UI fix * added track distance changes (#21) Modified below services Frontend service Added the new field on UI and passed the field to activity-tracking web service Validation to enter distance for running and swimming activities Css changes to add style for distance input field modified: frontend/src/App.css modified: frontend/src/components/trackExercise.js Activity-Tracking service Added the new field distance in the schema Added the new field in POST request & PUT request modified: activity-tracking/models/exercise.model.js modified: activity-tracking/routes/exercises.js * login and signup UI fix * merge * bracket fix --------- Co-authored-by: ruchika512 --- frontend/src/App.css | 144 +++++++++++++++++------ frontend/src/App.js | 38 +++--- frontend/src/components/journal.css | 1 - frontend/src/components/journal.js | 11 +- frontend/src/components/login.js | 28 +++-- frontend/src/components/manage.css | 33 ++++++ frontend/src/components/manage.js | 139 ++++++++++++++++------ frontend/src/components/navbar.js | 66 ++++++----- frontend/src/components/signup.js | 10 +- frontend/src/components/statistics.css | 1 - frontend/src/components/statistics.js | 11 +- frontend/src/components/trackExercise.js | 3 +- 12 files changed, 340 insertions(+), 145 deletions(-) create mode 100644 frontend/src/components/manage.css diff --git a/frontend/src/App.css b/frontend/src/App.css index 4b0dc04b..191b1d04 100644 --- a/frontend/src/App.css +++ b/frontend/src/App.css @@ -14,35 +14,31 @@ body { color: #333; } -#appLogo { - width: 150px; - height: auto; -} - .App { - text-align: center; - max-width: 750px; - margin: auto; - padding: 20px; + display: flex; + flex-direction: column; + height: 100vh; /* Utilize full height of the screen */ } - -.appTitle header { +.grid-container { display: flex; - align-items: center; /* Align items vertically */ - justify-content: center; /* Align items horizontally */ - margin-bottom: 20px; /* Adjust spacing */ + flex: 1; /* Grow to fill available space */ +} + +#header{ + margin: 5px 5px 25px 5px; +} +.navComponent{ + border-top: 0.1rem solid var(--mantine-color-dark-1); } -.appTitle h1 { - color: #F54996ff; - font-size: 36px; - margin-left: 20px; /* Adjust spacing between h1 and img */ +#appTitle { + color: #882255; + font-size: 30px; } #appLogo { - width: 50px; /* Adjust the width of the logo */ - height: auto; /* Maintain aspect ratio */ - margin-right: 20px; /* Add space between h1 and img */ + width: 35px; + height: auto; } form { @@ -51,7 +47,7 @@ form { button.navigationButton { - background-color: #F54996ff; + background-color: #882255; color: white; border: none; padding: 10px 20px; @@ -65,36 +61,38 @@ button.navigationButton:hover { background-color: #ff66b2; } -/* Style the success message */ p.successMessage { color: green; margin-bottom: 20px; } .componentContainer { + flex: 1; /* Grow to fill remaining space */ padding: 30px; background-color: #f0f0f0; border-radius: 5px; + text-align: center; } + .btn-primary { - background-color: #F54996 !important; - border-color: #F54996ff !important; + background-color: #882255 !important; + border-color: #882255 !important; } .btn-primary:hover { - background-color: #f03087 !important; - border-color: #F54996ff !important; + background-color: #882255 !important; + border-color: #882255 !important; } .btn-success { - background-color: #F54996 !important; - border-color: #F54996ff !important; + background-color: #882255 !important; + border-color: #882255 !important; } .btn-success:hover { background-color: #f03087 !important; - border-color: #F54996ff !important; + border-color: #882255 !important; } input#duration { @@ -102,6 +100,42 @@ input#duration { margin: auto; } +#appTitleLogin { + width: 50px; /* Adjust the width of the logo */ + height: auto; /* Maintain aspect ratio */ + margin-right: 30px; /* Add space between h1 and img */ + width: 35px; + height: auto; +} +.appTitleLogin header { + display: flex; + align-items: center; /* Align items vertically */ + justify-content: center; /* Align items horizontally */ + margin-bottom: 20px; /* Adjust spacing */ +} +.appTitleLogin header h1 { + margin-left: 20px; + color: #882255; +} + +#appTitleLogin { + width: 50px; /* Adjust the width of the logo */ + height: auto; /* Maintain aspect ratio */ + margin-right: 30px; /* Add space between h1 and img */ + width: 35px; + height: auto; +} +.appTitleLogin header { + display: flex; + align-items: center; /* Align items vertically */ + justify-content: center; /* Align items horizontally */ + margin-bottom: 20px; /* Adjust spacing */ +} +.appTitleLogin header h1 { + margin-left: 20px; + color: #882255; +} + input#distance { width: 20%; margin: auto; @@ -117,13 +151,45 @@ input#distance { padding: 10px; font-size: 12px; color: lightgrey; - position: relative; - bottom: 0; - width: 100%; } .navbar { - background-color: #F54996; + height: rem(700px); + width: rem(300px); + display: flex; + flex-direction: column; + border-right: rem(1px) solid light-dark(var(--mantine-color-gray-3), var(--mantine-color-dark-4)); +} + +#navLink { + display: flex; + align-items: center; + text-decoration: none; + font-size: var(--mantine-font-size-sm); + color: light-dark(var(--mantine-color-gray-7), var(--mantine-color-dark-1)); + padding: var(--mantine-spacing-xs) var(--mantine-spacing-sm); + border-radius: var(--mantine-radius-sm); + font-weight: 500; + + &:hover, + &[data-active] { + background-color: #228be61a; + color: var(--mantine-color-blue-light-color); + + .linkIcon { + color: var(--mantine-color-blue-light-color); + } + } +} + + + + +.linkIcon { + color: light-dark(var(--mantine-color-gray-6), var(--mantine-color-dark-2)); + margin-right: var(--mantine-spacing-sm); + width: rem(25px); + height: rem(25px); } .navbar-nav { @@ -136,4 +202,14 @@ input#distance { .signup { margin: 20px; +} + + +.login-container{ + max-width: 600px; + margin: auto; + background-color: #f5f5f5; + padding: 20px; + border-radius: 5px; + box-shadow: 0 0 10px rgba(0,0,0,0.1); } \ No newline at end of file diff --git a/frontend/src/App.js b/frontend/src/App.js index 84897185..9b2687b5 100644 --- a/frontend/src/App.js +++ b/frontend/src/App.js @@ -35,28 +35,22 @@ function App() {
-
-
- -

MLA Fitness App

-
-
- - {isLoggedIn && } - -
- - : } /> - : { - setIsLoggedIn(true); - setCurrentUser(username); - }} />} /> - : } /> - : } /> - : } /> - : } /> - : } /> - +
+ {isLoggedIn && } +
+ + : } /> + : { + setIsLoggedIn(true); + setCurrentUser(username); + }} />} /> + : } /> + : } /> + : } /> + : } /> + : } /> + +