forked from jakub/jakubb-hugo
started gal layout
This commit is contained in:
parent
d99c90c007
commit
3dfb87a4e3
22
layouts/photos/list.html
Normal file
22
layouts/photos/list.html
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
{{ partial "header.html" . }}
|
||||||
|
{{ partial "nav.html" . }}
|
||||||
|
<div class="content">
|
||||||
|
|
||||||
|
<h1>{{ .Title }}</h1>
|
||||||
|
|
||||||
|
{{ .Content }}
|
||||||
|
|
||||||
|
{{ range.Data.Pages }}
|
||||||
|
<article class="post-snippet">
|
||||||
|
<h3>
|
||||||
|
<a href="{{ .RelPermalink }}">{{ .Title }}</a>
|
||||||
|
</h3>
|
||||||
|
<time datetime="{{ .Date.Format "2006-01-02T15:04:05Z07:00" }}">
|
||||||
|
{{ .Date.Format "January 2, 2006" }}
|
||||||
|
</time>
|
||||||
|
</article>
|
||||||
|
{{ end }}
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{{ partial "footer.html" . }}
|
24
layouts/photos/single.html
Normal file
24
layouts/photos/single.html
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
{{ partial "header.html" . }}
|
||||||
|
{{ partial "nav.html" . }}
|
||||||
|
<div class="content">
|
||||||
|
|
||||||
|
<h1>{{ .Title }}</h1>
|
||||||
|
|
||||||
|
{{ .Content }}
|
||||||
|
|
||||||
|
{{ $path := .Page.File.Path | strings.TrimSuffix (path.Ext .Page.File.Path) }}
|
||||||
|
{{ $images := where (resources.Match "photos/test1/*" ) "ResourceType" "eq" "image" }}
|
||||||
|
|
||||||
|
<div class="gallery" >
|
||||||
|
{{ range $images }} <div class="gallery-item"> <img src="{{ .RelPermalink }}" /> {{ end }}
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<style>
|
||||||
|
</style>
|
||||||
|
|
||||||
|
{{ partial "footer.html" . }}
|
Loading…
Reference in New Issue
Block a user