Initial commit
This commit is contained in:
parent
29c198826a
commit
ba13221167
26 changed files with 181 additions and 14 deletions
36
layouts/_default/single.html
Normal file
36
layouts/_default/single.html
Normal file
|
@ -0,0 +1,36 @@
|
|||
{{ define "title"}}
|
||||
{{ .Title }} | {{ .Site.Params.author.name }}
|
||||
{{ end }}
|
||||
|
||||
{{ define "main" }}
|
||||
<div class="postWrapper">
|
||||
<h1>{{ .Title }}</h1>
|
||||
{{ if .Site.Params.showMetadata | default true }}
|
||||
<section class="postMetadata">
|
||||
<dl>
|
||||
{{ with .GetTerms "tags" }}
|
||||
{{ partial "taxonomy/tags.html" . }}
|
||||
{{ end }}
|
||||
{{ with .GetTerms "authors" }}
|
||||
{{ partial "taxonomy/authors.html" . }}
|
||||
{{ end }}
|
||||
{{ with .GetTerms "categories" }}
|
||||
{{ partial "taxonomy/categories.html" . }}
|
||||
{{ end }}
|
||||
{{ if .Site.Params.published | default true }}
|
||||
<dt>{{ i18n "published" }}</dt>
|
||||
{{ $formattedDate := .Date.Format "2006-01-02" }}
|
||||
<dd><time datetime="{{ $formattedDate }}">{{ .Date | time.Format ":date_long" }}</time></dd>
|
||||
{{ end }}
|
||||
{{ if .Site.Params.readingTime | default true }}
|
||||
<dt>{{ i18n "reading_time" }}</dt>
|
||||
<dd>{{ i18n "reading_time_desc" .ReadingTime }}</dd>
|
||||
{{ end }}
|
||||
</dl>
|
||||
</section>
|
||||
{{ end }}
|
||||
<div>
|
||||
{{ .Content }}
|
||||
</div>
|
||||
</div>
|
||||
{{ end }}
|
37
layouts/index.html
Normal file
37
layouts/index.html
Normal file
|
@ -0,0 +1,37 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="{{ .Site.LanguageCode }}">
|
||||
|
||||
<head>
|
||||
<title>
|
||||
{{ i18n "home" }} | {{ .Site.Params.author.name }}
|
||||
</title>
|
||||
|
||||
{{ partial "head.html" . }}
|
||||
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
<div class="flexWrapper">
|
||||
{{ partial "header.html" . }}
|
||||
|
||||
<div class="content vertical">
|
||||
<main class="main">
|
||||
<div class="indexWrapper">
|
||||
<div>
|
||||
<h1 class="indexHeader">{{ .Site.Params.author.name }}</h1>
|
||||
</div>
|
||||
{{ if isset .Site.Params "social" }}
|
||||
{{ partial "social.html" . }}
|
||||
{{ end }}
|
||||
</div>
|
||||
</main>
|
||||
</div>
|
||||
|
||||
|
||||
{{ partial "footer.html" . }}
|
||||
</div>
|
||||
|
||||
</body>
|
||||
|
||||
</html>
|
10
layouts/partials/footer.html
Normal file
10
layouts/partials/footer.html
Normal file
|
@ -0,0 +1,10 @@
|
|||
<footer class="footer">
|
||||
{{ with .Site.Params.footerHtml }}
|
||||
<span>{{ . | safeHTML }}</span>
|
||||
{{ else }}
|
||||
<span>
|
||||
© {{ now.Format "2006" }} <a href="https://tyler-hale.com" class="footerLink">{{ .Site.Title }}</a>
|
||||
</span>
|
||||
{{ end }}
|
||||
</footer>
|
||||
|
7
layouts/shortcodes/ReadDirectory.html
Normal file
7
layouts/shortcodes/ReadDirectory.html
Normal file
|
@ -0,0 +1,7 @@
|
|||
<!-- layouts/shortcodes/ReadDirectory.html -->
|
||||
|
||||
{{ $dir := .Get "dir" }}
|
||||
|
||||
{{ range sort (readDir (delimit (slice "static" $dir) "/")) "Name" }}
|
||||
<a href="/{{ $dir }}/{{ .Name }}">{{ .Name }}</a><br>
|
||||
{{ end }}
|
Loading…
Add table
Add a link
Reference in a new issue