Moving all the theme files out of the theme directory
This commit is contained in:
parent
23369f4ace
commit
3006bff575
40 changed files with 477 additions and 11 deletions
29
layouts/_default/baseof.html
Executable file
29
layouts/_default/baseof.html
Executable file
|
|
@ -0,0 +1,29 @@
|
|||
<!doctype html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
|
||||
{{/* NOTE: the Site's title, and if there is a page title, that is set too
|
||||
*/}}
|
||||
<title>
|
||||
{{ block "title" . }}{{ .Site.Title }} {{ with .Params.Title }} | {{ .
|
||||
}}{{ end }}{{ end }}
|
||||
</title>
|
||||
<meta name="viewport" content="width=device-width,minimum-scale=1" />
|
||||
{{ hugo.Generator }} {{ $sass := resources.Get "sass/style.scss" }} {{
|
||||
$style := $sass | css.Sass | resources.Minify | resources.Fingerprint }}
|
||||
<link rel="stylesheet" href="{{ $style.RelPermalink }}" />
|
||||
|
||||
{{ range .Site.Params.custom_css }}
|
||||
<link rel="stylesheet" href="{{ relURL ($.Site.BaseURL) }}{{ . }}" />
|
||||
{{ end }} {{ block "favicon" . }} {{ partial "site-favicon.html" . }} {{ end
|
||||
}}
|
||||
</head>
|
||||
|
||||
<body>
|
||||
{{ block "header" . }}{{ partial "site-header.html" .}}{{ end }}
|
||||
<main role="main">{{ block "main" . }}{{ end }}</main>
|
||||
{{ block "footer" . }}{{ partial "site-footer.html" . }}{{ end }} {{ block
|
||||
"scripts" . }}{{ partial "site-scripts.html" . }}{{ end }}
|
||||
</body>
|
||||
</html>
|
||||
15
layouts/_default/list.html
Executable file
15
layouts/_default/list.html
Executable file
|
|
@ -0,0 +1,15 @@
|
|||
{{ define "main" }}
|
||||
<article>
|
||||
<section>
|
||||
{{- .Content -}}
|
||||
</section>
|
||||
<section>
|
||||
{{ range .Paginator.Pages }}
|
||||
<div>
|
||||
{{- partial "summary.html" . -}}
|
||||
</div>
|
||||
{{ end }}
|
||||
</section>
|
||||
{{- template "_internal/pagination.html" . -}}
|
||||
</article>
|
||||
{{ end }}
|
||||
40
layouts/_default/single.html
Executable file
40
layouts/_default/single.html
Executable file
|
|
@ -0,0 +1,40 @@
|
|||
{{ define "header" }}
|
||||
{{/* We can override any block in the baseof file be defining it in the template */}}
|
||||
{{ partial "page-header.html" . }}
|
||||
{{ end }}
|
||||
|
||||
{{ define "main" }}
|
||||
{{ $section := .Site.GetPage "section" .Section }}
|
||||
<article>
|
||||
|
||||
<header>
|
||||
<p>
|
||||
{{/*
|
||||
CurrentSection allows us to use the section title instead of inferring from the folder.
|
||||
https://gohugo.io/variables/page/#section-variables-and-methods
|
||||
*/}}
|
||||
{{with .CurrentSection.Title }}{{. | upper }}{{end}}
|
||||
</p>
|
||||
<h1>
|
||||
{{- .Title -}}
|
||||
</h1>
|
||||
{{/* Hugo uses Go's date formatting is set by example. Here are two formats */}}
|
||||
<time datetime="{{ .Date.Format "2006-01-02T15:04:05Z07:00" }}">
|
||||
{{- .Date.Format "January 2, 2006" -}}
|
||||
</time>
|
||||
</header>
|
||||
|
||||
<section>
|
||||
{{- .Content -}}
|
||||
{{- partial "tags.html" . -}}
|
||||
<div>
|
||||
{{ template "_internal/disqus.html" . }}
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<aside>
|
||||
{{- partial "menu-contextual.html" . -}}
|
||||
</aside>
|
||||
|
||||
</article>
|
||||
{{ end }}
|
||||
16
layouts/_default/taxonomy.html
Normal file
16
layouts/_default/taxonomy.html
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
{{ define "main" }}
|
||||
<article>
|
||||
<div>
|
||||
<p>Below you will find pages that utilize the taxonomy term “{{ .Title }}”</p>
|
||||
</div>
|
||||
</article>
|
||||
<div>
|
||||
<section>
|
||||
{{ range .Pages }}
|
||||
<div>
|
||||
{{ partial "summary.html" . }}
|
||||
</div>
|
||||
{{ end }}
|
||||
</section>
|
||||
</div>
|
||||
{{ end }}
|
||||
22
layouts/_default/terms.html
Normal file
22
layouts/_default/terms.html
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
{{ define "main" }}
|
||||
{{ $data := .Data }}
|
||||
<article>
|
||||
<div>
|
||||
{{ .Content }}
|
||||
</div>
|
||||
</article>
|
||||
<div>
|
||||
<section>
|
||||
{{ range $key, $value := .Data.Terms }}
|
||||
<h2>
|
||||
<a href="{{ "/" | relLangURL }}{{ $.Data.Plural | urlize }}/{{ $key | urlize }}">
|
||||
{{ $.Data.Singular | humanize }}: {{ $key }}
|
||||
</a>
|
||||
</h2>
|
||||
{{ range $value.Pages }}
|
||||
{{ partial "summary.html" . }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
</section>
|
||||
</div>
|
||||
{{ end }}
|
||||
Loading…
Add table
Add a link
Reference in a new issue