-
Notifications
You must be signed in to change notification settings - Fork 6k
Custom sidebar brand style #3484
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Poolitzer
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Huge improvement on mobile! Thanks!
clot27
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Finally some more space :)
| .sidebar-sticky .sidebar-brand { | ||
| flex-direction: row; | ||
| } | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| .sidebar-container { | |
| width: 24rem; | |
| } |
It sort of vexes me that many class names are split over 2 lines in the sidebar. Increasing the width from default 15rem to 24rem makes sure even the longest class fits on one line. This may have to be checked on mobile, though
Also, I do realize it's sort of off topic in this PR
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
On my display with that setting there are still classes that have a linebreak - even on the doc-no-prefixes branch. Plus, the right hand side tree gets so wide that it overlaps the actual content …
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The first bit probably depends on screen resolution. When I make my browser window smaller, I see that the line breaks return. This width must be some maximum width and the screen resolution overrides that.
The second bit is especially weird because I'm changing the width of the container, not its content. In my browser, the right-hand-side tree simply disappears if the window is not wide enough to display it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
BTW increasing the container width makes the logo bigger again (because there are percentages there) :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How will the following work with you? I tried resizing the browser and it looks fine.
.sidebar-sticky .sidebar-brand {
flex-direction: row;
}
.sidebar-sticky .sidebar-brand .sidebar-logo-container {
align-self: center;
width: 30%;
}
.sidebar-sticky .sidebar-brand .sidebar-brand-text {
align-self: center;
}
.content {
width: 60%;
}
.sidebar-drawer {
width: 30%;
}
.sidebar-container {
width: 100%;
}(you can adjust the percentages of content and sidebar-drawer slightly)
Obviously, the content setting may need to go into a different file or the file should be renamed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the right hand side tree gets so wide that it overlaps the actual content …
I see that if you e.g. open the page for telegram.BotCommandScopeAllChatAdministrators, the end of the title will be hidden under the right sidebar. But it happens no matter what settings we put in the new CSS file.
I guess we have to add overflow-wrap: anywhere to h1 tag.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How will the following work with you? I tried resizing the browser and it looks fine.
this somewhat works on my desktop screen, but the main content column becomes really narrow and unless you expand the tree on the LHS there's a lot of dead space. TBH, I'd rather like to keep these settings as-is. I can live with the the linbreaks in the navigation tree …
I guess we have to add overflow-wrap: anywhere to h1 tag.
That sounds reasonable. Will add.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, tampering with CSS can be really annoying :) It is to me, at least :)
harshil21
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good change!
As suggested in https://t.me/c/1494805131/32133. I kept the version number in a new line though … build should be up soonish on rtd.
Build at https://docs.python-telegram-bot.org/en/doc-logo-adjustments/
Preview:
