Hi
We’re currently setting up our very first Discourse forum and I am experiencing problems with this component.
I have added it to my theme and on my desktop I can see the brand bar.
But logged in on a smartphone I only see a blank space where the brand bar would be positioned (I have defined it with 40px height and position: fixed, top: 0)
In addition to my question above:
I can see the brand header in a desktop browser reduced to mobile width. But on a REAL smartphone the brand header just dissappears, leaving just a space.
@pmusaraj Any idea why this is happening? Any case of workaround?
@SchweizerSchoggi I don’t think you can fix this using just CSS. I did update the component now though, it has a new setting that lets you display it as a bar on mobile as well.
So, once you update, you need to enable show bar on mobile:
and it should then display it above the regular header. Keep in mind that this works well if you have very few text links given the amount of space available on mobile. (You can have a fair amount of icons, though.)
Thank you @pmusaraj , we might be on the right track with this update!
I can see the bar itself and the background color I’ve defined for it.
But unfortunatly logo and links on the bar are still invisible.
While doing further tests I once set .d-header to display: none.
.d-header {
display: none;
}
Interesting enough the brand-header was hidden as well. I guess this should not happen? For me it looked like a wrong encapsulation as on a desktop .b-header and .d-header are independent of each other.
Regarding the amount of links I already have a CSS based solution:
I am displaying link 1-4 for desktop, hiding link 5.
And displaying only link 5 for mobile, while hiding links 1-4.
You can try disabling all your CSS customizations. If the component works fine then, you’ll need to go through your CSS and find what causes the logo and links on the bar to disappear.
Ah, I guess the main problem might be that the checkbox setting is not saved by simply checking or unchecking the checkbox. There might be a button to do this. Because currently when I check the “Show bar on mobile” checkbox it’s checked but when I am leaving the page and come back the checkbox is unchecked again. I might have overseen the save button?
Works like a charm now, @pmusaraj - thank you so much for your active help.
Buttons are visible now and activating (and saving!) the option results in a perfect brand header bar on mobile for me
Does it work if you replace fa-brands fa-youtube with fab-youtube in both the icons and custom font awesome icons sections? The same should work for the discourse icon as well. I’m not sure about the browser one.