Browse Source

adding photos to section pages

master
jk 5 years ago
parent
commit
384cdc154b
  1. 1
      layouts/_default/section.html
  2. 6
      themes/anatole/layouts/partials/taxonomy/photo.html

1
layouts/_default/section.html

@ -10,6 +10,7 @@
<aside> <aside>
{{if eq .Type "article" }}<a href="{{ .RelPermalink }}" class="link u-url"><h3 class="">{{ .Title }}</h3></a><b>{{ .Description }}</b>{{ end }} {{if eq .Type "article" }}<a href="{{ .RelPermalink }}" class="link u-url"><h3 class="">{{ .Title }}</h3></a><b>{{ .Description }}</b>{{ end }}
<div class="e-content"> <div class="e-content">
{{ with .Page.Params.Photo }}{{ partial "taxonomy/photo.html" . }}{{ end }}
{{ .Content }} {{ .Content }}
</div> </div>
<a href="{{ .RelPermalink }}" class="link u-url"><time class="dt-published" datetime="{{ .Date.Format "2 Jan 2006 15:04 GMT" }}">{{ .Date.Format "02/01/2006 15:04 GMT" }}</time></a> <a href="{{ .RelPermalink }}" class="link u-url"><time class="dt-published" datetime="{{ .Date.Format "2 Jan 2006 15:04 GMT" }}">{{ .Date.Format "02/01/2006 15:04 GMT" }}</time></a>

6
themes/anatole/layouts/partials/taxonomy/photo.html

@ -0,0 +1,6 @@
<span class="separator">
{{- range $index, $el := . -}}
<img class="u-photo src="{{ ( printf "%s" ( . | urlize ) ) | relLangURL }}" />
{{- end -}}
</span>