fix(images): use the right resource loader function and others things
This commit is contained in:
parent
93177a4c9a
commit
aa822b6f2e
3 changed files with 19 additions and 17 deletions
|
@ -7,7 +7,8 @@
|
|||
<!-- src="{{ $image.RelPermalink }}" /> -->
|
||||
</a>
|
||||
<nav class="site-header__nav desktop-nav">
|
||||
{{ if eq .File.Dir "/" }}
|
||||
{{ with .File }}
|
||||
{{ if eq .Dir "/" }}
|
||||
<ul class="inline-menu-list">
|
||||
<li><a href="#section-history">Histoire</a></li>
|
||||
<li><a href="#section-organization">L'association</a></li>
|
||||
|
@ -15,7 +16,7 @@
|
|||
<li><a href="/images">Galerie</a></li>
|
||||
</ul>
|
||||
{{ end }}
|
||||
{{ if not (eq .File.Dir "/") }}
|
||||
{{ if not (eq .Dir "/") }}
|
||||
<ul class="inline-menu-list">
|
||||
<li><a href="/actualites">Actualités</a></li>
|
||||
<li><a href="/association">L'association</a></li>
|
||||
|
@ -23,6 +24,7 @@
|
|||
<li><a href="/images">Galerie</a></li>
|
||||
</ul>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
</nav>
|
||||
<div class="burger-menu">
|
||||
<div class="burger-button-container">
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
<!-- Is an external image -->
|
||||
{{ $result = merge $result (dict "permalink" $imageValue) }}
|
||||
{{ else }}
|
||||
{{ $pageResourceImage := .Context.Resources.GetMatch (printf "%s" ($imageValue | safeURL)) }}
|
||||
{{ $pageResourceImage := resources.GetMatch (printf "%s" ($imageValue | safeURL)) }}
|
||||
|
||||
{{ if $pageResourceImage }}
|
||||
<!-- If image is found under page bundle -->
|
||||
|
|
|
@ -37,7 +37,7 @@
|
|||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{ $image := partialCached "helpers/image" (dict "Context" . "Type" "opengraph") .RelPermalink "opengraph" }}
|
||||
{{ $image := partial "helpers/image" (dict "Context" . "Type" "opengraph") .RelPermalink "opengraph" }}
|
||||
{{ if $image.exists }}
|
||||
<meta property="og:image" content="{{ absURL $image.permalink }}" />
|
||||
{{- end -}}
|
||||
|
|
Loading…
Reference in a new issue