This is an automated email from the ASF dual-hosted git repository. brycemecum pushed a commit to branch maint-19.0.x in repository https://gitbox.apache.org/repos/asf/arrow.git
commit b3b3b291e88364ad9e7e773c8021440346456116 Author: Ian Cook <[email protected]> AuthorDate: Mon Jan 13 09:23:45 2025 -0500 GH-45230: [Docs] Add LinkedIn social link and fix top nav scaling problems (#45228) This adds a LinkedIn icon social link to the main docs pages and fixes the layout of the top nav, which previously looked bad at widths between 960px and 1200px. * GitHub Issue: #45230 --- docs/source/_static/theme_overrides.css | 35 +++++++++++++++++++++++++++++++-- docs/source/conf.py | 6 ++++++ 2 files changed, 39 insertions(+), 2 deletions(-) diff --git a/docs/source/_static/theme_overrides.css b/docs/source/_static/theme_overrides.css index f7f25269a6..55403b2ed0 100644 --- a/docs/source/_static/theme_overrides.css +++ b/docs/source/_static/theme_overrides.css @@ -25,14 +25,39 @@ --pst-font-weight-heading: 600; } -/* Change header hight to make the logo a bit larger */ +/* Change header height to make the logo a bit larger */ /* only on wider screens */ -@media only screen and (min-width: 1170px){ + +@media only screen and (min-width: 1200px) { :root { --pst-header-height: 6rem; } } +/* Adjust layout of nav to fit narrower screens */ + +@media only screen and (max-width: 1199px) { + + /* Condense link text in nav to preserve layout */ + .navbar-header-items__center a.nav-link:not(.dropdown-item), + .navbar-header-items__center button.nav-item { + letter-spacing: -0.02em; + } + + /* Shrink search button */ + .search-button__default-text, + .search-button__kbd-shortcut { + display:none !important; + } + + /* Reduce horizontal space between icons in nav and sidebar */ + div.sidebar-header-items__end, + div.navbar-header-items__end, + ul.navbar-icon-links { + column-gap: 0.75rem !important; + } +} + /* Contributing landing page overview cards */ .contrib-card { @@ -84,3 +109,9 @@ dl.cpp.enumerator { p.breathe-sectiondef-title { margin-top: 1rem; } + +/* Keep social icons arranged horizontally in sidebar */ + +.sidebar-header-items__end { + flex-wrap: wrap; +} diff --git a/docs/source/conf.py b/docs/source/conf.py index 9b60c4180c..e9b926e884 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -342,6 +342,7 @@ html_theme_options = { }, "header_links_before_dropdown": 2, "header_dropdown_text": "Implementations", + "navbar_align": "left", "navbar_end": ["version-switcher", "theme-switcher", "navbar-icon-links"], "icon_links": [ { @@ -349,6 +350,11 @@ html_theme_options = { "url": "https://github.com/apache/arrow", "icon": "fa-brands fa-square-github", }, + { + "name": "LinkedIn", + "url": "https://www.linkedin.com/company/apache-arrow/", + "icon": "fa-brands fa-linkedin", + }, { "name": "X", "url": "https://twitter.com/ApacheArrow",
