Skip to content

Commit

Permalink
GH-38209: [Docs] Reduce width of header items and keep header height …
Browse files Browse the repository at this point in the history
…default (small) on smaller screens (#38148)

### Rationale for this change

The Sphinx theme we have been using (PyData Sphinx Theme) has been pinned to an older version for a while now and with the #36591 we have updated the code and are now using version 0.14.0 for the dev docs.

This PR fixes bugs we have encountered after the PR updating the theme has been merged.

### What changes are included in this PR?

- Have default header size for smaller screens and keep it increased for bigger screens.

* Closes: #38209

Authored-by: AlenkaF <frim.alenka@gmail.com>
Signed-off-by: Joris Van den Bossche <jorisvandenbossche@gmail.com>
  • Loading branch information
AlenkaF authored and raulcd committed Oct 12, 2023
1 parent f8259c9 commit b06cfd1
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 7 deletions.
10 changes: 8 additions & 2 deletions docs/source/_static/theme_overrides.css
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,18 @@
/* Customizing with theme CSS variables */

:root {
/* Change header hight to make the logo a bit larger */
--pst-header-height: 6rem;
/* Make headings more bold */
--pst-font-weight-heading: 600;
}

/* Change header hight to make the logo a bit larger */
/* only on wider screens */
@media only screen and (min-width: 1170px){
:root {
--pst-header-height: 6rem;
}
}

/* Contibuting landing page overview cards */

.contrib-card {
Expand Down
2 changes: 1 addition & 1 deletion docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,7 @@
"image_dark": "_static/arrow-dark.png",
},
"header_links_before_dropdown": 2,
"header_dropdown_text": "Language implementations",
"header_dropdown_text": "Implementations",
"navbar_end": ["version-switcher", "theme-switcher", "navbar-icon-links"],
"icon_links": [
{
Expand Down
4 changes: 2 additions & 2 deletions docs/source/format/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
.. _format:

Specifications and Protocols
============================
Specifications
==============

.. toctree::
:maxdepth: 2
Expand Down
4 changes: 2 additions & 2 deletions docs/source/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ target environment.**
:padding: 2 2 0 0
:class-container: sd-text-center

.. grid-item-card:: Specifications and Protocols
.. grid-item-card:: Specifications
:class-card: contrib-card
:shadow: none

Expand All @@ -57,7 +57,7 @@ target environment.**
:color: primary
:expand:

To the Specifications and Protocols
To the Specifications

.. grid-item-card:: Development
:class-card: contrib-card
Expand Down

0 comments on commit b06cfd1

Please sign in to comment.