Skip to content

Commit

Permalink
Merge pull request #180 from pathirny/develop
Browse files Browse the repository at this point in the history
Develop
  • Loading branch information
pathirny authored Dec 21, 2023
2 parents e6ab807 + 2063741 commit 481d6d6
Show file tree
Hide file tree
Showing 3 changed files with 111 additions and 74 deletions.
28 changes: 21 additions & 7 deletions harvesthub/app/globals.css
Original file line number Diff line number Diff line change
Expand Up @@ -460,7 +460,9 @@ hr {
transparent 100%
);
}

.flexContainer {
top: 50vw;
}
.addButton {
margin-top: 3rem;
}
Expand Down Expand Up @@ -835,6 +837,11 @@ hr {
height: 25vw;
opacity: 0.6;
}
.formButtonBox {
display: flex;
justify-content: space-around;
width: 80vw;
}
/* Media Queries */
@media only screen and (min-width: 1000px) {
#nav-body {
Expand Down Expand Up @@ -939,9 +946,10 @@ hr {
}

.flexContainer {
top: 20vw;
max-width: 60vw;
left: 20%;
border-radius: 0 0 25px 25px;
border-radius: 10px;
}

.input {
Expand All @@ -950,8 +958,8 @@ hr {

.formButtonBox {
display: flex;
justify-content: space-around;
width: 60%;
justify-content: center;
align-items: center;
}
hr {
width: 50vw;
Expand Down Expand Up @@ -1181,11 +1189,17 @@ hr {
background-color: var(--brown-color);
cursor: pointer;
}

#home-button {
#user-button {
border-radius: 70%;
height: 9vw;
width: 10vw;
}
#home-button,
#user-button {
transition: 0.7s;
}
#home-button:hover {
#home-button:hover,
#user-button:hover {
cursor: pointer;
background-color: var(--brown-color);
}
Expand Down
153 changes: 88 additions & 65 deletions harvesthub/app/tips-and-tricks/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ export default function TipsnTricks() {
const [description, setDescription] = useState("");
const [image, setImage] = useState("");
const [signedIn] = useCheckSignedIn();
const [addTipForm, setAddTipForm] = useState(false);
//use supabase
const supabase = createBrowserClient(
process.env.NEXT_PUBLIC_SUPABASE_URL!,
Expand Down Expand Up @@ -114,70 +115,6 @@ export default function TipsnTricks() {
<div>
<Header title="Tips and Tricks" />

<Flex
position="absolute"
zIndex="2"
justifyContent="center"
bgColor="#47594e"
width="100%"
color="#f3ebe4"
className="flexContainer"
>
<FormControl
display={display}
flexDirection="column"
justifyContent="center"
alignItems="center"
className="forms"
>
<Input
placeholder="Title ✍"
width="90vw"
required
className="input"
value={title}
onChange={(event) => setTitle(event.target.value)}
/>
<Input
placeholder="Description ✍"
width="90vw"
height="25vh"
className="input"
required
value={description}
onChange={(event) => setDescription(event.target.value)}
/>
{/* <Input
placeholder="Image ✍"
width="90vw"
value={image}
onChange={(event) => setImage(event.target.value)}
/> */}
<hr />
<div className="formButtonBox">
<Button
type="submit"
border="solid 1px black"
className="formButton"
boxShadow="10px 9px 30px 1px rgba(0,0,0,0.75)"
onClick={(event) => {
addTip(event);
toggleForm();
}}
>
Submit
</Button>
<Button
onClick={toggleForm}
className="formButton"
border="solid 1px black"
boxShadow="10px 9px 30px 1px rgba(0,0,0,0.75)"
>
Cancel
</Button>
</div>
</FormControl>
</Flex>
<SearchBar
value={searchTerm}
onChange={(e) => setSearchTerm(e.target.value)}
Expand All @@ -195,13 +132,99 @@ export default function TipsnTricks() {
<Button className="addButton">Back</Button>
</Link>
{signedIn ? (
<Button className="addButton" onClick={toggleForm}>
<Button
className="addButton"
onClick={() => {
setAddTipForm(!addTipForm);
}}
>
Add Tip +
</Button>
) : (
<></>
)}
</Flex>
{addTipForm ? (
<>
{" "}
<div
style={{
position: "fixed",
top: "0",
height: "100vh",
width: "100vw",
backgroundColor: "rgba(243, 235, 228, 0.8)",
}}
>
{" "}
</div>{" "}
<Flex
position="fixed"
zIndex="1000"
justifyContent="center"
alignContent="center"
bgColor="#47594e"
width="100%"
color="#f3ebe4"
className="flexContainer"
>
<FormControl
display="flex"
flexDirection="column"
justifyContent="center"
alignItems="center"
className="forms"
>
<Input
alignSelf="center"
justifySelf="center"
placeholder="Title ✍"
width="90vw"
required
className="input"
value={title}
onChange={(event) => setTitle(event.target.value)}
/>
<Input
placeholder="Description ✍"
width="90vw"
height="25vh"
className="input"
required
value={description}
onChange={(event) => setDescription(event.target.value)}
/>
<hr />
<div className="formButtonBox">
<Button
type="submit"
border="solid 1px black"
className="formButton"
boxShadow="10px 9px 30px 1px rgba(0,0,0,0.75)"
onClick={(event) => {
setAddTipForm(false);
addTip(event);
}}
>
Submit
</Button>
<Button
onClick={() => {
setAddTipForm(false);
}}
className="formButton"
border="solid 1px black"
boxShadow="10px 9px 30px 1px rgba(0,0,0,0.75)"
>
Cancel
</Button>
</div>
</FormControl>
</Flex>
</>
) : (
<></>
)}
</div>
);
}
4 changes: 2 additions & 2 deletions harvesthub/app/veggies/[veggie]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -135,13 +135,13 @@ export default function Veggies({ params }: any) {
<h2>Plant:</h2>
</div>
<div className="brown">
<h2>{vegHarv}</h2>
<h2>{vegPlant}</h2>
</div>
<div className="cream">
<h2>Harvest:</h2>
</div>
<div className="brown">
<h2>{vegPlant}</h2>
<h2>{vegHarv}</h2>
</div>
</div>
</div>
Expand Down

0 comments on commit 481d6d6

Please sign in to comment.