Skip to content

Commit bb50221

Browse files
committed
Enhance documentation generation.
1 parent 46ef9c6 commit bb50221

File tree

12 files changed

+696
-189
lines changed

12 files changed

+696
-189
lines changed

doc/_static/style.css

Lines changed: 109 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,109 @@
1+
/* layout*/
2+
body
3+
{
4+
font-family: sans-serif, Arial, Helvetica;
5+
background-color: white;
6+
color: #333;
7+
margin:0;
8+
padding: 0 3em 0 14em;
9+
}
10+
body > .header { margin: 0 0 0 -14em;}
11+
body > .footer { margin: 0 0 0 -14em; clear:both;}
12+
body > .navigation
13+
{
14+
margin-left: -14em;
15+
width: 14em;
16+
float: left;
17+
}
18+
body > .content
19+
{
20+
width: 100%;
21+
margin: 0;
22+
}
23+
body > .header > #searchbox { position: absolute; right: 1em; top: 1em;}
24+
25+
/* style */
26+
27+
:link { color: #bb0000; text-decoration: none;}
28+
:visited { color: #770000; text-decoration: none;}
29+
a.toc-backref { color: #000000; }
30+
31+
.header h1 { margin-left: 1em; }
32+
33+
body
34+
{
35+
font-family: sans-serif, Arial, Helvetica;
36+
background-color: #f5f5f5;
37+
color: #333;
38+
}
39+
40+
.menu
41+
{
42+
margin-right: 1em;
43+
padding: 2pt;
44+
border: solid thin #dadada;
45+
background-color:#ffffff;
46+
}
47+
.menu ul { list-style-type:none; padding: 0;}
48+
.menu ul ul { padding-left: 1em;}
49+
.menu li { border-top: solid thin #dadada;}
50+
.menu li:first-child { border-top: none;}
51+
52+
/* related */
53+
54+
div.related
55+
{
56+
width: 100%;
57+
font-size: 90%;
58+
}
59+
div.related-top { border-bottom: solid thin #dadada;}
60+
div.related-bottom { border-top: solid thin #dadada;}
61+
62+
div.related ul
63+
{
64+
margin: 0;
65+
padding: 0 0 0 10px;
66+
list-style: none;
67+
}
68+
69+
div.related li { display: inline;}
70+
71+
div.related li.right
72+
{
73+
float: right;
74+
margin-right: 5px;
75+
}
76+
77+
.footer
78+
{
79+
font-size: small;
80+
text-align: center;
81+
color: lightgrey;
82+
}
83+
84+
.content
85+
{
86+
padding: 1em;
87+
border: solid thin #dadada;
88+
background-color: #ffffff;
89+
}
90+
91+
/* This is a little hack to inject a 'news' block into the title
92+
page without having to set up a custom directive. */
93+
#roundup-issue-tracker .note
94+
{
95+
float: right;
96+
width: auto;
97+
border: solid thin #dadada;
98+
background-color:#f5f5f5;
99+
padding: 1em;
100+
margin: 1em;
101+
}
102+
#roundup-issue-tracker .note .admonition-title { display: none; }
103+
104+
table
105+
{
106+
border-collapse: collapse;
107+
border-spacing: 1px;
108+
background-color: #fafafa;
109+
}

doc/_templates/layout.html

Lines changed: 166 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,166 @@
1+
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
2+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3+
4+
{%- macro relbar(class) %}
5+
<div class="related {{ class }}">
6+
<ul>
7+
{%- for rellink in rellinks %}
8+
<li class="right" {% if loop.first %}style="margin-right: 10px"{% endif %}>
9+
<a href="{{ pathto(rellink[0]) }}" title="{{ rellink[1]|striptags }}"
10+
accesskey="{{ rellink[2] }}">{{ rellink[3] }}</a>
11+
{%- if not loop.first %}{{ reldelim2 }}{% endif %}</li>
12+
{%- endfor %}
13+
{%- block rootrellink %}
14+
<li><a href="{{ pathto(master_doc) }}">{{ shorttitle|e }}</a>{{ reldelim1 }}</li>
15+
{%- endblock %}
16+
{%- for parent in parents %}
17+
<li><a href="{{ parent.link|e }}" accesskey="U">{{ parent.title }}</a>{{ reldelim1 }}</li>
18+
{%- endfor %}
19+
{%- block relbaritems %} {% endblock %}
20+
</ul>
21+
</div>
22+
{%- endmacro %}
23+
{%- macro sidebar() %}
24+
{%- block sidebartoc %}
25+
{%- if display_toc %}
26+
<h3><a href="{{ pathto(master_doc) }}">{{ _('Table Of Contents') }}</a></h3>
27+
{{ toc }}
28+
{%- endif %}
29+
{%- endblock %}
30+
{%- block sidebarrel %}
31+
{%- if prev %}
32+
<h4>{{ _('Previous topic') }}</h4>
33+
<p class="topless"><a href="{{ prev.link|e }}"
34+
title="{{ _('previous chapter') }}">{{ prev.title }}</a></p>
35+
{%- endif %}
36+
{%- if next %}
37+
<h4>{{ _('Next topic') }}</h4>
38+
<p class="topless"><a href="{{ next.link|e }}"
39+
title="{{ _('next chapter') }}">{{ next.title }}</a></p>
40+
{%- endif %}
41+
{%- endblock %}
42+
{%- block sidebarsourcelink %}
43+
{%- if show_source and has_source and sourcename %}
44+
<h3>{{ _('This Page') }}</h3>
45+
<ul class="this-page-menu">
46+
<li><a href="{{ pathto('_sources/' + sourcename, true)|e }}"
47+
rel="nofollow">{{ _('Show Source') }}</a></li>
48+
</ul>
49+
{%- endif %}
50+
{%- endblock %}
51+
{%- block sidebarsearch %}
52+
{%- if pagename != "search" %}
53+
<div id="searchbox" style="display: none">
54+
<h3>{{ _('Quick search') }}</h3>
55+
<form class="search" action="{{ pathto('search') }}" method="get">
56+
<input type="text" name="q" size="18" />
57+
<input type="submit" value="{{ _('Go') }}" />
58+
<input type="hidden" name="check_keywords" value="yes" />
59+
<input type="hidden" name="area" value="default" />
60+
</form>
61+
<p style="font-size: 90%">{{ _('Enter search terms or a module, class or function name.') }}</p>
62+
</div>
63+
<script type="text/javascript">$('#searchbox').show(0);</script>
64+
{%- endif %}
65+
{%- endblock %}
66+
{%- endmacro %}
67+
68+
<html xmlns="http://www.w3.org/1999/xhtml">
69+
<head>
70+
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
71+
{{ metatags }}
72+
{%- if builder != 'htmlhelp' %}
73+
{%- set titlesuffix = " &mdash; " + docstitle|e %}
74+
{%- endif %}
75+
<title>{{ title|striptags }}{{ titlesuffix }}</title>
76+
{%- if builder == 'web' %}
77+
<link rel="stylesheet" href="{{ pathto('index') }}?do=stylesheet{%
78+
if in_admin_panel %}&admin=yes{% endif %}" type="text/css" />
79+
{%- for link, type, title in page_links %}
80+
<link rel="alternate" type="{{ type|e(true) }}" title="{{ title|e(true) }}" href="{{ link|e(true) }}" />
81+
{%- endfor %}
82+
{%- else %}
83+
<link rel="stylesheet" href="{{ pathto('_static/style.css', 1) }}" type="text/css" />
84+
<link rel="stylesheet" href="{{ pathto('_static/pygments.css', 1) }}" type="text/css" />
85+
{%- endif %}
86+
{%- if builder != 'htmlhelp' %}
87+
<script type="text/javascript">
88+
var DOCUMENTATION_OPTIONS = {
89+
URL_ROOT: '{{ pathto("", 1) }}',
90+
VERSION: '{{ release|e }}',
91+
COLLAPSE_MODINDEX: false,
92+
FILE_SUFFIX: '{{ file_suffix }}'
93+
};
94+
</script>
95+
{%- for scriptfile in script_files %}
96+
<script type="text/javascript" src="{{ pathto(scriptfile, 1) }}"></script>
97+
{%- endfor %}
98+
{%- if use_opensearch %}
99+
<link rel="search" type="application/opensearchdescription+xml"
100+
title="{% trans docstitle=docstitle|e %}Search within {{ docstitle }}{% endtrans %}"
101+
href="{{ pathto('_static/opensearch.xml', 1) }}"/>
102+
{%- endif %}
103+
{%- if favicon %}
104+
<link rel="shortcut icon" href="{{ pathto('_static/' + favicon, 1) }}"/>
105+
{%- endif %}
106+
{%- endif %}
107+
{%- block linktags %}
108+
{%- if hasdoc('about') %}
109+
<link rel="author" title="{{ _('About these documents') }}" href="{{ pathto('about') }}" />
110+
{%- endif %}
111+
<link rel="index" title="{{ _('Index') }}" href="{{ pathto('genindex') }}" />
112+
<link rel="search" title="{{ _('Search') }}" href="{{ pathto('search') }}" />
113+
{%- if hasdoc('copyright') %}
114+
<link rel="copyright" title="{{ _('Copyright') }}" href="{{ pathto('copyright') }}" />
115+
{%- endif %}
116+
<link rel="top" title="{{ docstitle|e }}" href="{{ pathto('index') }}" />
117+
{%- if parents %}
118+
<link rel="up" title="{{ parents[-1].title|striptags }}" href="{{ parents[-1].link|e }}" />
119+
{%- endif %}
120+
{%- if next %}
121+
<link rel="next" title="{{ next.title|striptags }}" href="{{ next.link|e }}" />
122+
{%- endif %}
123+
{%- if prev %}
124+
<link rel="prev" title="{{ prev.title|striptags }}" href="{{ prev.link|e }}" />
125+
{%- endif %}
126+
{%- endblock %}
127+
{%- block extrahead %} {% endblock %}
128+
</head>
129+
<body>
130+
<div class="header"><h1>Roundup</h1>
131+
{%- if pagename != "search" %}
132+
<div id="searchbox" style="display: none">
133+
<form class="search" action="{{ pathto('search') }}" method="get">
134+
<input type="text" name="q" size="18" />
135+
<input type="submit" value="{{ _('Search') }}" />
136+
<input type="hidden" name="check_keywords" value="yes" />
137+
<input type="hidden" name="area" value="default" />
138+
</form>
139+
</div>
140+
<script type="text/javascript">$('#searchbox').show(0);</script>
141+
{%- endif %}
142+
</div>
143+
<div class="navigation">
144+
<div class="menu">
145+
{{ sidebar() }}
146+
</div>
147+
</div>
148+
<div class="content">
149+
{{ relbar('related-top') }}
150+
{{ body }}
151+
{{ relbar('related-bottom') }}
152+
</div>
153+
{%- block footer %}
154+
<div class="footer">
155+
{%- if hasdoc('copyright') %}
156+
{% trans path=pathto('copyright'), copyright=copyright|e %}&copy; <a href="{{ path }}">Copyright</a> {{ copyright }}.{% endtrans %}
157+
{%- else %}
158+
{% trans copyright=copyright|e %}&copy; Copyright {{ copyright }}.{% endtrans %}
159+
{%- endif %}
160+
{%- if show_source and has_source and sourcename %}
161+
<p class="source"><a href="{{ pathto('_sources/' + sourcename, true)|e }}" rel="nofollow">{{ _('source') }}</a></p>
162+
{%- endif %}
163+
</div>
164+
{%- endblock %}
165+
</body>
166+
</html>

0 commit comments

Comments
 (0)