Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Documentation theme updates #3670

Merged
merged 3 commits into from
Jan 6, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
29 changes: 14 additions & 15 deletions docs/_static/theme-unidata.css
Original file line number Diff line number Diff line change
@@ -1,6 +1,17 @@
/* Define "Unidata Blue" RGB values */
html {
--unidata-blue-rgb: 6, 119, 143;
--unidata-blue-rgb: rgb(6, 119, 143);
--unidata-teal-rgb: rgb(69, 166, 169);
}

html[data-theme="light"] {
--pst-color-primary: var(--unidata-blue-rgb);
--pst-color-secondary: var(--unidata-teal-rgb);
}

html[data-theme="dark"] {
--pst-color-primary: var(--unidata-blue-rgb);
--pst-color-secondary: var(--unidata-teal-rgb);
}

/* Header and heading font style */
Expand All @@ -10,32 +21,20 @@ html {

/* Header colors */
.bd-header {
background: rgb(var(--unidata-blue-rgb)) !important;
background: var(--unidata-blue-rgb) !important;
}

.theme-switch-button {
border-color: rgb(var(--unidata-blue-rgb)) !important;
}

.bd-header .navbar-nav>.nav-item>.nav-link,
.bd-header .navbar-nav>.nav-item>.nav-link,
.bd-header .dropdown-toggle,
.bd-header .pst-navbar-icon,
.bd-header .btn {
color: #fff !important;
}

.version-switcher__button {
border-color: #fff !important;
}

.search-button {
padding: 0 0 0;
}

.navbar-nav .dropdown-menu {
background-color: var(--pst-color-background);
}

/* Increase contrast of links in code snippets */
div[class^="highlight"] a {
background-color: rgb(var(--unidata-blue-rgb), 0.2);
Expand Down
2 changes: 1 addition & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,7 @@
'github_user': 'Unidata',
'github_repo': 'MetPy',
'github_version': 'main', # Make changes to the main branch
'default_mode': 'light',
'default_mode': 'auto',
}

# Add any paths that contain custom themes here, relative to this directory.
Expand Down
8 changes: 7 additions & 1 deletion docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,13 @@ Our up-to-date references for grants and funding can be found
`here <https://github.com/Unidata/MetPy/blob/main/CITATION.cff>`_.

.. image:: _static/NSF-Unidata_lockup_horizontal_2024.png
:class: no-scaled-link
:class: no-scaled-link only-light
:align: center
:height: 100px
:alt: NSF Unidata logo

.. image:: _static/NSF-Unidata_lockup_horizontal_2024_darkmode_v3.png
:class: no-scaled-link only-dark
:align: center
:height: 100px
:alt: NSF Unidata logo
Loading