start to simplify layouts
This commit is contained in:
parent
c1548db124
commit
9678e8d33a
@ -1,15 +1,17 @@
|
|||||||
{{ define "main" }}
|
{{ define "main" }}
|
||||||
<main>
|
<main>
|
||||||
{{ if or .Title .Content }}
|
{{ if or .Title .Content }}
|
||||||
<div>
|
<div>
|
||||||
{{ with .Title }}<h1>{{ . }}</h1>{{ end }}
|
{{ with .Title }}<h1>{{ . }}</h1>{{ end }}
|
||||||
{{ with .Content }}<div>{{ . }}</div>{{ end }}
|
{{ with .Content }}<div>{{ . }}</div>{{ end }}
|
||||||
</div>
|
</div>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
||||||
{{ range .Paginator.Pages }}
|
{{ range .Paginator.Pages }}
|
||||||
{{ .Render "summary" }}
|
<article class="h-entry">
|
||||||
{{ end }}
|
{{ partial "article.html" . }}
|
||||||
{{ partial "pagination.html" . }}
|
</article>
|
||||||
</main>
|
{{ end }}
|
||||||
|
{{ partial "pagination.html" . }}
|
||||||
|
</main>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
@ -1,5 +1,7 @@
|
|||||||
{{ define "main" }}
|
{{ define "main" }}
|
||||||
<main>
|
<main>
|
||||||
{{ partial "article.html" . }}
|
<article class="h-entry">
|
||||||
|
{{ partial "article.html" . }}
|
||||||
|
</article>
|
||||||
</main>
|
</main>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
@ -1 +0,0 @@
|
|||||||
{{ partial "article.html" . }}
|
|
@ -2,7 +2,9 @@
|
|||||||
<main>
|
<main>
|
||||||
{{ $paginator := .Paginate (where .Site.RegularPages "Type" "in" .Site.Params.mainSections) }}
|
{{ $paginator := .Paginate (where .Site.RegularPages "Type" "in" .Site.Params.mainSections) }}
|
||||||
{{ range $paginator.Pages }}
|
{{ range $paginator.Pages }}
|
||||||
{{ .Render "summary" }}
|
<article class="h-entry">
|
||||||
|
{{ partial "article.html" . }}
|
||||||
|
</article>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
{{ partial "pagination.html" . }}
|
{{ partial "pagination.html" . }}
|
||||||
</main>
|
</main>
|
||||||
|
@ -1,19 +1,17 @@
|
|||||||
<article class="h-entry">
|
<h1 class="p-name"><a class="u-url" href="{{ .Permalink }}">{{ .Title }}</a></h1>
|
||||||
<h1 class="p-name"><a class="u-url" href="{{ .Permalink }}">{{ .Title }}</a></h1>
|
{{ if (isset .Params "date") }}
|
||||||
{{ if (isset .Params "date") }}
|
<p>
|
||||||
<p>
|
<small>
|
||||||
<small>
|
<time class="dt-published" datetime="{{ .Date.Format "2006-01-02 15:04:05" }}">{{ .Date.Format "02.01.2006 15:04" }}</time>
|
||||||
<time class="dt-published" datetime="{{ .Date.Format "2006-01-02 15:04:05" }}">{{ .Date.Format "02.01.2006 15:04" }}</time>
|
<a rel="author" class="p-author h-card" href="{{ .Site.BaseURL }}">{{ .Site.Params.AuthorName }}</a>
|
||||||
<a rel="author" class="p-author h-card" href="{{ .Site.BaseURL }}">{{ .Site.Params.AuthorName }}</a>
|
{{ if .GitInfo }}/// <a href="https://github.com/xsteadfastx/blog/commit/{{ .GitInfo.Hash }}">{{ .GitInfo.AbbreviatedHash }}</a>{{ end }}
|
||||||
{{ if .GitInfo }}/// <a href="https://github.com/xsteadfastx/blog/commit/{{ .GitInfo.Hash }}">{{ .GitInfo.AbbreviatedHash }}</a>{{ end }}
|
{{ if .Params.tags }}///{{ end }}
|
||||||
{{ if .Params.tags }}///{{ end }}
|
{{ range .Params.tags }}
|
||||||
{{ range .Params.tags }}
|
<a class="p-category" href="{{ "/tags/" | relLangURL }}{{ . | urlize }}">{{ . }}</a>
|
||||||
<a class="p-category" href="{{ "/tags/" | relLangURL }}{{ . | urlize }}">{{ . }}</a>
|
{{ end }}
|
||||||
{{ end }}
|
</small>
|
||||||
</small>
|
{{ end }}
|
||||||
{{ end }}
|
</p>
|
||||||
</p>
|
<section class="e-content">
|
||||||
<section class="e-content">
|
{{ .Content}}
|
||||||
{{ .Content}}
|
</section>
|
||||||
</section>
|
|
||||||
</article>
|
|
||||||
|
Loading…
Reference in New Issue
Block a user