Fix logoText variable & prevent code text transform

This commit is contained in:
panr 2018-09-03 09:10:12 +02:00
parent 3864783204
commit f9f276852e
5 changed files with 10 additions and 6 deletions

View File

@ -58,7 +58,7 @@ paginate = 5
subtitle = "Your site subtitle" subtitle = "Your site subtitle"
[params.logo] [params.logo]
logoText = "" logoText = "hello friend"
# or # or
# #
# path = "/img/your-example-logo.svg" # path = "/img/your-example-logo.svg"

View File

@ -9,7 +9,7 @@ paginate = 5
subtitle = "A simple theme for Hugo" subtitle = "A simple theme for Hugo"
[params.logo] [params.logo]
logoText = "" logoText = "hello friend"
# or # or
# #
# path = "/img/your-example-logo.svg" # path = "/img/your-example-logo.svg"

View File

@ -1,10 +1,10 @@
<a href="{{ .Site.BaseURL }}" style="text-decoration: none;"> <a href="{{ .Site.BaseURL }}" style="text-decoration: none;">
<div class="logo"> <div class="logo">
{{ if .Site.Params.Logo }} {{ if .Site.Params.Logo.path }}
<img src="{{ .Site.Params.Logo.path }}" alt="{{ .Site.Params.Logo.alt }}" /> <img src="{{ .Site.Params.Logo.path }}" alt="{{ .Site.Params.Logo.alt }}" />
{{ else }} {{ else }}
<span class="logo__mark">></span> <span class="logo__mark">></span>
<span class="logo__text">hello friend</span> <span class="logo__text">{{ with .Site.Params.Logo.logoText }}{{ . }}{{ else }}hello friend{{ end }}</span>
<span class="logo__cursor"></span> <span class="logo__cursor"></span>
{{ end }} {{ end }}
</div> </div>

View File

@ -47,3 +47,7 @@
max-width: 100%; max-width: 100%;
} }
} }
.theme-toggle {
cursor: pointer;
}

File diff suppressed because one or more lines are too long