From 8c7ae86720f73ceef46300508daccdd5eab70892 Mon Sep 17 00:00:00 2001 From: James Ray Date: Sun, 8 Aug 2021 12:34:38 -0400 Subject: [PATCH 1/3] education-line (#393) --- static/css/sections/education.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/static/css/sections/education.css b/static/css/sections/education.css index f7d518b..7b31cf3 100644 --- a/static/css/sections/education.css +++ b/static/css/sections/education.css @@ -36,7 +36,7 @@ } .education-section .education-info-table tr:first-child .hline { - height: 60%; + height: 65%; top: auto; } From fc3b4836973e7869c6304bf10612edcb6b802525 Mon Sep 17 00:00:00 2001 From: James Ray Date: Mon, 9 Aug 2021 22:39:10 -0400 Subject: [PATCH 2/3] Allow setting GIFS as author image (#394) Co-authored-by: Emruz Hossain --- layouts/partials/helpers/get-author-image.html | 6 +++--- layouts/partials/sections/home.html | 5 ++++- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/layouts/partials/helpers/get-author-image.html b/layouts/partials/helpers/get-author-image.html index 914a5ed..b4cfe8f 100644 --- a/layouts/partials/helpers/get-author-image.html +++ b/layouts/partials/helpers/get-author-image.html @@ -18,12 +18,12 @@ {{ end }} {{ end }} -{{/* apply image processing. don't use "Fit" in svg because its not supported */}} +{{/* apply image processing. don't use "Fit" in svg or gif because its not supported */}} {{ $authorImage:= resources.Get $authorImage}} -{{ if and $authorImage (ne $authorImage.MediaType.SubType "svg") }} + +{{ if and $authorImage (and (ne $authorImage.MediaType.SubType "svg") ( ne $authorImage.MediaType.SubType "gif")) }} {{ $authorImage = $authorImage.Fit "120x120" }} {{ end }} {{/* return the author image link */}} {{ return $authorImage.RelPermalink }} - diff --git a/layouts/partials/sections/home.html b/layouts/partials/sections/home.html index 27ddd31..6303db9 100644 --- a/layouts/partials/sections/home.html +++ b/layouts/partials/sections/home.html @@ -26,8 +26,11 @@ {{ $authorImage = $author.image }} {{ end }} {{ $authorImage := resources.Get $authorImage }} -{{ $authorImage = $authorImage.Fit "148x148" }} +{{/* apply image processing. don't use "Fit" in svg or gif because its not supported */}} +{{ if and $authorImage (and (ne $authorImage.MediaType.SubType "svg") ( ne $authorImage.MediaType.SubType "gif")) }} + {{ $authorImage = $authorImage.Fit "148x148" }} +{{ end }} {{/* get file that matches the filename as specified as src="" in shortcode */}} {{ $src := resources.Get $backgroundImage }} From 6d98c1513660503c12b0ed183324aadf1cccdf5e Mon Sep 17 00:00:00 2001 From: donfiguerres Date: Sat, 14 Aug 2021 18:00:35 +0800 Subject: [PATCH 3/3] Configure the number of posts in recent posts (#395) * Add configuration to number of recent posts. * Added default value. Co-authored-by: donfiguerres --- layouts/partials/sections/recent-posts.html | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/layouts/partials/sections/recent-posts.html b/layouts/partials/sections/recent-posts.html index 937bdff..9491977 100644 --- a/layouts/partials/sections/recent-posts.html +++ b/layouts/partials/sections/recent-posts.html @@ -3,13 +3,19 @@ {{ $sectionID = .section.id }} {{ end }} +{{ $numShow := 3}} +{{ if .section.numShow }} + {{ $numShow = .section.numShow }} +{{ end }} + +
{{ if not (.section.hideTitle) }}

{{ .section.name }}

{{ end }}
- {{ range first 3 (where site.RegularPages.ByDate.Reverse "Type" "in" "posts" )}} + {{ range first $numShow (where site.RegularPages.ByDate.Reverse "Type" "in" "posts" )}} {{ partial "cards/recent-post.html" . }} {{ end }}