Announcement Bar

Install this theme component

Settings

There are a few options to set content, cookie and layout placement:

Styles

For CSS styling the component structure is:

.announcement-bar {
  &__wrapper { }

  &__container { }

  &__content { }

  &__close { }
}
19 Likes

Nice work as always @nolo :clap: :slight_smile:

7 Likes

Awesome component idea!

Would it be possible to add settings which would limit groups of users to which the announcement should be visible?

6 Likes

Thanks for the suggestion @kinetiksoft! I like to keep shared components without group features though :smile: . The reason is that in my experience the actual use cases are often more specific than just selecting a group. You might need to distinguish anonymous visitors as well. Or display different content to different groups. And then it adds complexity already.

I usually fork components or just implement different layout options with CSS. So I’m afraid this would be my recommendation as well.

With respect to targeting groups with CSS, the Discourse groups css classes in body is a great helper component.

2 Likes

2 posts were split to a new topic: Install theme button not working under Ember 5

Hi
After installing and enabling i get the following error:

I think the this console error is relevant:

Am i missing something? Thanks

2 Likes

It looks like you are using a Discourse version that doesn’t support .gjs format file.

I believe this was introduced in v3.2.0.beta3 (2023, July – specifically a this commit)

Unfortunately, unless someone would make a version without using .gjs file, you can either upgrade Discourse or uninstall the component.

4 Likes

We’re on 3.1 - so that will make sense.

Hopefully Events will upgrade soon to support 3.2 and we’ll jump ship.

Thanks

4 Likes

Sorry for the confusion @martyn_thomas and thanks for explaining the reason @Arkshine! I’ve updated the about file to state "minimum_discourse_version": "3.2.0.beta3".

5 Likes