mirror of
https://github.com/Noettore/cocoa-eh-hugo-theme.git
synced 2025-10-15 03:36:41 +02:00
Fix the low images and move hq images in the root
This commit is contained in:
Before Width: | Height: | Size: 59 KiB After Width: | Height: | Size: 59 KiB |
@@ -4,12 +4,7 @@
|
|||||||
<div class="content">
|
<div class="content">
|
||||||
{{ partial "page-heading.html" . }}
|
{{ partial "page-heading.html" . }}
|
||||||
<div class="markdown">
|
<div class="markdown">
|
||||||
{{ if .Site.Params.progressively }}
|
{{ partial "content" . }}
|
||||||
{{ $newImage := (print "<figure class=\"progressive\"><img class=\"progressive__img progressive--not-loaded\" data-progressive=\"" .Site.BaseURL "$1/high/$2\" src=\"$1/low/$2\" alt=$3></figure>") }}
|
|
||||||
{{ .Content | replaceRE "<img src=\"/(.*)\\/(.*)\" alt=(.*)>" $newImage | safeHTML }}
|
|
||||||
{{ else }}
|
|
||||||
{{ .Content }}
|
|
||||||
{{ end }}
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@@ -13,12 +13,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="markdown">
|
<div class="markdown">
|
||||||
{{ if .Site.Params.progressively }}
|
{{ partial "content" . }}
|
||||||
{{ $newImage := (print "<figure class=\"progressive\"><img class=\"progressive__img progressive--not-loaded\" data-progressive=\"" .Site.BaseURL "$1/high/$2\" src=\"$1/low/$2\" alt=$3></figure>") }}
|
|
||||||
{{ .Content | replaceRE "<img src=\"/(.*)\\/(.*)\" alt=(.*)>" $newImage | safeHTML }}
|
|
||||||
{{ else }}
|
|
||||||
{{ .Content }}
|
|
||||||
{{ end }}
|
|
||||||
<br>
|
<br>
|
||||||
<p><a href="{{ .Section }}">Back to posts</a></p>
|
<p><a href="{{ .Section }}">Back to posts</a></p>
|
||||||
</div>
|
</div>
|
||||||
|
6
layouts/partials/content.html
Normal file
6
layouts/partials/content.html
Normal file
@@ -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></figure>") }}
|
||||||
|
{{ .Content | replaceRE "<img src=\"/(.*)\\/(.*)\" alt=(.*)>" $newImage | safeHTML }}
|
||||||
|
{{ else }}
|
||||||
|
{{ .Content }}
|
||||||
|
{{ end }}
|
Reference in New Issue
Block a user