Skip to content
This repository was archived by the owner on Jan 19, 2025. It is now read-only.

Commit f433edb

Browse files
committed
Added image caption for blog images 🚀
1 parent c313f4b commit f433edb

32 files changed

+49
-45
lines changed

_css/blog-post.scss

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,13 @@
77
}
88
}
99

10+
figure {
11+
figcaption {
12+
@include theme('color', $secondary-text-color);
13+
font-size: 14px;
14+
}
15+
}
16+
1017
.blog-post-title {
1118
@include theme('color', $accent-color);
1219
margin-bottom: 5px;
@@ -29,12 +36,6 @@
2936
@include theme('color', $accent-color);
3037
}
3138

32-
img {
33-
max-width: 100%;
34-
display: block;
35-
margin: 20px auto;
36-
}
37-
3839
.emoji {
3940
margin: auto;
4041
display: inline;

_data/webpack.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
hash: 19dfeec11b343b3552ad
1+
hash: aaf187c9d8fe249f4fd7

_includes/blog-lazy-image.html

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
11
{% capture description %}{{ include.description | replace: ' ', '-' | downcase }}{% endcapture %}
2-
{% capture customClassAndBlogClass %}{{ include.class | default: '' | append: ' blog-image' }}{% endcapture %}
3-
{% include lazy-image.html id=description alt=include.description fill="BDBDBD" src=include.src width=include.width height=include.height class=customClassAndBlogClass %}
2+
{% capture customClassAndBlogClass %}{{ include.class | default: '' | append: ' figure-img img-fluid rounded blog-image' }}{% endcapture %}
3+
<figure class="figure">
4+
{% include lazy-image.html id=description alt=include.description fill="BDBDBD" src=include.src width=include.width height=include.height class=customClassAndBlogClass %}
5+
<figcaption class="figure-caption text-center font-italic font-weight-light">{{ include.description }}</figcaption>
6+
</figure>

_includes/critical-blog-post.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)