Skip to content

Commit 8167ad4

Browse files
committed
Add card style and fix css
1 parent ab6a3f0 commit 8167ad4

File tree

5 files changed

+28
-68
lines changed

5 files changed

+28
-68
lines changed
Lines changed: 14 additions & 62 deletions
Original file line numberDiff line numberDiff line change
@@ -1,72 +1,24 @@
1-
.carousel-inner {
2-
display: flex;
3-
justify-content: center;
4-
align-items: center;
5-
}
6-
7-
.carousel-item {
8-
display: flex;
9-
justify-content: center;
10-
align-items: center;
11-
padding: 20px;
12-
background-color: #ffffff;
13-
border-radius: 12px;
14-
box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
15-
margin: 0 10px;
16-
transition: transform 0.3s ease;
17-
}
18-
19-
.carousel-item.active {
20-
transform: scale(1.05);
21-
}
22-
23-
.icon-wrapper {
24-
display: flex;
25-
justify-content: center;
26-
align-items: center;
27-
margin-bottom: 15px;
28-
}
29-
30-
.carousel-icon {
31-
width: 60px;
32-
height: 60px;
33-
border-radius: 50%;
34-
object-fit: cover;
35-
border: 3px solid #fff;
36-
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
37-
}
38-
39-
.text-wrapper {
40-
text-align: center;
41-
}
42-
43-
.carousel-title {
44-
font-size: 1.5rem;
45-
font-weight: bold;
46-
color: #333;
47-
margin-bottom: 10px;
48-
}
49-
50-
.carousel-description {
51-
font-size: 1rem;
52-
color: #666;
53-
margin-bottom: 10px;
54-
}
55-
56-
.carousel-author {
57-
font-size: 0.9rem;
58-
color: #999;
59-
font-style: italic;
60-
}
61-
621
.carousel-control-prev,
632
.carousel-control-next {
64-
background-color: rgba(0, 0, 0, 0.1);
3+
background-color: rgba(255, 255, 255, 0);
654
border-radius: 50%;
665
padding: 10px;
676
}
687

698
.carousel-control-prev-icon,
709
.carousel-control-next-icon {
7110
filter: invert(1);
11+
}
12+
13+
.card {
14+
display: flex;
15+
justify-content: center;
16+
align-items: center;
17+
height: 300px;
18+
border-radius: 8px;
19+
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1), 0 0 15px rgba(0, 0, 0, 0.1);
20+
padding: 20px;
21+
margin: 20px;
22+
text-align: center;
23+
flex-direction: column;
7224
}

assets/scss/style.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ $sub-footer-text-color: $white;
5252
@import 'components/strip';
5353
@import 'components/feature';
5454
@import 'components/social';
55+
@import 'components/blog-carousel';
5556

5657
// Pages
5758
@import 'pages/home';

layouts/blog/meta.html

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,3 @@
1-
{{ partial "blog-meta.html" . }}
1+
<div class="d-flex flex-row mb-2 align-items-center">
2+
{{ partial "blog-meta.html" . }}
3+
</div>

layouts/partials/blog-carousel.html

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,16 @@
44
{{ range $index, $page := $posts }}
55
{{ if .Params.authorId }}
66
<div class="carousel-item {{ if eq $index 0 }}active{{ end }}">
7-
<div class="d-flex justify-content-center">
8-
<div class="carousel-content text-center">
9-
<p class="carousel-description">{{ .Render "summary" }}</p>
10-
<div class="blog-meta">{{ partial "blog-meta.html" . }}</div>
7+
<div class="card">
8+
<div class="card-body card-body-shadow">
9+
<div class="d-flex justify-content-center">
10+
<div class="carousel-content text-center">
11+
<p class="carousel-description">{{ .Render "summary" }}</p>
12+
<div class="d-flex justify-content-end">
13+
{{ partial "blog-meta.html" . }}
14+
</div>
15+
</div>
16+
</div>
1117
</div>
1218
</div>
1319
</div>

layouts/partials/blog-meta.html

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,5 @@
1212
<div>{{ $author }}</div>
1313
<div>{{ time.Format "Jan 2, 2006" .Params.Date }}</div>
1414
</div>
15-
1615
</div>
1716
{{ end }}

0 commit comments

Comments
 (0)