msfjarvis.dev/layouts/_default/baseof.html
kentnek 112a5a17dd - remove static/css, static/js and yarn.lock
- specify output for generated css resources to "css/"
- update documentations
2020-06-22 03:27:41 +08:00

66 lines
2.5 KiB
HTML

<!DOCTYPE html>
<html lang="{{ .Site.LanguageCode }}">
<head>
<!-- Global site tag (gtag.js) - Google Analytics -->
<title>{{ .Page.Title }}</title>
<meta charset="UTF-8">
<meta name="language" content="en">
<meta name="description" content="{{ if .IsHome}}{{ .Site.Params.Description }}{{ else }}{{.Page.Params.Description}}{{ end }}">
<meta name="keywords" content="{{ delimit .Keywords " , " }}">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="google-site-verification" content="8cyiY374WL2LGr87fBghcdJCRx6BaPNBvLjeZlk6tyc" />
<!-- Twitter -->
{{ if isset .Site.Params "twitter" }}
<meta name="twitter:card" content="summary" />
<meta name="twitter:title" content="{{ .Title }}" />
<meta name="twitter:description" content="{{ if .IsHome }}{{ htmlEscape .Site.Params.description }}{{ else }}{{ htmlEscape .Description }}{{ end }}"
/>
<meta name="twitter:site" content="@{{ .Site.Params.twitter }}" />
<meta name="twitter:creator" content="@{{ .Site.Params.twitter }}" />
{{ end }}
<link rel="shortcut icon" type="image/png" href="/favicon.ico" />
<!-- Styles -->
{{ block "styles" . }} {{ end }} <!-- Get "style_opts" variable from "styles" block -->
{{ $base_styles_opts := .Scratch.Get "style_opts" | default (dict "src" "scss/pages/about.scss" "dest" "css/about.css") }}
{{ $custom_styles_opts := (dict "src" "scss/custom.scss" "dest" "css/custom.css") }}
{{ $current_page := . }}
{{ range (slice $base_styles_opts $custom_styles_opts) }}
{{ $style := resources.Get .src | resources.ExecuteAsTemplate .dest $current_page | toCSS | minify | fingerprint }}
<link rel="stylesheet" href="{{ $style.Permalink }}" integrity="{{ $style.Data.Integrity }}"/>
{{ end }}
{{ range .AlternativeOutputFormats }}
{{ printf `<link rel="%s" type="%s+%s" href="%s" title="%s" />` .Rel .MediaType.Type .MediaType.Suffix .Permalink $.Site.Title | safeHTML }}
{{ end }}
{{ block "links" . }} {{ end }}
{{ partial "seo-schema.html" .}}
</head>
<body>
{{ partial "burger.html" .}}
{{ partial "nav.html" .}}
<main>
{{ block "main" . }} {{ end }}
</main>
{{ block "footer" . }} {{ end }}
{{ $script := resources.Get "js/index.js" | minify | fingerprint }}
<script src="{{ $script.Permalink }}" integrity="{{ $script.Data.Integrity | safeHTMLAttr }}" crossorigin="anonymous"></script>
{{ block "scripts" . }} {{ end }}
</body>
</html>