Skip to content

Commit aecda08

Browse files
committed
styled course card component
1 parent bb2f26d commit aecda08

3 files changed

Lines changed: 67 additions & 22 deletions

File tree

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
h2 {
2+
font-weight: 500;
3+
font-size: 1.5em;
4+
padding: 0em;
5+
margin: 0em;
6+
}
7+
8+
p {
9+
font-size: 1.125em;
10+
}
11+
12+
a {
13+
text-decoration: none;
14+
color: #0f62fe;
15+
}
16+
17+
img {
18+
max-width: 16em;
19+
}
20+
21+
/* Styling for a link group */
22+
.link-g {
23+
margin-top: 1.4em;
24+
}
25+
26+
/* Styling for inline group (level, time) */
27+
.inline-g {
28+
display: flex;
29+
flex-flow: row wrap;
30+
gap: 1em;
31+
}
32+
33+
.inline-g p {
34+
padding: 0em;
35+
margin: 0em;
36+
}
37+
38+
/* Styling for course card */
39+
.course-card {
40+
margin: 1em 0em;
41+
padding: 2em 0em;
42+
display: flex;
43+
flex-flow: row wrap;
44+
align-items: flex-start;
45+
gap: 2em;
46+
border-bottom: 2px dotted lightgray;
47+
}
48+
49+
/* 1024px and above screen sizes */
50+
@media screen and (min-width: 64em) {
51+
.course-card {
52+
flex-flow: row nowrap;
53+
}
54+
}
Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,22 @@
11
<!-- HTML template -->
2-
<link href="" rel="stylesheet">
2+
<link href="web-components/course-card/course-card.css" rel="stylesheet">
33
<div class="course-card">
44
<div>
55
<img class="course-img" src="">
66
</div>
77
<div>
8-
<h2 class="course-name"></h2>
9-
<p class="course-desc"></p>
10-
<div class="inline-g">
11-
<p><b>Level: </b><span class="course-level"></span></p>
12-
<p><b>Cost: </b><span class="course-cost"></span></p>
13-
<p><b>Badge: </b><span class="course-badge"></span></p>
14-
<p><b>Time: </b><span class="course-time"></span></p>
8+
<div>
9+
<h2 class="course-name"></h2>
10+
<p class="course-desc"></p>
11+
<div class="inline-g">
12+
<p><b>Level: </b><span class="course-level"></span></p>
13+
<p><b>Cost: </b><span class="course-cost"></span></p>
14+
<p><b>Badge: </b><span class="course-badge"></span></p>
15+
<p><b>Time: </b><span class="course-time"></span></p>
16+
</div>
17+
</div>
18+
<div class="link-g">
19+
<a class="course-link" target="_blank" rel="noopener noreferrer">Learn more →</a>
1520
</div>
16-
</div>
17-
<div class="link-g">
18-
<a class="course-link" target="_blank" rel="noopener noreferrer">Learn more →</a>
1921
</div>
2022
</div>

web-components/video-card/video-card.css

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,3 @@
1-
:root {
2-
/* Color */
3-
--blue: #0f62fe;
4-
/* Background Color */
5-
--bg-light-gray: #f4f4f4;
6-
7-
/* Sizing */
8-
--plex-18: 1.125em;
9-
--plex-24: 1.5em;
10-
}
11-
121
h2 {
132
font-weight: 400;
143
font-size: var(--plex-24);

0 commit comments

Comments
 (0)