Skip to content

Commit

Permalink
blog safak#4
Browse files Browse the repository at this point in the history
  • Loading branch information
autarkist committed Feb 1, 2024
1 parent 1af3f88 commit 20b0f4c
Show file tree
Hide file tree
Showing 5 changed files with 65 additions and 7 deletions.
File renamed without changes
11 changes: 10 additions & 1 deletion src/app/blog/blog.module.css
Original file line number Diff line number Diff line change
@@ -1 +1,10 @@
.container{}
.container{
display: flex;
flex-wrap: wrap;
justify-content: space-between;
align-items: center;
}

.post {
width: 33%;
}
16 changes: 12 additions & 4 deletions src/app/blog/page.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,18 @@ import styles from "./blog.module.css";
const BlogPage = () => {
return (
<div className={styles.container}>
<PostCard />
<PostCard />
<PostCard />
<PostCard />
<div className={styles.post}>
<PostCard />
</div>
<div className={styles.post}>
<PostCard />
</div>
<div className={styles.post}>
<PostCard />
</div>
<div className={styles.post}>
<PostCard />
</div>
</div>
);
};
Expand Down
18 changes: 17 additions & 1 deletion src/components/postCard/postCard.jsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,21 @@
import Link from "next/link"
import Image from "next/image"
import styles from "./postcard.module.css"

const PostCard = () => {
return <div className={}>PostCard</div>;
return <div className={styles.container}>
<div className={styles.top}>
<div className={styles.imgContainer}>
<Image src="/static/girl.png" fill alt="" className={styles.img} />
</div>
<span className={styles.date}>2024.02.02</span>
</div>
<div className={styles.bottom}>
<h1 className={styles.title}>Title</h1>
<p className={styles.desc}>Desc</p>
<Link href="/blog/post">READ MORE</Link>
</div>
</div>;
};

export default PostCard;
27 changes: 26 additions & 1 deletion src/components/postCard/postcard.module.css
Original file line number Diff line number Diff line change
@@ -1 +1,26 @@
.container{}
.container{
display: flex;
flex-direction: column;
gap: 10px;
margin-bottom: 40px;
margin-top: 10px;
}

.top{
display: flex;
}

.imgContainer{
position: relative;
width: 90%;
height: 300px;
}

.img{
object-fit: cover;
}

.date {
font-size: 12px;
transform: rotate(270deg);
}

0 comments on commit 20b0f4c

Please sign in to comment.