diff --git a/config.yml b/config.yml index 5fc4db7..4d08bd7 100644 --- a/config.yml +++ b/config.yml @@ -73,7 +73,8 @@ params: safari_pinned_tab: "https://blog.morgan.kr/favicon.ico" label: - icon: /favicon.ico + icon: /favicon.png + icon_dark: /favicon-ing.png iconHeight: 24 analytics: diff --git a/static/favicon-inv.png b/static/favicon-inv.png new file mode 100644 index 0000000..cda654c Binary files /dev/null and b/static/favicon-inv.png differ diff --git a/themes/mytheme/layouts/partials/header.html b/themes/mytheme/layouts/partials/header.html index a9578b8..306c8a6 100644 --- a/themes/mytheme/layouts/partials/header.html +++ b/themes/mytheme/layouts/partials/header.html @@ -5,25 +5,8 @@ {{- if site.Title }} {{- if site.Params.label.icon }} - {{- $img := resources.Get site.Params.label.icon }} - {{- if $img }} - {{- $processableFormats := (slice "jpg" "jpeg" "png" "tif" "bmp" "gif") -}} - {{- if hugo.IsExtended -}} - {{- $processableFormats = $processableFormats | append "webp" -}} - {{- end -}} - {{- $prod := (hugo.IsProduction | or (eq site.Params.env "production")) }} - {{- if and (in $processableFormats $img.MediaType.SubType) (eq $prod true)}} - {{- if site.Params.label.iconHeight }} - {{- $img = $img.Resize (printf "x%d" site.Params.label.iconHeight) }} - {{ else }} - {{- $img = $img.Resize "x30" }} - {{- end }} - {{- end }} - - {{- else }} + height="{{- site.Params.label.iconHeight | default "24" -}}"> {{- end -}} {{- else }} {{- $label_text -}}