From 173e1e208e27ca5460cbca1499e39271be968ca0 Mon Sep 17 00:00:00 2001 From: Joe Hutchinson Date: Wed, 3 Feb 2021 23:29:35 -0500 Subject: [PATCH] Make images work for hight dpi screens --- assets/css/style.css | 2 +- layouts/_default/home.html | 8 +++++++- layouts/_default/li-next.html | 10 +++++----- layouts/_default/li.html | 9 ++++----- layouts/_default/single.html | 9 ++++----- 5 files changed, 21 insertions(+), 17 deletions(-) diff --git a/assets/css/style.css b/assets/css/style.css index 4b25c4a..1c62f08 100644 --- a/assets/css/style.css +++ b/assets/css/style.css @@ -57,7 +57,7 @@ p { .nav-bar { max-width: 60rem; width: 100%; - padding: 0.4em 0; + padding: 0.6em 0; display: flex; justify-content: space-between; align-items: center; diff --git a/layouts/_default/home.html b/layouts/_default/home.html index 9664ee6..2a1ebd9 100644 --- a/layouts/_default/home.html +++ b/layouts/_default/home.html @@ -12,7 +12,13 @@ {{ with resources.GetMatch .Site.Params.headshotimg -}}
- + + {{ $faceshot := .Resize "272x Lanczos" }} + {{ $faceshot_x2 := .Resize "544x Lanczos" }} + {{ $faceshot_x3 := .Resize "816x Lanczos" }} + + {{ . }} +
{{ end -}} diff --git a/layouts/_default/li-next.html b/layouts/_default/li-next.html index 9b0897f..c2f0f43 100644 --- a/layouts/_default/li-next.html +++ b/layouts/_default/li-next.html @@ -4,11 +4,11 @@

Next Article

- {{ with $.Resources.GetMatch (replace (.Title) (path.Ext (.Title)) ".webp") -}} - - {{- end }} - - {{ . }} + {{ $thumbnail := .Resize "400x Lanczos" }} + {{ $thumbnail_2 := .Resize "800x Lanczos" }} + {{ $thumbnail_3 := .Resize "1200x Lanczos" }} + + {{ . }}
{{ end }} diff --git a/layouts/_default/li.html b/layouts/_default/li.html index a672eaf..9ffd735 100644 --- a/layouts/_default/li.html +++ b/layouts/_default/li.html @@ -3,11 +3,10 @@ {{ with .Resources.GetMatch "featuredImage" }}
- {{ with $.Resources.GetMatch (replace (.Title) (path.Ext (.Title)) ".webp") -}} - - {{- end }} - {{ $thumbnail := .Fit "800x600 Lanczos" }} - + {{ $thumbnail := .Resize "400x Lanczos" }} + {{ $thumbnail_2 := .Resize "800x Lanczos" }} + {{ $thumbnail_3 := .Resize "1200x Lanczos" }} + {{ . }}
diff --git a/layouts/_default/single.html b/layouts/_default/single.html index 415fbcb..31280bb 100644 --- a/layouts/_default/single.html +++ b/layouts/_default/single.html @@ -11,11 +11,10 @@ {{ with .Resources.GetMatch "featuredImage" -}} - {{ with $.Resources.GetMatch (replace (.Title) (path.Ext (.Title)) ".webp") -}} - - {{- end }} - {{ $featured := .Resize "800x Lanczos" }} - + {{ $featured := .Resize "711x Lanczos" }} + {{ $featured_2 := .Resize "1422x Lanczos" }} + {{ $featured_3 := .Resize "2133x Lanczos" }} + {{ . }} {{ with .Params.attribution -}}