Skip to content

Commit 19201d7

Browse files
authored
docs: Put Comet logo in top nav bar, respect light/dark mode (#2591)
1 parent 213a57b commit 19201d7

File tree

4 files changed

+16
-10
lines changed

4 files changed

+16
-10
lines changed

docs/source/_static/theme_overrides.css

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,14 @@
3333
--pst-font-size-base: 0.9rem;
3434
}
3535

36+
/* Scale down the logo in the top navbar */
37+
.bd-header .navbar-brand img.logo__image {
38+
height: 40px;
39+
width: auto;
40+
margin-right: 0.25rem;
41+
vertical-align: middle;
42+
}
43+
3644
/* --- remove the right (secondary) sidebar entirely --- */
3745
.bd-sidebar-secondary { display: none !important; }
3846

docs/source/_templates/docs-sidebar.html

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,5 @@
2121
<div class="bd-toc-item active">
2222
{{ toctree(maxdepth=4, collapse=True, includehidden=True, titles_only=True) }}
2323
</div>
24-
25-
<a class="navbar-brand" href="{{ pathto(master_doc) }}">
26-
<img src="{{ pathto('_static/images/DataFusionComet-Logo-Light.png', 1) }}" class="logo" alt="logo">
27-
</a>
2824
</nav>
2925

docs/source/conf.py

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -85,11 +85,18 @@
8585
#
8686
html_theme = 'pydata_sphinx_theme'
8787

88+
html_logo = "_static/images/DataFusionComet-Logo-Light.png"
89+
8890
html_theme_options = {
91+
"logo": {
92+
"image_light": "_static/images/DataFusionComet-Logo-Light.png",
93+
"image_dark": "_static/images/DataFusionComet-Logo-Dark.png",
94+
},
95+
8996
"use_edit_page_button": False,
9097
"secondary_sidebar_items": [],
9198
"collapse_navigation": True,
92-
"navbar_start": [],
99+
"navbar_start": ["navbar-logo"],
93100
"navbar_center": ["navbar-nav"],
94101
"navbar_end": ["navbar-icon-links", "theme-switcher"],
95102
"icon_links": [
@@ -115,8 +122,6 @@
115122
# so a file named "default.css" will overwrite the builtin "default.css".
116123
html_static_path = ['_static']
117124

118-
html_logo = "_static/images/DataFusionComet-Logo-Light.png"
119-
120125
html_css_files = [
121126
"theme_overrides.css"
122127
]

docs/source/index.rst

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,6 @@
1515
.. specific language governing permissions and limitations
1616
.. under the License.
1717
18-
.. image:: _static/images/DataFusionComet-Logo-Light.png
19-
:alt: DataFusion Comet Logo
20-
2118
=======================
2219
Apache DataFusion Comet
2320
=======================

0 commit comments

Comments
 (0)