Skip to content

Commit

Permalink
Apply styles to unauthenticated home page
Browse files Browse the repository at this point in the history
  • Loading branch information
zahrafalak committed Oct 10, 2024
1 parent 942a42e commit 7ea8d7a
Show file tree
Hide file tree
Showing 5 changed files with 51 additions and 15 deletions.
1 change: 1 addition & 0 deletions src/styles/_variables.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@
$primary-beige: #f1e6cc;
$primary-blue: #3f6476;
$secondary-blue: #001f3f;
$light-blue: #356481;
Empty file removed src/views/Home.scss
Empty file.
1 change: 0 additions & 1 deletion src/views/Home.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import React from "react";
import "./Home.scss";
import { List, User } from "../api";
import { AuthenticatedHome, UnauthenticatedHome } from "../views";

Expand Down
31 changes: 31 additions & 0 deletions src/views/unauthenticated/UnauthenticatedHome.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
@use "../../styles/variables.scss" as *;

.text__heading {
color: $secondary-blue;
text-align: center;
padding: 12px;
}

.text__normal {
color: $light-blue;
text-align: center;
}

.button {
background-color: $primary-blue;
border: none;
color: $primary-beige;
text-align: center;
padding: 10px 40px;
width: 170px;
}

.custom-button-wrapper {
display: flex;
justify-content: center; // Centers the button horizontally
align-items: center;
}

.custom-button-wrapper button {
@extend .button;
}
33 changes: 19 additions & 14 deletions src/views/unauthenticated/UnauthenticatedHome.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import React from "react";
import "./UnauthenticatedHome.scss";
import { useNavigate } from "react-router-dom";
import { SignInButton } from "../../api";
import Button from "react-bootstrap/Button";
Expand All @@ -8,29 +9,33 @@ export function UnauthenticatedHome() {

return (
<div className="Home">
<h2>Welcome to GrocerEase</h2>
<p>
The next best thing to having someone else do the shopping for you!
<h2 className="text__heading">Welcome to GrocerEase</h2>
<p className="text__normal">
The next best thing to having someone else do the shopping for you!{" "}
<br />
Create and manage smart lists, while it learns your shopping habits to
let you know exactly when you will need to buy that next batch of toilet
paper!
</p>

<article>
<p>New to GrocerEase:</p>
<Button
onClick={() => navigate("/about")}
aria-label="Navigate to the about application page."
className="m-2"
>
Learn More
</Button>
<SignInButton isSignIn={false} />
<h3 className="text__heading">Welcome Back:</h3>
<div className="custom-button-wrapper">
<SignInButton />
</div>
</article>

<article>
<p>Welcome Back:</p>
<SignInButton />
<h5 className="text__heading">New to GrocerEase?</h5>
<div className="custom-button-wrapper">
<Button
onClick={() => navigate("/about")}
aria-label="Navigate to the about application page."
>
Learn More
</Button>
<SignInButton isSignIn={false} />
</div>
</article>
</div>
);
Expand Down

0 comments on commit 7ea8d7a

Please sign in to comment.