Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add site logo to left of title/slogan #75

Open
Kemp-J opened this issue Nov 24, 2019 · 2 comments
Open

Add site logo to left of title/slogan #75

Kemp-J opened this issue Nov 24, 2019 · 2 comments

Comments

@Kemp-J
Copy link

Kemp-J commented Nov 24, 2019

I want to add a site logo to the left of the title and slogan (so that it uses approximately the same height as those two lines). Unfortunately the CSS involved in rendering the title and slogan is a little beyond me.

Is there an existing example for implementing this? Alternatively, could someone give me some idea as to how to accomplish it?

@Pinaute
Copy link

Pinaute commented Apr 7, 2020

Hi @Kemp-J
Here's how I accomplish it (in this case, the site logo is only to the left of the title):

Edit the file header.html
Replace the following code block.

{{ if ( ne .Site.Title "" ) }}
<a href="{{ .Site.BaseURL | relLangURL }}"> {{ .Site.Title }} </a>
{{ end }}</div>

by this one:

{{ if ( ne .Site.Title "" ) }}
<a href="{{ .Site.BaseURL | relLangURL }}"><img class="logo-header" src="/img/main/my-logo.png"> {{ .Site.Title }} </a>
{{ end }}</div>

Finally, edit the file custom.css

.logo-header {
height: 20px;
}

@Kemp-J
Copy link
Author

Kemp-J commented Apr 7, 2020

Thanks, that's a fairly straightforward way to get one there. I was hoping for a solution for the logo to be to the left of the title and slogan though, so it can be taller than just the one line. It seems very hard to do with how things are currently laid out though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants