pydata-sphinx-theme icon indicating copy to clipboard operation
pydata-sphinx-theme copied to clipboard

Improve configuration to create front page

Open chrisjsewell opened this issue 2 years ago • 0 comments

Heya, so in https://aiida-website.readthedocs.io/ I've played with pydata-sphinx-theme v0.12.0rc1 to create a nice splash page, that keeps the standard layout (and top bar), but is properly full-width and, combined with sphinx-design, to make it size responsive. (you'll note it looks very similar to https://code.visualstudio.com/, which is certainly not a bad thing!) I think maybe some of the things I'm doing could be up-streamed, to make it easier for others (this is essentially a follow on from #146)

image image

The main steps were:

  1. Remove any sidebars: this is already possible with html_sidebars and html_theme.sidebar_secondary.remove config, but maybe could be streamlined

  2. Apply page specific CSS: I did this using a local extension and a html-page-context event, but could be improved

  3. Remove max-width restrictions on page: I applied in my page specific CSS, it would certainly be ideal to upstream this in some way:

     .bd-container__inner.bd-page-width {
         max-width: 100% !important;
     }
    
     .bd-article-container {
         max-width: 100% !important;
         padding: 0 !important;
     }
    
     .bd-article {
         padding: 0 !important;
     }
    
  4. Hide the page title

  5. Now add sphinx-design elements

chrisjsewell avatar Nov 11 '22 14:11 chrisjsewell