mirror of
https://github.com/thomasjsn/hugo-theme-hello-friend.git
synced 2024-12-24 23:09:27 +01:00
Add possibility to set up your own logotype in config
This commit is contained in:
parent
706c78ae07
commit
4dd1f16df6
@ -8,6 +8,10 @@ paginate = 5
|
||||
[params]
|
||||
subtitle = "A simple theme for Hugo"
|
||||
|
||||
# [params.logo]
|
||||
# path = "/img/your-example-logo.svg"
|
||||
# alt = "your_example_logo"
|
||||
|
||||
[menu]
|
||||
[[menu.main]]
|
||||
identifier = "about"
|
||||
|
@ -1,7 +1,11 @@
|
||||
<a href="{{ .Site.BaseURL }}" style="text-decoration: none;">
|
||||
<div class="logo">
|
||||
<span class="logo__mark">></span>
|
||||
<span class="logo__text">hello friend</span>
|
||||
<span class="logo__cursor"></span>
|
||||
{{ if .Site.Params.Logo }}
|
||||
<img src="{{ .Site.Params.Logo.path }}" alt="{{ .Site.Params.Logo.alt }}" />
|
||||
{{ else }}
|
||||
<span class="logo__mark">></span>
|
||||
<span class="logo__text">hello friend</span>
|
||||
<span class="logo__cursor"></span>
|
||||
{{ end }}
|
||||
</div>
|
||||
</a>
|
@ -3,6 +3,10 @@
|
||||
align-items: center;
|
||||
text-decoration: none;
|
||||
|
||||
img {
|
||||
height: 44px;
|
||||
}
|
||||
|
||||
&__mark {
|
||||
margin-right: 5px;
|
||||
}
|
||||
|
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue
Block a user