diff options
author | User Mms <mms@voyager.local> | 2024-10-15 23:16:59 +0200 |
---|---|---|
committer | User Mms <mms@voyager.local> | 2024-10-15 23:16:59 +0200 |
commit | 749e2567b4745184425ca2234e1b820ba457eb32 (patch) | |
tree | 368f956bcef378c8fa8e0ddf008c97275a7c38b7 /layouts | |
parent | 9a0b35a9f63efbe77042f638f4538060e7545212 (diff) |
feat: reunification unix hist
Diffstat (limited to 'layouts')
-rw-r--r-- | layouts/shortcodes/image.html | 10 | ||||
-rw-r--r-- | layouts/unix-history/baseof.html | 13 | ||||
-rw-r--r-- | layouts/unix-history/list.html | 2 | ||||
-rw-r--r-- | layouts/unix-history/redirect.html | 9 | ||||
-rw-r--r-- | layouts/unix-history/single.html | 2 |
5 files changed, 7 insertions, 29 deletions
diff --git a/layouts/shortcodes/image.html b/layouts/shortcodes/image.html index ee2f4a6..4217f39 100644 --- a/layouts/shortcodes/image.html +++ b/layouts/shortcodes/image.html @@ -1,12 +1,12 @@ <!-- Read page and image params --> {{- $max_width := .Page.Params.image_max_width }} -{{- $dir := .Page.Params.image_dir }} {{- $caption := .Inner }} {{- $file := .Params.file }} {{- $class := .Params.class }} {{- $source := .Params.source }} {{- $alt := .Params.alt }} +{{- $dir := .Page.Params.image_dir }} <!-- Get the the image --> {{- $path := printf "%s/%s" $dir $file}} @@ -22,10 +22,14 @@ {{ end }} {{- $final2x_width := math.Mul $final1x_width 2}} +{{ $ext := "jpg" }} +{{ if eq .Params.transparency "yes" }} +{{ $ext = "png" }} +{{ end }} <!-- Generate 1x and 2x images --> -{{- $img1xproc := printf "%dx jpg q90" $final1x_width }} -{{- $img2xproc := printf "%dx jpg q90" $final2x_width }} +{{- $img1xproc := printf "%dx %s q90" $final1x_width $ext }} +{{- $img2xproc := printf "%dx %s q90" $final2x_width $ext }} {{- $img1x := $img.Resize $img1xproc }} {{- $img2x := $img.Resize $img2xproc }} diff --git a/layouts/unix-history/baseof.html b/layouts/unix-history/baseof.html deleted file mode 100644 index 54db2d9..0000000 --- a/layouts/unix-history/baseof.html +++ /dev/null @@ -1,13 +0,0 @@ -{{ block "main" . }} -{{ end }} - -<!DOCTYPE html> -<html> - <head> - <title>{{ .Title }}</title> - <link rel="canonical" href="/unix-history/"/> - <meta http-equiv="content-type" content="text/html; charset=utf-8"/> - <meta http-equiv="refresh" content="0; url=https://unixhist.crys.site/{{ replace .RelPermalink "/unix-history/" ""}}"/> - </head> - -</html> diff --git a/layouts/unix-history/list.html b/layouts/unix-history/list.html deleted file mode 100644 index e4e4a83..0000000 --- a/layouts/unix-history/list.html +++ /dev/null @@ -1,2 +0,0 @@ -{{ define "main" }} -{{ end }} diff --git a/layouts/unix-history/redirect.html b/layouts/unix-history/redirect.html deleted file mode 100644 index 599d57b..0000000 --- a/layouts/unix-history/redirect.html +++ /dev/null @@ -1,9 +0,0 @@ -<!DOCTYPE html> -<html> - <head> - <title>{{ .Title }}</title> - <link rel="canonical" href="/unix-history/"/> - <meta http-equiv="content-type" content="text/html; charset=utf-8"/> - <meta http-equiv="refresh" content="0; url=/unix-history/#{{ .Page.Params.link }}"/> - </head> -</html> diff --git a/layouts/unix-history/single.html b/layouts/unix-history/single.html deleted file mode 100644 index e4e4a83..0000000 --- a/layouts/unix-history/single.html +++ /dev/null @@ -1,2 +0,0 @@ -{{ define "main" }} -{{ end }} |