메인 콘텐츠 위에는 배너를 표시하되 사이드바 위에는 표시하지 않도록 설정

before i try to attack it with a bunch of code, just wonder if it is even possible to force the banner to sit inside the page container beside the sidebar instead of having the sidebar down under it?

3개의 좋아요

You can have a look at the Plugin outlet locations theme component to see where you can easily add stuff.

That would help only if you were going to create your own component or fork this one, though.

2개의 좋아요

I’ve just opened a PR that will add a plugin outlet setting so it can be displayed like this:

@tshenry can you try it out and merge it when you have a chance? DEV: plugin outlet setting for sidebar, prettier by awesomerobot · Pull Request #15 · discourse/discourse-versatile-banner · GitHub

6개의 좋아요

thank you so much for this and for all your great work @awesomerobot :slight_smile:

3개의 좋아요

Looks great :star_struck: Thanks @awesomerobot!

PR merged!

4개의 좋아요

Tested and working smooth!

3개의 좋아요

works perfecly! :+1:

3개의 좋아요

just a quick note - this component seems to leave a gap in the top margin under the header in desktop view - it is also noticeable above the navigation bar in views where it’s not enabled (ie: if show for members is disabled).

to repro, go to a category or topic list page in a desktop view and compare when the component is enabled or disabled - the top margin expands by about 25px. this is can been seen in views where the banner is not enabled for members too (i’ve added a top-margin corrector to the main-outlet in common css for the time being).

2개의 좋아요

I can observe the same in mobile view also. Disabling this TC fixes the gap, so the cause is definitely in here somewhere.

2개의 좋아요

FYI, you can add this to the common css for formatting the banner. i use similar for formatting my versatile banner to fix it in the meantime.

// * compensate for versatile banner top margin off-set *

#main-outlet {
  margin-top: -25px;
}
2개의 좋아요

4 posts were merged into an existing topic: Versatile Banner