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 "header" }}<!-- No header on 404 pages -->{{ end }}
{{ define "main" }} {{ define "main" }}
<div role="main" class="container main-content"> <div role="main" class="container main-content">
<div class="text-center"> <div class="text-center">
<h1>{{ i18n "pageNotFound" }}</h1> <h1>{{ i18n "pageNotFound" }}</h1>
<br/> <br/>
<img src="{{ .Site.BaseURL }}/img/404-southpark.jpg" /> <img src="{{ .Site.BaseURL }}/img/404-southpark.jpg" />
</div>
</div> </div>
</div>
{{ end }} {{ end }}

View File

@ -1,61 +1,61 @@
{{ define "header" }} {{ define "header" }}
<header class="header-section "> <header class="header-section ">
<div class="intro-header no-img"> <div class="intro-header no-img">
<div class="container"> <div class="container">
<div class="row"> <div class="row">
<div class="col-lg-8 col-lg-offset-2 col-md-10 col-md-offset-1"> <div class="col-lg-8 col-lg-offset-2 col-md-10 col-md-offset-1">
<div class="page-heading"> <div class="page-heading">
<h2>#{{ .Title }}</h2> <h2>#{{ .Title }}</h2>
</div>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
</header> </div>
</header>
{{ end }} {{ end }}
{{ define "main" }} {{ define "main" }}
<div class="container" role="main"> <div class="container" role="main">
<div class="row"> <div class="row">
<div class="col-lg-8 col-lg-offset-2 col-md-10 col-md-offset-1"> <div class="col-lg-8 col-lg-offset-2 col-md-10 col-md-offset-1">
<div class="posts-list"> <div class="posts-list">
{{ $pag := .Paginate (where .Data.Pages "Type" "post") }} {{ $pag := .Paginate (where .Data.Pages "Type" "post") }}
{{ range $pag.Pages }} {{ range $pag.Pages }}
<article class="post-preview"> <article class="post-preview">
<a href="{{ .Permalink }}"> <a href="{{ .Permalink }}">
<h2 class="post-title">{{ .Title }}</h2> <h2 class="post-title">{{ .Title }}</h2>
{{ if .Params.subtitle }} {{ if .Params.subtitle }}
<h3 class="post-subtitle"> <h3 class="post-subtitle">
{{ .Params.subtitle }} {{ .Params.subtitle }}
</h3> </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>
{{ end }} {{ end }}
</a>
</article>
{{ end }} <p class="post-meta">
</div> {{ 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>
</div> </div>
</div>
{{ end }} {{ end }}

View File

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

View File

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

View File

@ -1,19 +1,19 @@
{{ define "main" }} {{ define "main" }}
<div role="main" class="container"> <div role="main" class="container">
<div class="row"> <div class="row">
<div class="col-lg-8 col-lg-offset-2 col-md-10 col-md-offset-1"> <div class="col-lg-8 col-lg-offset-2 col-md-10 col-md-offset-1">
{{ with .Content }} {{ with .Content }}
<div class="well"> <div class="well">
{{.}} {{.}}
</div> </div>
{{ end }} {{ end }}
<div class="posts-list">
{{ $pag := .Paginate (where .Data.Pages "Type" "post") }} <div class="posts-list">
{{ range $pag.Pages }} {{ $pag := .Paginate (where .Data.Pages "Type" "post") }}
<article class="post-preview"> {{ range $pag.Pages }}
<article class="post-preview">
<a href="{{ .Permalink }}"> <a href="{{ .Permalink }}">
<h2 class="post-title">{{ .Title }}</h2> <h2 class="post-title">{{ .Title }}</h2>
{{ if .Params.subtitle }} {{ if .Params.subtitle }}
<h3 class="post-subtitle"> <h3 class="post-subtitle">
{{ .Params.subtitle }} {{ .Params.subtitle }}
@ -38,27 +38,26 @@
{{ end }} {{ end }}
</span> </span>
{{ end }} {{ end }}
</article>
</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 }} {{ end }}
</div> </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> </div>
</div>
{{ end }} {{ end }}

View File

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

View File

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