Browse Source

updating image on list page for articles

master
jk 3 years ago
parent
commit
56454e9430
  1. 2
      themes/nipponalba/layouts/_default/list.html
  2. 2
      themes/nipponalba/layouts/_default/section.html

2
themes/nipponalba/layouts/_default/list.html

@ -27,7 +27,7 @@
{{ if not (eq .Type "note" "photo") }}
{{ if eq .Type "article"}}
<span class="list-article h-entry entry"><a class="u-url" href="{{ .Permalink }}">
{{ if .Page.Params.image }}{{ range first 1 .Page.Params.image }} <img class="banner u-photo" src="{{ .}}"/>{{ end }}{{ end }}<span class="p-name entry-title">{{ .Title }}</span>
{{ if .Page.Params.image }}{{ range first 1 .Page.Params.image }} <img class="banner u-photo" src="{{ replace . "images" "images/300" }}"/>{{ end }}{{ end }}<span class="p-name entry-title">{{ .Title }}</span>
<section class="e-content">{{ .Description }}</section>
</a></span>
{{else}}<span class="listing-post"><a href="{{ .Permalink }}" title="{{ .Title }}">{{.Title }}</a></span>{{end}}{{else}}

2
themes/nipponalba/layouts/_default/section.html

@ -6,7 +6,7 @@
<span id="pagination-top">{{ partial "pagination.html" . }}</span>
{{ range .Paginator.Pages}}
{{ if not (eq .Type "response")}}<section data-post-type="{{ .Type }}" class="feed h-entry {{.Type }}">
{{ if .Page.Params.image }}{{ range first 1 .Page.Params.image }} <img class="banner u-photo" src="{{ replace . "images" "images/300" }}"/>{{ end }}{{ end }}
{{ if .Page.Params.image }}{{ range first 1 .Page.Params.image }} <img class="banner u-photo" src="{{ . }}"/>{{ end }}{{ end }}
<article class="index_content">
{{if eq .Type "article"}}<a href="{{ .Permalink }}" class="u-url"><h3 class="p-name entry-title">{{ .Title }}</h3></a><b>{{ .Description }}</b>{{ end }}
{{ if eq .Type "article" }}<section class="info">

Loading…
Cancel
Save