From 1fd9c0e68639645d3bf1bb0e5d04847ebe1180da Mon Sep 17 00:00:00 2001 From: "Travis F. Collins" Date: Mon, 8 Jan 2024 17:42:35 -0700 Subject: [PATCH 1/3] Update doc to allow pdf generation with weasyprint Signed-off-by: Travis F. Collins --- doc/source/conf.py | 8 ++++++-- doc/source/index.rst | 4 ++-- requirements_doc.txt | 2 +- 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/doc/source/conf.py b/doc/source/conf.py index 7534c80ce..534ea3cc8 100644 --- a/doc/source/conf.py +++ b/doc/source/conf.py @@ -16,8 +16,6 @@ import sys from typing import List -import sphinx_rtd_theme - sys.path.insert(0, os.path.abspath("../..")) sys.setrecursionlimit(1500) @@ -84,6 +82,12 @@ coverage_ignore_classes = ["phy"] coverage_ignore_modules = ["test.dma_tests", "test.generics"] +# -- Options for PDF output -------------------------------------------------- +if os.path.exists(os.path.join("_themes", "pdf_theme")): + extensions.append("sphinx_simplepdf") + html_theme_path = ["_themes"] + simplepdf_theme = "pdf_theme" + # -- Options for HTML output ------------------------------------------------- # The theme to use for HTML and HTML Help pages. See the documentation for diff --git a/doc/source/index.rst b/doc/source/index.rst index 03c09f84e..9ecfb9988 100644 --- a/doc/source/index.rst +++ b/doc/source/index.rst @@ -79,12 +79,12 @@ Sections attr/index guides/examples guides/connectivity - devices/index buffers/index fpga/index - dev/index libiio support + dev/index + devices/index Indices and tables ================== diff --git a/requirements_doc.txt b/requirements_doc.txt index 166a706e6..621f8f600 100644 --- a/requirements_doc.txt +++ b/requirements_doc.txt @@ -1,7 +1,7 @@ sphinx>=2.0 -sphinx-rtd-theme myst-parser furo sphinx-favicon sphinxcontrib-mermaid +sphinx-simplepdf pillow From c4da91b5a431b9b4a3f7c005170eb135106c17c1 Mon Sep 17 00:00:00 2001 From: "Travis F. Collins" Date: Tue, 9 Jan 2024 17:18:37 -0700 Subject: [PATCH 2/3] Add animation for page transition in doc Signed-off-by: Travis F. Collins --- doc/source/_static/css/style.css | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/doc/source/_static/css/style.css b/doc/source/_static/css/style.css index 31a1af2a9..261ef348d 100644 --- a/doc/source/_static/css/style.css +++ b/doc/source/_static/css/style.css @@ -93,3 +93,18 @@ body>div>aside>div>div>div.sidebar-scroll>div>ul { element.style { display: none; } + +/* Animate page entries */ +.article-container > article:nth-child(3) { + animation-duration: 0.2s; + animation-delay: 0s; + animation-name: fadeInBottom; +} + +@keyframes fadeInBottom { + from { + opacity: 0; + transform: translateY(1%); + } + to { opacity: 1 } +} \ No newline at end of file From fb1bd402fdfd2e62ae353707b019b492b52d9078 Mon Sep 17 00:00:00 2001 From: "Travis F. Collins" Date: Tue, 9 Jan 2024 17:24:45 -0700 Subject: [PATCH 3/3] Remove sphinx_rtd requirement Signed-off-by: Travis F. Collins --- doc/source/_static/css/style.css | 2 +- doc/source/conf.py | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/doc/source/_static/css/style.css b/doc/source/_static/css/style.css index 261ef348d..701f9f57c 100644 --- a/doc/source/_static/css/style.css +++ b/doc/source/_static/css/style.css @@ -107,4 +107,4 @@ element.style { transform: translateY(1%); } to { opacity: 1 } -} \ No newline at end of file +} diff --git a/doc/source/conf.py b/doc/source/conf.py index 534ea3cc8..f9418a4c1 100644 --- a/doc/source/conf.py +++ b/doc/source/conf.py @@ -63,7 +63,6 @@ "sphinx.ext.autodoc", "sphinx.ext.coverage", "sphinx.ext.githubpages", - "sphinx_rtd_theme", "myst_parser", "sphinx_favicon", "sphinxcontrib.mermaid",