Skip to content

Commit

Permalink
some small documentation style fixes
Browse files Browse the repository at this point in the history
--HG--
branch : trunk
  • Loading branch information
mitsuhiko committed May 4, 2008
1 parent 9d472df commit 6b44952
Show file tree
Hide file tree
Showing 3 changed files with 72 additions and 51 deletions.
32 changes: 30 additions & 2 deletions docs/_static/style.css
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ body {
} }


div.footer { div.footer {
padding: 5px; padding: 8px;
font-size: 11px;
text-align: center; text-align: center;
} }


Expand Down Expand Up @@ -111,7 +112,7 @@ p, li, dd, dt, blockquote {
} }


p { p {
line-height: 150%; line-height: 20px;
margin-bottom: 0; margin-bottom: 0;
margin-top: 10px; margin-top: 10px;
text-align: justify; text-align: justify;
Expand All @@ -136,6 +137,12 @@ li, dt {


dt { dt {
font-weight: bold; font-weight: bold;
color: #000;
}

dd {
margin-top: 10px;
line-height: 20px;
} }


th { th {
Expand Down Expand Up @@ -254,3 +261,24 @@ table.indextable td {
vertical-align: top; vertical-align: top;
width: 50%; width: 50%;
} }

table.indextable dl dd {
font-size: 11px;
}

table.indextable dl dd a {
color: #000;
}

dl.function dt,
dl.class dt {
font-weight: normal;
}

dt .descname {
font-weight: bold;
}

dl dt big {
font-size: 100%;
}
64 changes: 28 additions & 36 deletions docs/_templates/genindex.html
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -2,43 +2,35 @@
{% title = 'Index' %} {% title = 'Index' %}
{% block body %} {% block body %}


<h1 id="index">Index</h1> <h1 id="index">Index</h1>


{% for key, dummy in genindexentries -%} {% for key, dummy in genindexentries -%}
<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 %}

<h2 id="{{ key }}">{{ key }}</h2>
{% for key, entries in genindexentries %} <table class="indextable"><tr>
<h2 id="{{ key }}">{{ key }}</h2> {%- for column in entries|slice(2) %}{% if column %}
<table class="indextable"><tr><td> <td><dl>
<dl> {%- for entryname, (links, subitems) in column %}
{%- breakat = genindexcounts[loop.index0] // 2 %} <dt>{% if links %}<a href="{{ links[0] }}">{{ entryname|e }}</a>
{%- numcols = 1 %} {% for link in links[1:] %}, <a href="{{ link }}">[Link]</a>{% endfor %}
{%- numitems = 0 %} {%- else %}{{ entryname|e }}{% endif %}</dt>
{% for entryname, (links, subitems) in entries %} {%- if subitems %}
<dt>{%- if links -%}<a href="{{ links[0] }}">{{ entryname|e }}</a> <dd><dl>
{%- for link in links[1:] %}, <a href="{{ link }}">[Link]</a>{% endfor -%} {%- for subentryname, subentrylinks in subitems %}
{%- else -%} <dt><a href="{{ subentrylinks[0] }}">{{ subentryname|e }}</a>
{{ entryname|e }} {%- for link in subentrylinks[1:] %}, <a href="{{ link }}">[Link]</a>{% endfor -%}
{%- endif -%}</dt> </dt>
{%- if subitems %} {%- endfor %}
<dd><dl> </dl></dd>
{%- for subentryname, subentrylinks in subitems %} {%- endif -%}
<dt><a href="{{ subentrylinks[0] }}">{{ subentryname|e }}</a> {%- endfor %}
{%- for link in subentrylinks[1:] %}, <a href="{{ link }}">[Link]</a>{% endfor -%} </dl></td>
</dt> {%- endif %}{% endfor %}
{%- endfor %} </tr></table>
</dl></dd> {% endfor %}
{%- endif -%}
{%- numitems = numitems + 1 + len(subitems) -%}
{%- if numcols < 2 and numitems > breakat -%}
{%- numcols = numcols+1 -%}
</dl></td><td><dl>
{%- endif -%}
{%- endfor %}
</dl></td></tr></table>
{% endfor %}


{% endblock %} {% endblock %}
27 changes: 14 additions & 13 deletions docs/_templates/layout.html
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
<head> <head>
<title>Jinja2 Documentation</title> <title>Jinja2 Documentation</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<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">
{%- if builder != 'htmlhelp' %} {%- if builder != 'htmlhelp' %}
<script type="text/javascript"> <script type="text/javascript">
var DOCUMENTATION_OPTIONS = { var DOCUMENTATION_OPTIONS = {
Expand All @@ -19,26 +19,26 @@
{%- if use_opensearch and builder != 'htmlhelp' %} {%- if use_opensearch and builder != 'htmlhelp' %}
<link rel="search" type="application/opensearchdescription+xml" <link rel="search" type="application/opensearchdescription+xml"
title="Search within {{ docstitle }}" title="Search within {{ docstitle }}"
href="{{ pathto('_static/opensearch.xml', 1) }}"/> href="{{ pathto('_static/opensearch.xml', 1) }}">
{%- endif %} {%- endif %}
{%- 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 %}
</head> </head>
<body> <body>
Expand Down Expand Up @@ -66,7 +66,8 @@ <h3>Table Of Contents</h3>
</div> </div>
</div> </div>
<div class="footer"> <div class="footer">
© Copyright 2008 by the <a href="http://pocoo.org/">Pocoo Team</a>. © Copyright 2008 by the <a href="http://pocoo.org/">Pocoo Team</a>,
documentation generated by <a href="http://sphinx.pocoo.org/">Sphinx</a>
</div> </div>
</body> </body>
</html> </html>

0 comments on commit 6b44952

Please sign in to comment.