diff options
author | Michael Hunteman <michael@huntm.net> | 2023-03-25 19:39:49 -0500 |
---|---|---|
committer | Michael Hunteman <michael@huntm.net> | 2023-03-29 14:30:23 -0500 |
commit | 92fb5f9aefba9562237bd21e3b35cb529c9efac9 (patch) | |
tree | 0ddc990a44086d55fcda97151d402ca38562ef31 /layouts | |
parent | 5a15f71b7dafe41bd83e9dfe989b0c8845eb5d6e (diff) |
Remove header and footer partials
Diffstat (limited to 'layouts')
-rw-r--r-- | layouts/_default/list.html | 53 | ||||
-rw-r--r-- | layouts/_default/single.html | 31 | ||||
-rw-r--r-- | layouts/blog/single.html | 26 | ||||
-rw-r--r-- | layouts/index.html | 28 | ||||
-rw-r--r-- | layouts/partials/footer.html | 5 | ||||
-rw-r--r-- | layouts/partials/head.html | 9 | ||||
-rw-r--r-- | layouts/partials/header.html | 10 | ||||
-rw-r--r-- | layouts/partials/nav.html | 8 |
8 files changed, 107 insertions, 63 deletions
diff --git a/layouts/_default/list.html b/layouts/_default/list.html index 4bc7238..7017822 100644 --- a/layouts/_default/list.html +++ b/layouts/_default/list.html @@ -1,21 +1,32 @@ -{{ partial "head.html" . }} -{{ partial "header.html" . }} - -<main> - <ul> - {{ range .Pages }} - <div class="post"> - <h3> - <a href="{{ .Permalink }}"> - {{ .Title }} - </a> - </h3> - <small> - {{.Date.Format "January 2, 2006"}} - </small> - </div> - {{ end }} - </ul> -</main> - -{{ partial "footer.html" . }} +<!doctype html> +<html lang="en"> + <head> + <meta charset="utf-8"/> + <meta name="viewport" content="width=device-width, initial-scale=1"/> + <title>{{ .Title }}</title> + {{ $style := resources.Get "main.scss" | resources.ToCSS | resources.Minify | resources.Fingerprint }} + <link rel="stylesheet" href="{{ $style.RelPermalink }}"/> + </head> + <body> + {{ partial "nav.html" . }} + <main> + <h2>{{ .Title }}</h2> + {{ range .Pages }} + <div class="post"> + <h3> + <a href="{{ .Permalink }}"> + {{ .Title }} + </a> + </h3> + <small> + {{ .Date.Format "January 2, 2006" }} + </small> + </div> + {{ end }} + </main> + </body> + <footer> + Site content is <a href="https://creativecommons.org/licenses/by-sa/4.0/">CC-BY-SA</a>. + Projects are <a href="https://www.gnu.org/licenses/gpl-3.0.en.html">GNU GPL</a>. + </footer> +</html> diff --git a/layouts/_default/single.html b/layouts/_default/single.html index 5788c52..f792e75 100644 --- a/layouts/_default/single.html +++ b/layouts/_default/single.html @@ -1,10 +1,21 @@ -{{ partial "head.html" . }} -{{ partial "header.html" . }} - -<main> - <article> - {{ .Content }} - </article> -</main> - -{{ partial "footer.html" . }} +<!doctype html> +<html lang="en"> + <head> + <meta charset="utf-8"/> + <meta name="viewport" content="width=device-width, initial-scale=1"/> + <title>{{ .Title }}</title> + {{ $style := resources.Get "main.scss" | resources.ToCSS | resources.Minify | resources.Fingerprint }} + <link rel="stylesheet" href="{{ $style.RelPermalink }}"/> + </head> + <body> + {{ partial "nav.html" . }} + <main> + <h2>{{ .Title }}</h2> + {{ .Content }} + </main> + </body> + <footer> + Site content is <a href="https://creativecommons.org/licenses/by-sa/4.0/">CC-BY-SA</a>. + Projects are <a href="https://www.gnu.org/licenses/gpl-3.0.en.html">GNU GPL</a>. + </footer> +</html> diff --git a/layouts/blog/single.html b/layouts/blog/single.html new file mode 100644 index 0000000..2643ea9 --- /dev/null +++ b/layouts/blog/single.html @@ -0,0 +1,26 @@ +<!doctype html> +<html lang="en"> + <head> + <meta charset="utf-8"/> + <meta name="viewport" content="width=device-width, initial-scale=1"/> + <title>{{ .Title }}</title> + {{ $style := resources.Get "main.scss" | resources.ToCSS | resources.Minify | resources.Fingerprint }} + <link rel="stylesheet" href="{{ $style.RelPermalink }}"/> + </head> + <body> + {{ partial "nav.html" . }} + <main> + <h2> + {{ .Title }} + <small> + {{ .Date.Format "January 2, 2006" }} + </small> + </h2> + {{ .Content }} + </main> + </body> + <footer> + Site content is <a href="https://creativecommons.org/licenses/by-sa/4.0/">CC-BY-SA</a>. + Projects are <a href="https://www.gnu.org/licenses/gpl-3.0.en.html">GNU GPL</a>. + </footer> +</html> diff --git a/layouts/index.html b/layouts/index.html index fde59c7..a4bdd0d 100644 --- a/layouts/index.html +++ b/layouts/index.html @@ -1,8 +1,20 @@ -{{ partial "head.html" . }} -<body> - {{ partial "header.html" . }} - <main> - {{ .Content }} - </main> -</body> -{{ partial "footer.html" . }} +<!doctype html> +<html lang="en"> + <head> + <meta charset="utf-8"/> + <meta name="viewport" content="width=device-width, initial-scale=1"/> + <title>{{ .Title }}</title> + {{ $style := resources.Get "main.scss" | resources.ToCSS | resources.Minify | resources.Fingerprint }} + <link rel="stylesheet" href="{{ $style.RelPermalink }}"/> + </head> + <body> + {{ partial "nav.html" . }} + <main> + {{ .Content }} + </main> + </body> + <footer> + Site content is <a href="https://creativecommons.org/licenses/by-sa/4.0/">CC-BY-SA</a>. + Projects are <a href="https://www.gnu.org/licenses/gpl-3.0.en.html">GNU GPL</a>. + </footer> +</html> diff --git a/layouts/partials/footer.html b/layouts/partials/footer.html deleted file mode 100644 index 8952bf1..0000000 --- a/layouts/partials/footer.html +++ /dev/null @@ -1,5 +0,0 @@ -<footer> - Site content is <a href="https://creativecommons.org/licenses/by-sa/4.0/">CC-BY-SA</a>. - Projects are <a href="https://www.gnu.org/licenses/gpl-3.0.en.html">GNU GPL</a>. -</footer> -</html> diff --git a/layouts/partials/head.html b/layouts/partials/head.html deleted file mode 100644 index 64416c8..0000000 --- a/layouts/partials/head.html +++ /dev/null @@ -1,9 +0,0 @@ -<!DOCTYPE html> -<html lang="en"> -<head> - <meta charset="utf-8"/> - <meta name="viewport" content="width=device-width, initial-scale=1"/> - <title>{{ .Title }}</title> - {{ $style := resources.Get "main.scss" | resources.ToCSS | resources.Minify | resources.Fingerprint }} - <link rel="stylesheet" href="{{ $style.RelPermalink }}"/> -</head> diff --git a/layouts/partials/header.html b/layouts/partials/header.html deleted file mode 100644 index d53a61e..0000000 --- a/layouts/partials/header.html +++ /dev/null @@ -1,10 +0,0 @@ -<header> - <h1>{{ .Title }}</h1> - <nav> - <ul> - {{ range .Site.Menus.nav }} - <li><a href="{{ .URL }}">{{ .Name }}</a></li> - {{ end }} - </ul> - </nav> -</header> diff --git a/layouts/partials/nav.html b/layouts/partials/nav.html new file mode 100644 index 0000000..9e04c80 --- /dev/null +++ b/layouts/partials/nav.html @@ -0,0 +1,8 @@ +<h1>Michael Hunteman</h1> +<nav> + <ul> + {{ range .Site.Menus.nav }} + <li><a href="{{ .URL }}">{{ .Name }}</a></li> + {{ end }} + </ul> +</nav> |