diff options
author | Davide Taviani <helios89@gmail.com> | 2016-06-18 09:57:22 +0300 |
---|---|---|
committer | digitalcraftsman <digitalcraftsman@protonmail.com> | 2016-06-18 12:23:48 +0300 |
commit | 5d8c8f3229e24aa71acbdd1cbe2bf8bd7d9e5f58 (patch) | |
tree | 205d7da2d207cabbe487c52b7757ff9a97b46ea4 | |
parent | 335b651ae198cd79043e38f460894157c967d7af (diff) |
Logo in the header is now user-defined
-rw-r--r-- | exampleSite/config.toml | 1 | ||||
-rw-r--r-- | layouts/partials/header.html | 7 |
2 files changed, 7 insertions, 1 deletions
diff --git a/exampleSite/config.toml b/exampleSite/config.toml index 49d2f07..d8026df 100644 --- a/exampleSite/config.toml +++ b/exampleSite/config.toml @@ -23,6 +23,7 @@ theme = "hugo-icarus-theme" site_description = "" copyright = "Powered by [Hugo](//gohugo.io). Theme by [PPOffice](http://github.com/ppoffice)." avatar = "css/images/avatar.png" + logo = "css/images/logo.png" # Format dates with Go's time formatting date_format = "2006-01-02" diff --git a/layouts/partials/header.html b/layouts/partials/header.html index 58d1efb..3819708 100644 --- a/layouts/partials/header.html +++ b/layouts/partials/header.html @@ -1,7 +1,12 @@ <header id="header"> <div id="header-main" class="header-inner"> <div class="outer"> - <a href="{{ .Site.BaseURL }}" id="logo"><i class="logo" style="background-image: url('{{ .Site.BaseURL }}css/images/logo.png')"></i><span class="site-title">{{ .Site.Title }}</span></a> + <a href="{{ .Site.BaseURL }}" id="logo"> + {{ if .Site.Params.logo }} + <i class="logo" style="background-image: url('{{ .Site.Params.logo | absURL }}')"></i> + {{end}} + <span class="site-title">{{ .Site.Title }}</span> + </a> <nav id="main-nav"> {{ range .Site.Params.menu }} {{ if .before }} |