File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -816,30 +816,45 @@ div.post-content .table-wrapper {
816816 margin-top : 2rem ;
817817 overflow-wrap : break-word ;
818818 word-wrap : break-word ;
819- a {
820- @extend %link-color ;
821- @extend %link-underline ;
822- & :hover {
823- @extend %link-hover ;
824- }
825- }
826- p {
827- font-size : 1.08rem ;
819+
820+ @mixin img {
828821 > img {
829822 & :not ([style ]) {
830823 margin : .5rem 0 ;
831824 @include align-center ;
832- + em {
833- display : block ;
834- text-align : center ;
835- font-style : normal ;
836- font-size : 80% ;
837- padding : 0 ;
838- color : #6d6c6c ;
839- }
825+ @include img-caption ;
826+ }
827+ }
828+ }
840829
830+ @mixin img-caption {
831+ + em {
832+ display : block ;
833+ text-align : center ;
834+ font-style : normal ;
835+ font-size : 80% ;
836+ padding : 0 ;
837+ color : #6d6c6c ;
838+ }
839+ }
840+
841+ a {
842+ & :not (.img-hyperlink ) {
843+ @extend %link-color ;
844+ @extend %link-underline ;
845+ & :hover {
846+ @extend %link-hover ;
841847 }
842848 }
849+ & .img-hyperlink {
850+ @include img ;
851+ @include img-caption ;
852+ }
853+ }
854+
855+ p {
856+ font-size : 1.08rem ;
857+ @include img ;
843858 }// p
844859}
845860
Original file line number Diff line number Diff line change 1+ /*
2+ * Find out the <a> tag contains an image and mark it.
3+ *
4+ * v2.5.1
5+ * https://github.com/cotes2020/jekyll-theme-chirpy
6+ * © 2020 Cotes Chung
7+ * MIT Licensed
8+ */
9+
10+ $ ( function ( ) {
11+
12+ var MARK = "img-hyperlink" ;
13+
14+ $ ( "a:has(img)" ) . addClass ( MARK ) ;
15+
16+ } ) ;
Original file line number Diff line number Diff line change @@ -13,3 +13,5 @@ layout: compress
1313{ % include_relative lib / _bootstrap - toc . min . js % }
1414
1515{ % include_relative _utils / toc - filter . js % }
16+
17+ { % include_relative _utils / img - hyperlink . js % }
You can’t perform that action at this time.
0 commit comments