From 400f9794109f18a5cde33ea1eb695ba50d81a301 Mon Sep 17 00:00:00 2001 From: iissnan Date: Fri, 23 Oct 2015 13:25:52 +0800 Subject: [PATCH] Bug: Apply styles to image caption generated by pandoc markdown. #443 --- source/css/_common/_component/posts.styl | 17 ++++++----------- source/js/fancy-box.js | 2 +- 2 files changed, 7 insertions(+), 12 deletions(-) diff --git a/source/css/_common/_component/posts.styl b/source/css/_common/_component/posts.styl index b6762fc7c4..9ac4e4cd8a 100644 --- a/source/css/_common/_component/posts.styl +++ b/source/css/_common/_component/posts.styl @@ -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; +} diff --git a/source/js/fancy-box.js b/source/js/fancy-box.js index 75ec9a3e39..0629e4837d 100644 --- a/source/js/fancy-box.js +++ b/source/js/fancy-box.js @@ -13,7 +13,7 @@ $(document).ready(function() { $imageWrapLink.attr('rel', 'group'); if (imageTitle) { - $imageWrapLink.append('
' + imageTitle + '
'); + $imageWrapLink.append('

' + imageTitle + '

'); $imageWrapLink.attr("title", imageTitle); //make sure img title tag will show correctly in fancybox } });