Skip to content

Commit 5a28c85

Browse files
foskey51tobixdev
authored andcommitted
feat(docs): display compatible logo for dark mode (apache#18197)
## Which issue does this PR close? - Closes apache#18190. ## What changes are included in this PR? This PR adds a new asset (original_dark.svg) which is similar to original.svg with just a change in text color from black to white, to support proper logo display in dark mode. It also updates the relevant files to ensure the correct logo variant is shown depending on the theme (light or dark). <img width="3200" height="1632" alt="Screenshot 2025-10-21 at 16-49-35 Apache DataFusion — Apache DataFusion documentation" src="https://github.com/user-attachments/assets/b44a6e38-f7c6-4787-b35a-2361ed1ec9a8" /> &nbsp <img width="3200" height="1632" alt="Screenshot 2025-10-21 at 16-49-43 Apache DataFusion — Apache DataFusion documentation" src="https://github.com/user-attachments/assets/98953a0a-b2eb-4dc7-8acc-018f78a1730d" />
1 parent 7366ef3 commit 5a28c85

File tree

4 files changed

+52
-3
lines changed

4 files changed

+52
-3
lines changed
Lines changed: 31 additions & 0 deletions
Loading

docs/source/_static/theme_overrides.css

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,18 @@ code {
4040
text-align: center;
4141
}
4242

43+
/* Display appropriate logo for dark and light mode */
44+
.light-logo { display: inline; }
45+
.dark-logo { display: none; }
46+
47+
@media (prefers-color-scheme: dark) {
48+
.light-logo { display: none; }
49+
.dark-logo {
50+
display: inline;
51+
background-color: transparent !important;
52+
}
53+
}
54+
4355
/* Ensure the logo is properly displayed */
4456

4557
.navbar-brand {

docs/source/_templates/docs-sidebar.html

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
<p>
22
<a href="{{ pathto(master_doc) }}">
3-
<img src="{{ pathto('_static/images/2x_bgwhite_original.png', 1) }}" class="logo" alt="logo">
3+
<img src="{{ pathto('_static/images/original.svg', 1) }}" class="logo light-logo" alt="logo">
4+
<img src="{{ pathto('_static/images/original_dark.svg', 1) }}" class="logo dark-logo" alt="logo">
45
</a>
56
</p>
67
<p>

docs/source/index.rst

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,13 @@
1515
.. specific language governing permissions and limitations
1616
.. under the License.
1717
18-
.. image:: _static/images/2x_bgwhite_original.png
19-
:alt: DataFusion Logo
18+
.. image:: _static/images/original.svg
19+
:alt: DataFusion Logo
20+
:class: light-logo
21+
22+
.. image:: _static/images/original_dark.svg
23+
:alt: DataFusion Logo
24+
:class: dark-logo
2025

2126
=================
2227
Apache DataFusion

0 commit comments

Comments
 (0)