moodle-docs-theme 0.3.0__tar.gz → 0.5.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (49) hide show
  1. {moodle_docs_theme-0.3.0/moodle_docs_theme.egg-info → moodle_docs_theme-0.5.0}/PKG-INFO +5 -5
  2. {moodle_docs_theme-0.3.0 → moodle_docs_theme-0.5.0}/README.md +1 -1
  3. {moodle_docs_theme-0.3.0 → moodle_docs_theme-0.5.0}/moodle_docs_theme/__init__.py +1 -1
  4. {moodle_docs_theme-0.3.0 → moodle_docs_theme-0.5.0}/moodle_docs_theme/layout.html +9 -4
  5. {moodle_docs_theme-0.3.0 → moodle_docs_theme-0.5.0}/moodle_docs_theme/static/css/base.css +20 -1
  6. moodle_docs_theme-0.5.0/moodle_docs_theme/template/__pycache__/__init__.cpython-314.pyc +0 -0
  7. {moodle_docs_theme-0.3.0 → moodle_docs_theme-0.5.0}/moodle_docs_theme/theme.conf +1 -0
  8. {moodle_docs_theme-0.3.0 → moodle_docs_theme-0.5.0}/moodle_docs_theme/theme.toml +1 -0
  9. {moodle_docs_theme-0.3.0 → moodle_docs_theme-0.5.0/moodle_docs_theme.egg-info}/PKG-INFO +5 -5
  10. {moodle_docs_theme-0.3.0 → moodle_docs_theme-0.5.0}/moodle_docs_theme.egg-info/SOURCES.txt +2 -1
  11. {moodle_docs_theme-0.3.0 → moodle_docs_theme-0.5.0}/pyproject.toml +4 -4
  12. {moodle_docs_theme-0.3.0 → moodle_docs_theme-0.5.0}/setup.py +4 -4
  13. {moodle_docs_theme-0.3.0 → moodle_docs_theme-0.5.0}/tests/test_cli.py +0 -1
  14. moodle_docs_theme-0.5.0/tests/test_header_logo.py +74 -0
  15. moodle_docs_theme-0.3.0/moodle_docs_theme/template/__pycache__/__init__.cpython-312.pyc +0 -0
  16. {moodle_docs_theme-0.3.0 → moodle_docs_theme-0.5.0}/LICENSE +0 -0
  17. {moodle_docs_theme-0.3.0 → moodle_docs_theme-0.5.0}/MANIFEST.in +0 -0
  18. {moodle_docs_theme-0.3.0 → moodle_docs_theme-0.5.0}/moodle_docs_theme/__main__.py +0 -0
  19. {moodle_docs_theme-0.3.0 → moodle_docs_theme-0.5.0}/moodle_docs_theme/breadcrumbs.html +0 -0
  20. {moodle_docs_theme-0.3.0 → moodle_docs_theme-0.5.0}/moodle_docs_theme/cli.py +0 -0
  21. {moodle_docs_theme-0.3.0 → moodle_docs_theme-0.5.0}/moodle_docs_theme/page.html +0 -0
  22. {moodle_docs_theme-0.3.0 → moodle_docs_theme-0.5.0}/moodle_docs_theme/searchbox.html +0 -0
  23. {moodle_docs_theme-0.3.0 → moodle_docs_theme-0.5.0}/moodle_docs_theme/static/css/colors.css +0 -0
  24. {moodle_docs_theme-0.3.0 → moodle_docs_theme-0.5.0}/moodle_docs_theme/static/js/theme.js +0 -0
  25. {moodle_docs_theme-0.3.0 → moodle_docs_theme-0.5.0}/moodle_docs_theme/template/__init__.py +0 -0
  26. {moodle_docs_theme-0.3.0 → moodle_docs_theme-0.5.0}/moodle_docs_theme/template/docs/conf.py.tpl +0 -0
  27. {moodle_docs_theme-0.3.0 → moodle_docs_theme-0.5.0}/moodle_docs_theme/template/docs/configuration.md.tpl +0 -0
  28. {moodle_docs_theme-0.3.0 → moodle_docs_theme-0.5.0}/moodle_docs_theme/template/docs/en/conf.py.tpl +0 -0
  29. {moodle_docs_theme-0.3.0 → moodle_docs_theme-0.5.0}/moodle_docs_theme/template/docs/en/configuration.rst.tpl +0 -0
  30. {moodle_docs_theme-0.3.0 → moodle_docs_theme-0.5.0}/moodle_docs_theme/template/docs/en/index.rst.tpl +0 -0
  31. {moodle_docs_theme-0.3.0 → moodle_docs_theme-0.5.0}/moodle_docs_theme/template/docs/en/installation.rst.tpl +0 -0
  32. {moodle_docs_theme-0.3.0 → moodle_docs_theme-0.5.0}/moodle_docs_theme/template/docs/en/usage.rst.tpl +0 -0
  33. {moodle_docs_theme-0.3.0 → moodle_docs_theme-0.5.0}/moodle_docs_theme/template/docs/index.html +0 -0
  34. {moodle_docs_theme-0.3.0 → moodle_docs_theme-0.5.0}/moodle_docs_theme/template/docs/index.md.tpl +0 -0
  35. {moodle_docs_theme-0.3.0 → moodle_docs_theme-0.5.0}/moodle_docs_theme/template/docs/installation.md.tpl +0 -0
  36. {moodle_docs_theme-0.3.0 → moodle_docs_theme-0.5.0}/moodle_docs_theme/template/docs/pt-br/conf.py.tpl +0 -0
  37. {moodle_docs_theme-0.3.0 → moodle_docs_theme-0.5.0}/moodle_docs_theme/template/docs/pt-br/configuration.rst.tpl +0 -0
  38. {moodle_docs_theme-0.3.0 → moodle_docs_theme-0.5.0}/moodle_docs_theme/template/docs/pt-br/index.rst.tpl +0 -0
  39. {moodle_docs_theme-0.3.0 → moodle_docs_theme-0.5.0}/moodle_docs_theme/template/docs/pt-br/installation.rst.tpl +0 -0
  40. {moodle_docs_theme-0.3.0 → moodle_docs_theme-0.5.0}/moodle_docs_theme/template/docs/pt-br/usage.rst.tpl +0 -0
  41. {moodle_docs_theme-0.3.0 → moodle_docs_theme-0.5.0}/moodle_docs_theme/template/docs/requirements.txt +0 -0
  42. {moodle_docs_theme-0.3.0 → moodle_docs_theme-0.5.0}/moodle_docs_theme/template/docs/usage.md.tpl +0 -0
  43. {moodle_docs_theme-0.3.0 → moodle_docs_theme-0.5.0}/moodle_docs_theme/template/workflows/docs.yml +0 -0
  44. {moodle_docs_theme-0.3.0 → moodle_docs_theme-0.5.0}/moodle_docs_theme.egg-info/dependency_links.txt +0 -0
  45. {moodle_docs_theme-0.3.0 → moodle_docs_theme-0.5.0}/moodle_docs_theme.egg-info/entry_points.txt +0 -0
  46. {moodle_docs_theme-0.3.0 → moodle_docs_theme-0.5.0}/moodle_docs_theme.egg-info/requires.txt +0 -0
  47. {moodle_docs_theme-0.3.0 → moodle_docs_theme-0.5.0}/moodle_docs_theme.egg-info/top_level.txt +0 -0
  48. {moodle_docs_theme-0.3.0 → moodle_docs_theme-0.5.0}/setup.cfg +0 -0
  49. {moodle_docs_theme-0.3.0 → moodle_docs_theme-0.5.0}/tests/test_theme.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: moodle-docs-theme
3
- Version: 0.3.0
3
+ Version: 0.5.0
4
4
  Summary: Um tema Sphinx reutilizável inspirado visualmente na documentação oficial do Moodle (docs.moodle.org)
5
5
  Home-page: https://github.com/moodle-by-kelsoncm/moodle-docs-theme
6
6
  Author: KelsonCM
@@ -13,15 +13,15 @@ Classifier: Environment :: Web Environment
13
13
  Classifier: Intended Audience :: Developers
14
14
  Classifier: Operating System :: OS Independent
15
15
  Classifier: Programming Language :: Python :: 3
16
- Classifier: Programming Language :: Python :: 3.8
17
- Classifier: Programming Language :: Python :: 3.9
18
16
  Classifier: Programming Language :: Python :: 3.10
19
17
  Classifier: Programming Language :: Python :: 3.11
20
18
  Classifier: Programming Language :: Python :: 3.12
19
+ Classifier: Programming Language :: Python :: 3.13
20
+ Classifier: Programming Language :: Python :: 3.14
21
21
  Classifier: Topic :: Documentation
22
22
  Classifier: Topic :: Documentation :: Sphinx
23
23
  Classifier: Topic :: Software Development :: Documentation
24
- Requires-Python: >=3.8
24
+ Requires-Python: >=3.10
25
25
  Description-Content-Type: text/markdown
26
26
  License-File: LICENSE
27
27
  Requires-Dist: sphinx>=4.0
@@ -44,7 +44,7 @@ mantidos por organizações no GitHub. Mantém a mesma identidade visual — cab
44
44
  com faixa de destaque laranja, títulos em roxo, links em azul — em toda a documentação
45
45
  da sua organização.
46
46
 
47
- ![Python](https://img.shields.io/badge/python-3.8%2B-blue)
47
+ ![Python](https://img.shields.io/badge/python-3.10%2B-blue)
48
48
  ![Sphinx](https://img.shields.io/badge/sphinx-4.0%2B-green)
49
49
  ![CI & Docs](https://github.com/moodle-by-kelsoncm/moodle-docs-theme/actions/workflows/publish-pypi.yml/badge.svg)
50
50
  ![License](https://img.shields.io/badge/license-BSD--3--Clause-blue)
@@ -8,7 +8,7 @@ mantidos por organizações no GitHub. Mantém a mesma identidade visual — cab
8
8
  com faixa de destaque laranja, títulos em roxo, links em azul — em toda a documentação
9
9
  da sua organização.
10
10
 
11
- ![Python](https://img.shields.io/badge/python-3.8%2B-blue)
11
+ ![Python](https://img.shields.io/badge/python-3.10%2B-blue)
12
12
  ![Sphinx](https://img.shields.io/badge/sphinx-4.0%2B-green)
13
13
  ![CI & Docs](https://github.com/moodle-by-kelsoncm/moodle-docs-theme/actions/workflows/publish-pypi.yml/badge.svg)
14
14
  ![License](https://img.shields.io/badge/license-BSD--3--Clause-blue)
@@ -5,7 +5,7 @@ moodle_docs_theme - A reusable Sphinx HTML theme inspired by docs.moodle.org (Mo
5
5
  import os
6
6
  from typing import Dict, Any
7
7
 
8
- __version__ = "0.3.0"
8
+ __version__ = "0.5.0"
9
9
 
10
10
 
11
11
  def get_html_theme_path() -> str:
@@ -59,15 +59,20 @@
59
59
  <div class="moodle-brand-group">
60
60
  <a href="{{ pathto(master_doc) }}" class="moodle-brand">
61
61
  {% if theme_logo %}
62
- <img src="{{ pathto('_static/' ~ theme_logo, 1) }}" alt="{{ project }}" class="moodle-brand-logo" style="{% if theme_logo_height %}height: {{ theme_logo_height }};{% endif %}" />
62
+ <img src="{{ pathto('_static/' ~ theme_logo, 1) }}" alt="" class="moodle-brand-logo" style="{% if theme_logo_height %}height: {{ theme_logo_height }};{% endif %}" />
63
63
  {% elif logo_url %}
64
- <img src="{{ logo_url }}" alt="{{ project }}" class="moodle-brand-logo" />
64
+ <img src="{{ logo_url }}" alt="" class="moodle-brand-logo" style="{% if theme_logo_height %}height: {{ theme_logo_height }};{% endif %}" />
65
65
  {% elif logo %}
66
- <img src="{{ pathto('_static/' ~ logo, 1) }}" alt="{{ project }}" class="moodle-brand-logo" />
67
- {% else %}
66
+ <img src="{{ pathto('_static/' ~ logo, 1) }}" alt="" class="moodle-brand-logo" style="{% if theme_logo_height %}height: {{ theme_logo_height }};{% endif %}" />
67
+ {% endif %}
68
+ {% set _has_logo = theme_logo or logo_url or logo %}
69
+ {% set _logo_only = theme_logo_only and theme_logo_only|string|lower not in ('false', '0', 'no', '') %}
70
+ {% if not (_has_logo and _logo_only) %}
68
71
  <span class="moodle-brand-title">
69
72
  {% if theme_project_name %}{{ theme_project_name }}{% else %}{{ project }}{% endif %}
70
73
  </span>
74
+ {% elif _has_logo %}
75
+ <span class="visually-hidden">{% if theme_project_name %}{{ theme_project_name }}{% else %}{{ project }}{% endif %}</span>
71
76
  {% endif %}
72
77
  </a>
73
78
  <span class="moodle-tagline">
@@ -70,7 +70,7 @@ img {
70
70
 
71
71
  .moodle-brand-group {
72
72
  display: flex;
73
- align-items: baseline;
73
+ align-items: center;
74
74
  gap: 1rem;
75
75
  }
76
76
 
@@ -83,11 +83,17 @@ img {
83
83
  }
84
84
 
85
85
  .moodle-brand-logo {
86
+ display: block;
86
87
  height: 32px;
87
88
  width: auto;
89
+ flex-shrink: 0;
88
90
  object-fit: contain;
89
91
  }
90
92
 
93
+ .moodle-brand-title {
94
+ line-height: 1.2;
95
+ }
96
+
91
97
  .moodle-brand-title {
92
98
  font-size: 1.65rem;
93
99
  font-weight: 700;
@@ -867,3 +873,16 @@ div.highlight pre {
867
873
  font-size: 1.15rem;
868
874
  }
869
875
  }
876
+
877
+ /* Texto só para leitores de tela (nome do projeto quando logo_only = True). */
878
+ .visually-hidden {
879
+ position: absolute !important;
880
+ width: 1px;
881
+ height: 1px;
882
+ padding: 0;
883
+ margin: -1px;
884
+ overflow: hidden;
885
+ clip: rect(0, 0, 0, 0);
886
+ white-space: nowrap;
887
+ border: 0;
888
+ }
@@ -18,6 +18,7 @@ nav_text_color = #355a83
18
18
 
19
19
  logo =
20
20
  logo_height = 32px
21
+ logo_only = False
21
22
  project_name =
22
23
  tagline = Documentação inspirada no MoodleDocs
23
24
  github_url =
@@ -19,6 +19,7 @@ sidebar_bg = "#fafafa"
19
19
  nav_text_color = "#355a83"
20
20
  logo = ""
21
21
  logo_height = "32px"
22
+ logo_only = false
22
23
  project_name = ""
23
24
  tagline = "Documentação inspirada no MoodleDocs"
24
25
  github_url = ""
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: moodle-docs-theme
3
- Version: 0.3.0
3
+ Version: 0.5.0
4
4
  Summary: Um tema Sphinx reutilizável inspirado visualmente na documentação oficial do Moodle (docs.moodle.org)
5
5
  Home-page: https://github.com/moodle-by-kelsoncm/moodle-docs-theme
6
6
  Author: KelsonCM
@@ -13,15 +13,15 @@ Classifier: Environment :: Web Environment
13
13
  Classifier: Intended Audience :: Developers
14
14
  Classifier: Operating System :: OS Independent
15
15
  Classifier: Programming Language :: Python :: 3
16
- Classifier: Programming Language :: Python :: 3.8
17
- Classifier: Programming Language :: Python :: 3.9
18
16
  Classifier: Programming Language :: Python :: 3.10
19
17
  Classifier: Programming Language :: Python :: 3.11
20
18
  Classifier: Programming Language :: Python :: 3.12
19
+ Classifier: Programming Language :: Python :: 3.13
20
+ Classifier: Programming Language :: Python :: 3.14
21
21
  Classifier: Topic :: Documentation
22
22
  Classifier: Topic :: Documentation :: Sphinx
23
23
  Classifier: Topic :: Software Development :: Documentation
24
- Requires-Python: >=3.8
24
+ Requires-Python: >=3.10
25
25
  Description-Content-Type: text/markdown
26
26
  License-File: LICENSE
27
27
  Requires-Dist: sphinx>=4.0
@@ -44,7 +44,7 @@ mantidos por organizações no GitHub. Mantém a mesma identidade visual — cab
44
44
  com faixa de destaque laranja, títulos em roxo, links em azul — em toda a documentação
45
45
  da sua organização.
46
46
 
47
- ![Python](https://img.shields.io/badge/python-3.8%2B-blue)
47
+ ![Python](https://img.shields.io/badge/python-3.10%2B-blue)
48
48
  ![Sphinx](https://img.shields.io/badge/sphinx-4.0%2B-green)
49
49
  ![CI & Docs](https://github.com/moodle-by-kelsoncm/moodle-docs-theme/actions/workflows/publish-pypi.yml/badge.svg)
50
50
  ![License](https://img.shields.io/badge/license-BSD--3--Clause-blue)
@@ -22,7 +22,7 @@ moodle_docs_theme/static/css/base.css
22
22
  moodle_docs_theme/static/css/colors.css
23
23
  moodle_docs_theme/static/js/theme.js
24
24
  moodle_docs_theme/template/__init__.py
25
- moodle_docs_theme/template/__pycache__/__init__.cpython-312.pyc
25
+ moodle_docs_theme/template/__pycache__/__init__.cpython-314.pyc
26
26
  moodle_docs_theme/template/docs/conf.py.tpl
27
27
  moodle_docs_theme/template/docs/configuration.md.tpl
28
28
  moodle_docs_theme/template/docs/index.html
@@ -42,4 +42,5 @@ moodle_docs_theme/template/docs/pt-br/installation.rst.tpl
42
42
  moodle_docs_theme/template/docs/pt-br/usage.rst.tpl
43
43
  moodle_docs_theme/template/workflows/docs.yml
44
44
  tests/test_cli.py
45
+ tests/test_header_logo.py
45
46
  tests/test_theme.py
@@ -4,14 +4,14 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "moodle-docs-theme"
7
- version = "0.3.0"
7
+ version = "0.5.0"
8
8
  description = "Um tema Sphinx reutilizável inspirado visualmente na documentação oficial do Moodle (docs.moodle.org)"
9
9
  readme = "README.md"
10
10
  authors = [
11
11
  { name = "KelsonCM", email = "kelsoncm@gmail.com" }
12
12
  ]
13
13
  license = "BSD-3-Clause"
14
- requires-python = ">=3.8"
14
+ requires-python = ">=3.10"
15
15
  dependencies = [
16
16
  "sphinx>=4.0",
17
17
  "myst-parser>=2.0"
@@ -22,11 +22,11 @@ classifiers = [
22
22
  "Intended Audience :: Developers",
23
23
  "Operating System :: OS Independent",
24
24
  "Programming Language :: Python :: 3",
25
- "Programming Language :: Python :: 3.8",
26
- "Programming Language :: Python :: 3.9",
27
25
  "Programming Language :: Python :: 3.10",
28
26
  "Programming Language :: Python :: 3.11",
29
27
  "Programming Language :: Python :: 3.12",
28
+ "Programming Language :: Python :: 3.13",
29
+ "Programming Language :: Python :: 3.14",
30
30
  "Topic :: Documentation",
31
31
  "Topic :: Documentation :: Sphinx",
32
32
  "Topic :: Software Development :: Documentation"
@@ -6,7 +6,7 @@ with open("README.md", "r", encoding="utf-8") as fh:
6
6
 
7
7
  setup(
8
8
  name="moodle-docs-theme",
9
- version="0.3.0",
9
+ version="0.5.0",
10
10
  author="KelsonCM",
11
11
  author_email="kelsoncm@gmail.com",
12
12
  description="Um tema Sphinx reutilizável inspirado visualmente na documentação oficial do Moodle (docs.moodle.org)",
@@ -47,14 +47,14 @@ setup(
47
47
  "Intended Audience :: Developers",
48
48
  "Operating System :: OS Independent",
49
49
  "Programming Language :: Python :: 3",
50
- "Programming Language :: Python :: 3.8",
51
- "Programming Language :: Python :: 3.9",
52
50
  "Programming Language :: Python :: 3.10",
53
51
  "Programming Language :: Python :: 3.11",
54
52
  "Programming Language :: Python :: 3.12",
53
+ "Programming Language :: Python :: 3.13",
54
+ "Programming Language :: Python :: 3.14",
55
55
  "Topic :: Documentation",
56
56
  "Topic :: Documentation :: Sphinx",
57
57
  "Topic :: Software Development :: Documentation",
58
58
  ],
59
- python_requires=">=3.8",
59
+ python_requires=">=3.10",
60
60
  )
@@ -27,7 +27,6 @@ class TestMoodleDocsThemeCLI(unittest.TestCase):
27
27
  def test_infer_plugin_info(self):
28
28
  self.assertEqual(_infer_plugin_info("atto_justify"), ("lib/editor/atto/plugins", "justify"))
29
29
  self.assertEqual(_infer_plugin_info("tiny_fontfamily"), ("lib/editor/tiny/plugins", "fontfamily"))
30
- self.assertEqual(_infer_plugin_info("tool_ribbons"), ("admin/tool", "ribbons"))
31
30
  self.assertEqual(_infer_plugin_info("block_recommendation"), ("blocks", "recommendation"))
32
31
  self.assertEqual(_infer_plugin_info("mod_imagemap"), ("mod", "imagemap"))
33
32
  self.assertEqual(_infer_plugin_info("local_tinytoolbar"), ("local", "tinytoolbar"))
@@ -0,0 +1,74 @@
1
+ """
2
+ Testes do cabeçalho: logo e nome do projeto lado a lado (issue #13).
3
+ """
4
+ import os
5
+ import tempfile
6
+ import unittest
7
+
8
+ from sphinx.application import Sphinx
9
+
10
+ import moodle_docs_theme
11
+
12
+ SVG = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 8 8"><rect width="8" height="8"/></svg>'
13
+
14
+
15
+ def build_header(extra_conf: str) -> str:
16
+ """Compila um projeto mínimo e devolve o trecho do cabeçalho do index.html."""
17
+ with tempfile.TemporaryDirectory() as tmp:
18
+ src = os.path.join(tmp, "src")
19
+ os.makedirs(src)
20
+ with open(os.path.join(src, "logo.svg"), "w", encoding="utf-8") as f:
21
+ f.write(SVG)
22
+ with open(os.path.join(src, "index.rst"), "w", encoding="utf-8") as f:
23
+ f.write("Teste\n=====\n")
24
+ with open(os.path.join(src, "conf.py"), "w", encoding="utf-8") as f:
25
+ f.write(
26
+ 'project = "Projeto Teste"\n'
27
+ 'extensions = ["sphinx.ext.githubpages", "moodle_docs_theme"]\n'
28
+ 'html_theme = "moodle_docs_theme"\n'
29
+ f"html_theme_path = [{moodle_docs_theme.get_html_theme_path()!r}]\n"
30
+ + extra_conf
31
+ )
32
+ out = os.path.join(tmp, "out")
33
+ app = Sphinx(src, src, out, os.path.join(tmp, "doctrees"), "html",
34
+ status=None, warning=None, freshenv=True)
35
+ app.build()
36
+ with open(os.path.join(out, "index.html"), encoding="utf-8") as f:
37
+ html = f.read()
38
+ start = html.index('class="moodle-brand"')
39
+ return html[start:html.index("</a>", start)]
40
+
41
+
42
+ class TestHeaderLogo(unittest.TestCase):
43
+
44
+ def test_logo_and_title_side_by_side(self):
45
+ header = build_header('html_logo = "logo.svg"\n')
46
+ self.assertIn('class="moodle-brand-logo"', header)
47
+ self.assertIn('class="moodle-brand-title"', header)
48
+ self.assertIn("Projeto Teste", header)
49
+
50
+ def test_title_without_logo(self):
51
+ header = build_header("")
52
+ self.assertNotIn('class="moodle-brand-logo"', header)
53
+ self.assertIn('class="moodle-brand-title"', header)
54
+
55
+ def test_logo_only_hides_visible_title(self):
56
+ header = build_header('html_logo = "logo.svg"\nhtml_theme_options = {"logo_only": True}\n')
57
+ self.assertIn('class="moodle-brand-logo"', header)
58
+ self.assertNotIn('class="moodle-brand-title"', header)
59
+ self.assertIn('class="visually-hidden"', header)
60
+
61
+
62
+ class TestHeaderCss(unittest.TestCase):
63
+
64
+ def test_brand_group_is_vertically_centered(self):
65
+ css_path = os.path.join(moodle_docs_theme.get_html_theme_path(), "static", "css", "base.css")
66
+ with open(css_path, encoding="utf-8") as f:
67
+ css = f.read()
68
+ block = css[css.index(".moodle-brand-group {"):]
69
+ block = block[:block.index("}")]
70
+ self.assertIn("align-items: center", block)
71
+
72
+
73
+ if __name__ == "__main__":
74
+ unittest.main()