layouts: Add container wrapper

This commit is contained in:
Alan Orth 2020-12-07 16:17:17 +02:00
parent 2e7f12c52a
commit bcb497d744
Signed by: alanorth
GPG Key ID: 0FB860CC9C45B1B9
2 changed files with 7 additions and 0 deletions

View File

@ -27,6 +27,8 @@
{{ define "main" }}
<div class="row">
<div class="col-md-8">
{{ $truncate := default true .Site.Params.truncate }}
{{ $paginator := .Paginate (where .Site.RegularPages "Section" "in" .Site.Params.mainSections) }}
{{ range $paginator.Pages }}
@ -41,6 +43,8 @@
{{ partial "pagination.html" . }}
{{ end }}
</div>
{{ end }}
{{- /* vim: set ts=2 sw=2 et: */}}

View File

@ -63,6 +63,8 @@
{{ define "main" }}
{{ $dateFormat := default "Mon Jan 2, 2006" (index .Site.Params "date_format") }}
<div class="row">
<div class="col-md-8">
<article class="blog-post">
<h2 class="blog-post-title"><a href="{{ .Permalink }}">{{ .Title | markdownify }}</a></h2>
<p class="blog-post-meta">{{ if not .PublishDate.IsZero }}<time {{ .Date.Format "2006-01-02T15:04:05Z07:00" | printf "datetime=%q" | safeHTMLAttr }}>{{ .Date.Format $dateFormat }}</time>{{ end }}
@ -71,6 +73,7 @@
{{ .Content }}
</article>{{ "<!-- /.blog-post -->" | safeHTML }}
</div>
{{ end }}