-
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.
changing styling of article grid titles
- Loading branch information
1 parent
2842727
commit b9433fb
Showing
2 changed files
with
72 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
import React from "react"; | ||
import styled from "styled-components"; | ||
import ArticleCard from "../components/ArticleCard.js"; | ||
|
||
|
||
const Container = styled.div` | ||
position: relative; | ||
width: 60%; | ||
margin: 0 auto; | ||
justify-content: center; | ||
padding: 1em; | ||
background: white; | ||
z-index: 10; | ||
`; | ||
|
||
const TitleContainer = styled.div` | ||
gap: 0px; | ||
width: 62.5%; | ||
margin: 0 auto; | ||
justify-content: center; | ||
opacity: 0px; | ||
background: #265ca9; | ||
position: relative; | ||
z-index: 1; | ||
`; | ||
const Title = styled.div` | ||
color: #FBFBFB; | ||
text-align: center; | ||
font-family: Moul; | ||
font-size: clamp(25px, 5vw, 70px); | ||
font-style: normal; | ||
font-weight: 400; | ||
line-height: normal; | ||
` | ||
|
||
const WhiteStripe = styled.div` | ||
width: 62.5%; | ||
height: 1em; | ||
margin: 0 auto; | ||
background: #ffffff; | ||
position: relative; | ||
z-index: 1; | ||
`; | ||
|
||
const RedStripe = styled.div` | ||
width: 62.5%; | ||
height: 1em; | ||
margin: 0 auto; | ||
background: #cd2027; | ||
position: relative; | ||
z-index: 1; | ||
`; | ||
|
||
const ArticleGrid = ({ articles, title }) => { | ||
return ( | ||
<> | ||
<TitleContainer> | ||
<Title>★ {title} ★</Title> | ||
</TitleContainer> | ||
<WhiteStripe /> | ||
<RedStripe /> | ||
<Container> | ||
{articles.map((article) => { | ||
return <ArticleCard props={article} />; | ||
})} | ||
</Container> | ||
</> | ||
); | ||
}; | ||
|
||
export default ArticleGrid; |
Binary file not shown.