Merge branch 'main' into taxonomies

This commit is contained in:
Emruz Hossain 2021-08-16 00:45:41 +06:00 committed by GitHub
commit 545316fea0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 15 additions and 6 deletions

View file

@ -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 }}

View file

@ -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 }}

View file

@ -3,13 +3,19 @@
{{ $sectionID = .section.id }}
{{ end }}
{{ $numShow := 3}}
{{ if .section.numShow }}
{{ $numShow = .section.numShow }}
{{ end }}
<div class="container-fluid anchor pb-5 recent-posts-section" id="{{ $sectionID }}">
{{ if not (.section.hideTitle) }}
<h1 class="text-center">{{ .section.name }}</h1>
{{ end }}
<div class="container">
<div class="row" id="recent-post-cards">
{{ 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 }}
</div>

View file

@ -36,7 +36,7 @@
}
.education-section .education-info-table tr:first-child .hline {
height: 60%;
height: 65%;
top: auto;
}