Versatile Banner

thx!

what’s the CSS class to hide it in /admin/?
it’s still displayed there

1 Like

This should do it :slight_smile:

.admin-interface .banner-box {
    display: none;
}
9 Likes

Some of my users reported that the collapse/expand text was swapped. it’s inconsistent and I could not reproduce the bug yet. Anyone have same issue?

@tshenry screenshots here from a user on Opera/Windows:

@tshenry Any chance for an option to set a user-specified icon versus them being preset?

Awesome plugin by the way! Thank you!

2 Likes

Great component.

Just a note. When it’s enabled the DiscoTOC component stops being sticky (for those who use it).
Looks like this is caused by:

body {
    overflow-x: hidden; // Needed to compensate for the overflow caused by the vertical scrollbar
5 Likes

Brilliant plugin :pray: Thank you!

I have a couple of customization questions:

  1. Here’s what my banner looks like (See Figure 1 below)
  2. After a user has closed the banner, I know you can change the cookie version to make it reappear. Is there a way for an individual to get the banner to come back?
  3. Taking a look at Figure 1 - Is there a simple way with CSS that I could hide EVERYTHING beneath the area highlighted in the red box? I would like to keep that Header small and allow the “Expand” button. over on the right, at which point I’d like it to show everything outside the red box, in Figure 1
  4. I love the idea of the “X Close” actually collapse-scaling to the top-right side as illustrated below in Figure 2 where it’s out of the way, but people can easily expand it. Has anyone done something like this?

Figure 1:

Figure 2:

2 Likes

I remember that happening early on when I was working on it, but I was pretty sure I had it figured out. I’m not able to get it into that state anymore. I would have the user clear their cookies for your site and see if you get any further reports. If they happen to have a consistent way to reproduce the issue, that would be great to get as well!

I can add that to the to-do list. It will be an easy change.

I’ll definitely revisit this next time I look at the component to see if there’s a better solution. It’s not ideal as-is.

They can clear the cookies for the site.

There’s not really a simple solution unfortunately. I’ll consider adding little more flexibility around the collapse point.

No plans for anything like this, but feel free to modify the component to fit your needs!

5 Likes

@tshenry loving this component! Do you have any updates on the option to display 2 different banners, one for anonymous, one for logged in users? Thanks in advance!

2 Likes

I found a way around this without installing anything additional - wrote an after header/css for the default Light theme and now I’m able to have a banner for all logged out users and the versatile banner for logged in users. https://go.helpberkeley.org/

6 Likes

I just noticed that new members are not shown the versatile banner upon first time login, when sent to /top/quarterly. I looked over the settings and it seems like it should be showing - any ideas what I can try? /top does display the versatile banner. Hmm…

2 Likes

It should show if you add /top/ to the url must contain theme setting. I do agree that it does seem inconsistent. I’ve added it to the list of things to look at with this component.

6 Likes

thanks! but if I add /top/ there won’t that prevent it from showing elsewhere? Right now it’s showing everywhere else I think.

edit - ok, did a test… and it seems I need to add a few more of these to make sure the banner stays as people click around. here’s how it looks now:

2 Likes

A post was split to a new topic: What is the purpose of the “Convert” button with themes?

That would be great addition. I am looking for a way to display the versatile banner to tl0 users only

2 Likes

I think I find an issue.
When the banner is showing, and a staff member select some post, the “selected-posts”'s box with the options disappear.

I can’t repro this issue here on meta because I don’t have permissions to select posts for moderate/admin them.


Testing Info

  • If you activate safe-mode, everything works fine :wink:
  • If you “collapse” the banner, works!
  • I think there is some issue with css’s class selected-posts (i’m debugging)
3 Likes

Ah, I see what you are talking about! Let me take a look.

3 Likes

I’m using Versatile Banner and it works great, but when switching Themes it would be good if I could set different colours for the background and text for the alternative theme.

I’m also using Alternative Logos (Alternative logos for dark / light themes) and Discourse Dark Mode (Dark Mode Automatic Theme Switcher) components so the site switches to dark mode and light mode according to the setting of the OS especially on iOS.

It’d be great if the banner could also change colours to suit :blush:

PS I imagine Header Theme Toggle (Header Theme Toggle) might give clues to do this

1 Like

Add this to your theme’s css and customize the colors to suit

.banner-box h1, .banner-box h2, .banner-box h3 {
    color: #32343B !important;
}

.banner-box {
    background-color: #F5F5F5 !important;
    color: #32343B !important;
}

.banner-box .row .single-box .icon {
    color: #32343B !important;
}

.banner-box .row .single-box .btn.btn-icon-text {
    background: #32343B !important;
    color: white !important;
}

.banner-box .section-header .colored-line {
    background: #32343B !important;
}

.banner-box a {
    color: #37B8EB !important;
}
5 Likes

Is there any easy way to modify the banner to enable expand/collapse not just by clicking the arrow, but the whole main heading content area? Basically the whole <div class="section-header">...</div>

1 Like

Really great TC! :slight_smile: Just a heads up, it seems that when using this TC with the Discourse Tag Banners TC, if you navigate to a tag, then return back to the homepage (clicking on the site logo), the top 1/3rd or so of the versatile banner seems to get cut off. Not sure why.

1 Like