forked from aahmadyar123/CookMyFridge
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathhome.js
76 lines (68 loc) · 1.58 KB
/
home.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
import React from 'react';
import styled from 'styled-components';
import "../css/home.css";
import HomeWidgets from '../components/Home/home_widgets';
import Cooking from "../images/cooking.jpg";
const Title = styled.h1`
font-size: ${props => props.fontSize}em;
text-align: center;
color: white;
font-weight: bold;
font-style: italic;
padding-top: 0px;
`;
const Middle = styled.div`
opacity: 1;
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
-ms-transform: translate(-50%, -50%)
`;
const Gradient = styled.section`
background-image: linear-gradient(to bottom, rgba(245, 246, 252, 0.52), rgba(117, 19, 93, 0.73)), url(${Cooking});
background-size: cover;
display: block;
width: 100%;
margin-left: auto;
margin-right: auto;
height: 300px;
position: absolute;
`;
const Base = styled.section`
background-image: url(${Cooking});
background-size: cover;;
display: block;
width: 100%;
margin-left: auto;
margin-right: auto;
height: 300px;
position: relative;
transition: 0.4s 180s;
&:hover {
opacity: 0;
transition-delay: 0s;
${Gradient} {
opacity: 1;
}
}
&:focus {
opacity: 1;
}
`;
const Home = () => {
return (
<>
<Gradient>
<Middle>
<Title fontSize = "4">Cook My Fridge</Title>
</Middle>
</Gradient>
<Base>
</Base>
{/* <BottomSearchbar id="Search"/> */}
<HomeWidgets> </HomeWidgets>
</>
);
};
export default Home;