Skip to content

Commit c4c5217

Browse files
committed
adds blog post card template
1 parent 744b73c commit c4c5217

File tree

2 files changed

+58
-0
lines changed

2 files changed

+58
-0
lines changed

blog-post-card/index.html

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="utf-8">
5+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
6+
<title>Blog Post Card</title>
7+
<link rel="stylesheet" href="styles.css" />
8+
</head>
9+
<body>
10+
<div class="blog-post-card">
11+
<img src="https://cdn.freecodecamp.org/curriculum/labs/cover-photo.jpg" alt="computer screen on a text document at an angle" class="post-img" />
12+
<div class="post-content">
13+
<h2 class="post-title">Blog Post</h2>
14+
<p class="post-excerpt">This is a sample of the blog post to make you click the read more link.</p>
15+
<a class="read-more">Read More</a>
16+
</div>
17+
</div>
18+
</body>
19+
</html>

blog-post-card/styles.css

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
body {
2+
background-color: rosybrown;
3+
}
4+
5+
.blog-post-card {
6+
background-color: white;
7+
border-radius: 3%;
8+
width: 300px;
9+
text-align: center;
10+
}
11+
12+
.post-img {
13+
width: 100%;
14+
border-top-right-radius: 3%;
15+
border-top-left-radius: 3%;
16+
border-bottom: 2px solid black;
17+
}
18+
19+
.post-content {
20+
padding: 10px;
21+
}
22+
23+
.post-title, .post-excerpt {
24+
color: #333;
25+
margin: 15px;
26+
}
27+
28+
.read-more {
29+
color: rgb(195, 94, 195);
30+
background-color: #222;
31+
margin: 10px;
32+
padding: 10px;
33+
border-radius: 5%;
34+
display: inline-block;
35+
}
36+
37+
.read-more:hover {
38+
background-color: #666;
39+
}

0 commit comments

Comments
 (0)