mirror of
https://github.com/maikka39/Personal-Website.git
synced 2026-10-02 14:46:25 +00:00
Remove larger image view as it's broken on some browsers
This commit is contained in:
@@ -1,34 +1,9 @@
|
||||
{{- $orignal := resources.Get .path }}
|
||||
{{- $png := $orignal.Resize (printf "%dx%d png q50" $orignal.Width $orignal.Height) }}
|
||||
{{- $webp := $orignal.Resize (printf "%dx%d webp q50" $orignal.Width $orignal.Height) }}
|
||||
{{- $pngFull := $orignal.Resize (printf "%dx%d webp q100" $orignal.Width $orignal.Height) }}
|
||||
{{- $webpFull := $orignal.Resize (printf "%dx%d webp q100" $orignal.Width $orignal.Height) }}
|
||||
{{- $png := $orignal.Resize (printf "%dx%d png q75" $orignal.Width $orignal.Height) }}
|
||||
{{- $webp := $orignal.Resize (printf "%dx%d webp q75" $orignal.Width $orignal.Height) }}
|
||||
<picture>
|
||||
<source type="image/webp" srcset="{{ $webp.Permalink }}">
|
||||
<img
|
||||
src="{{ $png.Permalink }}"
|
||||
alt="{{ .alt | default "" }}"
|
||||
title="{{ .alt }}"
|
||||
width="{{ .width | default $png.Width }}"
|
||||
height="{{ .height | default $png.Height }}"
|
||||
{{- if .class}}class="{{ .class }}" {{end}}
|
||||
{{- if .style}}style="{{ .style | safeCSS }}" {{end}} />
|
||||
</picture>
|
||||
|
||||
<div class="enlarged_image">
|
||||
<picture>
|
||||
<source type="image/webp" srcset="{{ $webpFull.Permalink }}">
|
||||
<img
|
||||
src="{{ $pngFull.Permalink }}"
|
||||
alt="{{ .alt | default "" }}"
|
||||
loading="lazy"
|
||||
title="{{ .alt }}"
|
||||
width="{{ .width | default $pngFull.Width }}"
|
||||
height="{{ .height | default $pngFull.Height }}"
|
||||
{{- if .class}}class="{{ .class }}" {{end}}
|
||||
{{- if .style}}style="{{ .style | safeCSS }}" {{end}} />
|
||||
</picture>
|
||||
{{- with .alt }}
|
||||
<p class="caption">{{ . }}</p>
|
||||
{{- end }}
|
||||
</div>
|
||||
<img src="{{ $png.Permalink }}" alt="{{ .alt | default "" }}" title="{{ .alt }}"
|
||||
width="{{ .width | default $png.Width }}" height="{{ .height | default $png.Height }}"
|
||||
{{- if .class}}class="{{ .class }}" {{end}} {{- if .style}}style="{{ .style | safeCSS }}" {{end}} />
|
||||
</picture>
|
||||
@@ -2,8 +2,7 @@
|
||||
{{- $menu := resources.Get "js/menu.js" }}
|
||||
{{- $theme := resources.Get "js/theme.js" }}
|
||||
{{- $nav := resources.Get "js/nav.js" }}
|
||||
{{- $image_enlargement := resources.Get "js/image_enlargement.js" }}
|
||||
{{- $secureJS := slice $main $menu $theme $nav $image_enlargement | resources.Concat "bundle.js" | resources.Minify | resources.Fingerprint "sha512" }}
|
||||
{{- $secureJS := slice $main $menu $theme $nav | resources.Concat "bundle.js" | resources.Minify | resources.Fingerprint "sha512" }}
|
||||
<script type="text/javascript" src="{{ $secureJS.Permalink }}" integrity="{{ $secureJS.Data.Integrity }}"></script>
|
||||
|
||||
{{- if .Site.GoogleAnalytics }}
|
||||
|
||||
Reference in New Issue
Block a user