forked from etoiledebethleem/website
add gallery imtags navigation
This commit is contained in:
parent
325875a5c7
commit
b5785c8218
29 changed files with 92 additions and 84 deletions
|
@ -4,7 +4,7 @@ defaultContentLanguage = 'fr'
|
|||
title = "L'Étoile de Bethléem"
|
||||
|
||||
[taxonomies]
|
||||
image-tag = 'image-tags'
|
||||
imtag = 'imtags'
|
||||
|
||||
# theme = "custom"
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
title: Autel principal
|
||||
original_name: L'autel à l'intérieur.jpg
|
||||
mime_type: image/jpeg
|
||||
tags:
|
||||
imtags:
|
||||
- crypte
|
||||
- autel-principal
|
||||
---
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
title: Avant de la crypte
|
||||
original_name: crypte_carte_postale.jpg
|
||||
mime_type: image/jpeg
|
||||
tags:
|
||||
imtags:
|
||||
- crypte
|
||||
---
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
title: Ensemble mangeoir, étable
|
||||
original_name: etable.jpg
|
||||
mime_type: image/jpeg
|
||||
tags:
|
||||
imtags:
|
||||
- crypte
|
||||
- mangeoir
|
||||
# etable
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
title: Entrée de la crypte en 1896
|
||||
original_name: Aubevoye_-_Bethléem_-_entrée_de_la_crypte_-_1896.jpg
|
||||
mime_type: image/jpeg
|
||||
tags:
|
||||
imtags:
|
||||
- crypte
|
||||
- entrée-crypte
|
||||
inception: 1896
|
||||
|
|
|
@ -2,6 +2,6 @@
|
|||
title: La vierge éclairée
|
||||
original_name: 935_001.jpg
|
||||
mime_type: image/jpeg
|
||||
tags: ['crypte', 'loge-vierge']
|
||||
imtags: ['crypte', 'loge-vierge']
|
||||
---
|
||||
|
||||
|
|
|
@ -2,6 +2,6 @@
|
|||
title: Ensemble crypte
|
||||
original_name: 47FI3.jpg
|
||||
mime_type: image/jpeg
|
||||
tags: ['crypte', 'ensemble-crypte']
|
||||
imtags: ['crypte', 'ensemble-crypte']
|
||||
---
|
||||
|
||||
|
|
BIN
content/images/14/original.jpg
Executable file → Normal file
BIN
content/images/14/original.jpg
Executable file → Normal file
Binary file not shown.
Before Width: | Height: | Size: 199 KiB After Width: | Height: | Size: 176 KiB |
|
@ -2,6 +2,6 @@
|
|||
title: Mangeoir, Étable
|
||||
original_name: 629_001.jpg
|
||||
mime_type: image/jpeg
|
||||
tags: ['crypte', 'mangeoir']
|
||||
imtags: ['crypte', 'mangeoir']
|
||||
---
|
||||
|
||||
|
|
|
@ -2,6 +2,6 @@
|
|||
title: Mangeoir, étable
|
||||
original_name: 865_001.jpg
|
||||
mime_type: image/jpeg
|
||||
tags: ['crypte', 'mangeoir']
|
||||
imtags: ['crypte', 'mangeoir']
|
||||
---
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
title: Dessin de l'entrée de la crypte
|
||||
original_name: Bethleem-pot-crypte.jpg
|
||||
mime_type: image/jpeg
|
||||
tags:
|
||||
imtags:
|
||||
- crypte
|
||||
- entrée-crypte
|
||||
---
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
title: Le plafond de la grotte avec ses lampes
|
||||
original_name: Le plafond de la grotte avec ses lampes.jpg
|
||||
mime_type: image/jpeg
|
||||
tags:
|
||||
image_imtags:
|
||||
- crypte
|
||||
- lampes
|
||||
- ensemble-crypte
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
title: Ensemble crypte
|
||||
original_name: Aubevoye_-_Bethléem_-_la_crypte_en_1896.jpg
|
||||
mime_type: image/jpeg
|
||||
tags:
|
||||
imtags:
|
||||
- crypte
|
||||
- ensemble-crypte
|
||||
inception: 1896
|
||||
|
|
|
@ -2,6 +2,6 @@
|
|||
title: Entrée de la crypte aujourd'hui
|
||||
original_name: entree-crypte-bethleem-2.jpg
|
||||
mime_type: image/jpeg
|
||||
tags: ['crypte', 'entrée-crypte']
|
||||
imtags: ['crypte', 'entrée-crypte']
|
||||
---
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
title: Autel des rois mages
|
||||
original_name: Une petite statue de la Vierge à l'intérieur de la grotte.jpg
|
||||
mime_type: image/jpeg
|
||||
tags:
|
||||
imtags:
|
||||
- crypte
|
||||
- autel-rois-mages
|
||||
---
|
||||
|
|
|
@ -2,6 +2,6 @@
|
|||
title: Statue de la Vierge
|
||||
original_name: WhatsApp Image 2022-01-14 at 14.04.04.jpeg
|
||||
mime_type: image/jpeg
|
||||
tags: ['crypte', 'loge-vierge']
|
||||
imtags: ['crypte', 'loge-vierge']
|
||||
---
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
title: Dalle de la crypte cassée
|
||||
original_name: dalle-crypte-bethleem1.jpg
|
||||
mime_type: image/jpeg
|
||||
tags:
|
||||
imtags:
|
||||
- crypte
|
||||
- etoile
|
||||
---
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
title: Entrée de la crypte
|
||||
original_name: entree-crypte-bethleem-11.jpg
|
||||
mime_type: image/jpeg
|
||||
tags: ['crypte', 'entrée-crypte']
|
||||
imtags: ['crypte', 'entrée-crypte']
|
||||
---
|
||||
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
title: Ensemble crypte
|
||||
original_name: WhatsApp Image 2022-01-14 at 14.03.06.jpeg
|
||||
mime_type: image/jpeg
|
||||
tags: ['crypte', 'ensemble-crypte']
|
||||
imtags: ['crypte', 'ensemble-crypte']
|
||||
inception:
|
||||
from: 1950
|
||||
to: 2000
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
title: Mangeoir, étable
|
||||
original_name: WhatsApp Image 2022-01-14 at 14.05.16.jpeg
|
||||
mime_type: image/jpeg
|
||||
tags:
|
||||
imtags:
|
||||
- crypte
|
||||
- mangeoir
|
||||
---
|
||||
|
|
|
@ -2,6 +2,6 @@
|
|||
title: Mangeoir, étable
|
||||
original_name: Reproduction de la grotte de la nativité.jpg
|
||||
mime_type: image/jpeg
|
||||
tags: ['crypte', 'mangeoir']
|
||||
imtags: ['crypte', 'mangeoir']
|
||||
---
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
title: Statue de la Vierge
|
||||
original_name: La statue de la Vierge à l'intérieur de la grotte.jpg
|
||||
mime_type: image/jpeg
|
||||
tags:
|
||||
imtags:
|
||||
- crypte
|
||||
- loge-vierge
|
||||
---
|
||||
|
|
|
@ -15,12 +15,11 @@ for dir in images_dirs:
|
|||
# change tags to image-tags
|
||||
path = CONTENT_DIR + dir + '/index.md'
|
||||
print(path)
|
||||
index_file = open(path, 'w+')
|
||||
|
||||
content = index_file.read()
|
||||
print(content)
|
||||
content = content.replace('tags:', 'image-tags:')
|
||||
print(content)
|
||||
# index_file = open(path, 'w+')
|
||||
# content = index_file.read()
|
||||
# print(content)
|
||||
# content = content.replace('tags:', 'image-tags:')
|
||||
# print(content)
|
||||
break
|
||||
index_file.write(content)
|
||||
index_file.close()
|
||||
|
|
|
@ -1 +0,0 @@
|
|||
Term page for image tag
|
|
@ -1 +0,0 @@
|
|||
List of images tags
|
|
@ -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>
|
||||
|
|
4
layouts/imtags/term.html
Normal file
4
layouts/imtags/term.html
Normal file
|
@ -0,0 +1,4 @@
|
|||
{{ define "main" }}
|
||||
{{ .Scratch.Set "image_list_context" "imtags" }}
|
||||
{{ partial "images-list.html" . }}
|
||||
{{ end }}
|
58
layouts/partials/images-list.html
Normal file
58
layouts/partials/images-list.html
Normal file
|
@ -0,0 +1,58 @@
|
|||
<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>
|
||||
{{- if eq (.Scratch.Get "image_list_context") "imtags" -}}
|
||||
<li>
|
||||
<a href="/images">Tout</a>
|
||||
</li>
|
||||
{{- end -}}
|
||||
{{- range .Site.Taxonomies.imtags -}}
|
||||
<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>
|
Loading…
Reference in a new issue