-
Notifications
You must be signed in to change notification settings - Fork 18
Expand file tree
/
Copy pathCover.js
More file actions
122 lines (116 loc) · 3.43 KB
/
Cover.js
File metadata and controls
122 lines (116 loc) · 3.43 KB
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
import React from "react";
import "./Styles/Cover.css";
import { css, StyleSheet } from "aphrodite/no-important";
import commonStyle from "./Styles/CommonStyle";
const coverStyle = StyleSheet.create({
applyMargin: {
"margin-left": "10px"
},
hideDiv: {
visibility: "hidden"
},
title: {
fontWeight: "700",
"font-size": "46px",
"line-height": "1.2",
color: "#fff"
},
textMargin: {
color: "#fff",
marginBottom: "25px",
"font-size": "15px",
"font-weight": "500"
},
trendingText: {
color: "#decdcd;"
},
searchButton: {
border: "none",
padding: 0,
"font-size": "18px",
color: "#999",
"background-color": "transparent",
"text-align": "inherit",
cursor: "pointer",
position: "absolute",
left: "20px",
bottom: "42px",
":focus": {
outline: "none",
top: "17px",
right: "71px"
}
}
});
// have used hardcoded image source as unplash doesnot provide the apis for the photo of the day
// you can use what ever you like.
const imagesrc = "https://images.unsplash.com/photo-1617396900799-f4ec2b43c7ae";
const Cover = () => {
return (
<div className="cover-photo">
<img src={imagesrc} className="random" />
<div className="cover-content">
<div className="cover-heading">
<div className={css(coverStyle.title)}>Unsplash</div>
<div className={css(commonStyle.textColor, commonStyle.fontWeight)}>
Beautiful, free photos.
</div>
<div className={css(coverStyle.textMargin)}>
Gifted by the world’s most generous community of photographers. 🎁
</div>
</div>
<div className="asd">
<button className={css(coverStyle.searchButton)}>
<i className="fas fa-search" />
</button>
<input
className="coverSearchBox"
type="text"
placeholder="Search free high-resolution photos"
/>
</div>
<div className="trending-search">
<span className={css(commonStyle.textColor)}>
Trending searches:{" "}
</span>
<span className={css(coverStyle.trendingText)}>business, </span>
<span className={css(coverStyle.trendingText)}>computer, </span>
<span className={css(coverStyle.trendingText)}>nature, </span>
<span className={css(coverStyle.trendingText)}>love, </span>
<span className={css(coverStyle.trendingText)}>house </span>
</div>
</div>
<div className="footer-div">
<div className="left-div">
<span
className={css(commonStyle.highlightText, coverStyle.applyMargin)}
>
Photo of the day by
</span>{" "}
<a className={css(commonStyle.linkDecoration)} href="/@spenas88">
Gabriel
</a>
</div>
<div className="center-div">
<span className={css(commonStyle.highlightText)}>
Read more about the{" "}
</span>
<span>
<a
className={css(commonStyle.linkDecoration)}
href="https://unsplash.com/license"
target="blank"
>
{" "}
Unsplash License
</a>
</span>
</div>
<div className={css(coverStyle.hideDiv)}>
Extream Right Div No Content Displayed
</div>
</div>
</div>
);
};
export default Cover;