-
Notifications
You must be signed in to change notification settings - Fork 52
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This PR adds the following features: * The ability to list a post's tags in `list.html` with a parameter to toggle that defaults to off. * Update baseof.html to support a custom "title" block that defines the page's <title>. Default content matches current implementation. * A terms.html template that will display tags or categories sorted by post count. * A fix for list.html's conditional logic. The original `(or "tags" "categories")` just returns `"tags"` being logically equivalent to `(in .Page.RelPermalink "tags")` * The `tag` class from the post description is hoisted up, uses `text-transform: lowercase` along with the `before`, and can be applied outside of a post description. * The `category` class has also been hoisted similarly.
- Loading branch information
Showing
5 changed files
with
83 additions
and
11 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 |
---|---|---|
@@ -0,0 +1,35 @@ | ||
{{ define "header" }} | ||
{{ partialCached "header.html" . }} | ||
{{ end }} | ||
|
||
{{ define "main" }} | ||
<main class="site-main section-inner thin {{- if ne false .Site.Params.usesAnimation }} animated fadeIn faster{{- end -}}"> | ||
<h1>{{ .Title }}</h1> | ||
{{- if .Content }} | ||
<div class="content"> | ||
{{ .Content }} | ||
</div> | ||
{{- end }} | ||
|
||
{{- range .Data.Terms.ByCount }} | ||
<div class="posts-group"> | ||
<ul class="posts-list"> | ||
<li class="post-item"> | ||
<a href="{{.Page.RelPermalink}}"> | ||
{{- if in .Page.RelPermalink "tags" -}} | ||
<span class="post-title tag">{{.Page.LinkTitle }}</span> | ||
{{- else if in .Page.RelPermalink "categories" -}} | ||
<span class="post-title category">{{.Page.LinkTitle}}</span> | ||
{{- else -}} | ||
<span class="post-title">{{.Page.LinkTitle}}</span> | ||
{{- end -}} | ||
<span class="post-day">{{ .Count }}</span> | ||
</a> | ||
</li> | ||
</ul> | ||
</div> | ||
{{- end -}} | ||
</main> | ||
{{ end }} | ||
{{ define "footer" }}<footer id="site-footer" class="section-inner thin {{- if ne false .Site.Params.usesAnimation }} animated fadeIn faster {{- end -}}">{{- if templates.Exists "partials/list-footer.html" -}}{{- partialCached "list-footer.html" . -}}{{- else -}}{{- partial "footer.html" . -}}{{- end -}}</footer> | ||
{{ end }} |