hugo-theme-paradox/layouts/_default/baseof.html

67 lines
2 KiB
HTML
Raw Permalink Normal View History

2022-10-11 09:54:07 +00:00
<!DOCTYPE html>
<html lang="{{.Site.Language.Lang }}" xml:lang="{{.Site.Language.Lang }}">
2022-10-16 22:15:34 +00:00
<head>
<meta charset="UTF-8">
<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,chrome=1" />
2022-12-18 14:10:54 +00:00
{{- /* print layout */ -}}
{{- $print := resources.Get "styles/print.scss" | toCSS | minify | fingerprint }}
<link rel="stylesheet"
href="{{ $print.Permalink }}"
integrity="{{ $print.Data.Integrity }}"
media="print" />
{{- /* web layout */ -}}
{{- $theme := resources.Get "styles/screen.scss" | toCSS }}
{{- with resources.Get "styles/custom.scss" }}
{{- $custom := . | toCSS }}
2022-12-19 15:10:26 +00:00
{{- $screen := slice $theme $custom | resources.Concat "assets/screen.css" | minify | fingerprint }}
2022-10-16 22:15:34 +00:00
<link rel="stylesheet"
href="{{ $screen.Permalink }}"
integrity="{{ $screen.Data.Integrity }}"
media="screen" />
2022-12-18 14:10:54 +00:00
{{- else }}
{{- $screen := $theme | minify | fingerprint }}
2022-10-16 22:15:34 +00:00
<link rel="stylesheet"
2022-12-18 14:10:54 +00:00
href="{{ $screen.Permalink }}"
integrity="{{ $screen.Data.Integrity }}"
media="screen" />
{{- end }}
{{- /* scripts */ -}}
{{- $theme := resources.Get "scripts/main.js" | js.Build "script.js" | minify | fingerprint }}
{{ with resources.Get "scripts/custom.js" }}
{{ $custom := . }}
2022-12-19 15:10:26 +00:00
{{ $script := slice $theme $custom | resources.Concat "assets/main.js" | js.Build "script.js" | minify | fingerprint}}
2022-12-18 14:10:54 +00:00
<script type="text/javascript"
src="{{ $script.Permalink }}"
integrity="{{ $script.Data.Integrity }}">
</script>
{{ else }}
{{ $script := $theme | js.Build "script.js" | minify | fingerprint}}
2022-10-16 22:15:34 +00:00
<script type="text/javascript"
src="{{ $script.Permalink }}"
integrity="{{ $script.Data.Integrity }}">
</script>
2022-12-18 14:10:54 +00:00
{{ end }}
{{/* optional features */ -}}
2022-10-18 01:04:22 +00:00
{{ partial "styles/external-links.html" . }}
2022-12-18 14:10:54 +00:00
2022-10-18 01:04:22 +00:00
{{ if .Site.Params.borders }}
{{ partial "styles/borders.html" . }}
2022-12-18 14:10:54 +00:00
{{ end -}}
{{ partial "seo.html" . -}}
{{- block "head" . -}}
2022-10-16 22:15:34 +00:00
{{ end }}
</head>
2022-12-18 14:10:54 +00:00
<body>
{{ partial "site-header.html" . }}
{{ block "main" . }}
{{ end }}
{{ partial "site-footer.html" . }}
</body>
2022-10-11 09:54:07 +00:00
</html>