Hugo Dark Theme Site Generator https://after-dark.habd.as
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

baseof.html 2.9KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. <!DOCTYPE html>
  2. <html lang="{{ .Site.LanguageCode }}">
  3. <head>
  4. {{ .Hugo.Generator }}
  5. <meta charset="utf-8">
  6. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  7. <title>{{ block "title" . }}{{ .Title }} | {{ .Site.Title }}{{ end }}</title>
  8. <meta name="description" content="{{ with .Description }}{{ . }}{{ else }}{{ if .IsPage }}{{ .Summary }}{{ else }}{{ with .Site.Params.description }}{{ . }}{{ end }}{{ end }}{{ end }}">
  9. <meta name="keywords" content="{{ if .Keywords }}{{ delimit .Keywords ", " }}{{ else if and .IsPage .Params.tags }}{{ delimit .Params.tags ", " }}{{ else }}{{ range $term, $val := .Site.Taxonomies.categories }}{{ lower (humanize $term) }}, {{ end }}{{ end }}">
  10. {{ $default_noindex_kinds := slice "section" "taxonomy" "taxonomyTerm" }}
  11. {{ $noindex_kinds := .Site.Params.noindex_kinds | default $default_noindex_kinds }}
  12. {{ $is_noindex_true := and (isset .Params "noindex") .Params.noindex }}
  13. {{ if or (in $noindex_kinds .Kind) ($is_noindex_true) }}
  14. <meta name="robots" content="noindex">
  15. {{ end }}
  16. {{ partial "meta/name-author.html" . }}
  17. {{ template "_internal/opengraph.html" . }}
  18. {{ template "_internal/twitter_cards.html" . }}
  19. {{ partial "meta/ogimage-maybe.html" . }}
  20. {{ partial "meta/telegram-channel-maybe.html" . }}
  21. {{ if eq .Kind "home" }}
  22. {{ partial "head/site-verification.html" . }}
  23. {{ end }}
  24. {{ partial "meta/http-referrer.html" . }}
  25. {{ partial "async-scripts.html" . }}
  26. {{ partial "modules.html" . }}
  27. {{ if .RSSLink }}
  28. <link href="{{ .RSSLink }}" rel="alternate" type="application/rss+xml" title="{{ .Site.Title }}">
  29. {{ end }}
  30. <link rel="canonical" href="{{ .Permalink }}">
  31. {{ if (isset .Params "prev") }}
  32. <link rel="prev" href="{{ .Params.prev }}">
  33. {{ end }}
  34. {{ if (isset .Params "next") }}
  35. <link rel="next" href="{{ .Params.next }}">
  36. {{ end }}
  37. {{ partial "head/favicon.html" . }}
  38. {{ partial "global-styles.html" . }}
  39. {{ $highlights := findRE "class\\s*?=\\s*?\".*?\\bhighlight\\b.*?\"|class\\s*?=\\s*?highlight\\b" .Content }}
  40. {{ if ge (len $highlights) 1 }}
  41. <script>fetchInject([{{ "/css/syntax.css" | relURL }}])</script>
  42. <noscript>
  43. <link href={{ "/css/syntax.css" | relURL }} rel="stylesheet">
  44. </noscript>
  45. {{ end }}
  46. {{ partial "head/validate-maybe.html" . }}
  47. </head>
  48. {{ $hackcss_disabled := .Site.Params.hackcss.disabled | default false }}
  49. {{ $hackcss_mode := .Site.Params.hackcss.mode | default "hack" }}
  50. {{ $hackcss_palette := .Site.Params.hackcss.palette | default "dark" }}
  51. <body class="{{ if ne $hackcss_disabled true }}{{ $hackcss_mode }} {{ $hackcss_palette }} main container{{ end }}">
  52. <header>{{ block "header" . }}{{ end }}</header>
  53. <main>{{ block "main" . }}{{ end }}</main>
  54. <footer>{{ block "footer" . }}{{ end }}</footer>
  55. </body>
  56. </html>