add gallery imtags navigation
This commit is contained in:
parent
325875a5c7
commit
b5785c8218
29 changed files with 92 additions and 84 deletions
|
|
@ -1,55 +1,4 @@
|
|||
{{ define "main" }}
|
||||
<main>
|
||||
|
||||
<div class="gallery">
|
||||
<div class="gallery__side">
|
||||
{{ $listtitle := .Title }}
|
||||
{{ if or .Title .Content }}
|
||||
<div>
|
||||
{{ with .Title }}<h1>{{ . }}</h1>{{ end }}
|
||||
{{ with .Content }}<div>{{ . }}</div>{{ end }}
|
||||
</div>
|
||||
{{ end }}
|
||||
<div class="gallery-tags__title">Filtrer par étiquettes</div>
|
||||
<div class="gallery-tags__list">
|
||||
<ul>
|
||||
{{- range .Site.Taxonomies.tags -}}
|
||||
<li>
|
||||
<a href="{{ .Page.RelPermalink }}">{{ .Page.Title }}</a>
|
||||
</li>
|
||||
{{- end -}}
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="gallery__items-container">
|
||||
<div class="gallery__items">
|
||||
{{ range (.Paginator 8).Pages }}
|
||||
<a class="gallery__item" href="{{ .RelPermalink }}">
|
||||
{{ $image := .Resources.GetMatch "original.jpg" }}
|
||||
{{ $image := $image.Resize "x350" }}
|
||||
{{ with $image }}
|
||||
<img
|
||||
class="gallery__image"
|
||||
src="{{ .RelPermalink }}" width="{{ .Width }}" height="{{ .Height }}"
|
||||
/>
|
||||
{{ end }}
|
||||
|
||||
{{/*
|
||||
<div class="post-title">
|
||||
{{ if eq $listtitle "Posts" }}
|
||||
{{ .Date.Format "2006-01-02" }} <a href="{{ .RelPermalink }}">{{.Title }}</a>
|
||||
{{ else }}
|
||||
<a href="{{ .RelPermalink }}">{{.Title }}</a>
|
||||
{{ end }}
|
||||
</div>
|
||||
*/}}
|
||||
|
||||
</a>
|
||||
{{ end }}
|
||||
</div>
|
||||
{{ partial "pagination.html" . }}
|
||||
</div>
|
||||
</div>
|
||||
</main>
|
||||
{{ .Scratch.Set "image_list_context" "all" }}
|
||||
{{ partial "images-list.html" . }}
|
||||
{{ end }}
|
||||
|
|
|
|||
|
|
@ -13,8 +13,8 @@
|
|||
<path d="M6 9h-.01" />
|
||||
</svg>
|
||||
<ul>
|
||||
{{ range .Params.image_tags }}
|
||||
<li><a href="{{ "/tags/" | relLangURL }}{{ . | urlize }}">{{ . }}</a></li>
|
||||
{{ range .Params.imtags }}
|
||||
<li><a href="/tag_images/{{ . | urlize }}">{{ . }}</a></li>
|
||||
{{ end }}
|
||||
</ul>
|
||||
</div>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue