-
-
Notifications
You must be signed in to change notification settings - Fork 164
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
58 additions
and
50 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,14 @@ | ||
{{- $featuredPosts := first (default 5 .Site.Params.featuredPostCount) (where (where site.RegularPages "Type" "in" site.Params.mainSections) ".Params.featured" "eq" true) -}} | ||
{{- with $featuredPosts -}} | ||
<section class="featured-posts row surface"> | ||
<h4>{{ T "featured_posts" }}</h4> | ||
<ul> | ||
{{- range . -}} | ||
<li><a href="{{ .Permalink }}">{{ .Title }}</a></li> | ||
{{- $count := default 5 .Site.Params.featuredPostCount -}} | ||
{{- if $count -}} | ||
{{- $featuredPosts := first $count (where (where site.RegularPages "Type" "in" site.Params.mainSections) ".Params.featured" "eq" true) -}} | ||
{{- with $featuredPosts -}} | ||
<section class="featured-posts row surface"> | ||
<h4>{{ T "featured_posts" }}</h4> | ||
<ul> | ||
{{- range . -}} | ||
<li><a href="{{ .Permalink }}">{{ .Title }}</a></li> | ||
{{- end -}} | ||
</ul> | ||
</section> | ||
{{- end -}} | ||
</ul> | ||
</section> | ||
{{- end -}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,11 @@ | ||
{{- $count := default 5 .Site.Params.recentPostCount -}} | ||
{{- if $count -}} | ||
<section class="recent-posts row surface"> | ||
<h4>{{ T "recent_posts" }}</h4> | ||
<ul> | ||
{{- range first (default 5 .Site.Params.recentPostCount) (where site.RegularPages "Type" "in" site.Params.mainSections) -}} | ||
{{- range first $count (where site.RegularPages "Type" "in" site.Params.mainSections) -}} | ||
<li><a href="{{ .Permalink }}">{{ .Title }}</a></li> | ||
{{- end -}} | ||
</ul> | ||
</section> | ||
{{- end -}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,23 @@ | ||
{{- range $key, $value := .Site.Taxonomies -}} | ||
{{- $countParams := dict "categories" "categoryCount" "tags" "tagCount" "series" "seriesCount" -}} | ||
{{- $param := default "" (index $countParams $key) -}} | ||
{{- $taxonomyCount := default 10 ($.Site.Param $param) -}} | ||
{{- with $value.ByCount -}} | ||
<section class="taxonomy-{{ $key }} row surface"> | ||
<h4> | ||
<a href="{{ absLangURL (urlize $key) }}">{{ T $key }}</a> | ||
</h4> | ||
<div> | ||
{{- range $idx, $taxonomy := . -}} | ||
{{- if lt $idx $taxonomyCount -}} | ||
<a href="{{ $taxonomy.Page.Permalink }}" class="post-taxonomy rounded btn btn-sm me-2 mb-2" title="{{ $taxonomy.Page.Title }}"> | ||
{{ $taxonomy.Page.Title }} <span class="badge rounded-pill">{{ $taxonomy.Count }}</span> | ||
</a> | ||
{{- $countParams := dict "categories" "categoryCount" "tags" "tagCount" "series" "seriesCount" -}} | ||
{{- $param := default "" (index $countParams $key) -}} | ||
{{- $taxonomyCount := default 10 ($.Site.Param $param) -}} | ||
{{- if $taxonomyCount -}} | ||
{{- with $value.ByCount -}} | ||
<section class="taxonomy-{{ $key }} row surface"> | ||
<h4> | ||
<a href="{{ absLangURL (urlize $key) }}">{{ T $key }}</a> | ||
</h4> | ||
<div> | ||
{{- range $idx, $taxonomy := . -}} | ||
{{- if lt $idx $taxonomyCount -}} | ||
<a href="{{ $taxonomy.Page.Permalink }}" class="post-taxonomy rounded btn btn-sm me-2 mb-2" title="{{ $taxonomy.Page.Title }}"> | ||
{{ $taxonomy.Page.Title }} <span class="badge rounded-pill">{{ $taxonomy.Count }}</span> | ||
</a> | ||
{{- end -}} | ||
{{- end -}} | ||
</div> | ||
</section> | ||
{{- end -}} | ||
{{- end -}} | ||
</div> | ||
</section> | ||
{{- end -}} | ||
{{- end -}} |