bitcoin-dot-org / developer.bitcoin.org

Bitcoin.org Developer Documentation
https://developer.bitcoin.org/
Other
183 stars 138 forks source link

Website is broken with newer version of Sphinx #144

Open melroy89 opened 2 years ago

melroy89 commented 2 years ago

Hi,

For my mirror I'm also building developer.bitcoin.org. I noticed that in my case using the latest version of Sphinx (Sphinx v4.3.1) under Python 3 (using unchanged source-code), I got a lay-out issue. Due to the Sphinx sidebar.

As you can see Sphinx is changing the order of CSS link includes, this content is generated of course: image

Instead of: image

Which breaks all the pages with a sidebar most likely due to some margin-left: -100%; css setting on sphinxsidebar class. I think the left sidebar you are using is by default collapsed?

Anyway the result will be (not good):

image

It happens on all pages with the sidebar, incl the example, reference and glossary page.

Regards, Melroy

itcatplayit commented 1 year ago

@melroy89 I use hack css way to fix this bug:

in file _theme/static/sphinxbootstrap4.css_t, add:

div.sphinxsidebar.coverml100 {
    margin-left: 0px !important;
}

and modify file _theme/static/sphinxbootstrap4.js_t

- $(".sphinxsidebar").addClass("col-md-3");
+ $(".sphinxsidebar").addClass("col-md-3 coverml100");