summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--assets/css/header.css11
-rw-r--r--layouts/partials/header.html10
2 files changed, 18 insertions, 3 deletions
diff --git a/assets/css/header.css b/assets/css/header.css
index 916e575..e5061d4 100644
--- a/assets/css/header.css
+++ b/assets/css/header.css
@@ -25,6 +25,15 @@
font-weight: 700;
}
+.logo a img {
+ display: inline;
+ vertical-align: middle;
+ pointer-events: none;
+ transform: translate(0, -10%);
+ border-radius: 6px;
+ margin-right: 8px;
+}
+
.theme-toggle svg{
height: 18px;
margin: 0 10px;
@@ -57,4 +66,4 @@ body:not(.dark) #sun {
.menu .active {
font-weight: 500;
border-bottom: 2px solid currentColor;
-} \ No newline at end of file
+}
diff --git a/layouts/partials/header.html b/layouts/partials/header.html
index 40e7b15..c73333a 100644
--- a/layouts/partials/header.html
+++ b/layouts/partials/header.html
@@ -30,7 +30,13 @@
<header class="header">
<nav class="nav">
<p class="logo">
- <a href="{{ "" | absLangURL }}">{{ .Site.Title }}</a>
+ <a href="{{ "" | absLangURL }}">
+ {{- if .Site.Params.label.icon }}
+ <img src="{{- .Site.Params.label.icon -}}"
+ height="{{- .Site.Params.label.iconHeight | default "30px" -}}">
+ {{- end -}}
+ {{- .Site.Params.label.text | default .Site.Title -}}
+ </a>
{{- if (and (not .Site.Params.disableThemeToggle) (not (or (eq .Site.Params.defaultTheme "light") (eq .Site.Params.defaultTheme "dark")))) }}
<span class="theme-toggle">
<a id="theme-toggle">
@@ -72,4 +78,4 @@
{{- end }}
</ul>
</nav>
-</header> \ No newline at end of file
+</header>