hugo site
This commit is contained in:
14
layouts/_default/baseof.html
Normal file
14
layouts/_default/baseof.html
Normal file
@ -0,0 +1,14 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
{{- partial "head.html" . -}}
|
||||
<body>
|
||||
<div class="flex-container">
|
||||
{{- partial "header.html" . -}}
|
||||
<div class="content wrapper">
|
||||
{{- block "main" . }}{{- end }}
|
||||
</div>
|
||||
{{- partial "footer.html" . -}}
|
||||
{{- partial "javascripts.html" . }}
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
29
layouts/_default/list.html
Normal file
29
layouts/_default/list.html
Normal file
@ -0,0 +1,29 @@
|
||||
{{ define "main" }}
|
||||
{{ $paginator := .Paginate (where .Pages.ByPublishDate.Reverse ".Params.date" "!=" nil) 6 }}
|
||||
{{ if eq $paginator.PageNumber 1 }}
|
||||
{{ .Content }}
|
||||
{{ end }}
|
||||
<h2>Recent pieces</h2>
|
||||
<ol class="post-card-box clearfix">
|
||||
{{ range $paginator.Pages.ByPublishDate.Reverse }}
|
||||
<li>
|
||||
<div class="post-card">
|
||||
<a href="{{ .Permalink }}" class="post-card-image"{{ with .Params.img }} style="background-image: url(/assets/img/{{.}} )"{{ end }}>
|
||||
</a>
|
||||
|
||||
<div class="post-card-body">
|
||||
{{ with .Params.tags }}
|
||||
{{ range . }}
|
||||
<a href="/tags/{{ . | urlize }}" class="tag">| {{ . }}</a>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
<a href="{{ .Permalink }}" class="post-card-link"><h3 class="post-card-title">{{ .Title }}</h3></a>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</li>
|
||||
{{ end }}
|
||||
</ol>
|
||||
<link rel="stylesheet" type="text/css" href="/css/pagination.css" />
|
||||
{{ template "_internal/pagination.html" . }}
|
||||
{{ end }}
|
||||
3
layouts/_default/single.html
Normal file
3
layouts/_default/single.html
Normal file
@ -0,0 +1,3 @@
|
||||
{{ define "main" }}
|
||||
{{ .Content }}
|
||||
{{ end }}
|
||||
21
layouts/_default/terms.html
Normal file
21
layouts/_default/terms.html
Normal file
@ -0,0 +1,21 @@
|
||||
{{ define "main" }}
|
||||
<main id="main">
|
||||
<h1>{{ .Title }}</h1>
|
||||
<ul class="patterns-list">
|
||||
{{ $type := .Type }}
|
||||
{{ range $key, $value := .Data.Terms.ByCount }}
|
||||
{{ $name := .Name }}
|
||||
{{ $count := .Count }}
|
||||
{{ with $.Site.GetPage (printf "/%s/%s" $type $name) }}
|
||||
<li>
|
||||
<h2>
|
||||
<a href="{{ .Permalink }}">
|
||||
{{ printf "(%d) %s" $count $name }}
|
||||
</a>
|
||||
</h2>
|
||||
</li>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
</ul>
|
||||
</main>
|
||||
{{ end }}
|
||||
Reference in New Issue
Block a user