Skip to content

Commit

Permalink
UX: add more plugin outlet options (#33)
Browse files Browse the repository at this point in the history
  • Loading branch information
awesomerobot authored Jul 6, 2023
1 parent 8131513 commit 21284e2
Show file tree
Hide file tree
Showing 6 changed files with 24 additions and 11 deletions.
7 changes: 7 additions & 0 deletions common/common.scss
Original file line number Diff line number Diff line change
Expand Up @@ -50,3 +50,10 @@ div[class^="category-title-header"] {
}
}
}

@if $plugin_outlet == "header-list-container-bottom" {
#header-list-area {
display: flex;
flex-direction: column-reverse;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{{#if (eq (theme-setting "plugin_outlet") "above-main-container")}}
<DiscourseCategoryBanners />
{{/if}}
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{{#if (theme-setting "show_above_site_header")}}
{{#if (eq (theme-setting "plugin_outlet") "above-site-header")}}
<DiscourseCategoryBanners />
{{/if}}
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{{#if (theme-setting "show_below_site_header")}}
{{#if (eq (theme-setting "plugin_outlet") "below-site-header")}}
<DiscourseCategoryBanners />
{{/if}}
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{{#if (eq (theme-setting "plugin_outlet") "header-list-container-bottom")}}
<DiscourseCategoryBanners />
{{/if}}
18 changes: 9 additions & 9 deletions settings.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,15 +32,15 @@ categories:
<li> only_sub - only subcategories of the named category.
</ul>
show_above_site_header:
default: false
type: bool
description: "Display the banner in the above site header connector."

show_below_site_header:
default: true
type: bool
description: "Display the banner in the below site header connector."
plugin_outlet:
default: "below-site-header"
type: "enum"
choices:
- "below-site-header"
- "above-site-header"
- "above-main-container"
- "header-list-container-bottom"
description: "Changes the position of the banner on the page."

show_category_icon:
default: false
Expand Down

0 comments on commit 21284e2

Please sign in to comment.