💄 add image caption
This commit is contained in:
@@ -118,6 +118,19 @@
|
||||
});
|
||||
})();
|
||||
|
||||
// Caption
|
||||
$(".article-entry").each(function (i) {
|
||||
$(this)
|
||||
.find("img")
|
||||
.each(function () {
|
||||
if ($(this).parent().is("a")) return;
|
||||
|
||||
const { alt } = this;
|
||||
|
||||
if (alt) $(this).after('<span class="caption">' + alt + "</span>");
|
||||
});
|
||||
});
|
||||
|
||||
// Mobile Nav
|
||||
const $content = $(".content"),
|
||||
$sidebar = $(".sidebar");
|
||||
|
Reference in New Issue
Block a user