[Python-checkins] r62416 - in doctools/trunk/sphinx/templates: genindex.html layout.html macros.html modindex.html search.html

georg.brandl python-checkins at python.org
Sun Apr 20 17:07:53 CEST 2008


Author: georg.brandl
Date: Sun Apr 20 17:07:52 2008
New Revision: 62416

Log:
Since docutils output XHTML, make the templates respect that.


Modified:
   doctools/trunk/sphinx/templates/genindex.html
   doctools/trunk/sphinx/templates/layout.html
   doctools/trunk/sphinx/templates/macros.html
   doctools/trunk/sphinx/templates/modindex.html
   doctools/trunk/sphinx/templates/search.html

Modified: doctools/trunk/sphinx/templates/genindex.html
==============================================================================
--- doctools/trunk/sphinx/templates/genindex.html	(original)
+++ doctools/trunk/sphinx/templates/genindex.html	Sun Apr 20 17:07:52 2008
@@ -8,7 +8,7 @@
    <a href="#{{ key }}"><strong>{{ key }}</strong></a> {% if not loop.last %}| {% endif %}
    {%- endfor %}
 
-   <hr>
+   <hr />
 
    {% for key, entries in genindexentries %}
 <h2 id="{{ key }}">{{ key }}</h2>

Modified: doctools/trunk/sphinx/templates/layout.html
==============================================================================
--- doctools/trunk/sphinx/templates/layout.html	(original)
+++ doctools/trunk/sphinx/templates/layout.html	Sun Apr 20 17:07:52 2008
@@ -1,7 +1,7 @@
 {%- include "macros.html" %}
 {%- block doctype -%}
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
-  "http://www.w3.org/TR/html4/loose.dtd">
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
 {%- endblock %}
 {%- macro relbar %}
 {# this macro needs to stay in layout.html due to it containing blocks #}
@@ -32,22 +32,22 @@
       </ul>
     </div>
 {%- endmacro %}
-<html>
+<html xmlns="http://www.w3.org/1999/xhtml">
   <head>
-    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
+    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
     {%- if builder != 'htmlhelp' %}
       {%- set titlesuffix = " &mdash; " + docstitle %}
     {%- endif %}
     <title>{{ title|striptags }}{{ titlesuffix }}</title>
     {%- if builder == 'web' %}
     <link rel="stylesheet" href="{{ pathto('index') }}?do=stylesheet{%
-      if in_admin_panel %}&admin=yes{% endif %}" type="text/css">
+      if in_admin_panel %}&admin=yes{% endif %}" type="text/css" />
     {%- for link, type, title in page_links %}
-    <link rel="alternate" type="{{ type|e(true) }}" title="{{ title|e(true) }}" href="{{ link|e(true) }}">
+    <link rel="alternate" type="{{ type|e(true) }}" title="{{ title|e(true) }}" href="{{ link|e(true) }}" />
     {%- endfor %}
     {%- else %}
-    <link rel="stylesheet" href="{{ pathto('_static/' + style, 1) }}" type="text/css">
-    <link rel="stylesheet" href="{{ pathto('_static/pygments.css', 1) }}" type="text/css">
+    <link rel="stylesheet" href="{{ pathto('_static/' + style, 1) }}" type="text/css" />
+    <link rel="stylesheet" href="{{ pathto('_static/pygments.css', 1) }}" type="text/css" />
     {%- endif %}
     {%- if builder != 'htmlhelp' %}
     <script type="text/javascript">
@@ -62,23 +62,23 @@
     {%- endif %}
 {%- block rellinks %}
     {%- if hasdoc('about') %}
-    <link rel="author" title="About these documents" href="{{ pathto('about') }}">
+    <link rel="author" title="About these documents" href="{{ pathto('about') }}" />
     {%- endif %}
-    <link rel="contents" title="Global table of contents" href="{{ pathto('contents') }}">
-    <link rel="index" title="Global index" href="{{ pathto('genindex') }}">
-    <link rel="search" title="Search" href="{{ pathto('search') }}">
+    <link rel="contents" title="Global table of contents" href="{{ pathto('contents') }}" />
+    <link rel="index" title="Global index" href="{{ pathto('genindex') }}" />
+    <link rel="search" title="Search" href="{{ pathto('search') }}" />
     {%- if hasdoc('copyright') %}
-    <link rel="copyright" title="Copyright" href="{{ pathto('copyright') }}">
+    <link rel="copyright" title="Copyright" href="{{ pathto('copyright') }}" />
     {%- endif %}
-    <link rel="top" title="{{ docstitle }}" href="{{ pathto('index') }}">
+    <link rel="top" title="{{ docstitle }}" href="{{ pathto('index') }}" />
     {%- if parents %}
-    <link rel="up" title="{{ parents[-1].title|striptags }}" href="{{ parents[-1].link|e }}">
+    <link rel="up" title="{{ parents[-1].title|striptags }}" href="{{ parents[-1].link|e }}" />
     {%- endif %}
     {%- if next %}
-    <link rel="next" title="{{ next.title|striptags }}" href="{{ next.link|e }}">
+    <link rel="next" title="{{ next.title|striptags }}" href="{{ next.link|e }}" />
     {%- endif %}
     {%- if prev %}
-    <link rel="prev" title="{{ prev.title|striptags }}" href="{{ prev.link|e }}">
+    <link rel="prev" title="{{ prev.title|striptags }}" href="{{ prev.link|e }}" />
     {%- endif %}
 {%- endblock %}
 {%- block extrahead %}{% endblock %}

Modified: doctools/trunk/sphinx/templates/macros.html
==============================================================================
--- doctools/trunk/sphinx/templates/macros.html	(original)
+++ doctools/trunk/sphinx/templates/macros.html	Sun Apr 20 17:07:52 2008
@@ -32,9 +32,9 @@
           {% if current_page_name != "search" %}
             <h3>{{ builder == 'web' and 'Keyword' or 'Quick' }} search</h3>
             <form class="search" action="{{ pathto('search') }}" method="get">
-              <input type="text" name="q" size="18"> <input type="submit" value="Go">
-              <input type="hidden" name="check_keywords" value="yes">
-              <input type="hidden" name="area" value="default">
+              <input type="text" name="q" size="18"> <input type="submit" value="Go" />
+              <input type="hidden" name="check_keywords" value="yes" />
+              <input type="hidden" name="area" value="default" />
             </form>
             {% if builder == 'web' %}
             <p style="font-size: 90%">Enter a module, class or function name.</p>

Modified: doctools/trunk/sphinx/templates/modindex.html
==============================================================================
--- doctools/trunk/sphinx/templates/modindex.html	(original)
+++ doctools/trunk/sphinx/templates/modindex.html	Sun Apr 20 17:07:52 2008
@@ -33,7 +33,7 @@
    <tr{% if indent %} class="cg-{{ cgroup }}"{% endif %}>
      <td>{% if collapse -%}
        <img src="{{ pathto('_static/minus.png', 1) }}" id="toggle-{{ cgroup }}"
-            class="toggler" style="display: none">
+            class="toggler" style="display: none" />
          {%- endif %}</td>
      <td>{% if indent %}&nbsp;&nbsp;&nbsp;{% endif %}
      {% if fname %}<a href="{{ fname }}">{% endif -%}

Modified: doctools/trunk/sphinx/templates/search.html
==============================================================================
--- doctools/trunk/sphinx/templates/search.html	(original)
+++ doctools/trunk/sphinx/templates/search.html	Sun Apr 20 17:07:52 2008
@@ -12,8 +12,8 @@
     containing less words won't appear in the result list.
   </p>
   <form action="" method="get">
-    <input type="text" name="q" value="">
-    <input type="submit" value="search">
+    <input type="text" name="q" value="" />
+    <input type="submit" value="search" />
   </form>
   {% if search_performed %}
     <h2>Search Results</h2>


More information about the Python-checkins mailing list