Skip to content

Commit

Permalink
Merge pull request #3670 from dopplershift/theme-updates
Browse files Browse the repository at this point in the history
Documentation theme updates
  • Loading branch information
dcamron authored Jan 6, 2025
2 parents 5a4ee1c + 0f83ec0 commit 82e91cb
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 17 deletions.
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

0 comments on commit 82e91cb

Please sign in to comment.