doc (fixes #876): Improve dark-mode heading, navigation, and search bars

This commit is contained in:
Yikun Wang
2023-04-02 07:12:48 +00:00
committed by Tom Henderson
parent 9a8a2640a8
commit 747b1bf94e
3 changed files with 25 additions and 8 deletions

View File

@@ -61,7 +61,7 @@ div.footer a {
}
div.related {
background-color: {{ theme_relbarbgcolor }};
background-image: linear-gradient(to bottom, white 0%, transparent 80%);
line-height: 30px;
color: {{ theme_relbartextcolor }};
}
@@ -142,9 +142,16 @@ div.sphinxsidebar a {
}
div.sphinxsidebar input {
border: 1px solid {{ theme_sidebarlinkcolor }};
border: 2px solid {{ theme_sidebarlinkcolor }};
font-family: sans-serif;
font-size: 1em;
font-weight: bold;
background: #f0f1e8;
}
div.sphinxsidebar input[type="submit"] {
background: {{ theme_sidebarlinkcolor }};
color: {{theme_sidebartextcolor}};
}
{% if theme_collapsiblesidebar|tobool %}
@@ -196,12 +203,12 @@ div.body h4,
div.body h5,
div.body h6 {
font-family: {{ theme_headfont }};
background-color: {{ theme_headbgcolor }};
font-weight: normal;
color: {{ theme_headtextcolor }};
background-color: transparent;
font-weight: bold;
border-bottom: 1px solid #ccc;
margin: 20px -20px 10px -20px;
padding: 3px 0 3px 10px;
padding: 10px 8px;
border-left: 6px solid #d7d4d2;
}
div.body h1 { margin-top: 0; font-size: 200%; }
@@ -273,7 +280,7 @@ p.admonition-title:after {
pre {
padding: 5px;
background-color: {{ theme_codebgcolor }};
background-color: transparent;
color: {{ theme_codetextcolor }};
line-height: 120%;
border: 1px solid #ac9;

View File

@@ -24,6 +24,12 @@ dl {
color: ivory;
background:black;
}
div.sphinxsidebar input{
background: #2c2d24;
}
div.related{
background-image: linear-gradient(to bottom, #66696a 0%, transparent 80%);
}
}
a {
@@ -32,6 +38,7 @@ a {
}
/* Sphinx headings */
/*
div.body h1,
div.body h2,
div.body h3,
@@ -40,6 +47,7 @@ div.body h5,
div.body h6 {
background-image: url('nav_f.png');
}
*/
/* Sphinx figure captions */
p.caption {
@@ -56,9 +64,11 @@ p.caption {
}
/* Sphinx nav links bar (relbar) */
/*
div.related {
background-image: url('tab_b.png')
}
*/
div.related h3 {
display: none;

View File

@@ -42,7 +42,7 @@ sidebarbtncolor = #D5D5D5
footerbgcolor = #D5D5D5
footertextcolor = #364D7C
codebgcolor = ##FBFCFD
codebgcolor = #FBFCFD
codetextcolor = black
bodyfont = 'Lucida Grande', Verdana, Geneva, Arial, sans-serif