* Add a post date to each post * Do not show the post date for tours * Only show posts tagged "current-event" on the home page (hiding 37c3 entries) * Use a custom template for sorting the summary list by title (instead of the default by date)
This commit is contained in:
parent
d070853e64
commit
c06c8603ef
17 changed files with 67 additions and 4 deletions
12
layouts/_default/summary.html
Normal file
12
layouts/_default/summary.html
Normal file
|
@ -0,0 +1,12 @@
|
|||
<article class="list-view{{ with .Section }} list-view--{{ . | urlize }}{{ end }}">
|
||||
<header>
|
||||
{{- $postDate := "" }}
|
||||
{{- if .Param "showPostDate" | default false }}
|
||||
{{- $postDate = .Params.date.Format .Site.Params.dateFormat }}
|
||||
{{- end }}
|
||||
<h2 class="title mt--s{{ if $.Param "submitted" | default false }} mb--xxs{{ end }}"><a href="{{ .RelPermalink }}">{{ .Title }}</a> <span class="title-post-date">{{ $postDate }}</span></h2>
|
||||
{{ if $.Param "submitted" | default false }}{{ partial "submitted.html" . -}}{{ end }}
|
||||
</header>
|
||||
|
||||
{{ .Summary }}
|
||||
</article>
|
15
layouts/index.html
Normal file
15
layouts/index.html
Normal file
|
@ -0,0 +1,15 @@
|
|||
{{ define "title" }}{{ site.Title }}{{ end }}
|
||||
|
||||
{{ define "main" -}}
|
||||
<main class="main layout__main">
|
||||
{{ .Content }}
|
||||
|
||||
{{ $pages := .Site.RegularPages.RelatedTo (keyVals "tags" "current-event") -}}
|
||||
{{ $paginator := .Paginate $pages -}}
|
||||
{{ range $paginator.Pages -}}
|
||||
{{ .Render "summary" }}
|
||||
{{ end -}}
|
||||
|
||||
{{ partial "pagination.html" . }}
|
||||
</main>
|
||||
{{ end -}}
|
Loading…
Add table
Add a link
Reference in a new issue