layout: add default and partials
* NEW Adds a section template. * NEW Adds a single page template. * NEW Fills in the header and footer templates. * BETTER Improves the global html head template. Co-Authored-by: Igor Milhit <igor@milhit.ch>pull/31/head
parent
9b7e39acd2
commit
498a724195
|
@ -0,0 +1,16 @@
|
|||
{{ define "main" }}
|
||||
<main>
|
||||
{{ .Content }}
|
||||
<ul class="contents">
|
||||
{{ range .Paginator.Pages }}
|
||||
<li><a href="{{ .Permalink }}">{{.Title}} — {{ .Date.Format "2006-01-02" }}</a>
|
||||
{{/* <div>
|
||||
{{ partial "summary.html" . }}
|
||||
</div> */}}
|
||||
</li>
|
||||
{{ end }}
|
||||
</ul>
|
||||
{{/* {{ partial "pagination.html" . }} */}}
|
||||
</main>
|
||||
{{ end }}
|
||||
|
|
@ -0,0 +1,44 @@
|
|||
{{ define "main" }}
|
||||
<section id="main">
|
||||
<header>
|
||||
<h1 id="title">{{ .Title }}</h1>
|
||||
<h4 id="date">{{ .Date.Format "2006-01-02" }}</h4>
|
||||
</header>
|
||||
<article id="content">
|
||||
{{ .Content }}
|
||||
</article>
|
||||
</section>
|
||||
|
||||
{{/*
|
||||
<aside id="meta">
|
||||
<div>
|
||||
<section>
|
||||
</section>
|
||||
{{ with .Params.topics }}
|
||||
<ul id="topics">
|
||||
{{ range . }}
|
||||
<li><a href="{{ "topics" | absURL}}{{ . | urlize }}">{{ . }}</a> </li>
|
||||
{{ end }}
|
||||
</ul>
|
||||
{{ end }}
|
||||
{{ with .Params.tags }}
|
||||
<ul id="tags">
|
||||
{{ range . }}
|
||||
<li> <a href="{{ "tags" | absURL }}{{ . | urlize }}">{{ . }}</a> </li>
|
||||
{{ end }}
|
||||
</ul>
|
||||
{{ end }}
|
||||
</div>
|
||||
<div>
|
||||
{{ with .PrevInSection }}
|
||||
<a class="previous" href="{{.Permalink}}"> {{.Title}}</a>
|
||||
{{ end }}
|
||||
{{ with .NextInSection }}
|
||||
<a class="next" href="{{.Permalink}}"> {{.Title}}</a>
|
||||
{{ end }}
|
||||
</div>
|
||||
</aside>
|
||||
|
||||
*/}}
|
||||
{{ end }}
|
||||
|
|
@ -0,0 +1,6 @@
|
|||
<footer class="main-footer">
|
||||
<ul>
|
||||
<li><a href="https://framagit.org/iGormilhit/igor.milhit">Sources</a></li>
|
||||
<li><a href="http://creativecommons.org/licenses/by/4.0/">CC-BY</a></li>
|
||||
</ul>
|
||||
</footer>
|
|
@ -2,7 +2,7 @@
|
|||
<meta charset="utf-8">
|
||||
|
||||
<base href="{{ .Site.BaseURL }}">
|
||||
<title> {{ .Title }} </title>
|
||||
<title>{{ .Title }} | {{ .Site.Title }}</title>
|
||||
<link rel="canonical" href="{{ .Permalink }}">
|
||||
|
||||
<link rel="stylesheet" type="text/css" href="{{ .Site.BaseURL }}style.css">
|
||||
|
|
|
@ -0,0 +1,4 @@
|
|||
<header class="main-header">
|
||||
<a href="{{ .Site.BaseURL }}">{{ .Site.Title }}</a>
|
||||
<a href="{{ .Site.BaseURL }}blog">Blog</a>
|
||||
</header>
|
Loading…
Reference in New Issue