Skip to content

Commit

Permalink
GH-45230: [Docs] Add LinkedIn social link and fix top nav scaling pro…
Browse files Browse the repository at this point in the history
…blems (#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
  • Loading branch information
ianmcook authored Jan 13, 2025
1 parent 04249b9 commit 1f63646
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 2 deletions.
35 changes: 33 additions & 2 deletions docs/source/_static/theme_overrides.css
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -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;
}
6 changes: 6 additions & 0 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -342,13 +342,19 @@
},
"header_links_before_dropdown": 2,
"header_dropdown_text": "Implementations",
"navbar_align": "left",
"navbar_end": ["version-switcher", "theme-switcher", "navbar-icon-links"],
"icon_links": [
{
"name": "GitHub",
"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",
Expand Down

0 comments on commit 1f63646

Please sign in to comment.