rj1
about | log | files | refs
commit 27fa6b5cc5a2644f68f2e77775774eb5a777ae5f
parent 6499ba0a224d3730bf323c5a5ceadc38c1575f90
author: rj1 <[email protected]>
date:   Fri,  9 Dec 2022 03:11:06 -0600

head/header partials were backwards

Diffstat:
Mthemes/rj1/layouts/_default/baseof.html | 4++--
Mthemes/rj1/layouts/index.html | 4++--
Mthemes/rj1/layouts/partials/head.html | 28++++++++++++++++++----------
Mthemes/rj1/layouts/partials/header.html | 10++++++++++
4 files changed, 32 insertions(+), 14 deletions(-)

diff --git a/themes/rj1/layouts/_default/baseof.html b/themes/rj1/layouts/_default/baseof.html @@ -1,9 +1,9 @@ <!DOCTYPE html> <html> - {{- partial "header.html" . -}} + {{- partial "head.html" . -}} <body> <div class="content"> - {{- partial "head.html" . -}} + {{- partial "header.html" . -}} {{- block "main" . }}{{- end }} {{- partial "footer.html" . -}} </div> diff --git a/themes/rj1/layouts/index.html b/themes/rj1/layouts/index.html @@ -1,9 +1,9 @@ <!DOCTYPE html> <html> - {{ partial "header.html" . }} + {{ partial "head.html" . }} <body> <div class="content"> - {{ partial "head.html" . }} + {{ partial "header.html" . }} <main class="list"> <div class="site-description"> {{- if isset .Site.Params "subtitle" -}} diff --git a/themes/rj1/layouts/partials/head.html b/themes/rj1/layouts/partials/head.html @@ -1,10 +1,18 @@ -<header> - <div class="main"> - <a href="{{ .Site.BaseURL }}"><img src="/img/rj1.svg" width="50" alt="{{ .Site.Title }}" /></a> - </div> - <nav> - {{ range .Site.Menus.main }} - <a href="{{ .URL }}">{{ .Name }}</a> - {{ end }} - </nav> -</header> +<head> + <meta charset="utf-8" /> + <meta http-equiv="X-UA-Compatible" content="IE=edge"> + {{- $title := ( .Title ) -}} + {{- $siteTitle := ( .Site.Title ) -}} + {{- if .IsHome -}} + <title>{{ $siteTitle }}</title> + {{- else -}} + <title>{{ $siteTitle }} > {{ $title | lower }}</title> + {{- end -}} + <meta name="viewport" content="width=device-width, initial-scale=1"> + <meta property="og:image" content="{{ .Site.Params.og_image }}"/> + {{ with .OutputFormats.Get "rss" -}} + {{ printf `<link rel="%s" type="%s" href="%s" title="%s" />` .Rel .MediaType.Type .Permalink $.Site.Title | safeHTML }} + {{ end -}} + <link rel="stylesheet" type="text/css" media="screen" href="/css/style.css" /> + <link rel="icon" href="/favicon.svg"> +</head> diff --git a/themes/rj1/layouts/partials/header.html b/themes/rj1/layouts/partials/header.html @@ -1,3 +1,13 @@ +<header> + <div class="main"> + <a href="{{ .Site.BaseURL }}"><img src="/img/rj1.svg" width="50" alt="{{ .Site.Title }}" /></a> + </div> + <nav> + {{ range .Site.Menus.main }} + <a href="{{ .URL }}">{{ .Name }}</a> + {{ end }} + </nav> +</header> <head> <meta charset="utf-8" /> <meta http-equiv="X-UA-Compatible" content="IE=edge">