Since docutils output XHTML, make the templates respect that.

This commit is contained in:
Georg Brandl
2008-04-20 15:07:52 +00:00
parent d957979dd4
commit 3da2d79710
5 changed files with 24 additions and 24 deletions

View File

@@ -8,7 +8,7 @@
<a href="#{{ key }}"><strong>{{ key }}</strong></a> {% if not loop.last %}| {% endif %} <a href="#{{ key }}"><strong>{{ key }}</strong></a> {% if not loop.last %}| {% endif %}
{%- endfor %} {%- endfor %}
<hr> <hr />
{% for key, entries in genindexentries %} {% for key, entries in genindexentries %}
<h2 id="{{ key }}">{{ key }}</h2> <h2 id="{{ key }}">{{ key }}</h2>

View File

@@ -1,7 +1,7 @@
{%- include "macros.html" %} {%- include "macros.html" %}
{%- block doctype -%} {%- block doctype -%}
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd"> "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
{%- endblock %} {%- endblock %}
{%- macro relbar %} {%- macro relbar %}
{# this macro needs to stay in layout.html due to it containing blocks #} {# this macro needs to stay in layout.html due to it containing blocks #}
@@ -32,22 +32,22 @@
</ul> </ul>
</div> </div>
{%- endmacro %} {%- endmacro %}
<html> <html xmlns="http://www.w3.org/1999/xhtml">
<head> <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' %} {%- if builder != 'htmlhelp' %}
{%- set titlesuffix = " &mdash; " + docstitle %} {%- set titlesuffix = " &mdash; " + docstitle %}
{%- endif %} {%- endif %}
<title>{{ title|striptags }}{{ titlesuffix }}</title> <title>{{ title|striptags }}{{ titlesuffix }}</title>
{%- if builder == 'web' %} {%- if builder == 'web' %}
<link rel="stylesheet" href="{{ pathto('index') }}?do=stylesheet{% <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 %} {%- 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 %} {%- endfor %}
{%- else %} {%- else %}
<link rel="stylesheet" href="{{ pathto('_static/' + style, 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"> <link rel="stylesheet" href="{{ pathto('_static/pygments.css', 1) }}" type="text/css" />
{%- endif %} {%- endif %}
{%- if builder != 'htmlhelp' %} {%- if builder != 'htmlhelp' %}
<script type="text/javascript"> <script type="text/javascript">
@@ -62,23 +62,23 @@
{%- endif %} {%- endif %}
{%- block rellinks %} {%- block rellinks %}
{%- if hasdoc('about') %} {%- if hasdoc('about') %}
<link rel="author" title="About these documents" href="{{ pathto('about') }}"> <link rel="author" title="About these documents" href="{{ pathto('about') }}" />
{%- endif %} {%- endif %}
<link rel="contents" title="Global table of contents" href="{{ pathto('contents') }}"> <link rel="contents" title="Global table of contents" href="{{ pathto('contents') }}" />
<link rel="index" title="Global index" href="{{ pathto('genindex') }}"> <link rel="index" title="Global index" href="{{ pathto('genindex') }}" />
<link rel="search" title="Search" href="{{ pathto('search') }}"> <link rel="search" title="Search" href="{{ pathto('search') }}" />
{%- if hasdoc('copyright') %} {%- if hasdoc('copyright') %}
<link rel="copyright" title="Copyright" href="{{ pathto('copyright') }}"> <link rel="copyright" title="Copyright" href="{{ pathto('copyright') }}" />
{%- endif %} {%- endif %}
<link rel="top" title="{{ docstitle }}" href="{{ pathto('index') }}"> <link rel="top" title="{{ docstitle }}" href="{{ pathto('index') }}" />
{%- if parents %} {%- 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 %} {%- endif %}
{%- if next %} {%- 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 %} {%- endif %}
{%- if prev %} {%- 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 %} {%- endif %}
{%- endblock %} {%- endblock %}
{%- block extrahead %}{% endblock %} {%- block extrahead %}{% endblock %}

View File

@@ -32,9 +32,9 @@
{% if current_page_name != "search" %} {% if current_page_name != "search" %}
<h3>{{ builder == 'web' and 'Keyword' or 'Quick' }} search</h3> <h3>{{ builder == 'web' and 'Keyword' or 'Quick' }} search</h3>
<form class="search" action="{{ pathto('search') }}" method="get"> <form class="search" action="{{ pathto('search') }}" method="get">
<input type="text" name="q" size="18"> <input type="submit" value="Go"> <input type="text" name="q" size="18"> <input type="submit" value="Go" />
<input type="hidden" name="check_keywords" value="yes"> <input type="hidden" name="check_keywords" value="yes" />
<input type="hidden" name="area" value="default"> <input type="hidden" name="area" value="default" />
</form> </form>
{% if builder == 'web' %} {% if builder == 'web' %}
<p style="font-size: 90%">Enter a module, class or function name.</p> <p style="font-size: 90%">Enter a module, class or function name.</p>

View File

@@ -33,7 +33,7 @@
<tr{% if indent %} class="cg-{{ cgroup }}"{% endif %}> <tr{% if indent %} class="cg-{{ cgroup }}"{% endif %}>
<td>{% if collapse -%} <td>{% if collapse -%}
<img src="{{ pathto('_static/minus.png', 1) }}" id="toggle-{{ cgroup }}" <img src="{{ pathto('_static/minus.png', 1) }}" id="toggle-{{ cgroup }}"
class="toggler" style="display: none"> class="toggler" style="display: none" />
{%- endif %}</td> {%- endif %}</td>
<td>{% if indent %}&nbsp;&nbsp;&nbsp;{% endif %} <td>{% if indent %}&nbsp;&nbsp;&nbsp;{% endif %}
{% if fname %}<a href="{{ fname }}">{% endif -%} {% if fname %}<a href="{{ fname }}">{% endif -%}

View File

@@ -12,8 +12,8 @@
containing less words won't appear in the result list. containing less words won't appear in the result list.
</p> </p>
<form action="" method="get"> <form action="" method="get">
<input type="text" name="q" value=""> <input type="text" name="q" value="" />
<input type="submit" value="search"> <input type="submit" value="search" />
</form> </form>
{% if search_performed %} {% if search_performed %}
<h2>Search Results</h2> <h2>Search Results</h2>