Hereās an example code of how you can customize the banner to look less tall on small screens:
Put this in the mobile tab of your theme customization!
// Makes the welcome banner adapted to small screen sizes
.below-site-header-outlet.welcome-link-banner-connector {
.welcome-link-banner-wrapper {
background-image: url($mobile-banner-bg);
background-size: cover;
.welcome-wrapper {
.featured-banner-link {
flex-direction: row;
padding-bottom: 0.5em;
&>div a {
padding: 0 5px;
h3 {
font-size: 0.75em;
white-space: normal;
}
}
}
}
}
}
To be tweaked regarding your needs (thatās why there are āemptyā SCSS nests).
As it is, it looks like this on my current project:
This is a vast improvement in the mobile appearance of the Welcome Banner. Just yesterday I watched a new user sign up to my site via mobile, and they tripped up on the large size of the banner; basically they didnāt realise that they had to scroll down to see the action. Hence Iāve been hunting for something better, and that snippet of CSS is brilliant.
I had to trim out background-image: url($mobile-banner-bg); as it is clear you lifted that from a forked TC.
@awesomerobot, would you consider a PR to add this Mobile enhancement to the Theme Component?
Hi @awesomerobot, given that I havenāt seen a PR for that so far, I just created a PR to add the enhancement made by @Canapin, and added two locales.
Nice! But the problem with vertical icons also occurs on tablets, so just using the mobile custom CSS starts at too low a screen size. Unfortunately Discourse custom CSS doesnāt let you target tablets. My solution was to put the following text in the common custom CSS tab.
It also includes fixes for unwanted spacing on the right in the tablet view, and I also chose to increase the font size for the links to 1em.
Thanks for this info!
I didnāt do a pull request to the theme component with my mobile version because I didnāt test it in various configurations. And your message shows that the mobile code would need indeed additional work