From 24ee0f6355ae3dd08deca5dc511974e768013732 Mon Sep 17 00:00:00 2001 From: Ed Costello Date: Mon, 25 Mar 2013 17:38:15 -0400 Subject: [PATCH 1/3] Changes driven by accessibility checks --- conf.py | 1 + themes/mongodb/layout.html | 237 ++++++++++++----------- themes/mongodb/static/mongodb-docs.css_t | 20 +- themes/mongodb/theme.conf | 1 + 4 files changed, 133 insertions(+), 126 deletions(-) diff --git a/conf.py b/conf.py index 4d57c7c6e4e..e9a4ada0d88 100644 --- a/conf.py +++ b/conf.py @@ -126,6 +126,7 @@ 'version': version, 'version_selector': meta['version_selector'], 'stable': meta['stable'], + 'language':'en' } html_sidebars = { diff --git a/themes/mongodb/layout.html b/themes/mongodb/layout.html index 0c8f173bf2f..7e2d8c1a750 100644 --- a/themes/mongodb/layout.html +++ b/themes/mongodb/layout.html @@ -9,7 +9,7 @@ {%- set titlesuffix = " — "|safe + docstitle|e + " " + release|e %} {%- else %} {%- set titlesuffix = "" %} -{%- endif %} +{%- endif -%} {%- macro githublink() -%} Edit this Page @@ -20,41 +20,41 @@ {%- endmacro -%} {%- macro sidebar() %} - {%- if render_sidebar %} -
-
- {%- if sidebars != None %} - {%- for sidebartemplate in sidebars %} - {%- include sidebartemplate %} - {%- endfor %} - {%- endif %} -
-
- {%- endif %} -{%- endmacro %} +{%- if render_sidebar %} +
+
+{%- if sidebars != None %} +{%- for sidebartemplate in sidebars %} +{%- include sidebartemplate %} +{%- endfor %} +{%- endif %} +
+
+{%- endif %} +{%- endmacro -%} {%- macro script() %} - - {%- for scriptfile in script_files %} - - {%- endfor %} -{%- endmacro %} + +{%- for scriptfile in script_files %} + +{%- endfor %} +{%- endmacro -%} {%- macro css() %} - - - {%- for cssfile in css_files %} - - {%- endfor %} -{%- endmacro %} + + +{%- for cssfile in css_files %} + +{%- endfor %} +{%- endmacro -%} {%- macro render_nextprev() %}
@@ -70,80 +70,110 @@ {%- endif %}
-{% endmacro -%} - +{%- endmacro -%} +{% if theme_language == '' %} - - {%- block htmltitle %} - {{ title|striptags|e }}{{ titlesuffix }} - {%- endblock %} - - - - - - - {%- if pagename == 'index' %} - - {%- else %} - - {%- endif %} +{%- else -%} + +{%- endif %} + +{%- block htmltitle %} +{{ title|striptags|e }}{{ titlesuffix }} +{%- endblock -%} + + + + +{%- if pagename == 'index' %} + +{%- else %} + +{%- endif -%} - {{ metatags }} - {{ css() }} +{{ metatags }} +{{ css() }} - {%- if not embedded %} - {{ script() }} +{%- if not embedded %} +{{ script() }} - {%- block googlecse_opensearch %} - - {%- endblock -%} +{%- block googlecse_opensearch %} + +{%- endblock -%} - {%- if favicon %} - - {%- endif %} - {%- endif %} +{%- if favicon %} + +{%- endif %} +{%- endif %} {%- block linktags %} {%- include "linktags.html" %} -{%- endblock %} +{%- endblock -%} -{%- block extrahead %}{% endblock %} +{%- block extrahead %}{% endblock -%} {%- block sitesearch %} +{%- endblock -%} + + +{%- block header %} +
+
+ +
+
+{%- endblock -%} + +{%- block content %} +{%- block sidebar1 %} {# possible location for sidebar #} {% endblock %} +
+{%- block document %} +
+{%- if render_sidebar %} +
+{%- endif %} +
+
+{% block body %} {% endblock %} +{{- render_nextprev() -}} +
+{%- if render_sidebar %} +
+{%- endif %} +
{%- endblock %} - - -{%- block header %} +{%- block sidebar2 %}{{ sidebar() }}{% endblock %} +
+
+{%- endblock %} +{%- block commnav -%}
- + -
-
- -
- +
+{%- endblock -%} +{%- block searchbox %}
+{%- endblock %} +{%- block subnav %} {%- if theme_project != 'about' %}
    @@ -153,42 +183,13 @@
{%- endif %} -
-{%- endblock %} - -{%- block content %} - {%- block sidebar1 %} {# possible location for sidebar #} {% endblock %} -
- {%- block document %} -
- {%- if render_sidebar %} -
- {%- endif %} -
-
- {% block body %} {% endblock %} - {{- render_nextprev() -}} -
- {%- if render_sidebar %} -
- {%- endif %} -
- {%- endblock %} - - {%- block sidebar2 %}{{ sidebar() }}{% endblock %} -
-
-{%- endblock %} - +{%- endblock -%} {%- block footer %} - + {%- endblock %} - {%- block analytics %} {%- include "analytics.html" %} {%- endblock %} diff --git a/themes/mongodb/static/mongodb-docs.css_t b/themes/mongodb/static/mongodb-docs.css_t index c504e97c385..cd43b576e0f 100644 --- a/themes/mongodb/static/mongodb-docs.css_t +++ b/themes/mongodb/static/mongodb-docs.css_t @@ -109,7 +109,7 @@ div.sphinxsidebar h3 { padding: 0px 0 0 10px; } -div.sphinxsidebar h3 a { color: #444; } +div.sphinxsidebar h3 a { color: black; } div.sphinxsidebar p { color: #333333; @@ -138,7 +138,7 @@ div.sphinxsidebar ul { color: #000; } -div.sphinxsidebar a { color: #444; } +div.sphinxsidebar a { color: black; } div.sphinxsidebar input { border: 1px solid #ccc; @@ -380,32 +380,32 @@ div#mongodb ul.simple { div.sphinxsidebar li.toctree-l1 a.reference { font-size: 1.2em; - color: #444; + color: black; line-height: 1.5em; } div.sphinxsidebar ul.current li.toctree-l1 a { font-size: 1.2em; - color: #444; + color: black; line-height: 1.5em; } div.sphinxsidebar ul.current li.toctree-l2 a { font-size: 1.1em; - color: #646464; + color: black; line-height: 1.5em; } div.sphinxsidebar ul.current li.toctree-l3 a { font-size: 1.0em; - color: #848484; + color: black; line-height: 1.5em; } div.sphinxsidebar ul.current li.toctree-l4 a { font-size: .95em; - color: #7b7b7b; + color: black; line-height: 1.5em; } div.sphinxsidebar ul.current li.toctree-l5 a { font-size: .9em; - color: #a3a3a3; + color: black; line-height: 1.5em; } div.related li.right { @@ -835,3 +835,7 @@ div.admonition-example pre { background-color: #FBFBFB; } li p.first { margin-bottom: 0em; } h4#vnd {padding:0;margin:0;line-height:1.5;padding-left:10px;} + +ul.current li.toctree-l1 a:active {text-decoration:underline;} +ul.current li.toctree-l1 a:hover {font-weight:900;} +ul.current li.toctree-l1 a:focus {text-decoration:none;font-weight:900;} diff --git a/themes/mongodb/theme.conf b/themes/mongodb/theme.conf index b265a82d156..9f8cf31bf81 100644 --- a/themes/mongodb/theme.conf +++ b/themes/mongodb/theme.conf @@ -17,3 +17,4 @@ version = VERSION version_selector = VERSION_SELECTOR latest = LATEST stable = STABLE +language = LANGUAGE From 5673dab63cd2f1be4e59959bd10bd7d343493055 Mon Sep 17 00:00:00 2001 From: Ed Costello Date: Mon, 25 Mar 2013 17:38:34 -0400 Subject: [PATCH 2/3] Optional changes driven by accessibility checks --- conf.py | 2 ++ themes/mongodb/pagenav.html | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/conf.py b/conf.py index e9a4ada0d88..50e113aa8c6 100644 --- a/conf.py +++ b/conf.py @@ -71,6 +71,8 @@ 'djangotoolbox' : ('http://djangotoolbox.readthedocs.org/en/latest/', '../../../build/djangotoolbox.inv'), } +language = 'en' + languages = [ ("ar", "Arabic"), ("cn", "Chinese"), diff --git a/themes/mongodb/pagenav.html b/themes/mongodb/pagenav.html index ad4c9be242f..4c65e3c30cc 100644 --- a/themes/mongodb/pagenav.html +++ b/themes/mongodb/pagenav.html @@ -7,4 +7,4 @@

{{ shorttitle }} {# the following span is replaced by the javascript in versionnav.html #}

Version: {{version}}

{% endif %} -{{ toctree(maxdepth=-1) }} +{{ toctree(maxdepth=-1,titles_only=1) }} From d697ccd775060a9dbe0e6b409978c4d90ad4be53 Mon Sep 17 00:00:00 2001 From: Ed Costello Date: Mon, 25 Mar 2013 17:59:24 -0400 Subject: [PATCH 3/3] Optional markup change to add source metadata --- themes/mongodb/layout.html | 1 + 1 file changed, 1 insertion(+) diff --git a/themes/mongodb/layout.html b/themes/mongodb/layout.html index 7e2d8c1a750..024ef38d971 100644 --- a/themes/mongodb/layout.html +++ b/themes/mongodb/layout.html @@ -84,6 +84,7 @@ + {%- if pagename == 'index' %} {%- else %}