Add layout for photos page
This commit is contained in:
parent
d76eb85f1d
commit
41a5632d4d
|
@ -952,4 +952,9 @@ textarea {
|
|||
margin: 0;
|
||||
cursor: pointer;
|
||||
}
|
||||
}
|
||||
|
||||
/* Photo summary */
|
||||
.photosummary img {
|
||||
width: 100%;
|
||||
}
|
|
@ -0,0 +1,10 @@
|
|||
<article class="list-item h-entry photosummary">
|
||||
<div class="list-excerpt">
|
||||
{{ range .Params.images }}
|
||||
<p><figure><img src="{{ . | safeURL }}"></figure></p>
|
||||
{{ end }}
|
||||
</div>
|
||||
<div class="list-footer">
|
||||
<a class="read-more u-url" href="{{ .RelPermalink }}">{{ T "read_more" }}</a>
|
||||
</div>
|
||||
</article>
|
|
@ -0,0 +1,21 @@
|
|||
{{ define "main" }}
|
||||
<main class="main list">
|
||||
{{- with .Title }}
|
||||
<header class="main-header">
|
||||
<h1 class="main-title">{{ . }}</h1>
|
||||
</header>
|
||||
{{- end }}
|
||||
{{- with .Content }}
|
||||
<div class="main-content">
|
||||
{{ . }}
|
||||
</div>
|
||||
{{- end }}
|
||||
{{- $photoSections := (.Site.Param "photoSections" | default (slice "posts")) }}
|
||||
{{- $paginator := .Paginate ( where ( where .Site.RegularPages "Type" "in" $photoSections ) "Params.images" "!=" nil ) 5 }}
|
||||
{{- range $paginator.Pages }}
|
||||
{{- .Render "photosummary" }}
|
||||
{{- end }}
|
||||
{{ partial "authorbox.html" . }}
|
||||
</main>
|
||||
{{ partial "pagination.html" . }}
|
||||
{{ end }}
|
Reference in New Issue