Skip to content

Commit

Permalink
Bug: Apply styles to image caption generated by pandoc markdown. hexo…
Browse files Browse the repository at this point in the history
  • Loading branch information
iissnan committed Oct 23, 2015
1 parent f2c5598 commit 400f979
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 12 deletions.
17 changes: 6 additions & 11 deletions source/css/_common/_component/posts.styl
Original file line number Diff line number Diff line change
Expand Up @@ -6,20 +6,15 @@
cursor: -webkit-zoom-in;
}

.post-body .pic-title {
margin: 0 auto;
.post-body .image-caption {
margin: 10px auto 15px;
text-align: center;
}

.post-body .pic-title span {
display: inline-block;
min-width: 10%;
min-height: 20px;
margin: 10px auto 0;
padding: 2px 0;
border-bottom: 1px solid $grey-dark;
font-size: $font-size-base;
color: $grey-dark;
font-weight: bold;
line-height: 1;
}

.post-body .figure .caption {
@extend .post-body .image-caption;
}
2 changes: 1 addition & 1 deletion source/js/fancy-box.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ $(document).ready(function() {
$imageWrapLink.attr('rel', 'group');

if (imageTitle) {
$imageWrapLink.append('<div class="pic-title"><span>' + imageTitle + '</span></div>');
$imageWrapLink.append('<p class="image-caption">' + imageTitle + '</p>');
$imageWrapLink.attr("title", imageTitle); //make sure img title tag will show correctly in fancybox
}
});
Expand Down

0 comments on commit 400f979

Please sign in to comment.