Fix template indentation

Fix indentation for templates changed in 3cec621. This is a
separate commit as it makes for diffs that are easier to read.
This commit is contained in:
Jack Taylor 2017-04-10 18:41:02 +09:00
parent a5113e5008
commit 0df40cf71e
7 changed files with 133 additions and 135 deletions

View File

@ -1,11 +1,11 @@
{{ define "header" }}<!-- No header on 404 pages -->{{ end }}
{{ define "main" }}
<div role="main" class="container main-content">
<div class="text-center">
<h1>{{ i18n "pageNotFound" }}</h1>
<br/>
<img src="{{ .Site.BaseURL }}/img/404-southpark.jpg" />
</div>
<div role="main" class="container main-content">
<div class="text-center">
<h1>{{ i18n "pageNotFound" }}</h1>
<br/>
<img src="{{ .Site.BaseURL }}/img/404-southpark.jpg" />
</div>
</div>
{{ end }}

View File

@ -1,61 +1,61 @@
{{ define "header" }}
<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>
<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>
</header>
</div>
</header>
{{ end }}
{{ define "main" }}
<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>
<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>&nbsp;
{{ end }}
</span>
{{ if .Params.subtitle }}
<h3 class="post-subtitle">
{{ .Params.subtitle }}
</h3>
{{ end }}
</a>
</article>
{{ end }}
</div>
<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>&nbsp;
{{ end }}
</span>
{{ end }}
</article>
{{ end }}
</div>
</div>
</div>
</div>
{{ end }}

View File

@ -1,6 +1,6 @@
{{ define "main" }}
<div class="container" role="main">
{{.Content}}
</div>
<div class="container" role="main">
{{.Content}}
</div>
{{ end }}

View File

@ -1,15 +1,14 @@
{{ define "main" }}
{{ $data := .Data }}
<div class="container" role="main">
<article class="post-preview">
<div class="list-group col-lg-4 col-lg-offset-4 col-md-6 col-md-offset-3">
{{ range $key, $value := .Data.Terms.ByCount }}
<a href="{{ $.Site.LanguagePrefix }}/{{ $data.Plural }}/{{ $value.Name | urlize }}" class="list-group-item">
{{ $value.Name }}<span class="badge">{{ $value.Count }}</span></a>
{{ end }}
</div>
</article>
</div>
{{ $data := .Data }}
<div class="container" role="main">
<article class="post-preview">
<div class="list-group col-lg-4 col-lg-offset-4 col-md-6 col-md-offset-3">
{{ range $key, $value := .Data.Terms.ByCount }}
<a href="{{ $.Site.LanguagePrefix }}/{{ $data.Plural }}/{{ $value.Name | urlize }}" class="list-group-item">
{{ $value.Name }}<span class="badge">{{ $value.Count }}</span></a>
{{ end }}
</div>
</article>
</div>
{{ end }}

View File

@ -1,19 +1,19 @@
{{ define "main" }}
<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">
<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 }}
@ -38,27 +38,26 @@
{{ 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 }}">&larr; {{ i18n "newerPosts" }}</a>
</li>
{{ end }}
{{ if .Paginator.HasNext }}
<li class="next">
<a href="{{ .URL }}page/{{ .Paginator.Next.PageNumber }}">{{ i18n "olderPosts" }} &rarr;</a>
</li>
{{ end }}
</ul>
</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 }}">&larr; {{ i18n "newerPosts" }}</a>
</li>
{{ end }}
{{ if .Paginator.HasNext }}
<li class="next">
<a href="{{ .URL }}page/{{ .Paginator.Next.PageNumber }}">{{ i18n "olderPosts" }} &rarr;</a>
</li>
{{ end }}
</ul>
{{ end }}
</div>
</div>
</div>
{{ end }}

View File

@ -1,17 +1,17 @@
{{ define "main" }}
<div class="container" role="main">
<div class="row">
<div class="col-lg-8 col-lg-offset-2 col-md-10 col-md-offset-1">
{{ .Content }}
{{ if (.Params.comments) | or (and (or (not (isset .Params "comments")) (eq .Params.comments nil)) (.Site.Params.comments)) }}
{{ if .Site.DisqusShortname }}
<div class="disqus-comments">
{{ template "_internal/disqus.html" . }}
</div>
<div class="container" role="main">
<div class="row">
<div class="col-lg-8 col-lg-offset-2 col-md-10 col-md-offset-1">
{{ .Content }}
{{ if (.Params.comments) | or (and (or (not (isset .Params "comments")) (eq .Params.comments nil)) (.Site.Params.comments)) }}
{{ if .Site.DisqusShortname }}
<div class="disqus-comments">
{{ template "_internal/disqus.html" . }}
</div>
{{ end }}
{{ end }}
{{ end }}
</div>
</div>
</div>
</div>
{{ end }}

View File

@ -1,34 +1,34 @@
{{ define "main" }}
<div class="container">
<div class="row">
<div class="col-lg-8 col-lg-offset-2 col-md-10 col-md-offset-1">
<article role="main" class="blog-post">
{{ .Content }}
</article>
<div class="row">
<div class="col-lg-8 col-lg-offset-2 col-md-10 col-md-offset-1">
<article role="main" class="blog-post">
{{ .Content }}
</article>
<ul class="pager blog-pager">
{{ if .PrevInSection }}
<li class="previous">
<a href="{{ .PrevInSection.Permalink }}" data-toggle="tooltip" data-placement="top" title="{{ .PrevInSection.Title }}">&larr; {{ i18n "previousPost" }}</a>
</li>
{{ end }}
{{ if .NextInSection }}
<li class="next">
<a href="{{ .NextInSection.Permalink }}" data-toggle="tooltip" data-placement="top" title="{{ .NextInSection.Title }}">{{ i18n "nextPost" }} &rarr;</a>
</li>
{{ end }}
</ul>
<ul class="pager blog-pager">
{{ if .PrevInSection }}
<li class="previous">
<a href="{{ .PrevInSection.Permalink }}" data-toggle="tooltip" data-placement="top" title="{{ .PrevInSection.Title }}">&larr; {{ i18n "previousPost" }}</a>
</li>
{{ end }}
{{ if .NextInSection }}
<li class="next">
<a href="{{ .NextInSection.Permalink }}" data-toggle="tooltip" data-placement="top" title="{{ .NextInSection.Title }}">{{ i18n "nextPost" }} &rarr;</a>
</li>
{{ end }}
</ul>
{{ if (.Params.comments) | or (and (or (not (isset .Params "comments")) (eq .Params.comments nil)) (.Site.Params.comments)) }}
{{ if .Site.DisqusShortname }}
<div class="disqus-comments">
{{ template "_internal/disqus.html" . }}
</div>
{{ if (.Params.comments) | or (and (or (not (isset .Params "comments")) (eq .Params.comments nil)) (.Site.Params.comments)) }}
{{ if .Site.DisqusShortname }}
<div class="disqus-comments">
{{ template "_internal/disqus.html" . }}
</div>
{{ end }}
{{ end }}
{{ end }}
</div>
</div>
</div>
</div>
{{ end }}