From 588276475b9461c6bfc5e0dbed51382b20fa5cd9 Mon Sep 17 00:00:00 2001 From: Stephan Date: Sat, 2 Oct 2021 15:18:29 +0200 Subject: [PATCH] fix: removed dependency on wtf_coop theme --- source/conf.py | 2 +- .../static/css/fonts.css | 60 +++++++ .../static/css/theme.css | 63 +------ .../static/css/wtf_coop.css | 169 ++++++++++++++++++ theme/custom_sphinx_rtd_theme/theme.conf | 2 +- theme/wtf_coop/static/css/wtf_coop.css | 2 +- 6 files changed, 234 insertions(+), 64 deletions(-) create mode 100644 theme/custom_sphinx_rtd_theme/static/css/fonts.css create mode 100644 theme/custom_sphinx_rtd_theme/static/css/wtf_coop.css diff --git a/source/conf.py b/source/conf.py index eab215e..181cf00 100644 --- a/source/conf.py +++ b/source/conf.py @@ -57,7 +57,7 @@ exclude_patterns = [] # The theme to use for HTML and HTML Help pages. See the documentation for # a list of builtin themes. # -html_theme = "wtf_coop" +html_theme = "custom_sphinx_rtd_theme" html_theme_path = ["../theme"] html_logo = "_static/wtf_logo_dark_bg.png" #html_theme = 'alabaster' diff --git a/theme/custom_sphinx_rtd_theme/static/css/fonts.css b/theme/custom_sphinx_rtd_theme/static/css/fonts.css new file mode 100644 index 0000000..20c683e --- /dev/null +++ b/theme/custom_sphinx_rtd_theme/static/css/fonts.css @@ -0,0 +1,60 @@ +/*! + * Font Awesome 4.7.0 by @davegandy - http://fontawesome.io - @fontawesome + * License - http://fontawesome.io/license (Font: SIL OFL 1.1, CSS: MIT License) + */ +@font-face { + font-family: FontAwesome; + src: url(fonts/fontawesome-webfont.eot?674f50d287a8c48dc19ba404d20fe713); + src: url(fonts/fontawesome-webfont.eot?674f50d287a8c48dc19ba404d20fe713?#iefix&v=4.7.0) format("embedded-opentype"), + url(fonts/fontawesome-webfont.woff2?af7ae505a9eed503f8b8e6982036873e) format("woff2"), + url(fonts/fontawesome-webfont.woff?fee66e712a8a08eef5805a46892932ad) format("woff"), + url(fonts/fontawesome-webfont.ttf?b06871f281fee6b241d60582ae9369b9) format("truetype"), + url(fonts/fontawesome-webfont.svg?912ec66d7572ff821749319396470bde#fontawesomeregular) format("svg"); + font-weight: 400; + font-style: normal +} + +@font-face { + font-family: Lato; + src: url(fonts/lato-normal.woff2?bd03a2cc277bbbc338d464e679fe9942) format("woff2"), + url(fonts/lato-normal.woff?27bd77b9162d388cb8d4c4217c7c5e2a) format("woff"); + font-weight: 400; + font-style: normal; + font-display: block +} + +@font-face { + font-family: Lato; + src: url(fonts/lato-bold.woff2?cccb897485813c7c256901dbca54ecf2) format("woff2"), + url(fonts/lato-bold.woff?d878b6c29b10beca227e9eef4246111b) format("woff"); + font-weight: 700; + font-style: normal; + font-display: block +} + +@font-face { + font-family: Lato; + src: url(fonts/lato-bold-italic.woff2?0b6bb6725576b072c5d0b02ecdd1900d) format("woff2"), + url(fonts/lato-bold-italic.woff?9c7e4e9eb485b4a121c760e61bc3707c) format("woff"); + font-weight: 700; + font-style: italic; + font-display: block +} + +@font-face { + font-family: Lato; + src: url(fonts/lato-normal-italic.woff2?4eb103b4d12be57cb1d040ed5e162e9d) format("woff2"), + url(fonts/lato-normal-italic.woff?f28f2d6482446544ef1ea1ccc6dd5892) format("woff"); + font-weight: 400; + font-style: italic; + font-display: block +} + +/* noto-serif-700 - latin */ +@font-face { + font-family: 'Noto Serif Bold'; + src: url('fonts/noto-serif-v9-latin-700.woff2') format('woff2'), /* Super Modern Browsers */ + url('fonts/noto-serif-v9-latin-700.woff') format('woff'); /* Modern Browsers */ + font-style: normal; + font-weight: 700; +} diff --git a/theme/custom_sphinx_rtd_theme/static/css/theme.css b/theme/custom_sphinx_rtd_theme/static/css/theme.css index 53f929d..bfa775c 100644 --- a/theme/custom_sphinx_rtd_theme/static/css/theme.css +++ b/theme/custom_sphinx_rtd_theme/static/css/theme.css @@ -1,3 +1,5 @@ +@import url('fonts.css'); + html { box-sizing: border-box } @@ -419,22 +421,6 @@ textarea { clear: both } -/*! - * Font Awesome 4.7.0 by @davegandy - http://fontawesome.io - @fontawesome - * License - http://fontawesome.io/license (Font: SIL OFL 1.1, CSS: MIT License) - */ -@font-face { - font-family: FontAwesome; - src: url(fonts/fontawesome-webfont.eot?674f50d287a8c48dc19ba404d20fe713); - src: url(fonts/fontawesome-webfont.eot?674f50d287a8c48dc19ba404d20fe713?#iefix&v=4.7.0) format("embedded-opentype"), - url(fonts/fontawesome-webfont.woff2?af7ae505a9eed503f8b8e6982036873e) format("woff2"), - url(fonts/fontawesome-webfont.woff?fee66e712a8a08eef5805a46892932ad) format("woff"), - url(fonts/fontawesome-webfont.ttf?b06871f281fee6b241d60582ae9369b9) format("truetype"), - url(fonts/fontawesome-webfont.svg?912ec66d7572ff821749319396470bde#fontawesomeregular) format("svg"); - font-weight: 400; - font-style: normal -} - .fa, .icon, .rst-content .admonition-title, @@ -7387,48 +7373,3 @@ span[id*=MathJax-Span] { .math { text-align: center } - -@font-face { - font-family: Lato; - src: url(fonts/lato-normal.woff2?bd03a2cc277bbbc338d464e679fe9942) format("woff2"), - url(fonts/lato-normal.woff?27bd77b9162d388cb8d4c4217c7c5e2a) format("woff"); - font-weight: 400; - font-style: normal; - font-display: block -} - -@font-face { - font-family: Lato; - src: url(fonts/lato-bold.woff2?cccb897485813c7c256901dbca54ecf2) format("woff2"), - url(fonts/lato-bold.woff?d878b6c29b10beca227e9eef4246111b) format("woff"); - font-weight: 700; - font-style: normal; - font-display: block -} - -@font-face { - font-family: Lato; - src: url(fonts/lato-bold-italic.woff2?0b6bb6725576b072c5d0b02ecdd1900d) format("woff2"), - url(fonts/lato-bold-italic.woff?9c7e4e9eb485b4a121c760e61bc3707c) format("woff"); - font-weight: 700; - font-style: italic; - font-display: block -} - -@font-face { - font-family: Lato; - src: url(fonts/lato-normal-italic.woff2?4eb103b4d12be57cb1d040ed5e162e9d) format("woff2"), - url(fonts/lato-normal-italic.woff?f28f2d6482446544ef1ea1ccc6dd5892) format("woff"); - font-weight: 400; - font-style: italic; - font-display: block -} - -/* noto-serif-700 - latin */ -@font-face { - font-family: 'Noto Serif Bold'; - src: url('fonts/noto-serif-v9-latin-700.woff2') format('woff2'), /* Super Modern Browsers */ - url('fonts/noto-serif-v9-latin-700.woff') format('woff'); /* Modern Browsers */ - font-style: normal; - font-weight: 700; -} diff --git a/theme/custom_sphinx_rtd_theme/static/css/wtf_coop.css b/theme/custom_sphinx_rtd_theme/static/css/wtf_coop.css new file mode 100644 index 0000000..d16552a --- /dev/null +++ b/theme/custom_sphinx_rtd_theme/static/css/wtf_coop.css @@ -0,0 +1,169 @@ +@import url('theme.css'); + +:root { + /* default text color */ + --wtf-nearly-black: #333; + --wtf-nearly-white: #fff; + /* WTF Farben gemäß https://git.wtf-eg.de/ag_kommunikation/wtf_propaganda/ */ + --wtf-orange: #ef7c21; + --wtf-light-orange: #ffcba9; + --wtf-very-light-blue: #cfe2ff; + --wtf-light-blue: #0790a9; + --wtf-dark-blue: #20386a; + --wtf-night-blue: #00173B; + --wtf-dark-grey: #202020; + --wtf-grey: #666; + --wtf-mid-grey: #acacac; + --wtf-footer-grey: #344b5d; + --wtf-light-grey: #edefeb; + --wtf-lila: #6600ff; + --wtf-rtd-background: #F5F6F3; +} + +/* fonts - start */ +.rst-content .toctree-wrapper>p.caption, +h1, +h2, +h3, +h4, +h5, +h6, +legend { + font-family: 'Noto Serif Bold', ff-tisa-web-pro, Georgia, Arial, sans-serif; +} + +.rst-content .sidebar .sidebar-title { + font-family: 'Noto Serif Bold', ff-tisa-web-pro, Georgia, Arial, sans-serif; +} +/* fonts - end */ + +/* colours - start */ + +.wy-nav-content { + background-color: var(--wtf-light-grey); +} + +.wy-nav-content-wrap{ + background-color: var(--wtf-rtd-background); +} + +.wy-menu-vertical li span.toctree-expand, +.wy-menu-vertical a { + color: var(--wtf-light-grey); +} + +.rst-content .wy-alert-neutral.admonition-todo a, +.rst-content .wy-alert-neutral.admonition a, +.rst-content .wy-alert-neutral.attention a, +.rst-content .wy-alert-neutral.caution a, +.rst-content .wy-alert-neutral.danger a, +.rst-content .wy-alert-neutral.error a, +.rst-content .wy-alert-neutral.hint a, +.rst-content .wy-alert-neutral.important a, +.rst-content .wy-alert-neutral.note a, +.rst-content .wy-alert-neutral.seealso a, +.rst-content .wy-alert-neutral.tip a, +.rst-content .wy-alert-neutral.warning a, +.wy-alert.wy-alert-neutral a { + color: var(--wtf-dark-blue); +} + +.wy-tray-container li.wy-tray-item-info { + background: var(--wtf-dark-blue); +} + +.btn-info { + background-color: var(--wtf-dark-blue); !important +} + +.btn-link { + color: var(--wtf-dark-blue); +} + +.wy-dropdown-menu>dd>a:hover { + background: var(--wtf-dark-blue); +} + +.wy-dropdown.wy-dropdown-bubble .wy-dropdown-menu a:hover { + background: var(--wtf-dark-blue); +} + +.wy-inline-validate.wy-inline-validate-info .wy-input-context { + color: var(--wtf-dark-blue); +} + +a { + color: var(--wtf-dark-blue); +} + +.wy-text-info { + color: var(--wtf-dark-blue); !important +} + +.wy-menu-vertical a:active { + background-color: var(--wtf-dark-blue); +} + +.wy-side-nav-search { + background-color: var(--wtf-dark-blue); +} + +.wy-side-nav-search img { + background-color: var(--wtf-dark-blue); +} + +.wy-nav .wy-menu-vertical header { + color: var(--wtf-dark-blue); +} + +.wy-nav .wy-menu-vertical a:hover { + background-color: var(--wtf-dark-blue); +} + +.wy-nav-top { + background: var(--wtf-dark-blue); +} + +.wy-nav-top img { + background-color: var(--wtf-dark-blue); +} + +a, +.rst-versions a { + color: var(--wtf-orange); +} + +a:hover, +.rst-versions a:hover { + color: var(--wtf-light-blue); +} + +.wy-menu-vertical a:hover { + color: var(--wtf-orange); +} + +a:visited, +.rst-versions a:visited { + color: var(--wtf-light-blue); +} + +.rst-content a code, +.rst-content a tt { + color: var(--wtf-dark-blue); +} + +html.writer-html4 .rst-content dl:not(.docutils)>dt, +html.writer-html5 .rst-content dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.glossary):not(.simple)>dt { + color: var(--wtf-dark-blue); +} + +.wy-menu-vertical header, +.wy-menu-vertical p.caption { + color: var(--wtf-mid-grey); +} + +.wy-nav-side { + background-color: var(--wtf-nearly-black); +} + +/* colours - end */ diff --git a/theme/custom_sphinx_rtd_theme/theme.conf b/theme/custom_sphinx_rtd_theme/theme.conf index 2e07454..9c54dd5 100644 --- a/theme/custom_sphinx_rtd_theme/theme.conf +++ b/theme/custom_sphinx_rtd_theme/theme.conf @@ -1,6 +1,6 @@ [theme] inherit = basic -stylesheet = css/theme.css +stylesheet = css/wtf_coop.css pygments_style = trac [options] diff --git a/theme/wtf_coop/static/css/wtf_coop.css b/theme/wtf_coop/static/css/wtf_coop.css index c23c898..02ddafe 100644 --- a/theme/wtf_coop/static/css/wtf_coop.css +++ b/theme/wtf_coop/static/css/wtf_coop.css @@ -2,7 +2,7 @@ * */ -@import url('css/fonts.css'); +@import url('fonts.css'); @import url('theme.css'); :root {