change to hugo-blog-awesome theme
This commit is contained in:
parent
113e3650f1
commit
15b6142a8e
131 changed files with 5895 additions and 124 deletions
26
themes/hugo-blog-awesome/layouts/partials/webmanifest.html
Normal file
26
themes/hugo-blog-awesome/layouts/partials/webmanifest.html
Normal file
|
@ -0,0 +1,26 @@
|
|||
{{ define "partials/hugo-blog-awesome/manifest-background-color" }}
|
||||
{{ $bg := ""}}
|
||||
{{ if .Site.Params.webmanifest.background_color }}
|
||||
{{ $bg = .Site.Params.webmanifest.background_color }}
|
||||
{{ else if eq .Site.Params.defaultColor "dark" }}
|
||||
{{ $bg = "#131418" }}
|
||||
{{ else }}
|
||||
{{ $bg = "#ffffff"}}
|
||||
{{ end}}
|
||||
{{ return $bg }}
|
||||
{{ end }}
|
||||
|
||||
{{ $background_color := partial "hugo-blog-awesome/manifest-background-color" . }}
|
||||
|
||||
{{
|
||||
$ctx := merge (.Site.Params.webmanifest | default dict)
|
||||
(dict
|
||||
"name" (.Site.Params.webmanifest.name | default .Site.Params.sitename | default .Site.Title)
|
||||
"short_name" (.Site.Params.webmanifest.short_name | default .Site.Params.sitename | default .Site.Title)
|
||||
"start_url" (.Site.Params.webmanifest.start_url | default .Site.Home.Permalink)
|
||||
"theme_color" (.Site.Params.webmanifest.theme_color | default "#434648")
|
||||
"background_color" $background_color
|
||||
"display" (.Site.Params.webmanifest.display | default "standalone")
|
||||
)
|
||||
}}
|
||||
<link rel="manifest" href="{{ (resources.Get "icons/site.webmanifest" | resources.ExecuteAsTemplate "site.webmanifest" $ctx).Permalink }}">
|
Loading…
Add table
Add a link
Reference in a new issue