mirror of
https://github.com/theNewDynamic/gohugo-theme-ananke.git
synced 2025-06-08 09:12:47 +00:00
Add option to add a hidpi version of the logo
This commit is contained in:
parent
ab295db12c
commit
cc215204f6
@ -141,11 +141,12 @@ If you add a key of `show_reading_time` true to either the Config Params, a page
|
||||
|
||||
### Logo
|
||||
|
||||
You can replace the title of your site in the top left corner of each page with your own logo. To do that put your own logo into the `static` directory of your website, and add the `logo` parameter to the site params in your config file. For example:
|
||||
You can replace the title of your site in the top left corner of each page with your own logo. To do that put your own logo into the `static` directory of your website, and add the `logo` parameter to the site params in your config file. You can optionally add a HiDPI version of the logo, too. For example:
|
||||
|
||||
```
|
||||
[params]
|
||||
logo = "img/logo.svg"
|
||||
logo = "img/logo.png"
|
||||
logohidpi = "img/logohidpi.png"
|
||||
```
|
||||
|
||||
|
||||
|
@ -2,7 +2,11 @@
|
||||
<div class="flex-l justify-between items-center center">
|
||||
<a href="{{ .Site.BaseURL }}" class="f3 fw2 hover-white no-underline white-90 dib">
|
||||
{{ if .Site.Params.Logo }}
|
||||
<img src="/{{ .Site.Params.Logo }}" alt="{{ .Site.Title }}" />
|
||||
{{ if .Site.Params.LogoHidpi }}
|
||||
<img srcset="{{ .Site.Params.LogoHidpi | relURL }} 2x, {{ .Site.Params.Logo | relURL }} 1x" src="{{ .Site.Params.Logo | relURL }}" alt="{{ .Site.Title }}" />
|
||||
{{ else }}
|
||||
<img src="{{ .Site.Params.Logo | relURL }}" alt="{{ .Site.Title }}" />
|
||||
{{ end }}
|
||||
{{ else }}
|
||||
{{ .Site.Title }}
|
||||
{{ end }}
|
||||
|
Loading…
x
Reference in New Issue
Block a user