nolo
(Manuel)
August 28, 2024, 8:51am
1
There’s a small alignment glitch:
On a more general note, on desktop view the small logo doesn’t seem so helpful any longer, now that the logo sits atop the sidebar. It actually makes the topic title render far left of the topic, though there’d be enough space to keep it right above:
But desktop and mobile use the same small logo setting. And on mobile the header layout would indeed get scrambled without a very narrow small logo.
So right now it doesn’t seem to be an option to keep the same logo for all header states on desktop. Are there any plan to address this?
3 Likes
Moin
August 28, 2024, 9:04am
2
Manuel:
On a more general note, on desktop view the small logo doesn’t seem so helpful any longer, now that the logo sits atop the sidebar. It actually makes the topic title render far left of the topic, though there’d be enough space to keep it right above
That’s why I use a full width theme.
2 Likes
nolo
(Manuel)
August 28, 2024, 9:18am
3
I generally quite like the centered layout… but that’s a great hint! At least in a custom theme I could add the modifying code that the full width component uses:
import Component from "@glimmer/component";
import HomeLogo from "discourse/components/header/home-logo";
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.
// Importing and using the HomeLogo component here isn't ideal... it's not really public API.
// But, it is certainly better than monkey-patching inside the component.
api.renderInOutlet(
"home-logo",
class FullWidthHomeLogo extends Component {
get forceMinimizedFalse() {
return (
this.args.outletArgs.minimized &&
api.container.lookup("controller:application").get("showSidebar")
);
}
This file has been truncated. show original
Because, to paraphrase the code comment, so far I only had some monkey-patching ideas
2 Likes