f1d5b69293
Removes the [full-width component](https://github.com/discourse/discourse-full-width-component) dependency by adding most of the code directly to the theme. There was one grid definition in the CSS I ended up removing because it was conflicting with an existing override in the theme. Anyone who has previously installed the theme should manually remove the full-width component from it.
17 lines
440 B
JavaScript
17 lines
440 B
JavaScript
import { apiInitializer } from "discourse/lib/api";
|
|
|
|
export default apiInitializer("0.8", (api) => {
|
|
document.body.classList.add("full-width-enabled");
|
|
|
|
// When the sidebar is visible, force the HomeLogo to be in an 'un-minimized' state.
|
|
api.registerValueTransformer?.(
|
|
"home-logo-minimized",
|
|
({ value, context }) => {
|
|
if (value && context.showSidebar) {
|
|
return false;
|
|
}
|
|
return value;
|
|
}
|
|
);
|
|
});
|