1
0
forked from Git/hugo-story
agr.asia/layouts/partials/template/head.html

26 lines
1.4 KiB
HTML
Raw Normal View History

2020-07-02 07:05:45 +02:00
<head>
<title>{{ .Site.Title }}</title>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no" />
<meta name="description" content="">
<meta name="author" content="">
{{ if .Site.Params.favicon }}
{{ partial "template/favicon" }}
{{ end }}
<!-- CSS -->
{{ if .Site.IsServer }}
{{ $style := resources.Get "sass/main.scss" | resources.ExecuteAsTemplate "scss/main.scss" . | toCSS (dict "targetPath" "assets/css/main.css" "outputStyle" "compressed" "enableSourceMap" false) }}
<link rel="stylesheet" href="{{ ($style).RelPermalink }}">
{{ else }}
{{ $style := resources.Get "sass/main.scss" | resources.ExecuteAsTemplate "scss/main.scss" . | toCSS (dict "targetPath" "assets/css/main.css" "enableSourceMap" false) }}
<link rel="stylesheet" href="{{ ($style | minify).RelPermalink }}">
{{ end }}
{{ if .Site.IsServer }}
{{ $noscript := resources.Get "sass/noscript.scss" | resources.ExecuteAsTemplate "noscript.scss" . | toCSS (dict "targetPath" "assets/css/noscript.css" "enableSourceMap" false) }}
<noscript><link rel="stylesheet" href="{{ ($noscript).RelPermalink }}" /></noscript>
{{ else }}
{{ $noscript := resources.Get "sass/noscript.scss" | resources.ExecuteAsTemplate "noscript.scss" . | toCSS (dict "targetPath" "assets/css/noscript.css" "enableSourceMap" false) }}
<noscript><link rel="stylesheet" href="{{ ($noscript | minify).RelPermalink }}" /></noscript>
{{end}}
</head>