wires

summary refs log tree commit diff
path: root/layouts
diff options
context:
space:
mode:
Diffstat (limited to 'layouts')
-rw-r--r--layouts/_default/_markup/render-codeblock.html1
-rw-r--r--layouts/_default/_markup/render-heading.html3
-rw-r--r--layouts/_default/baseof.html47
-rw-r--r--layouts/partials/head.html13
-rw-r--r--layouts/partials/tags.html7
5 files changed, 34 insertions, 37 deletions
diff --git a/layouts/_default/_markup/render-codeblock.html b/layouts/_default/_markup/render-codeblock.html
deleted file mode 100644
index 9bfc3b1..0000000
--- a/layouts/_default/_markup/render-codeblock.html
+++ /dev/null
@@ -1 +0,0 @@
-<pre class="chroma"><code class="language-{{ .Type }}" data-lang="{{ .Type }}">{{ (transform.HighlightCodeBlock .).Inner }}</code></pre>
diff --git a/layouts/_default/_markup/render-heading.html b/layouts/_default/_markup/render-heading.html
new file mode 100644
index 0000000..d49699e
--- /dev/null
+++ b/layouts/_default/_markup/render-heading.html
@@ -0,0 +1,3 @@
+<h{{ .Level }} id="{{ .Anchor }}" {{- with .Attributes.class }} class="{{ . }}" {{- end }}>
+  <a href="#{{ .Anchor }}">{{ .Text }}</a>
+</h{{ .Level }}>
diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html
index ecac3b1..0504861 100644
--- a/layouts/_default/baseof.html
+++ b/layouts/_default/baseof.html
@@ -1,29 +1,30 @@
-<!DOCTYPE html>
+<!doctype html>
 <html lang="{{ .Site.Language.LanguageCode }}">
-    <head>
+  <head>
     {{ partial "head.html" . }}
     <!-- this is here to make sure that if we can't load CSS the icons don't totally fuck up layout -->
-    <style>.icon svg { width: 1.25em; height: 1.25em; }</style>
-{{ range .AlternativeOutputFormats -}}
-{{ printf `<link rel="%s" type="%s" href="%s" title="%s" />` .Rel .MediaType.Type .Permalink $.Site.Title | safeHTML }}
-{{ end -}}
-</head>
-<body>
-<a href="#main" class="skip">Skip to content</a>
-<nav id="main-nav">
-<ul>
-<li><a href="{{.Site.BaseURL}}" id="site-title">{{.Site.Title}}</a></li>
-{{ with .Site.Menus.main }}
-        {{ range . }}
+    <style>
+      .icon svg {
+        width: 1.25em;
+        height: 1.25em;
+      }
+    </style>
+    {{ range .AlternativeOutputFormats -}} {{ printf `
+    <link rel="%s" type="%s" href="%s" title="%s" />
+    ` .Rel .MediaType.Type .Permalink $.Site.Title | safeHTML }} {{ end -}}
+  </head>
+  <body>
+    <a href="#main" class="skip">Skip to content</a>
+    <nav id="main-nav">
+      <div id="site-title">{{.Site.Title}}</div>
+      <ul>
+        {{ with .Site.Menus.main }} {{ range . }}
         <li><a href="{{ .URL }}">{{ .Name }}</a></li>
-        {{ end }}
-{{ end }}
-</ul>
-</nav>
+        {{ end }} {{ end }}
+      </ul>
+    </nav>
 
-<main id="main">
-{{ block "main" . }}{{ end }}
-</main>
-{{ partial "footer.html" . }}
-</body>
+    <main id="main">{{ block "main" . }}{{ end }}</main>
+    {{ partial "footer.html" . }}
+  </body>
 </html>
diff --git a/layouts/partials/head.html b/layouts/partials/head.html
index ce38afc..e09b60c 100644
--- a/layouts/partials/head.html
+++ b/layouts/partials/head.html
@@ -6,16 +6,8 @@
 {{ with .Keywords }}<meta name="keywords" content="{{ delimit . ", " }}"/>{{ end }}
 <link rel="license" href="https://creativecommons.org/licenses/by-sa/4.0/"/>
 <link rel="canonical" href="{{ .Permalink }}"/>
-{{- with resources.Get "style.css" }}
-  {{- if eq hugo.Environment "development" }}
-    <link rel="stylesheet" href="{{ .RelPermalink }}">
-  {{- else }}
-    {{- with . | minify | fingerprint }}
-      <link rel="stylesheet" href="{{ .RelPermalink }}" integrity="{{ .Data.Integrity }}" crossorigin="anonymous">
-    {{- end }}
-  {{- end }}
-{{- end }}
-{{- with resources.Get "syntax.css" }}
+{{ range slice "style.css" "syntax.css"}}
+{{- with resources.Get . }}
   {{- if eq hugo.Environment "development" }}
     <link rel="stylesheet" href="{{ .RelPermalink }}">
   {{- else }}
@@ -24,5 +16,6 @@
     {{- end }}
   {{- end }}
 {{- end }}
+{{ end }}
 <title>{{ if .IsHome }}{{ site.Title }}{{ else }}{{ printf "%s | %s" .Title site.Title }}{{ end }}</title>
 
diff --git a/layouts/partials/tags.html b/layouts/partials/tags.html
index 8062534..b464c47 100644
--- a/layouts/partials/tags.html
+++ b/layouts/partials/tags.html
@@ -1,5 +1,6 @@
 {{ with .GetTerms "tags" }}
-<br>
-tags:
-{{ range $i, $e := . }}{{- if $i -}}, {{ end -}}{{ with $e }}<a class="tag" href="{{.Permalink}}">{{lower .Title}}</a>{{end}}{{ end }}
+<p>
+  Tags:{{ range $i, $e := . }}{{- if $i -}},{{ end -}}{{ with $e }}
+  <a class="tag" href="{{.Permalink}}">{{lower .Title}}</a>{{end}}{{ end }}
+</p>
 {{ end }}