Correct layout on tags list view

Make the layout when listing posts by tags consistent with the layout
when listing posts (default blog view)
This commit is contained in:
Michael Romero 2017-03-16 21:09:28 -07:00
parent f786ba7785
commit bb64fb5b8e

View File

@ -22,43 +22,48 @@
</header> </header>
<div class="container" role="main"> <div class="container" role="main">
{{ $pag := .Paginate (where .Data.Pages "Type" "post") }} <div class="row">
{{ range $pag.Pages }} <div class="col-lg-8 col-lg-offset-2 col-md-10 col-md-offset-1">
<article class="post-preview"> <div class="posts-list">
<a href="{{ .Permalink }}"> {{ $pag := .Paginate (where .Data.Pages "Type" "post") }}
<h2 class="post-title">{{ .Title }}</h2> {{ range $pag.Pages }}
<article class="post-preview">
{{ if .Params.subtitle }} <a href="{{ .Permalink }}">
<h3 class="post-subtitle"> <h2 class="post-title">{{ .Title }}</h2>
{{ .Params.subtitle }}
</h3> {{ if .Params.subtitle }}
{{ end }} <h3 class="post-subtitle">
</a> {{ .Params.subtitle }}
</h3>
<p class="post-meta"> {{ end }}
Posted on {{ .Date.Format .Site.Params.dateFormat }} </a>
</p>
<div class="post-entry"> <p class="post-meta">
{{ if .Truncated }} Posted on {{ .Date.Format .Site.Params.dateFormat }}
{{ .Summary }} </p>
<a href="{{ .Permalink }}" class="post-read-more">[Read&nbsp;More]</a> <div class="post-entry">
{{ else }} {{ if .Truncated }}
{{ .Content }} {{ .Summary }}
<a href="{{ .Permalink }}" class="post-read-more">[Read&nbsp;More]</a>
{{ else }}
{{ .Content }}
{{ end }}
</div>
{{ if .Params.tags }}
<span class="post-meta">
{{ range .Params.tags }}
#<a href="/tags/{{ . | urlize }}">{{ . }}</a>&nbsp;
{{ end }}
</span>
{{ end }}
</article>
{{ end }} {{ end }}
</div> </div>
</div>
{{ if .Params.tags }} </div>
<span class="post-meta">
{{ range .Params.tags }}
#<a href="/tags/{{ . | urlize }}">{{ . }}</a>&nbsp;
{{ end }}
</span>
{{ end }}
</article>
{{ end }}
</div> </div>
{{ partial "footer.html" . }} {{ partial "footer.html" . }}
</body> </body>