Skip to content

Commit

Permalink
fix: primary bg with showing header UI results in invisible links
Browse files Browse the repository at this point in the history
  • Loading branch information
SychO9 committed Jun 7, 2022
1 parent 82aea3d commit 81534b3
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 2 deletions.
5 changes: 4 additions & 1 deletion js/src/forum/components/PrivateFacade.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,12 @@ export default class PrivateFacade<T extends IPageAttrs> extends Page<T> {
document.body.classList.add('body--privateFacade');
}

const showHeader = !['show_only_logo', 'hide_secondary_items'].includes(app.forum.attribute('sycho-private-facade.header_layout'));

this.bodyClass = classList({
'App--privateFacade': true,
'App--privateFacade--logoOnly': ['show_only_logo', 'hide_secondary_items'].includes(app.forum.attribute('sycho-private-facade.header_layout')),
'App--privateFacade--showHeader': showHeader,
'App--privateFacade--logoOnly': !showHeader,
'App--privateFacade--primaryBg': app.forum.attribute('sycho-private-facade.primary_color_bg'),
});
}
Expand Down
2 changes: 1 addition & 1 deletion js/src/forum/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ app.initializers.add('sycho/flarum-private-facade', () => {

const original = orig(...args);

if (isPrivateFacadePage() && original && app.forum.attribute('sycho-private-facade.primary_color_bg')) {
if (isPrivateFacadePage() && original && app.forum.attribute('sycho-private-facade.primary_color_bg') && app.forum.attribute('sycho-private-facade.header_layout') !== 'show_header') {
(original as Mithril.Vnode<any>).attrs['data-primary-background'] = true;
}

Expand Down
8 changes: 8 additions & 0 deletions less/forum.less
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,14 @@
}
}

&--showHeader {
@media @tablet-up {
.Header-title {
float: left;
}
}
}

@media @phone {
.App-content {
background-color: transparent;
Expand Down

0 comments on commit 81534b3

Please sign in to comment.