From 0364e4b1bc0805864c84967c241da9622079a08a Mon Sep 17 00:00:00 2001 From: wgroeneveld Date: Sun, 7 Jun 2020 11:00:42 +0200 Subject: [PATCH] avoid flickering img-responsives --- .../jefklak-creative-portfolio/layouts/_default/single.html | 4 ++-- themes/jefklak-creative-portfolio/static/js/codex.js | 4 ---- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/themes/jefklak-creative-portfolio/layouts/_default/single.html b/themes/jefklak-creative-portfolio/layouts/_default/single.html index 538dfdf..cf0b369 100644 --- a/themes/jefklak-creative-portfolio/layouts/_default/single.html +++ b/themes/jefklak-creative-portfolio/layouts/_default/single.html @@ -27,11 +27,11 @@ {{ $reAltIn := "

\"([^\"]*)\"

" }} - {{ $reAltOut := "
\"$2\"
" }} + {{ $reAltOut := "
\"$2\"
" }} {{ $altContent := .Content | replaceRE $reAltIn $reAltOut | safeHTML }} {{ $reAltTitleIn := "

\"([^\"]*)\"

" }} - {{ $reAltTitleOut := "
$3
" }} + {{ $reAltTitleOut := "
$3
" }} {{ $finalContent := $altContent | replaceRE $reAltTitleIn $reAltTitleOut | safeHTML }} {{ $finalContent }} diff --git a/themes/jefklak-creative-portfolio/static/js/codex.js b/themes/jefklak-creative-portfolio/static/js/codex.js index e0ac34c..f002390 100644 --- a/themes/jefklak-creative-portfolio/static/js/codex.js +++ b/themes/jefklak-creative-portfolio/static/js/codex.js @@ -1,15 +1,11 @@ $(function() { - var addResponsiveTagToContentImages = function() { - $("img").addClass("img-responsive"); - }; var disableResponsiveImagesForInlineLis = function() { $('li img.img-responsive').each(function() { $(this).removeClass('img-responsive'); $(this).css('border', 'none'); }); }; - addResponsiveTagToContentImages(); disableResponsiveImagesForInlineLis(); const box = new SimpleLightbox('.lbox', { /* options */ });