Links to translated content will appear next to the date, both on the index page and on post pages. Also style the translation links on post pages to be like those on the index page, although some more thought about the design is probably in order.
76 lines
2.2 KiB
HTML
76 lines
2.2 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="en">
|
|
|
|
{{ partial "head.html" . }}
|
|
|
|
<body>
|
|
|
|
{{ partial "nav.html" . }}
|
|
{{ partial "header.html" . }}
|
|
|
|
<div role="main" class="container">
|
|
<div class="row">
|
|
<div class="col-lg-8 col-lg-offset-2 col-md-10 col-md-offset-1">
|
|
{{ with .Content }}
|
|
<div class="well">
|
|
{{.}}
|
|
</div>
|
|
{{ end }}
|
|
<div class="posts-list">
|
|
{{ $pag := .Paginate (where .Data.Pages "Type" "post") }}
|
|
{{ range $pag.Pages }}
|
|
<article class="post-preview">
|
|
<a href="{{ .Permalink }}">
|
|
<h2 class="post-title">{{ .Title }}</h2>
|
|
|
|
{{ if .Params.subtitle }}
|
|
<h3 class="post-subtitle">
|
|
{{ .Params.subtitle }}
|
|
</h3>
|
|
{{ end }}
|
|
</a>
|
|
|
|
{{ partial "post_meta.html" . }}
|
|
<div class="post-entry">
|
|
{{ if .Truncated }}
|
|
{{ .Summary }}
|
|
<a href="{{ .Permalink }}" class="post-read-more">[{{ i18n "readMore" }}]</a>
|
|
{{ else }}
|
|
{{ .Content }}
|
|
{{ end }}
|
|
</div>
|
|
|
|
{{ if .Params.tags }}
|
|
<span class="post-meta">
|
|
{{ range .Params.tags }}
|
|
#<a href="{{ $.Site.LanguagePrefix }}/tags/{{ . | urlize }}">{{ . }}</a>
|
|
{{ end }}
|
|
</span>
|
|
{{ end }}
|
|
|
|
</article>
|
|
{{ end }}
|
|
</div>
|
|
|
|
{{ if or (.Paginator.HasPrev) (.Paginator.HasNext) }}
|
|
<ul class="pager main-pager">
|
|
{{ if .Paginator.HasPrev }}
|
|
<li class="previous">
|
|
<a href="{{ .URL }}page/{{ .Paginator.Prev.PageNumber }}">← {{ i18n "newerPosts" }}</a>
|
|
</li>
|
|
{{ end }}
|
|
{{ if .Paginator.HasNext }}
|
|
<li class="next">
|
|
<a href="{{ .URL }}page/{{ .Paginator.Next.PageNumber }}">{{ i18n "olderPosts" }} →</a>
|
|
</li>
|
|
{{ end }}
|
|
</ul>
|
|
{{ end }}
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
{{ partial "footer.html" . }}
|
|
|
|
</body>
|
|
</html>
|