Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
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
Next Next commit
Add custom CSS
  • Loading branch information
C-Achard committed Feb 11, 2026
commit d56d73dd9880d1f09ca0a71aa275fe3b2d5c588a
2 changes: 2 additions & 0 deletions _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ sphinx:
config:
autodoc_mock_imports: ["wx", "matplotlib", "qtpy", "PySide6", "napari", "shiboken6"]
mermaid_output_format: raw
html_static_path: ["docs/_static"]
html_css_files: ["custom.css"]
extra_extensions:
- numpydoc
- sphinxcontrib.mermaid
Expand Down
113 changes: 113 additions & 0 deletions docs/_static/custom.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,113 @@
/* custom.css */

html[data-theme="light"] {
--sidebar-bg-color: #fefefe; /* #d2efff; */
--sidebar-text-color: #000000;
--sidebar-highlight-color: #95489c;
--sidebar-hover-text-color: #de6be8; /* #0044bd; */
--header-bg-color: #ffffff;
--logo-filter: none;
--button-color: #fff;
--footer-text-color: #000000;
}

html[data-theme="dark"] {
--sidebar-bg-color: #455364; /* #053346; */
--sidebar-text-color: #ffffff;
--sidebar-highlight-color: #95489c;
--sidebar-hover-text-color: #de6be8; /* #00aeef; */
--header-bg-color: #414141;
--logo-filter: grayscale(100%) brightness(20);
--button-color: #fff;
--footer-text-color: #b9b9b9;
}

/* Sidebar */
.bd-sidebar-primary.bd-sidebar {
background-color: var(--sidebar-bg-color);
color: var(--sidebar-text-color);
}

.bd-sidebar-primary.bd-sidebar a {
color: var(--sidebar-text-color);
}

.bd-sidebar-primary.bd-sidebar a:hover {
color: var(--sidebar-hover-text-color);
}

/* Sidebar ToC */
.toctree-l1.current.active {
color: var(--sidebar-highlight-color);
}

.toctree-l1.current.active * {
color: inherit;
}

/* Sidebar footer */
.sidebar-primary-items__end::after {
content: "DeepLabCut";
display: block;
text-align: center;
font-size: 12px;
color: var(--footer-text-color);
/* If you want an image at the footer */
/* background-image: url("images/logo_background.png"); */
background-size: contain;
background-repeat: no-repeat;
background-position: center;
padding-top: 150px;
height: 100px;
z-index: 1;
}

/* Logo (top of sidebar) */
.navbar-brand img {
filter: var(--logo-filter);
}

/* Header */
.bd-header-article {
/* position: fixed; */
/* background-color: var(--header-bg-color); */
background-color: rgba(0, 0, 0, 0);
backdrop-filter: blur(2px);
z-index: 1000;
}

/* Header background image */
.bd-header-article::before {
content: "";
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
/* background-image: url("images/header.jpg"); */
/* background-size: cover; */
/* background-repeat: no-repeat; */
/* background-position: center; */
opacity: 0.75;
z-index: -1;
}

/* Header buttons */
.article-header-buttons .btn {
color: var(--button-color);
z-index: 1;
}

.article-header-buttons .btn:hover {
opacity: 0.8;
z-index: 1;
}

.article-header-buttons .btn:hover {
opacity: 0.8;
-index: 1;
}

.article-header-buttons .btn:hover {
opacity: 0.8;
}