forked from aahmadyar123/CookMyFridge
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathhome_widgets.js
132 lines (120 loc) · 3.4 KB
/
home_widgets.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
import React from 'react';
import styled from 'styled-components';
import { NavLink as Link } from 'react-router-dom';
import { useAuth } from '../context/AuthProvider';
// import { StyledLink, NavBtn } from "../Navbar/NavbarElements";
export const WidgetBox = styled.div`
padding-top: 3em;;
position: relative;
display: grid;
grid-template-area:
"widget widget widget";
grid-template-columns: 1fr 1fr 1fr;
justify-content: space-evenly;
gap: 2em;
padding-left: 12em;
padding-right: 12em;
justify-content: space-evenly;
justify-items: center;
align-content: space-evenly;
align-items: center;
width: 100%;
height: 100%;
`;
export const ToastImg = styled.div`
background-image: url(${"https://i.pinimg.com/originals/b5/64/ef/b564efd57ef4a8542a4e4520f9a201cd.jpg"});
background-size: 140%;
background-position: 40%;
border: 1px solid black;
position: relative;
display: grid;
justify-content: center;
width: 310px;
height: 365px;
margin: auto;
border-radius: 20px;
`;
export const SoupImg = styled.div`
background-image: url(${"https://soyummy.club/wp-content/uploads/2019/09/martha-stewart-potato-soup-lovely-9-carrot-soup-recipes-that-anybunny-will-love-of-martha-stewart-potato-soup.jpg"});
background-size: 140%;
background-position: 65%;
border: 1px solid black;
position: relative;
display: grid;
justify-content: center;
width: 310px;
height: 365px;
margin: auto;
border-radius: 20px;
`;
export const BrownieImg = styled.div`
background-image: url(${"https://i.pinimg.com/originals/87/6e/19/876e19fa02ed05a1ca42045c8e3e372e.jpg"});
background-size: 140%;
background-position: center;
border: 2px solid black;
position: relative;
display: grid;
justify-content: center;
width: 310px;
height: 365px;
margin: auto;
border-radius: 20px;
`;
export const Button = styled.button`
position: relative;
z-index: 10;
top: -210px;
width: 150px;
height: 60px;
margin: auto;
border-radius: 20px;
background: #353839;
color: #fff;
outline: none;
border: 1px solid black;
cursor: pointer;
transition: all 0.2s ease-in-out;
text-decoration: none;
top: 0;
&:hover {
transition: all 0.2s ease-in-out;
background: #929292;
color: #fff;
}
`;
export const StyledLink = styled(Link)`
text-decoration: none;
color: inherit;
margin: auto;
`;
const BigWrapper = styled.section`
padding: 0;
background: white;
width: 100%;
height: ${props => props.height};
`;
export default function HomeWidgets() {
const {Auth} = useAuth();
return (
<>
<WidgetBox>
<ToastImg>
{/* <StyledLink id="link" onClikc> */}
<Button id="Button" onClick={Auth.toSave}> My Favorites </Button>
{/* </StyledLink> */}
</ToastImg>
<SoupImg>
<StyledLink id="link" to="/services/ingredients">
<Button id="Button"> Find Recipes </Button>
</StyledLink>
</SoupImg>
<BrownieImg>
<StyledLink id="link" to="/ContactUs">
<Button id="Button"> Contact Us </Button>
</StyledLink>
</BrownieImg>
</WidgetBox>
<BigWrapper height="50px"></BigWrapper>
</>
);
}