Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Header Design & Carousel Base + About page #64

Merged
merged 20 commits into from
Oct 17, 2024
Merged
Show file tree
Hide file tree
Changes from 17 commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
5e75100
moving navbar to header and getting background color
bbland1 Oct 8, 2024
96b9194
working on the unauth header
bbland1 Oct 8, 2024
442f48a
getting the hamburger to show on the small screen and the links to be…
bbland1 Oct 9, 2024
82e62dc
spacing the navigation links on expanded view
bbland1 Oct 9, 2024
2df9440
fixing the hamburger being bumped down when trying mobile
bbland1 Oct 9, 2024
dbba311
getting the brand name to be at the top like design
bbland1 Oct 9, 2024
c9e2a67
getting the hamburger and title on same page when on iphone SE
bbland1 Oct 9, 2024
0a1a6c0
making sure the navbar toggler icon can be seen
bbland1 Oct 9, 2024
7f588e5
making sure nav bar close on mobile clicks
bbland1 Oct 9, 2024
cc2e6e6
Bb/about page carousel design (#66)
bbland1 Oct 10, 2024
7cc3a26
when merged the about page into header branch all the buttons broke w…
bbland1 Oct 10, 2024
0d5aa28
changing color of svg icons
bbland1 Oct 10, 2024
c2dddbc
the creators and thank you boxes are equal size now
bbland1 Oct 10, 2024
84b4401
fixed media queries for mobile size to make sure button looked okay
bbland1 Oct 10, 2024
9cafd27
switch button color and bg for clearer on small screens and more cons…
bbland1 Oct 16, 2024
d8e7727
moving sign out button outside of menu hamburger
bbland1 Oct 16, 2024
bc7fe6d
fixing a change to the layout width didn't see got changed
bbland1 Oct 16, 2024
19709f7
Merge branch 'main' into bb/header-design
bbland1 Oct 17, 2024
aa5bb76
added about to navbar and removed button like the design
bbland1 Oct 17, 2024
a14d5a9
fix button size
bbland1 Oct 17, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions src/api/useAuth.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ export const SignInButton = ({ isSignIn = true }: SignInButtonProps) => {

return (
<Button
className="custom-button"
type="button"
onClick={() => {
signInWithPopup(auth, new GoogleAuthProvider())
Expand All @@ -37,7 +38,6 @@ export const SignInButton = ({ isSignIn = true }: SignInButtonProps) => {
);
});
}}
className="m-2"
>
{isSignIn ? "Sign In" : "Sign Up"}
</Button>
Expand Down Expand Up @@ -69,7 +69,6 @@ export const SignOutButton = () => {
);
});
}}
className="m-2"
>
Sign Out
</Button>
Expand Down
File renamed without changes
File renamed without changes
Binary file added src/assets/images/sample.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
26 changes: 0 additions & 26 deletions src/components/AuthenticatedNavBar.tsx

This file was deleted.

7 changes: 6 additions & 1 deletion src/components/CreateList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,12 @@ export function CreateList({ user, setListPath }: Props) {
aria-required="true" // Indicates that this field is required
/>
<br />
<Button aria-label="Create new shopping list">Create List</Button>
<Button
className="custom-button"
aria-label="Create new shopping list"
>
Create List
</Button>
</InputGroup>
</Form>
</>
Expand Down
4 changes: 3 additions & 1 deletion src/components/FilterListInput.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,9 @@ export function FilterListInput({
aria-label="Filter items in the list"
placeholder="Search items..."
/>
<Button onClick={handleClear}>x</Button>
<Button className="custom-button" onClick={handleClear}>
x
</Button>
</InputGroup>
</Form>
);
Expand Down
4 changes: 3 additions & 1 deletion src/components/ListItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,9 @@ export function ListItemCheckBox({ item, listPath }: Props) {
{item.name}{" "}
<span>
{getUrgencyStatus(item)}
<Button onClick={() => deleteItemHandler()}>Delete Item</Button>
<Button className="custom-button" onClick={() => deleteItemHandler()}>
Delete Item
</Button>
</span>
</div>
);
Expand Down
75 changes: 48 additions & 27 deletions src/components/NavBar.scss
Original file line number Diff line number Diff line change
@@ -1,35 +1,56 @@
.Nav {
background-color: var(--color-bg);
border-top: 1px solid var(--color-border);
bottom: 0;
display: flex;
flex-direction: row;
padding-bottom: max(env(safe-area-inset-bottom), 1rem);
padding-top: 1rem;
place-content: center;
position: fixed;
width: 100%;

&__container {
display: flex;
flex-direction: row;
justify-content: space-evenly;
width: min(72ch, 100%);
@import "../styles/variables.scss";

.navbar {
.navbar-brand {
font-size: 3.5rem !important;

text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.4);

@media (max-width: 430px) {
bbland1 marked this conversation as resolved.
Show resolved Hide resolved
font-size: 3rem !important;
}
@media (max-width: 375px) {
font-size: 2.5rem !important;
}
}

&__link {
--color-text: var(--color-accent);
color: var(--color-text);
font-size: 1.4em;
flex: 0 1 auto;
.nav-link {
color: $primary-beige;
font-size: 1.5rem;
line-height: 1;
padding: 0.8rem;
text-align: center;
text-underline-offset: 0.1em;

&.active {
text-decoration-thickness: 0.22em;
text-underline-offset: 0.1em;
text-decoration: underline;
bbland1 marked this conversation as resolved.
Show resolved Hide resolved
color: $primary-beige !important;
text-underline-offset: 0.3em;
}

&:hover {
color: $secondary-blue;
}
}

.navbar .navbar-toggler {
background-color: $primary-beige;
}
}

.navbar button {
background-color: $primary-beige;
color: $secondary-blue;
font-weight: bold;
border: none;

@media (hover: hover) {
background-color: $secondary-blue;
color: $primary-beige;
}

bbland1 marked this conversation as resolved.
Show resolved Hide resolved
@media (min-width: 431px) {
font-size: 1.5rem;
text-align: center;
border: none;
padding: 0.5rem;
width: 11rem;
}
}
4 changes: 3 additions & 1 deletion src/components/SingleList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,9 @@ export function SingleList({ name, path, setListPath }: Props) {

return (
<li className="SingleList">
<Button onClick={handleClick}>{name}</Button>
<Button className="custom-button" onClick={handleClick}>
{name}
</Button>
</li>
);
}
39 changes: 25 additions & 14 deletions src/components/authenticated/AuthenticatedNavBar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,21 +9,32 @@ import "../NavBar.scss";

export function AuthenticatedNavBar() {
return (
<Navbar expand="lg" fixed="bottom" className="Nav">
<Container className="d-flex justify-content-around Nav_container">
<Navbar
collapseOnSelect
expand="md"
className="bg-secondary rounded-bottom-3 pt-0"
>
<Container className="align-items-center justify-content-evenly">
<Navbar.Brand className="bg-primary rounded-bottom-3 text-center mb-3 px-3 text-dark fw-bolder shadow">
GrocerEase
</Navbar.Brand>
<Navbar.Toggle aria-controls="basic-navbar-nav" />
<Navbar.Collapse>
<Nav className="flex-grow-1 justify-content-evenly align-items-center fw-bolder p-1 text-center">
<Nav.Link as={NavLink} to="/" aria-label="Home" eventKey={"1"}>
Home
</Nav.Link>
<Nav.Link
as={NavLink}
to="/manage-list"
aria-label="Manage List"
eventKey={"2"}
>
Manage List
</Nav.Link>
</Nav>
</Navbar.Collapse>
<SignOutButton />
<Nav.Link as={NavLink} to="/" className="Nav__link" aria-label="Home">
Home
</Nav.Link>

<Nav.Link
as={NavLink}
to="/manage-list"
className="Nav__link"
aria-label="Manage List"
>
Manage List
</Nav.Link>
</Container>
</Navbar>
);
Expand Down
10 changes: 8 additions & 2 deletions src/components/forms/AddItemForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -180,12 +180,18 @@ export function AddItemForm({ listPath, data: unfilteredListItems }: Props) {
Not soon -- Within {purchaseTimelines[PurchaseTime.notSoon]} days!
</label>
</fieldset>
<Button type="submit" aria-label="Add item to shopping list">
<Button
className="custom-button"
type="submit"
aria-label="Add item to shopping list"
>
Submit Item
</Button>
</Form>
<h4>Let&apos;s go look at your list!</h4>
<Button onClick={navigateToListPage}>{"View List"}</Button>
<Button className="custom-button" onClick={navigateToListPage}>
{"View List"}
</Button>
</section>
);
}
12 changes: 9 additions & 3 deletions src/components/forms/ItemQuantityForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -57,11 +57,17 @@ export function ItemQuantityForm({
/>
{edit ? (
<span>
<Button onClick={updateItemQuantity}>Save!</Button>{" "}
<Button onClick={toggleEdit}>Cancel!</Button>
<Button className="custom-button" onClick={updateItemQuantity}>
Save!
</Button>{" "}
<Button className="custom-button" onClick={toggleEdit}>
Cancel!
</Button>
</span>
) : (
<Button onClick={toggleEdit}>Edit!</Button>
<Button className="custom-button" onClick={toggleEdit}>
Edit!
</Button>
)}
</>
);
Expand Down
6 changes: 5 additions & 1 deletion src/components/forms/ShareListForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,11 @@ const ShareListForm = ({ listPath }: Props) => {
aria-label="Enter the user email address to share list"
aria-required
/>
<Button type="submit" aria-label="submits form to share shopping list">
<Button
className="custom-button"
type="submit"
aria-label="submits form to share shopping list"
>
Invite User
</Button>
</InputGroup>
Expand Down
38 changes: 25 additions & 13 deletions src/components/unauthenticated/UnauthenticatedNavBar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,19 +8,31 @@ import "../NavBar.scss";

export function UnauthenticatedNavBar() {
return (
<Navbar expand="lg" fixed="bottom" className="Nav">
<Container className="d-flex justify-content-around Nav-container">
<Nav.Link as={NavLink} to="/" className="Nav-link" aria-label="Home">
Home
</Nav.Link>
<Nav.Link
as={NavLink}
to="/about"
className="Nav-link"
aria-label="About"
>
About
</Nav.Link>
<Navbar
collapseOnSelect
expand="md"
className="bg-secondary rounded-bottom-3 pt-0"
>
<Container>
<Navbar.Brand className="bg-primary rounded-bottom-3 text-center mb-3 px-3 text-dark fw-bolder shadow">
GrocerEase
</Navbar.Brand>
<Navbar.Toggle aria-controls="basic-navbar-nav" />
<Navbar.Collapse id="basic-navbar-nav">
<Nav className="flex-grow-1 justify-content-evenly align-items-center fw-bolder p-1 text-center">
<Nav.Link as={NavLink} to="/" aria-label="Home" eventKey={"1"}>
Home
</Nav.Link>
<Nav.Link
as={NavLink}
to="/about"
aria-label="About"
eventKey={"2"}
>
About
</Nav.Link>
</Nav>
</Navbar.Collapse>
</Container>
</Navbar>
);
Expand Down
30 changes: 30 additions & 0 deletions src/declarations.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
// Declare modules for image types
declare module "*.png" {
const value: string;
export default value;
}

declare module "*.jpg" {
const value: string;
export default value;
}

declare module "*.jpeg" {
const value: string;
export default value;
}

declare module "*.gif" {
const value: string;
export default value;
}

declare module "*.svg" {
const value: string;
export default value;
}

declare module "*.webp" {
const value: string;
export default value;
}
2 changes: 0 additions & 2 deletions src/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,8 @@ import { createRoot } from "react-dom/client";
import { BrowserRouter as Router } from "react-router-dom";
import { App } from "./App";

import "bootstrap/dist/css/bootstrap.min.css";
import "./styles/global.scss";


const root = createRoot(document.getElementById("root") as HTMLElement);
root.render(
<StrictMode>
Expand Down
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;
$tertiary-blue: #356481;
Loading