-
-
Notifications
You must be signed in to change notification settings - Fork 189
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
Enable optional links to *next* and *previous* items #101
Conversation
Provides *next* and *previous* links above and below main page content. They are disabled by default. Includes documentation. Closes sphinx-doc#18.
Awesome, thanks! |
How soon until a release that has this? It's already live on the readthedocs site (which shows the dev docs). |
It also would be nice if the prev and next links had different css ids so that one could style them separately (I'd prefer to make the prev links float left). |
@asmeurer : You can already target the CSS for the top and bottom links separately, and this is actually done by the theme. .related {
// applies to both sets of links
}
.related.top {
// applies to only the top links
}
.related.bottom {
// applies to only the bottom links
} |
No I want to style the previous and next separately, not the top and bottom. I want to put the previous link on the left. |
@asmeurer try using the pseudo-classes :first and :last |
@MinchinWeb I assume you mean I'm pretty new to CSS, but I can't figure out how to make this work. Note that on both the first and last page, there is only one link in the rellinks nav, but in the two cases I would want them to be on opposite sides. I thought I could use attribute selectors to select based on the title, but that doesn't select the arrow. I'm sure there's a way to do it, but I don't know enough CSS to get it done. It would be much simpler if the previous and next links had separate CSS classes. (also FWIW, I think what I'm trying to do should be the default in the theme, but I'll leave that decision up to @bitprophet) |
Having extra classes seems reasonable if it's easy to do (haven't looked myself yet). I think that should be a separate ticket, however - feel free to make one. Re: release of this merge: I'll try to pop out an 0.7.11 sometime, there's outstanding release process issues but AFAIK this is backwards compatible so we should still be able to put out a tertiary release. |
This is as suggested at sphinx-doc#101. This makes them easier to style separately, such as making the previous link float left.
I went ahead and implemented it #135. I put the CSS I'm using there so you can decide which you prefer as the default. |
@asmeurer I glad you could get something with CSS working. I tried a couple of things, I couldn't get it working on my end... |
You mean you tried #135 and couldn't get it to work? I've been using it at https://www.asmeurer.com/brown-water-python/ (with this custom.css https://github.com/asmeurer/brown-water-python/blob/4edf12f0b710a4c6878d28811a14a9fcdb4471f9/docs/_static/custom.css#L1-L20) |
@asmeurer No, I was trying to hack my own code to get it to display like you were wanting it to. I thought I'd managed to do that at one point early in my work on this, but couldn't figure it out again; maybe it never worked for me, I don't know. So I'm glad you found a working solution, and that it made it into the newest release! |
Is it actually in the release? #135 wasn't merged. |
Apparently I'm not paying quite enough attention, but it looks like it's (#135) slated for the next release. |
I'll be releasing soon, been tied up with other thing and projects, but I intend to sweep through all repos and put any unreleased code out on PyPI this week. |
Thanks for the update @bitprophet, psyched for this to get released. Btw #125 has already been approved and should just be a matter of clicking merge in case you can land that too before the release. |
Fixes #18. I finally got annoyed enough at the feature not being there that I added it myself.
The links are optional, and off by default. Under theme options, set
show_relbars = True
to enable them.The top and bottom bars can be individually toggled. The border color can also be customized. Documentation is also included.