Initial Commit
This commit is contained in:
@ -0,0 +1,3 @@
|
||||
{{ range .AlternativeOutputFormats -}}
|
||||
{{ printf `<link rel="%s" type="%s" href="%s" title="%s" />` .Rel .MediaType.Type .RelPermalink $.Site.Title | safeHTML }}
|
||||
{{ end -}}
|
11
themes/hugo-coder/layouts/partials/head/color-scheme.html
Normal file
11
themes/hugo-coder/layouts/partials/head/color-scheme.html
Normal file
@ -0,0 +1,11 @@
|
||||
{{ if or (eq .Site.Params.colorScheme "auto") (eq .Site.Params.colorScheme "dark") }}
|
||||
{{ if .Site.IsServer }}
|
||||
{{ $cssOpts := (dict "targetPath" "css/coder-dark.css" "enableSourceMap" true ) }}
|
||||
{{ $styles := resources.Get "scss/coder-dark.scss" | resources.ExecuteAsTemplate "style.coder-dark.css" . | toCSS $cssOpts }}
|
||||
<link rel="stylesheet" href="{{ $styles.RelPermalink }}" media="screen">
|
||||
{{ else }}
|
||||
{{ $cssOpts := (dict "targetPath" "css/coder-dark.css" ) }}
|
||||
{{ $styles := resources.Get "scss/coder-dark.scss" | resources.ExecuteAsTemplate "style.coder-dark.css" . | toCSS $cssOpts | minify | fingerprint }}
|
||||
<link rel="stylesheet" href="{{ $styles.RelPermalink }}" integrity="{{ $styles.Data.Integrity }}" crossorigin="anonymous" media="screen" />
|
||||
{{ end }}
|
||||
{{ end }}
|
@ -0,0 +1,7 @@
|
||||
<link rel="icon" type="image/png" href="{{ .Site.Params.favicon_32 | default "/images/favicon-32x32.png" | relURL }}" sizes="32x32">
|
||||
<link rel="icon" type="image/png" href="{{ .Site.Params.favicon_16 | default "/images/favicon-16x16.png" | relURL }}" sizes="16x16">
|
||||
|
||||
<link rel="apple-touch-icon" href="{{ .Site.Params.touchicon | default "/images/apple-touch-icon.png" | relURL }}">
|
||||
<link rel="apple-touch-icon" sizes="180x180" href="{{ .Site.Params.touchicon | default "/images/apple-touch-icon.png" | relURL }}">
|
||||
|
||||
<link rel="mask-icon" href="{{ .Site.Params.mask_icon | default "/images/safari-pinned-tab.svg" | relURL }}" color="{{ .Site.Params.mask_icon_color | default "#383C4A" }}">
|
21
themes/hugo-coder/layouts/partials/head/custom-styles.html
Normal file
21
themes/hugo-coder/layouts/partials/head/custom-styles.html
Normal file
@ -0,0 +1,21 @@
|
||||
{{ range .Site.Params.customCSS }}
|
||||
{{ if $.Site.IsServer }}
|
||||
{{ $styles := resources.Get . }}
|
||||
<link rel="stylesheet" href="{{ $styles.RelPermalink }}" media="screen">
|
||||
{{ else }}
|
||||
{{ $styles := resources.Get . | minify | fingerprint }}
|
||||
<link rel="stylesheet" href="{{ $styles.RelPermalink }}" integrity="{{ $styles.Data.Integrity }}" crossorigin="anonymous" media="screen" />
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
|
||||
{{ range .Site.Params.customSCSS }}
|
||||
{{/* We don't change the targetPath to because it's transparent to users */}}
|
||||
{{ if $.Site.IsServer }}
|
||||
{{ $cssOpts := (dict "enableSourceMap" true ) }}
|
||||
{{ $styles := resources.Get . | toCSS $cssOpts }}
|
||||
<link rel="stylesheet" href="{{ $styles.RelPermalink }}" media="screen">
|
||||
{{ else }}
|
||||
{{ $styles := resources.Get . | toCSS | minify | fingerprint }}
|
||||
<link rel="stylesheet" href="{{ $styles.RelPermalink }}" integrity="{{ $styles.Data.Integrity }}" crossorigin="anonymous" media="screen" />
|
||||
{{ end }}
|
||||
{{ end }}
|
4
themes/hugo-coder/layouts/partials/head/extensions.html
Normal file
4
themes/hugo-coder/layouts/partials/head/extensions.html
Normal file
@ -0,0 +1,4 @@
|
||||
{{/*
|
||||
You can add further theme extensions or customizations here if they should
|
||||
appear in <head>.
|
||||
*/}}
|
@ -0,0 +1 @@
|
||||
{{ hugo.Generator }}
|
19
themes/hugo-coder/layouts/partials/head/meta-tags.html
Normal file
19
themes/hugo-coder/layouts/partials/head/meta-tags.html
Normal file
@ -0,0 +1,19 @@
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta name="color-scheme" content="light dark">
|
||||
|
||||
{{ if .Site.Params.csp }}
|
||||
{{ partial "csp.html" . }}
|
||||
{{ end }}
|
||||
|
||||
{{ with .Site.Params.author }}
|
||||
<meta name="author" content="{{ . }}">{{ end }}
|
||||
<meta name="description" content="{{ .Description | default (.Summary | default .Site.Params.description ) }}">
|
||||
<meta name="keywords" content="{{ (delimit .Keywords " ,") | default .Site.Params.keywords }}">
|
||||
<meta property="og:image" content="{{ .Site.Params.ogimage }}">
|
||||
<meta name="twitter:image" content="{{ .Site.Params.ogimage }}">
|
||||
<element hidden>
|
||||
<a rel="me" href="{{ .Site.Params.mastodon }}">Mastodon</a>
|
||||
</element>
|
||||
{{ template "_internal/twitter_cards.html" . }}
|
||||
{{ template "_internal/opengraph.html" . }}
|
23
themes/hugo-coder/layouts/partials/head/theme-styles.html
Normal file
23
themes/hugo-coder/layouts/partials/head/theme-styles.html
Normal file
@ -0,0 +1,23 @@
|
||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/fork-awesome@1.2.0/css/fork-awesome.min.css" integrity="sha256-XoaMnoYC5TH6/+ihMEnospgm0J1PM/nioxbOUdnM8HY=" crossorigin="anonymous">
|
||||
|
||||
{{ if .Site.IsServer }}
|
||||
{{ $cssOpts := (dict "targetPath" "css/coder.css" "enableSourceMap" true ) }}
|
||||
{{ $styles := resources.Get "scss/coder.scss" | resources.ExecuteAsTemplate "style.coder.css" . | toCSS $cssOpts }}
|
||||
<link rel="stylesheet" href="{{ $styles.RelPermalink }}" media="screen">
|
||||
{{ else }}
|
||||
{{ $cssOpts := (dict "targetPath" "css/coder.css" ) }}
|
||||
{{ $styles := resources.Get "scss/coder.scss" | resources.ExecuteAsTemplate "style.coder.css" . | toCSS $cssOpts | minify | fingerprint }}
|
||||
<link rel="stylesheet" href="{{ $styles.RelPermalink }}" integrity="{{ $styles.Data.Integrity }}" crossorigin="anonymous" media="screen" />
|
||||
{{ end }}
|
||||
|
||||
{{ if .Site.Params.rtl }}
|
||||
{{ if .Site.IsServer }}
|
||||
{{ $cssOpts := (dict "targetPath" "css/coder-rtl.css" "enableSourceMap" true ) }}
|
||||
{{ $styles := resources.Get "scss/coder-rtl.scss" | resources.ExecuteAsTemplate "style.coder-rtl.css" . | toCSS $cssOpts }}
|
||||
<link rel="stylesheet" href="{{ $styles.RelPermalink }}" media="screen">
|
||||
{{ else }}
|
||||
{{ $cssOpts := (dict "targetPath" "css/coder-rtl.css" ) }}
|
||||
{{ $styles := resources.Get "scss/coder-rtl.scss" | resources.ExecuteAsTemplate "style.coder-rtl.css" . | toCSS $cssOpts | minify | fingerprint }}
|
||||
<link rel="stylesheet" href="{{ $styles.RelPermalink }}" integrity="{{ $styles.Data.Integrity }}" crossorigin="anonymous" media="screen" />
|
||||
{{ end }}
|
||||
{{ end }}
|
Reference in New Issue
Block a user