-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #92 from LikeLionHGU/hwan_#83/Schedule_View
Hwan #83/schedule view
- Loading branch information
Showing
9 changed files
with
647 additions
and
56 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
105 changes: 105 additions & 0 deletions
105
src/components/SchedulePage/Changing/View/InViewCard.jsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,105 @@ | ||
import styled from "styled-components"; | ||
import "../../../../font/font.css"; | ||
|
||
const StyleContainer = styled.div``; | ||
|
||
const Card = styled.div` | ||
display: flex; | ||
padding: 50px 0; | ||
font-family: Pretendard-Regular; | ||
`; | ||
|
||
const ImageCard = styled.img` | ||
width: 40%; | ||
height: 500px; | ||
border-radius: 5px; | ||
object-fit: cover; | ||
`; | ||
|
||
const InfoBox = styled.div` | ||
padding: 0 80px; | ||
`; | ||
|
||
const Name = styled.div` | ||
font-family: EsaManru; | ||
font-weight: 200; | ||
font-size: 50px; | ||
`; | ||
|
||
const Hours = styled.div` | ||
font-weight: 300; | ||
font-size: 24px; | ||
`; | ||
|
||
const Location = styled.div` | ||
font-size: 22px; | ||
`; | ||
|
||
const Info = styled.div` | ||
width: 700px; | ||
font-size: 20px; | ||
`; | ||
|
||
const BlogBtn = styled.button` | ||
border: 1px solid #f4f0e7; | ||
padding: 20px 50px; | ||
border-radius: 5px; | ||
background-color: #f4f0e7; | ||
color: #2c6e49; | ||
`; | ||
|
||
function InViewCard({ | ||
key, | ||
imageURL, | ||
name, | ||
businessHours, | ||
location, | ||
information, | ||
blog, | ||
index, | ||
}) { | ||
const ToBlog = () => { | ||
window.open(blog); | ||
}; | ||
return ( | ||
<StyleContainer> | ||
<Card style={index % 2 === 1 ? { flexDirection: "row-reverse" } : null}> | ||
<ImageCard src={imageURL} /> | ||
<InfoBox | ||
style={ | ||
index % 2 === 1 | ||
? { | ||
display: "flex", | ||
flexDirection: "column", | ||
alignItems: "flex-end", | ||
} | ||
: null | ||
} | ||
> | ||
<Name>{name}</Name> | ||
<Hours>{businessHours}</Hours> | ||
<Location>{location}</Location> | ||
<Info style={index % 2 === 1 ? { textAlign: "right" } : null}> | ||
{information} | ||
</Info> | ||
{blog ? <BlogBtn onClick={ToBlog}>DISCOVER</BlogBtn> : ""} | ||
</InfoBox> | ||
</Card> | ||
</StyleContainer> | ||
); | ||
} | ||
|
||
// InViewCard.propTypes = { | ||
// key: PropTypes.number.isRequired, | ||
// coverImg: PropTypes.string.isRequired, | ||
// title: PropTypes.string.isRequired, | ||
// summary: PropTypes.string.isRequired, | ||
// rating: PropTypes.number.isRequired, | ||
// genres: PropTypes.arrayOf(PropTypes.string).isRequired, | ||
// }; | ||
|
||
export default InViewCard; |
Oops, something went wrong.