Remove all template content from the scrolls theme that was almost the same as the basic.

Apply a few real modifications to the basic templates.
This commit is contained in:
Georg Brandl 2010-01-07 11:43:51 +01:00
parent ab7ac64e1a
commit ee53111847
11 changed files with 50 additions and 227 deletions

View File

@ -4,41 +4,36 @@
<h1 id="index">{{ _('Index') }}</h1>
<div class="genindex-jumpbox">
{% for key, dummy in genindexentries -%}
<a href="#{{ key }}"><strong>{{ key }}</strong></a> {% if not loop.last %}| {% endif %}
{%- endfor %}
</div>
<hr />
{% for key, entries in genindexentries %}
{%- for key, entries in genindexentries %}
<h2 id="{{ key }}">{{ key }}</h2>
<table width="100%" class="indextable"><tr><td width="33%" valign="top">
<dl>
{%- set breakat = genindexcounts[loop.index0] // 2 %}
{%- set numcols = 1 %}
{%- set numitems = 0 %}
{% for entryname, (links, subitems) in entries %}
<dt>{%- if links -%}<a href="{{ links[0] }}">{{ entryname|e }}</a>
{%- for link in links[1:] %}, <a href="{{ link }}">[{{ loop.index }}]</a>{% endfor -%}
{%- else -%}
{{ entryname|e }}
{%- endif -%}</dt>
{%- if subitems %}
<dd><dl>
<table width="100%" class="indextable genindextable"><tr>
{%- for column in entries|slice(2) if column %}
<td width="33%" valign="top"><dl>
{%- for entryname, (links, subitems) in column %}
<dt>{% if links %}<a href="{{ links[0] }}">{{ entryname|e }}</a>
{% for link in links[1:] %}, <a href="{{ link }}">[{{ loop.index }}]</a>{% endfor %}
{%- else %}{{ entryname|e }}{% endif %}</dt>
{%- if subitems %}
<dd><dl>
{%- for subentryname, subentrylinks in subitems %}
<dt><a href="{{ subentrylinks[0] }}">{{ subentryname|e }}</a>
{%- for link in subentrylinks[1:] %}, <a href="{{ link }}">[{{ loop.index }}]</a>{% endfor -%}
</dt>
<dt><a href="{{ subentrylinks[0] }}">{{ subentryname|e }}</a>
{%- for link in subentrylinks[1:] %}, <a href="{{ link }}">[{{ loop.index }}]</a>{% endfor -%}
</dt>
{%- endfor %}
</dl></dd>
{%- endif -%}
{%- set numitems = numitems + 1 + (subitems|length) -%}
{%- if numcols < 2 and numitems > breakat -%}
{%- set numcols = numcols+1 -%}
</dl></td><td width="33%" valign="top"><dl>
{%- endif -%}
{%- endfor %}
</dl></td></tr></table>
</dl></td>
{%- endfor %}
</tr></table>
{% endfor %}
{% endblock %}

View File

@ -12,12 +12,13 @@
<h1 id="global-module-index">{{ _('Global Module Index') }}</h1>
<div class="modindex-jumpbox">
{%- for letter in letters %}
<a href="#cap-{{ letter }}"><strong>{{ letter }}</strong></a> {% if not loop.last %}| {% endif %}
{%- endfor %}
<hr/>
</div>
<table width="100%" class="indextable" cellspacing="0" cellpadding="2">
<table class="indextable modindextable" cellspacing="0" cellpadding="2">
{%- for modname, collapse, cgroup, indent, fname, synops, pform, dep, stripped in modindexentries %}
{%- if not modname -%}
<tr class="pcap"><td></td><td>&nbsp;</td><td></td></tr>

View File

@ -127,6 +127,10 @@ span.linkdescr {
/* -- general index --------------------------------------------------------- */
table.indextable {
width: 100%;
}
table.indextable td {
text-align: left;
vertical-align: top;
@ -152,6 +156,20 @@ img.toggler {
cursor: pointer;
}
div.modindex-jumpbox {
border-top: 1px solid #ddd;
border-bottom: 1px solid #ddd;
margin: 1em 0 1em 0;
padding: 0.4em;
}
div.genindex-jumpbox {
border-top: 1px solid #ddd;
border-bottom: 1px solid #ddd;
margin: 1em 0 1em 0;
padding: 0.4em;
}
/* -- general body styles --------------------------------------------------- */
a.headerlink {

View File

@ -1,36 +0,0 @@
{% extends "layout.html" %}
{% set title = 'Index' %}
{% block body %}
<h1 id="index">Index</h1>
{% for key, dummy in genindexentries -%}
<a href="#{{ key }}"><strong>{{ key }}</strong></a> {% if not loop.last %}| {% endif %}
{%- endfor %}
<hr>
{% for key, entries in genindexentries %}
<h2 id="{{ key }}">{{ key }}</h2>
<table class="indextable"><tr>
{%- for column in entries|slice(2) if column %}
<td><dl>
{%- for entryname, (links, subitems) in column %}
<dt>{% if links %}<a href="{{ links[0] }}">{{ entryname|e }}</a>
{% for link in links[1:] %}, <a href="{{ link }}">[Link]</a>{% endfor %}
{%- else %}{{ entryname|e }}{% endif %}</dt>
{%- if subitems %}
<dd><dl>
{%- for subentryname, subentrylinks in subitems %}
<dt><a href="{{ subentrylinks[0] }}">{{ subentryname|e }}</a>
{%- for link in subentrylinks[1:] %}, <a href="{{ link }}">[Link]</a>{% endfor -%}
</dt>
{%- endfor %}
</dl></dd>
{%- endif -%}
{%- endfor %}
</dl></td>
{%- endfor %}
</tr></table>
{% endfor %}
{% endblock %}

View File

@ -1,58 +1,10 @@
<!doctype html>
<html>
<head>
{%- if not embedded %}
{%- set titlesuffix = " &mdash; "|safe + docstitle|e %}
{%- else %}
{%- set titlesuffix = "" %}
{%- endif %}
<title>{{ title|striptags }}{{ titlesuffix }}</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<link rel="stylesheet" href="{{ pathto('_static/style.css', 1) }}" type="text/css">
<link rel="stylesheet" href="{{ pathto('_static/print.css', 1) }}" type="text/css" media="print">
<link rel="stylesheet" href="{{ pathto('_static/pygments.css', 1) }}" type="text/css">
{%- if builder != 'htmlhelp' %}
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT: '{{ pathto("", 1) }}',
VERSION: '{{ release|e }}',
COLLAPSE_MODINDEX: false,
FILE_SUFFIX: '{{ file_suffix }}',
HAS_SOURCE: {{ has_source|lower }}
};
</script>
<script type="text/javascript" src="{{ pathto('_static/jquery.js', 1) }}"></script>
<script type="text/javascript" src="{{ pathto('_static/interface.js', 1) }}"></script>
<script type="text/javascript" src="{{ pathto('_static/doctools.js', 1) }}"></script>
<script type="text/javascript" src="{{ pathto('_static/theme_extras.js', 1) }}"></script>
{%- endif %}
{%- if use_opensearch and builder != 'htmlhelp' %}
<link rel="search" type="application/opensearchdescription+xml"
title="Search within {{ docstitle }}"
href="{{ pathto('_static/opensearch.xml', 1) }}">
{%- endif %}
{%- if hasdoc('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') }}">
{%- if hasdoc('copyright') %}
<link rel="copyright" title="Copyright" href="{{ pathto('copyright') }}">
{%- endif %}
<link rel="top" title="{{ docstitle }}" href="{{ pathto('index') }}">
{%- if parents %}
<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 }}">
{%- endif %}
{%- if prev %}
<link rel="prev" title="{{ prev.title|striptags }}" href="{{ prev.link|e }}">
{%- endif %}
{% block extrahead %}{% endblock %}
</head>
<body>
{% extends "basic/layout.html" %}
{% set script_files = script_files + ['_static/theme_extras.js'] %}
{% set css_files = css_files + ['_static/print.css'] %}
{# do not display relbars #}
{% block relbar1 %}{% endblock %}
{% block relbar2 %}{% endblock %}
{% block content %}
<div id="content">
<div class="header">
<h1 class="heading"><a href="{{ pathto('index') }}"
@ -77,20 +29,4 @@
{% block body %}{% endblock %}
</div>
</div>
<div class="footer">
{%- if show_copyright %}
{%- if hasdoc('copyright') %}
{% trans path=pathto('copyright'), copyright=copyright|e %}&copy; <a href="{{ path }}">Copyright</a> {{ copyright }}.{% endtrans %}
{%- else %}
{% trans copyright=copyright|e %}&copy; Copyright {{ copyright }}.{% endtrans %}
{%- endif %}
{%- endif %}
{%- if last_updated %}
{% trans last_updated=last_updated|e %}Last updated on {{ last_updated }}.{% endtrans %}
{%- endif %}
{%- if show_sphinx %}
{% trans sphinx_version=sphinx_version|e %}Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> {{ sphinx_version }}.{% endtrans %}
{%- endif %}
</div>
</body>
</html>
{% endblock %}

View File

@ -1,43 +0,0 @@
{% extends "layout.html" %}
{% set title = _('Global Module Index') %}
{% block extrahead %}
{{ super() }}
{% if not embedded and collapse_modindex %}
<script type="text/javascript">
DOCUMENTATION_OPTIONS.COLLAPSE_MODINDEX = true;
</script>
{% endif %}
{% endblock %}
{% block body %}
<h1 id="global-module-index">{{ _('Global Module Index') }}</h1>
<div class="modindex-jumpbox">
{%- for letter in letters %}
<a href="#cap-{{ letter }}"><strong>{{ letter }}</strong></a> {% if not loop.last %}| {% endif %}
{%- endfor %}
</div>
<table class="modindextable">
{%- for modname, collapse, cgroup, indent, fname, synops, pform, dep, stripped in modindexentries %}
{%- if not modname -%}
<tr class="pcap"><td></td><td>&nbsp;</td><td></td></tr>
<tr class="cap"><td></td><td><a name="cap-{{ fname }}"><strong>{{ fname }}</strong></a></td><td></td></tr>
{%- else -%}
<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" alt="-" />
{%- endif %}</td>
<td>{% if indent %}&nbsp;&nbsp;&nbsp;{% endif %}
{% if fname %}<a href="{{ fname }}">{% endif -%}
<tt class="xref">{{ stripped|e }}{{ modname|e }}</tt>
{%- if fname %}</a>{% endif %}
{%- if pform and pform[0] %} <em>({{ pform|join(', ') }})</em>{% endif -%}
</td><td>{% if dep %}<strong>{{ _('Deprecated')}}:</strong>{% endif %}
<em>{{ synops|e }}</em></td></tr>
{%- endif -%}
{% endfor %}
</table>
{% endblock %}

View File

@ -1,9 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<OpenSearchDescription xmlns="http://a9.com/-/spec/opensearch/1.1/">
<ShortName>{{ project }}</ShortName>
<Description>Search {{ docstitle }}</Description>
<InputEncoding>utf-8</InputEncoding>
<Url type="text/html" method="get"
template="{{ use_opensearch }}/{{ pathto('search') }}?q={searchTerms}&amp;check_keywords=yes&amp;area=default"/>
<LongName>{{ docstitle }}</LongName>
</OpenSearchDescription>

View File

@ -1,4 +0,0 @@
{% extends 'layout.html' %}
{% block body %}
{{ body }}
{% endblock %}

View File

@ -1,35 +0,0 @@
{% extends "layout.html" %}
{% set title = 'Search' %}
{% block extrahead %}
<script type="text/javascript" src="{{ pathto('_static/searchtools.js', 1) }}"></script>
{% endblock %}
{% block body %}
<h1 id="search-documentation">Search</h1>
<p>
From here you can search these documents. Enter your search
words into the box below and click "search". Note that the search
function will automatically search for all of the words. Pages
containing less words won't appear in the result list.
</p>
<form action="" method="get"><p>
<input type="text" name="q" value="">
<input type="submit" value="search">
</p></form>
{% if search_performed %}
<h2>Search Results</h2>
{% if not search_results %}
<p>Your search did not match any results.</p>
{% endif %}
{% endif %}
<div id="search-results">
{% if search_results %}
<ul>
{% for href, caption, context in search_results %}
<li><a href="{{ pathto(item.href) }}">{{ caption }}</a>
<div class="context">{{ context|e }}</div>
</li>
{% endfor %}
</ul>
{% endif %}
</div>
{% endblock %}

View File

@ -259,7 +259,7 @@ table.indextable {
width: 100%;
}
table.indextable td {
table.genindextable td {
vertical-align: top;
width: 50%;
}
@ -407,4 +407,4 @@ span.highlight {
margin-top: 0;
margin-bottom: 0;
margin-left: 1.5em;
}
}

View File

@ -1,5 +1,5 @@
[theme]
inherit = default
inherit = basic
stylesheet = scrolls.css
pygments_style = tango