From 4eb040806102ac88c02ba1b0bb5205b77f034d4f Mon Sep 17 00:00:00 2001 From: reuixiy Date: Tue, 25 Feb 2020 11:29:52 +0800 Subject: [PATCH] perf: use cilent side js selector for medium zoom --- layouts/partials/third-party/medium-zoom.html | 4 ++-- layouts/partials/utils/content.html | 9 --------- 2 files changed, 2 insertions(+), 11 deletions(-) diff --git a/layouts/partials/third-party/medium-zoom.html b/layouts/partials/third-party/medium-zoom.html index 3277dc07..b46dbb0d 100644 --- a/layouts/partials/third-party/medium-zoom.html +++ b/layouts/partials/third-party/medium-zoom.html @@ -1,7 +1,7 @@ \ No newline at end of file + diff --git a/layouts/partials/utils/content.html b/layouts/partials/utils/content.html index 9b02b6f4..012ebf08 100644 --- a/layouts/partials/utils/content.html +++ b/layouts/partials/utils/content.html @@ -217,15 +217,6 @@ {{- end -}} {{- end -}} - -{{- $Content := .Scratch.Get "Content" -}} -{{- if .Site.Params.enableMediumZoom -}} - {{- $regexPatternMediumZoom := `(]+)( />|>)` -}} - {{- $regexReplacementMediumZoom := `$1$2 data-zoomable$3` -}} - {{- $Content := $Content | replaceRE $regexPatternMediumZoom $regexReplacementMediumZoom | safeHTML -}} - {{- .Scratch.Set "Content" $Content -}} -{{- end -}} - {{- partial "custom/content.html" . -}}