Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/wileybaba/hugo-theme-robotico.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'layouts/partials/content.html')
-rw-r--r--layouts/partials/content.html6
1 files changed, 6 insertions, 0 deletions
diff --git a/layouts/partials/content.html b/layouts/partials/content.html
new file mode 100644
index 0000000..b4af9e9
--- /dev/null
+++ b/layouts/partials/content.html
@@ -0,0 +1,6 @@
+{{ if .Site.Params.progressively }}
+ {{ $newImage := (print "<figure class=\"progressive\"><img class=\"progressive__img progressive--not-loaded\" data-progressive=\"" .Site.BaseURL "$1/$2\" src=\"" .Site.BaseURL "$1/low/$2\" alt=$3 $4></figure>") }}
+ {{ .Content | replaceRE "<img src=\"/(.*)\\/(.*)\" alt=(.*) (.*)>" $newImage | safeHTML }}
+{{ else }}
+ {{ .Content }}
+{{ end }}