From f9ef21bffddeb8ee18a2fb2aa8dfff18caf57034 Mon Sep 17 00:00:00 2001 From: Simon Hausmann Date: Fri, 25 Jun 2021 10:28:38 +0200 Subject: [PATCH] Add a logo to the C++ docs This requires working around a bug in sphinx and the rtd theme, hence the git pinning. --- api/sixtyfps-cpp/docs/Pipfile | 5 +++-- api/sixtyfps-cpp/docs/_static/theme_tweak.css | 4 ++++ api/sixtyfps-cpp/docs/conf.py | 2 ++ 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/api/sixtyfps-cpp/docs/Pipfile b/api/sixtyfps-cpp/docs/Pipfile index c5c79179f..91c807533 100644 --- a/api/sixtyfps-cpp/docs/Pipfile +++ b/api/sixtyfps-cpp/docs/Pipfile @@ -6,9 +6,10 @@ verify_ssl = true [dev-packages] [packages] -sphinx = "*" breathe = "*" -sphinx-rtd-theme = "*" +# Upstream sphinx and sphinx-rtd-theme have a bug in not supporting html_logo urls, pull in prospective fix +sphinx-rtd-theme = {editable = true, ref = "logo-url-fix", git = "https://github.com/tronical/sphinx_rtd_theme.git"} +sphinx = {editable = true, ref = "logo-url-fix", git = "https://github.com/tronical/sphinx.git"} exhale = "*" recommonmark = "*" sphinx-markdown-tables = "*" diff --git a/api/sixtyfps-cpp/docs/_static/theme_tweak.css b/api/sixtyfps-cpp/docs/_static/theme_tweak.css index 0e494d571..f5f498a6a 100644 --- a/api/sixtyfps-cpp/docs/_static/theme_tweak.css +++ b/api/sixtyfps-cpp/docs/_static/theme_tweak.css @@ -6,4 +6,8 @@ margin-bottom: 24px; max-width: 100%; overflow: visible; +} + +img.logo { + max-height: 70px; } \ No newline at end of file diff --git a/api/sixtyfps-cpp/docs/conf.py b/api/sixtyfps-cpp/docs/conf.py index a6edabdd0..b48566a11 100644 --- a/api/sixtyfps-cpp/docs/conf.py +++ b/api/sixtyfps-cpp/docs/conf.py @@ -76,5 +76,7 @@ html_static_path = ['_static'] html_show_sourcelink = False +html_logo = "https://sixtyfps.io/resources/logo.drawio.svg" + def setup(app): app.add_css_file('theme_tweak.css')