Initial checkin
This commit is contained in:
29
themes/hugo-theme-notrack/layouts/_default/archives.html
Normal file
29
themes/hugo-theme-notrack/layouts/_default/archives.html
Normal file
@ -0,0 +1,29 @@
|
||||
|
||||
{{ define "main" }}
|
||||
<main>
|
||||
|
||||
{{- with .Title }}
|
||||
<h1 class="page-title">{{ . }}</h1>
|
||||
{{- end }}
|
||||
|
||||
{{ with (where site.RegularPages "Type" "in" site.Params.mainSections) }}
|
||||
{{- $byyear := (where . ".Draft" false).GroupByDate "2006" -}}
|
||||
|
||||
{{- range $byyear -}}
|
||||
<h2>{{ .Key }}</h2>
|
||||
|
||||
<ul>
|
||||
{{ range.Pages }}
|
||||
<li> <time>{{ .Date.Format "2/1" }}</time>
|
||||
<span> - </span>
|
||||
<a href="{{ .Permalink }}">
|
||||
<span>{{ .Title }}</span>
|
||||
</a>
|
||||
</li>
|
||||
{{ end }}
|
||||
</ul>
|
||||
{{- end -}}
|
||||
{{ end }}
|
||||
|
||||
</main>
|
||||
{{ end }}
|
11
themes/hugo-theme-notrack/layouts/_default/baseof.html
Normal file
11
themes/hugo-theme-notrack/layouts/_default/baseof.html
Normal file
@ -0,0 +1,11 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
{{- partial "head.html" . -}}
|
||||
<body>
|
||||
{{- partial "header.html" . -}}
|
||||
<div id="content">
|
||||
{{- block "main" . }}{{- end }}
|
||||
</div>
|
||||
{{- partial "footer.html" . -}}
|
||||
</body>
|
||||
</html>
|
52
themes/hugo-theme-notrack/layouts/_default/list.html
Normal file
52
themes/hugo-theme-notrack/layouts/_default/list.html
Normal file
@ -0,0 +1,52 @@
|
||||
{{ define "main" }}
|
||||
<main>
|
||||
|
||||
<h1 class="page-title">{{ .Title }}</h1>
|
||||
|
||||
{{ if default true .Site.Params.showTaxonomyLinks }}
|
||||
<div class="taxonomy-links">
|
||||
<ul>
|
||||
{{- /* code for figuring out where to archives page is, if anywhere */ -}}
|
||||
{{ $archivesExists := false }}
|
||||
{{ $archivesPageTitle := "" }}
|
||||
{{ $archivesPagePermalink := "" }}
|
||||
{{ range .Site.AllPages }}
|
||||
{{ if eq .Layout "archives" }}
|
||||
{{ $archivesExists = true }}
|
||||
{{ $archivesPagePermalink = .Permalink }}
|
||||
{{ with .Title }}
|
||||
{{ $archivesPageTitle = . }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ if $archivesExists }}
|
||||
<li><a href="{{ $archivesPagePermalink }}">{{ default "Archives" $archivesPageTitle }}</a></li>
|
||||
{{ end }}
|
||||
|
||||
{{ range $taxonomyName, $taxonomy := .Site.Taxonomies }}
|
||||
{{ if or (in $taxonomyName "categ") (in $taxonomyName "tag") }}
|
||||
<li><a href="{{ $taxonomyName | absURL }}">{{ $taxonomyName }}</a></li>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
</ul>
|
||||
</div>
|
||||
{{ end }}
|
||||
|
||||
{{- if .Pages -}}
|
||||
{{- $pages := (where .Pages ".Draft" false) -}}
|
||||
|
||||
{{- /* Use site config params for posts per page if available, otherwise default */ -}}
|
||||
{{- with .Site.Params.list.paginate | default .Site.Params.paginate -}}
|
||||
{{- $pages = $.Paginate $pages . -}}
|
||||
{{- else -}}
|
||||
{{- $pages = .Paginate $pages -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- range $pages.Pages -}}
|
||||
{{ partial "blog-entry-summary.html" . }}
|
||||
{{- end -}}
|
||||
|
||||
{{ partial "pagination.html" . }}
|
||||
{{- end -}}
|
||||
</main>
|
||||
{{ end }}
|
48
themes/hugo-theme-notrack/layouts/_default/rss.xml
Normal file
48
themes/hugo-theme-notrack/layouts/_default/rss.xml
Normal file
@ -0,0 +1,48 @@
|
||||
{{- printf "<?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"yes\"?>" | safeHTML }}
|
||||
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
|
||||
<channel>
|
||||
<title>{{ with .Site.Title }}{{.}}{{ end }}</title>
|
||||
<link>{{ .Permalink }}</link>
|
||||
<description>Latest blog posts from {{ .Site.Title }}</description>
|
||||
|
||||
{{ with .Site.LanguageCode }}
|
||||
<language>{{.}}</language>
|
||||
{{end}}
|
||||
|
||||
{{ with .Site.Author.email }}
|
||||
<managingEditor>{{.}}
|
||||
{{ with $.Site.Author.name }} ({{.}}){{end}}
|
||||
</managingEditor>
|
||||
{{end}}
|
||||
|
||||
{{ with .Site.Author.email }}
|
||||
<webMaster>{{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}
|
||||
</webMaster>
|
||||
{{end}}
|
||||
|
||||
{{ with .Site.Copyright }}
|
||||
<copyright>{{.}}</copyright>
|
||||
{{end}}
|
||||
|
||||
{{ if not .Date.IsZero }}
|
||||
<lastBuildDate>{{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}</lastBuildDate>
|
||||
{{ end }}
|
||||
|
||||
{{ with .OutputFormats.Get "RSS" }}
|
||||
{{ printf "<atom:link href=%q rel=\"self\" type=%q />" .Permalink .MediaType | safeHTML }}
|
||||
{{ end }}
|
||||
|
||||
{{ with (where site.RegularPages "Type" "in" site.Params.mainSections) }}
|
||||
{{ range . }}
|
||||
<item>
|
||||
<title>{{ .Title }}</title>
|
||||
<link>{{ .Permalink }}</link>
|
||||
<pubDate>{{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}</pubDate>
|
||||
{{ with .Site.Author.email }}<author>{{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}</author>{{end}}
|
||||
<guid>{{ .Permalink }}</guid>
|
||||
<description>{{ .Summary | markdownify }}</description>
|
||||
</item>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
</channel>
|
||||
</rss>
|
24
themes/hugo-theme-notrack/layouts/_default/single.html
Normal file
24
themes/hugo-theme-notrack/layouts/_default/single.html
Normal file
@ -0,0 +1,24 @@
|
||||
{{ define "main" }}
|
||||
<main>
|
||||
<article>
|
||||
{{ if in site.Params.mainSections .Page.Section }}
|
||||
<h1 class="page-title blog">{{ .Title }}</h1>
|
||||
{{ else }}
|
||||
<h1 class="page-title">{{ .Title }}</h1>
|
||||
{{ end }}
|
||||
|
||||
{{- /* Show post information if it's a post, otherwise just the content */ -}}
|
||||
{{ if in site.Params.mainSections .Page.Section }}
|
||||
<p class="blog-post-info">Posted: <time>{{ .Date.Format "2006-01-02" }}</time>
|
||||
{{ partial "blog-taxonomy-info" . }}</p>
|
||||
|
||||
<div class="blog-post-content">
|
||||
{{ .Content }}
|
||||
</div>
|
||||
{{ template "_internal/disqus.html" . }}
|
||||
{{ else }}
|
||||
{{ .Content }}
|
||||
{{ end }}
|
||||
</article>
|
||||
</main>
|
||||
{{ end }}
|
Reference in New Issue
Block a user