Skip to content

Commit 1f63646

Browse files
authored
apacheGH-45230: [Docs] Add LinkedIn social link and fix top nav scaling problems (apache#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: apache#45230
1 parent 04249b9 commit 1f63646

File tree

2 files changed

+39
-2
lines changed

2 files changed

+39
-2
lines changed

docs/source/_static/theme_overrides.css

Lines changed: 33 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,14 +25,39 @@
2525
--pst-font-weight-heading: 600;
2626
}
2727

28-
/* Change header hight to make the logo a bit larger */
28+
/* Change header height to make the logo a bit larger */
2929
/* only on wider screens */
30-
@media only screen and (min-width: 1170px){
30+
31+
@media only screen and (min-width: 1200px) {
3132
:root {
3233
--pst-header-height: 6rem;
3334
}
3435
}
3536

37+
/* Adjust layout of nav to fit narrower screens */
38+
39+
@media only screen and (max-width: 1199px) {
40+
41+
/* Condense link text in nav to preserve layout */
42+
.navbar-header-items__center a.nav-link:not(.dropdown-item),
43+
.navbar-header-items__center button.nav-item {
44+
letter-spacing: -0.02em;
45+
}
46+
47+
/* Shrink search button */
48+
.search-button__default-text,
49+
.search-button__kbd-shortcut {
50+
display:none !important;
51+
}
52+
53+
/* Reduce horizontal space between icons in nav and sidebar */
54+
div.sidebar-header-items__end,
55+
div.navbar-header-items__end,
56+
ul.navbar-icon-links {
57+
column-gap: 0.75rem !important;
58+
}
59+
}
60+
3661
/* Contributing landing page overview cards */
3762

3863
.contrib-card {
@@ -84,3 +109,9 @@ dl.cpp.enumerator {
84109
p.breathe-sectiondef-title {
85110
margin-top: 1rem;
86111
}
112+
113+
/* Keep social icons arranged horizontally in sidebar */
114+
115+
.sidebar-header-items__end {
116+
flex-wrap: wrap;
117+
}

docs/source/conf.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -342,13 +342,19 @@
342342
},
343343
"header_links_before_dropdown": 2,
344344
"header_dropdown_text": "Implementations",
345+
"navbar_align": "left",
345346
"navbar_end": ["version-switcher", "theme-switcher", "navbar-icon-links"],
346347
"icon_links": [
347348
{
348349
"name": "GitHub",
349350
"url": "https://github.com/apache/arrow",
350351
"icon": "fa-brands fa-square-github",
351352
},
353+
{
354+
"name": "LinkedIn",
355+
"url": "https://www.linkedin.com/company/apache-arrow/",
356+
"icon": "fa-brands fa-linkedin",
357+
},
352358
{
353359
"name": "X",
354360
"url": "https://twitter.com/ApacheArrow",

0 commit comments

Comments
 (0)