summaryrefslogtreecommitdiffstats
path: root/tests/roots/test-theming
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-04 11:31:33 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-04 11:31:33 +0000
commite863fd965dd6253243c3342bd6f0adc4fc8aec4d (patch)
treea4c1b6491a82593950043c3f8b2530e80664d768 /tests/roots/test-theming
parentInitial commit. (diff)
downloadsphinx-upstream.tar.xz
sphinx-upstream.zip
Adding upstream version 5.3.0.upstream/5.3.0upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'tests/roots/test-theming')
-rw-r--r--tests/roots/test-theming/MANIFEST.in2
-rw-r--r--tests/roots/test-theming/child.zipbin0 -> 661 bytes
-rw-r--r--tests/roots/test-theming/conf.py3
-rw-r--r--tests/roots/test-theming/index.rst5
-rw-r--r--tests/roots/test-theming/parent.zipbin0 -> 1039 bytes
-rw-r--r--tests/roots/test-theming/setup.py11
-rw-r--r--tests/roots/test-theming/test_theme/__init__.py5
-rw-r--r--tests/roots/test-theming/test_theme/staticfiles/layout.html5
-rw-r--r--tests/roots/test-theming/test_theme/staticfiles/static/staticimg.pngbin0 -> 120 bytes
-rw-r--r--tests/roots/test-theming/test_theme/staticfiles/static/statictmpl.html_t2
-rw-r--r--tests/roots/test-theming/test_theme/staticfiles/theme.conf7
-rw-r--r--tests/roots/test-theming/test_theme/test-theme/theme.conf4
-rw-r--r--tests/roots/test-theming/ziptheme.zipbin0 -> 1039 bytes
13 files changed, 44 insertions, 0 deletions
diff --git a/tests/roots/test-theming/MANIFEST.in b/tests/roots/test-theming/MANIFEST.in
new file mode 100644
index 0000000..0ace41c
--- /dev/null
+++ b/tests/roots/test-theming/MANIFEST.in
@@ -0,0 +1,2 @@
+recursive-include test_theme *.conf
+
diff --git a/tests/roots/test-theming/child.zip b/tests/roots/test-theming/child.zip
new file mode 100644
index 0000000..b4a6a56
--- /dev/null
+++ b/tests/roots/test-theming/child.zip
Binary files differ
diff --git a/tests/roots/test-theming/conf.py b/tests/roots/test-theming/conf.py
new file mode 100644
index 0000000..0db7cf0
--- /dev/null
+++ b/tests/roots/test-theming/conf.py
@@ -0,0 +1,3 @@
+html_theme = 'test-theme'
+html_theme_path = ['.', 'test_theme']
+exclude_patterns = ['_build']
diff --git a/tests/roots/test-theming/index.rst b/tests/roots/test-theming/index.rst
new file mode 100644
index 0000000..214dcd7
--- /dev/null
+++ b/tests/roots/test-theming/index.rst
@@ -0,0 +1,5 @@
+=======
+Theming
+=======
+
+
diff --git a/tests/roots/test-theming/parent.zip b/tests/roots/test-theming/parent.zip
new file mode 100644
index 0000000..8a246ed
--- /dev/null
+++ b/tests/roots/test-theming/parent.zip
Binary files differ
diff --git a/tests/roots/test-theming/setup.py b/tests/roots/test-theming/setup.py
new file mode 100644
index 0000000..7b504e8
--- /dev/null
+++ b/tests/roots/test-theming/setup.py
@@ -0,0 +1,11 @@
+from setuptools import find_packages, setup
+
+setup(
+ name='test-theme',
+ packages=find_packages(),
+ include_package_data=True,
+ entry_points="""
+ [sphinx_themes]
+ path = test_theme:get_path
+ """,
+)
diff --git a/tests/roots/test-theming/test_theme/__init__.py b/tests/roots/test-theming/test_theme/__init__.py
new file mode 100644
index 0000000..13bdc4b
--- /dev/null
+++ b/tests/roots/test-theming/test_theme/__init__.py
@@ -0,0 +1,5 @@
+import os
+
+
+def get_path():
+ return os.path.dirname(os.path.abspath(__file__))
diff --git a/tests/roots/test-theming/test_theme/staticfiles/layout.html b/tests/roots/test-theming/test_theme/staticfiles/layout.html
new file mode 100644
index 0000000..81372be
--- /dev/null
+++ b/tests/roots/test-theming/test_theme/staticfiles/layout.html
@@ -0,0 +1,5 @@
+{% extends "basic/layout.html" %}
+{% block extrahead %}
+<meta name="testopt" content="{{ theme_testopt }}" />
+{{ super() }}
+{% endblock %}
diff --git a/tests/roots/test-theming/test_theme/staticfiles/static/staticimg.png b/tests/roots/test-theming/test_theme/staticfiles/static/staticimg.png
new file mode 100644
index 0000000..fda6cd2
--- /dev/null
+++ b/tests/roots/test-theming/test_theme/staticfiles/static/staticimg.png
Binary files differ
diff --git a/tests/roots/test-theming/test_theme/staticfiles/static/statictmpl.html_t b/tests/roots/test-theming/test_theme/staticfiles/static/statictmpl.html_t
new file mode 100644
index 0000000..4ab292b
--- /dev/null
+++ b/tests/roots/test-theming/test_theme/staticfiles/static/statictmpl.html_t
@@ -0,0 +1,2 @@
+<!-- testing static templates -->
+<html><project>{{ project|e }}</project></html>
diff --git a/tests/roots/test-theming/test_theme/staticfiles/theme.conf b/tests/roots/test-theming/test_theme/staticfiles/theme.conf
new file mode 100644
index 0000000..a877673
--- /dev/null
+++ b/tests/roots/test-theming/test_theme/staticfiles/theme.conf
@@ -0,0 +1,7 @@
+[theme]
+inherit = basic
+stylesheet = default.css
+pygments_style = emacs
+
+[options]
+testopt = optdefault
diff --git a/tests/roots/test-theming/test_theme/test-theme/theme.conf b/tests/roots/test-theming/test_theme/test-theme/theme.conf
new file mode 100644
index 0000000..2ad2c33
--- /dev/null
+++ b/tests/roots/test-theming/test_theme/test-theme/theme.conf
@@ -0,0 +1,4 @@
+[theme]
+inherit = classic
+sidebars = globaltoc.html, searchbox.html
+pygments_dark_style = monokai
diff --git a/tests/roots/test-theming/ziptheme.zip b/tests/roots/test-theming/ziptheme.zip
new file mode 100644
index 0000000..8a246ed
--- /dev/null
+++ b/tests/roots/test-theming/ziptheme.zip
Binary files differ