Is there a way to use a seperate logo for mobile version?
-
You can do it with custom CSS:
@media (max-width: 767px) { .header .forum-logo { background: url([path to image]) no-repeat; background-size: contain; padding-left: [width of image on mobile]px; overflow: hidden; } }
This is an example replacing an image that is displayed as 95px wide on mobile with the Google logo:
@media (max-width: 767px) { .header .forum-logo { background: url(https://www.google.com/images/branding/googlelogo/2x/googlelogo_color_120x44dp.png) no-repeat; background-size: contain; padding-left: 95px; overflow: hidden; } }
You can find out how large an image is on mobile by changing the browser window down to about the size of a phone screen and then right clicking on the image and hitting inspect element.
-
@AnthonyM well, is your site public? I can see if I can hack together a quick fix.
-
This works, but it creates a double logo since it doesn't remove the normal logo. How do you fix that?
On another note, why isn't this built into nodebb? Using a bigger logo for your desktop site and a smaller one for your mobile site is pretty normal. For me, it looks fine when logged out, but once I log in, the logo gets moved to another line since it runs out of space.
-
@Eminent said in Is there a way to use a seperate logo for mobile version?:
@julian The Feature Request subcategory?
you should do this here: https://github.com/NodeBB/NodeBB/issues