Commit 6620ee45 by Madhankumar

bloglist array value change

parent 30ba4def
...@@ -16,11 +16,13 @@ export const card = { ...@@ -16,11 +16,13 @@ export const card = {
height: 300, height: 300,
}, },
publishedDate: "July 13, 2020.", publishedDate: "July 13, 2020.",
author: "Isabella Ava", author: {
images: { name: "Isabella Ava",
url: require("@img/a1.jpg").default.src, image: {
width: 80, url: require("@img/a1.jpg").default.src,
height: 80, // Use require to load images width: 80,
height: 80, // Use require to load images
},
}, },
readingTime: "1 min", readingTime: "1 min",
}, },
......
...@@ -10,7 +10,6 @@ const Card = ({ ...@@ -10,7 +10,6 @@ const Card = ({
image, image,
publishedDate, publishedDate,
author, author,
images,
readingTime, readingTime,
}) => { }) => {
return ( return (
...@@ -30,13 +29,13 @@ const Card = ({ ...@@ -30,13 +29,13 @@ const Card = ({
<div className={styles.cardbottom}> <div className={styles.cardbottom}>
<Image <Image
className={styles.img} className={styles.img}
src={images.url} src={author.image.url}
height={images.height} height={author.image.height}
width={images.width} width={author.image.width}
alt={author} alt={author}
/> />
<div className={styles.authordescription}> <div className={styles.authordescription}>
<p className={styles.authorName}>{author}</p> <p className={styles.authorName}>{author.name}</p>
<div className={styles["author-desc"]}> <div className={styles["author-desc"]}>
{publishedDate} {publishedDate}
<span className={styles.icon}> <span className={styles.icon}>
...@@ -57,10 +56,14 @@ Card.propTypes = { ...@@ -57,10 +56,14 @@ Card.propTypes = {
url: PropTypes.string, url: PropTypes.string,
}), }),
publishedDate: PropTypes.string, publishedDate: PropTypes.string,
author: PropTypes.string, author: {
images: PropTypes.shape({ name: PropTypes.string,
url: PropTypes.string, // Use PropTypes.string for images image: PropTypes.shape({
}), url: PropTypes.string,
height: PropTypes.number,
width: PropTypes.number, // Use PropTypes.string for images
}),
},
readingTime: PropTypes.string, readingTime: PropTypes.string,
}; };
......
...@@ -7,6 +7,7 @@ ...@@ -7,6 +7,7 @@
word-wrap: break-word; word-wrap: break-word;
&:hover { &:hover {
transform: translateY(-10px); transform: translateY(-10px);
box-shadow: rgba(0, 0, 0, 0.1) -4px 9px 25px -6px;
} }
.img { .img {
max-width: 100%; max-width: 100%;
......
...@@ -15,11 +15,17 @@ export const blogLists = { ...@@ -15,11 +15,17 @@ export const blogLists = {
"Lorem ipsum dolor sit amet consectetur ipsum adipisicing elit. Quis vitae sit.", "Lorem ipsum dolor sit amet consectetur ipsum adipisicing elit. Quis vitae sit.",
image: { image: {
url: require("@img/lifestyle1.jpg"), url: require("@img/lifestyle1.jpg"),
width: 470,
height: 300,
}, },
publishedDate: "July 13, 2020.", publishedDate: "July 13, 2020.",
author: "Isabella ava", author: {
images: { name: "Isabella ava",
url: require("@img/a1.jpg"), image: {
url: require("@img/a1.jpg"),
height: 80,
width: 80,
},
}, },
readingTime: "1min", readingTime: "1min",
...@@ -30,12 +36,18 @@ export const blogLists = { ...@@ -30,12 +36,18 @@ export const blogLists = {
"Lorem ipsum dolor sit amet consectetur ipsum adipisicing elit. Quis vitae sit.", "Lorem ipsum dolor sit amet consectetur ipsum adipisicing elit. Quis vitae sit.",
image: { image: {
url: require("@img/lifestyle2.jpg"), url: require("@img/lifestyle2.jpg"),
width: 470,
height: 300,
}, },
publishedDate: "July 13, 2020.", publishedDate: "July 13, 2020.",
author: "Charlotte mia", author: {
images: { name: "Charlotte mia",
url: require("@img/a2.jpg"), image: {
url: require("@img/a2.jpg"),
width: 80,
height: 80,
},
}, },
readingTime: "1min", readingTime: "1min",
...@@ -46,11 +58,17 @@ export const blogLists = { ...@@ -46,11 +58,17 @@ export const blogLists = {
"Lorem ipsum dolor sit amet consectetur ipsum adipisicing elit. Quis vitae sit.", "Lorem ipsum dolor sit amet consectetur ipsum adipisicing elit. Quis vitae sit.",
image: { image: {
url: require("@img/lifestyle3.jpg"), url: require("@img/lifestyle3.jpg"),
width: 470,
height: 300,
}, },
publishedDate: "July 13, 2020.", publishedDate: "July 13, 2020.",
author: "Elizabeth", author: {
images: { name: "Elizabeth",
url: require("@img/a3.jpg"), image: {
url: require("@img/a3.jpg"),
width: 80,
height: 80,
},
}, },
readingTime: "1min", readingTime: "1min",
...@@ -61,11 +79,17 @@ export const blogLists = { ...@@ -61,11 +79,17 @@ export const blogLists = {
"Lorem ipsum dolor sit amet consectetur ipsum adipisicing elit. Quis vitae sit.", "Lorem ipsum dolor sit amet consectetur ipsum adipisicing elit. Quis vitae sit.",
image: { image: {
url: require("@img/lifestyle4.jpg"), url: require("@img/lifestyle4.jpg"),
width: 470,
height: 300,
}, },
publishedDate: "July 13, 2020.", publishedDate: "July 13, 2020.",
author: "Charlotte mia", author: {
images: { name: "Charlotte mia",
url: require("@img/a1.jpg"), image: {
url: require("@img/a1.jpg"),
width: 80,
height: 80,
},
}, },
readingTime: "1min", readingTime: "1min",
}, },
...@@ -75,11 +99,17 @@ export const blogLists = { ...@@ -75,11 +99,17 @@ export const blogLists = {
"Lorem ipsum dolor sit amet consectetur ipsum adipisicing elit. Quis vitae sit.", "Lorem ipsum dolor sit amet consectetur ipsum adipisicing elit. Quis vitae sit.",
image: { image: {
url: require("@img/lifestyle5.jpg"), url: require("@img/lifestyle5.jpg"),
width: 470,
height: 300,
}, },
publishedDate: "July 13, 2020.", publishedDate: "July 13, 2020.",
author: "Elizabeth", author: {
images: { name: "Elizabeth",
url: require("@img/a3.jpg"), image: {
url: require("@img/a3.jpg"),
width: 80,
height: 80,
},
}, },
readingTime: "1min", readingTime: "1min",
...@@ -90,11 +120,17 @@ export const blogLists = { ...@@ -90,11 +120,17 @@ export const blogLists = {
"Lorem ipsum dolor sit amet consectetur ipsum adipisicing elit. Quis vitae sit.", "Lorem ipsum dolor sit amet consectetur ipsum adipisicing elit. Quis vitae sit.",
image: { image: {
url: require("@img/lifestyle6.jpg"), url: require("@img/lifestyle6.jpg"),
width: 470,
height: 300,
}, },
publishedDate: "July 13, 2020.", publishedDate: "July 13, 2020.",
author: "Isabella ava", author: {
images: { name: "Isabella ava",
url: require("@img/a1.jpg"), image: {
url: require("@img/a1.jpg"),
width: 80,
height: 80,
},
}, },
readingTime: "1min", readingTime: "1min",
}, },
...@@ -104,11 +140,17 @@ export const blogLists = { ...@@ -104,11 +140,17 @@ export const blogLists = {
"Lorem ipsum dolor sit amet consectetur ipsum adipisicing elit. Quis vitae sit.", "Lorem ipsum dolor sit amet consectetur ipsum adipisicing elit. Quis vitae sit.",
image: { image: {
url: require("@img/lifestyle6.jpg"), url: require("@img/lifestyle6.jpg"),
width: 470,
height: 300,
}, },
publishedDate: "July 13, 2020.", publishedDate: "July 13, 2020.",
author: "Isabella ava", author: {
images: { name: "Isabella ava",
url: require("@img/a1.jpg"), image: {
url: require("@img/a1.jpg"),
width: 80,
height: 80,
},
}, },
readingTime: "1min", readingTime: "1min",
}, },
...@@ -118,11 +160,17 @@ export const blogLists = { ...@@ -118,11 +160,17 @@ export const blogLists = {
"Lorem ipsum dolor sit amet consectetur ipsum adipisicing elit. Quis vitae sit.", "Lorem ipsum dolor sit amet consectetur ipsum adipisicing elit. Quis vitae sit.",
image: { image: {
url: require("@img/lifestyle6.jpg"), url: require("@img/lifestyle6.jpg"),
width: 470,
height: 300,
}, },
publishedDate: "July 13, 2020.", publishedDate: "July 13, 2020.",
author: "Isabella ava", author: {
images: { name: "Isabella ava",
url: require("@img/a1.jpg"), image: {
url: require("@img/a1.jpg"),
width: 80,
height: 80,
},
}, },
readingTime: "1min", readingTime: "1min",
}, },
...@@ -132,11 +180,17 @@ export const blogLists = { ...@@ -132,11 +180,17 @@ export const blogLists = {
"Lorem ipsum dolor sit amet consectetur ipsum adipisicing elit. Quis vitae sit.", "Lorem ipsum dolor sit amet consectetur ipsum adipisicing elit. Quis vitae sit.",
image: { image: {
url: require("@img/lifestyle6.jpg"), url: require("@img/lifestyle6.jpg"),
width: 470,
height: 300,
}, },
publishedDate: "July 13, 2020.", publishedDate: "July 13, 2020.",
author: "Isabella ava", author: {
images: { name: "Isabella ava",
url: require("@img/a1.jpg"), image: {
url: require("@img/a1.jpg"),
width: 80,
height: 80,
},
}, },
readingTime: "1min", readingTime: "1min",
}, },
......
...@@ -9,7 +9,6 @@ function SingleBlog({ ...@@ -9,7 +9,6 @@ function SingleBlog({
author, author,
category, category,
readingTime, readingTime,
image,
categories, categories,
markdown, markdown,
}) { }) {
...@@ -22,13 +21,13 @@ function SingleBlog({ ...@@ -22,13 +21,13 @@ function SingleBlog({
<div className={styles["blog-list"]}> <div className={styles["blog-list"]}>
<ul> <ul>
<li> <li>
Posted on Posted on&nbsp;
<span className={styles["list-bold"]}>{publishedDate}</span> <span className={styles["list-bold"]}>{publishedDate}</span>
</li> </li>
<li> <li>
By&nbsp; By&nbsp;
<a href="#" className={styles["list-bold"]}> <a href="#" className={styles["list-bold"]}>
{author} {author.name}
</a> </a>
</li> </li>
<li> <li>
...@@ -49,10 +48,10 @@ function SingleBlog({ ...@@ -49,10 +48,10 @@ function SingleBlog({
<div className={styles.blogimage}> <div className={styles.blogimage}>
<Image <Image
className={styles.img} className={styles.img}
src={image.url} src={author.image.url}
alt={title} alt={author.name}
width={image.width} width={author.image.width}
height={image.height} height={author.image.height}
/> />
</div> </div>
<div className={styles["blog-content"]}> <div className={styles["blog-content"]}>
...@@ -72,14 +71,16 @@ function SingleBlog({ ...@@ -72,14 +71,16 @@ function SingleBlog({
SingleBlog.propTypes = { SingleBlog.propTypes = {
title: PropTypes.string, title: PropTypes.string,
publishedDate: PropTypes.string, publishedDate: PropTypes.string,
authorName: PropTypes.string, author: {
name: PropTypes.string,
image: PropTypes.shape({
url: PropTypes.string,
width: PropTypes.number,
height: PropTypes.number,
}),
},
category: PropTypes.string, category: PropTypes.string,
readingTime: PropTypes.string, readingTime: PropTypes.string,
categories: PropTypes.array, categories: PropTypes.array,
image: PropTypes.shape({
url: PropTypes.string,
width: PropTypes.number,
height: PropTypes.number,
}),
}; };
export default SingleBlog; export default SingleBlog;
...@@ -7,11 +7,13 @@ export const singleBlog = { ...@@ -7,11 +7,13 @@ export const singleBlog = {
args: { args: {
title: "Create an Art that shows the beauty in everyone ideas of flaws.", title: "Create an Art that shows the beauty in everyone ideas of flaws.",
publishedDate: "July 11,2020", publishedDate: "July 11,2020",
author: "Charlotte mia", author: {
image: { name: "Charlotte mia",
url: require("@/public/images/blogsingle.jpg").default.src, image: {
width: 1100, url: require("@/public/images/blogsingle.jpg").default.src,
height: 400, width: 1100,
height: 400,
},
}, },
category: "Fashion", category: "Fashion",
......
...@@ -39,9 +39,9 @@ blockquote p { ...@@ -39,9 +39,9 @@ blockquote p {
text-decoration: none; text-decoration: none;
color: var(--font-color-300); color: var(--font-color-300);
} }
.blog-list ul li a:hover { /* .blog-list ul li a:hover {
color: var(--font-color-700); color: var(--font-color-700);
} } */
.blog-container { .blog-container {
width: min(90%, 100% - 2rem); width: min(90%, 100% - 2rem);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment