diff options
Diffstat (limited to 'backend/templates')
| -rw-r--r-- | backend/templates/base.html | 4 | ||||
| -rw-r--r-- | backend/templates/components.html | 18 |
2 files changed, 12 insertions, 10 deletions
diff --git a/backend/templates/base.html b/backend/templates/base.html index 24d7b1b..cbb0e71 100644 --- a/backend/templates/base.html +++ b/backend/templates/base.html @@ -13,7 +13,9 @@ <meta name="og:title" content="{{ .Title }}" /> <meta name="og:type" content="website" /> <meta name="og:url" content="https://{{ .Domain }}{{ .URL }}" /> - <meta name="og:image" content="{{ fullStatic .Image }}" /> + {{ if ne (len .Image) 0 }} + <meta name="og:image" content="{{ fullStatic .Image }}" /> + {{ end }} <meta name="og:description" content="{{ .PageDescription }}" /> <meta name="og:local" content="fr_FR" /> <meta name="og:site_name" content="{{ .Name }}" /> diff --git a/backend/templates/components.html b/backend/templates/components.html index dff4626..b249706 100644 --- a/backend/templates/components.html +++ b/backend/templates/components.html @@ -16,7 +16,7 @@ {{ define "data_display" }} <article class="large"> <figure> - <a href="/{{ .URI }}/{{ .Slug }}"><img src="{{ static .Img.Src }}" alt="{{ .Img.Alt }}" /></a> + <a href="/{{ .URI }}/{{ .Slug }}"><img src="{{ static .Img.Src }}" alt="{{ .Img.Alt }}" /></a> <figcaption>{{ .Img.Legend }}</figcaption> </figure> <div> @@ -26,15 +26,15 @@ </article> {{ end }} {{ define "section_pagination" }} - <div class="pagination"> - {{ if .Paginate }} - {{ template "pagination" . }} - {{ else }} - {{ if eq (len .Data) .LenMax }} - <a href="/{{ .URI }}/">Voir plus</a> - {{ end }} + <div class="pagination"> + {{ if .Paginate }} + {{ template "pagination" . }} + {{ else }} + {{ if eq (len .Data) .LenMax }} + <a href="/{{ .URI }}/">Voir plus</a> {{ end }} - </div> + {{ end }} + </div> {{ end }} {{ define "section_display--no-first" }} <article class="article__list"> |
