hugo site

This commit is contained in:
Madison Scott-Clary
2019-03-06 00:31:57 -08:00
parent 748b3c1b30
commit 4386102543
174 changed files with 1843 additions and 522 deletions

View 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>

View 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">|&#32;{{ . }}</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 }}

View File

@ -0,0 +1,3 @@
{{ define "main" }}
{{ .Content }}
{{ end }}

View 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 }}