Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Single article page #33

Closed
wants to merge 45 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
45 commits
Select commit Hold shift + click to select a range
ae43512
Fixed Issues
eliftabak Jul 25, 2020
c8a8449
Merge branch 'dev' of https://github.com/ReCoded-Org/capstone-istanbu…
eliftabak Jul 30, 2020
d6c5bed
added blog card component
eliftabak Jul 30, 2020
673ef61
Merge branch 'dev' into blog-cards
eliftabak Jul 30, 2020
cf1fbd5
merged with new updated from dev
eliftabak Jul 30, 2020
e99f3cf
passed test
eliftabak Jul 30, 2020
a50ccd0
restore lost commits
eliftabak Aug 3, 2020
97e5fd0
Update BlogCard.jsx
eliftabak Aug 3, 2020
e1472bb
passed test
eliftabak Aug 3, 2020
11e3702
added initial files and rebase blog-cards branch
eliftabak Aug 3, 2020
7a2a859
added a button
eliftabak Aug 3, 2020
49d0b4e
added a button
eliftabak Aug 3, 2020
ac0e7c1
Merge branch 'blog-cards' of https://github.com/ReCoded-Org/capstone-…
eliftabak Aug 3, 2020
0153340
finished designing and add a test
eliftabak Aug 4, 2020
58f8fef
run fix
eliftabak Aug 4, 2020
61ce65b
Merge branch 'dev' into blog-cards
eliftabak Aug 4, 2020
119ff3a
Merge branch 'blog-cards' of https://github.com/ReCoded-Org/capstone-…
halitbatur Aug 7, 2020
e6111f4
updated button
eliftabak Aug 7, 2020
89e49d3
Merge branch 'blog-cards' of https://github.com/ReCoded-Org/capstone-…
eliftabak Aug 7, 2020
036cde6
Merge branch 'blog-cards' of https://github.com/ReCoded-Org/capstone-…
halitbatur Aug 7, 2020
d4ff5e9
import navlinks and add router
halitbatur Aug 7, 2020
bf777eb
updated test
eliftabak Aug 8, 2020
98d7a9a
updated
eliftabak Aug 9, 2020
bf7101c
Merge branch 'dev' of https://github.com/ReCoded-Org/capstone-istanbu…
eliftabak Aug 9, 2020
7fbbd40
updated appjs
eliftabak Aug 9, 2020
e7f3d94
merge dev to local repo and resolved conflicts
eliftabak Aug 9, 2020
54e906d
finished blog card
eliftabak Aug 9, 2020
4706083
removed errors
eliftabak Aug 9, 2020
24078e7
run yarn fix
eliftabak Aug 9, 2020
9825673
edited image names
eliftabak Aug 10, 2020
ae9f118
updated the test
eliftabak Aug 10, 2020
669b57d
small changes
eliftabak Aug 11, 2020
e231e91
Merge branch 'dev' into blog-cards
eliftabak Aug 11, 2020
a39ec8b
change folder name to blogcards
eliftabak Aug 11, 2020
ecb6f98
Merge branch 'blog-cards' of https://github.com/ReCoded-Org/capstone-…
eliftabak Aug 11, 2020
221a0ca
fixed failed test
eliftabak Aug 11, 2020
0958a68
merge with blog branch
eliftabak Aug 11, 2020
f58f631
Merge branch 'blog-cards' into single-article-page
eliftabak Aug 11, 2020
288bda8
routing is working
eliftabak Aug 12, 2020
3d470e7
before checkout
eliftabak Aug 12, 2020
78dc64d
finally finished
eliftabak Aug 12, 2020
2850b90
added scrollup
eliftabak Aug 12, 2020
5614984
fixed errors
eliftabak Aug 12, 2020
04f5484
Merge branch 'dev' of https://github.com/ReCoded-Org/capstone-istanbu…
eliftabak Aug 12, 2020
54a4b5a
fixed conflict
eliftabak Aug 12, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file modified .DS_Store
Binary file not shown.
Binary file added public/images/blackMuslimAfrican.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/images/footballGirl.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 4 additions & 1 deletion src/components/blog-cards/BlogCard.css
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
margin-bottom: 30px;
color: #6c567b;
font-size: 30px;
width: 90%;
}

.blogBody {
Expand All @@ -37,3 +36,7 @@
height: 17em;
align-self: center;
}
eliftabak marked this conversation as resolved.
Show resolved Hide resolved

hr {

}
33 changes: 17 additions & 16 deletions src/components/blog-cards/BlogCard.jsx
Original file line number Diff line number Diff line change
@@ -1,30 +1,31 @@
import React from 'react';
import { Col, Row, Container, Image } from 'react-bootstrap';
import { BrowserRouter as Router, Link } from 'react-router-dom';
import { BrowserRouter as NavLink } from 'react-router-dom';
import blogArticles from './blog.json';
import './BlogCard.css';

export default function BlogCard() {
return blogArticles.map((blog) => {
return (
<Container key={blog.id} className="blogContainer">
<Row>
<Col xs={6} md={6} lg={8}>
<h3 className="blogTitle">{blog.title}</h3>
<span className="blogBody">{blog.body.substring(0, 250)}...</span>
<Router>
<Link to={`/blog/${blog.id}`}>
<div>
eliftabak marked this conversation as resolved.
Show resolved Hide resolved
<Container key={blog.id} className="blogContainer">
<Row>
<Col xs={6} md={6} lg={8}>
<h3 className="blogTitle">{blog.title}</h3>
<span className="blogBody">{blog.firstPart.substring(0, 250)}...</span>
<NavLink to={`/blog/${blog.id}`} key={blog.id}>
<button type="button" className="readMoreButton">
Read More
</button>
</Link>
</Router>
</Col>
<Col xs={4} md={4} lg={3} className="imageContainer">
<Image src={blog.imgUrl} className="roundImage" roundedCircle />
</Col>
</Row>
</Container>
</NavLink>
</Col>
<Col xs={4} md={4} lg={3} className="imageContainer">
<Image src={blog.imgUrl} className="roundImage" roundedCircle />
</Col>
</Row>
</Container>
<hr />
</div>
);
});
}
113 changes: 113 additions & 0 deletions src/components/blog-cards/__snapshots__/BlogCard.test.jsx.snap
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,29 @@

exports[`renders correctly 1`] = `
Array [
<<<<<<< HEAD
<div>
<div
className="blogContainer container"
>
<div
className="row"
>
<div
className="col-lg-8 col-md-6 col-6"
>
<h3
className="blogTitle"
>
My Intersectional Activism as A Black African Muslim Woman
</h3>
<span
className="blogBody"
>
My identities as being a Black Muslim woman who is also African come in one. I experience discrimination in many unique ways: my skin colour, my gender, my religion and being African. Often, the notion of have these identities tend to equate to me be
...
</span>
=======
<div
className="blogContainer container"
>
Expand All @@ -26,12 +49,49 @@ Array [
href="/blog/1"
onClick={[Function]}
>
>>>>>>> dev
<button
className="readMoreButton"
type="button"
>
Read More
</button>
<<<<<<< HEAD
</div>
<div
className="imageContainer col-lg-3 col-md-4 col-4"
>
<img
className="roundImage rounded-circle"
src="/images/blackMuslimAfrican.jpg"
/>
</div>
</div>
</div>
<hr />
</div>,
<div>
<div
className="blogContainer container"
>
<div
className="row"
>
<div
className="col-lg-8 col-md-6 col-6"
>
<h3
className="blogTitle"
>
An Open Letter to My Abuser
</h3>
<span
className="blogBody"
>
It is hard to put into words all that you put me through. This letter is, I know, another vain attempt to master the chaos within me. But trying is always a better option than quitting, I suppose. Sometimes I wish you could go through the pain and st
...
</span>
=======
</a>
</div>
<div
Expand Down Expand Up @@ -68,12 +128,49 @@ Array [
href="/blog/2"
onClick={[Function]}
>
>>>>>>> dev
<button
className="readMoreButton"
type="button"
>
Read More
</button>
<<<<<<< HEAD
</div>
<div
className="imageContainer col-lg-3 col-md-4 col-4"
>
<img
className="roundImage rounded-circle"
src="/images/leon-biss.jpg"
/>
</div>
</div>
</div>
<hr />
</div>,
<div>
<div
className="blogContainer container"
>
<div
className="row"
>
<div
className="col-lg-8 col-md-6 col-6"
>
<h3
className="blogTitle"
>
How My Love of Football Goes Against My Feminism
</h3>
<span
className="blogBody"
>
Marva, a 24-year-old woman from England, was reminded of how boys view girls who like to play football. She wrote about how, as a young girl, boys became physical with her whenever she outplayed them. Marva also recalls a recent experience at a park
...
</span>
=======
</a>
</div>
<div
Expand Down Expand Up @@ -110,12 +207,27 @@ Array [
href="/blog/3"
onClick={[Function]}
>
>>>>>>> dev
<button
className="readMoreButton"
type="button"
>
Read More
</button>
<<<<<<< HEAD
</div>
<div
className="imageContainer col-lg-3 col-md-4 col-4"
>
<img
className="roundImage rounded-circle"
src="/images/footballGirl.jpg"
/>
</div>
</div>
</div>
<hr />
=======
</a>
</div>
<div
Expand All @@ -127,6 +239,7 @@ Array [
/>
</div>
</div>
>>>>>>> dev
</div>,
]
`;
Loading