-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
991ce4a
commit 49f8fee
Showing
9 changed files
with
117 additions
and
15 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
import React from 'react' | ||
import { Col, Row } from 'react-bootstrap' | ||
import blogHome from '../../images/blogHome.jpg' | ||
import '../../styles/blog.css' | ||
import BlogCard from './BlogCard' | ||
|
||
function Blog() { | ||
const blogCategories = ['All', 'Plant', 'Gardening', 'Green Living'] | ||
const num = [1,2,3,4,5] | ||
return ( | ||
<> | ||
<div className="blog-home"> | ||
<img className="blog-home-img" src={blogHome} alt="blog-home" /> | ||
<div className="blog-home-text"> | ||
<h3>Latest Articles</h3> | ||
<p>Discover the most outstanding articles in all topics related to Plants</p> | ||
</div> | ||
|
||
<Row className="blog-row"> | ||
<Col md={2}> | ||
<div className='blog-category'> | ||
<h5>Category</h5> | ||
{blogCategories.map(blog => ( | ||
<div>{blog}</div> | ||
))} | ||
</div> | ||
</Col> | ||
<Col md={10}> | ||
<Row> | ||
{num.map(n => ( | ||
<Col xs={12} sm={6} md={6} lg={4} className='blog-card'> | ||
<BlogCard /> | ||
</Col> | ||
))} | ||
</Row> | ||
</Col> | ||
</Row> | ||
</div> | ||
</> | ||
) | ||
} | ||
|
||
export default Blog |
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,22 @@ | ||
import React from 'react' | ||
import { Button, Card } from 'react-bootstrap' | ||
|
||
function BlogCard() { | ||
return ( | ||
<div> | ||
<Card style={{ width: '24rem'}}> | ||
<Card.Img style={{padding:'0.7rem'}} variant="top" src="https://images.unsplash.com/photo-1520121401995-928cd50d4e27?ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&ixlib=rb-1.2.1&auto=format&fit=crop&w=750&q=80" /> | ||
<Card.Body> | ||
<Card.Title>Card Title</Card.Title> | ||
<Card.Text> | ||
Some quick example text to build on the card title and make up the bulk of | ||
the card's content. | ||
</Card.Text> | ||
<Button variant="primary">Go somewhere</Button> | ||
</Card.Body> | ||
</Card> | ||
</div> | ||
) | ||
} | ||
|
||
export default BlogCard |
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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
.blog-home { | ||
margin-top: -1.5rem; | ||
} | ||
.blog-home-img { | ||
width: 100%; | ||
height: 40vh; | ||
object-fit: cover; | ||
filter: brightness(70%); | ||
} | ||
.blog-home-text { | ||
margin-top: 2rem; | ||
margin-left: 1rem; | ||
} | ||
.blog-home-text h3 { | ||
font-size: 2.5rem; | ||
color: #333; | ||
} | ||
.blog-home-text p { | ||
font-size: 1.3rem; | ||
font-family: "Nunito" !important; | ||
} | ||
.blog-row { | ||
margin-left: 0.5rem !important; | ||
margin-right: 0 !important; | ||
} | ||
.blog-category { | ||
} | ||
.blog-category h5 { | ||
font-size: 1.5rem; | ||
} | ||
.blog-card { | ||
margin-bottom: 2rem; | ||
} |
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