added option to position the logo at the right of the title

This commit is contained in:
Gabriele Musco 2022-03-28 16:28:17 +02:00
parent 210793da66
commit eaa947df25
No known key found for this signature in database
GPG Key ID: 0587A5D65B5DC99E
3 changed files with 19 additions and 3 deletions

View File

@ -57,6 +57,8 @@ summaryLength = 70 # number of words for article summaries
svgicon = "/logo.svg" svgicon = "/logo.svg"
icon512 = "/icon512.png" # 512x512 png image icon512 = "/icon512.png" # 512x512 png image
logoRightOfTitle = false # positions the logo to the right of the title; default: false
showTags = true # show the Tags menu item; default true showTags = true # show the Tags menu item; default true
showRss = true # show the link for the RSS feed; default true showRss = true # show the link for the RSS feed; default true

View File

@ -586,6 +586,15 @@ ul.list {
font-weight: normal; font-weight: normal;
font-size: 1.6 * $base_font_size * $title_font_mult; font-size: 1.6 * $base_font_size * $title_font_mult;
margin: 0; margin: 0;
{{ if site.Params.logoRightOfTitle }}
display: flex;
flex-direction: row;
flex-wrap: wrap;
align-items: center;
> a {
margin-right: 12px;
}
{{ end }}
} }
img { img {

View File

@ -2,13 +2,18 @@
{{- partial "inject/header-before.html" . -}} {{- partial "inject/header-before.html" . -}}
<div class="titleAndSearchContainer"> <div class="titleAndSearchContainer">
<div id="titleContainer"> <div id="titleContainer">
{{ if not (.Site.Params.logoRightOfTitle | default false) }}
<a class="unstyledLink" href="/"> <a class="unstyledLink" href="/">
<img src='{{ .Site.Params.Logo | default "/logo.svg" }}' /> <img src='{{ .Site.Params.Logo | default "/logo.svg" }}' />
</a> </a>
{{ end }}
<div class="rightOfLogo"> <div class="rightOfLogo">
<div class="titleAndHamburger"> <div class="titleAndHamburger">
<h1> <h1>
<a class="unstyledLink" href="/">{{ .Site.Title | default "Ficurinia" }}</a> <a class="unstyledLink" href="/">{{ .Site.Title | default "Ficurinia" }}</a>
{{ if .Site.Params.logoRightOfTitle | default false }}
<img src='{{ .Site.Params.Logo | default "/logo.svg" }}' />
{{ end }}
</h1> </h1>
{{ if (.Site.Params.mobileHamburgerNav | default false) }} {{ if (.Site.Params.mobileHamburgerNav | default false) }}
<label id="hamburger-menu" for="main-nav-toggler"> <label id="hamburger-menu" for="main-nav-toggler">