This ensures that links work correctly in languages other than English. For example, clicking on the navbar "brand" link used to take you to the English home page even if you were browsing the site in another language. Now it takes you to the home page for that language.
70 lines
2.1 KiB
HTML
70 lines
2.1 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="en">
|
|
|
|
{{ partial "head.html" . }}
|
|
|
|
<body>
|
|
|
|
{{ partial "nav.html" . }}
|
|
|
|
<header class="header-section ">
|
|
<div class="intro-header no-img">
|
|
<div class="container">
|
|
<div class="row">
|
|
<div class="col-lg-8 col-lg-offset-2 col-md-10 col-md-offset-1">
|
|
<div class="page-heading">
|
|
<h2>#{{ .Title }}</h2>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</header>
|
|
|
|
<div class="container" role="main">
|
|
<div class="row">
|
|
<div class="col-lg-8 col-lg-offset-2 col-md-10 col-md-offset-1">
|
|
<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>
|
|
|
|
<p class="post-meta">
|
|
{{ default (i18n "dateFormat") .Site.Params.dateformat | .Date.Format | i18n "postedOnDate" }}
|
|
</p>
|
|
<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>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
{{ partial "footer.html" . }}
|
|
|
|
</body>
|
|
</html>
|