diff options
Diffstat (limited to 'layouts')
-rw-r--r-- | layouts/_default/baseof.html | 1 | ||||
-rw-r--r-- | layouts/partials/button-15.html | 13 |
2 files changed, 9 insertions, 5 deletions
diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html index b626a95..418db7b 100644 --- a/layouts/_default/baseof.html +++ b/layouts/_default/baseof.html @@ -101,7 +101,6 @@ </main> <footer> - {{ partial "button-15" (dict "button" . "file" "home.gif" "alt" "Return to homepage" "href" "/") }} </footer> </body> </html> diff --git a/layouts/partials/button-15.html b/layouts/partials/button-15.html index 009ed5c..4e408d7 100644 --- a/layouts/partials/button-15.html +++ b/layouts/partials/button-15.html @@ -1,13 +1,18 @@ {{- $file := .file }} {{- $path := printf "webbuttons/%s" $file}} {{- $img := resources.Get $path }} -{{- $img := $img.Resize "80x15 webp q90"}} +{{- $img1x := $img.Resize "80x15 webp q90"}} +{{- $img2x := $img.Resize "160x30 webp q90"}} {{- if $.href }} <a href="{{ $.href }}"> {{ end }} <img class="webbutton" alt="{{ $.alt }}" - src="{{ $img.RelPermalink }}" - width="{{ $img.Width }}" - height="{{ $img.Height }}"> + src="{{ $img1x.RelPermalink }}" + srcset=" + {{ $img1x.RelPermalink }} 1x, + {{ $img2x.RelPermalink }} 2x + " + width="{{ $img1x.Width }}" + height="{{ $img1x.Height }}"> {{- if $.href }} </a> {{ end }} |