more documentation polish

This commit is contained in:
Arvid Norberg 2015-03-14 01:51:08 +00:00
parent 37225b71ae
commit b237458183
4 changed files with 47 additions and 289 deletions

View File

@ -163,6 +163,9 @@ def highlight_signature(s):
# a parsed literal in rst
name[1] = name[1].replace('*', '\\*')
# we also have to escape colons
name[1] = name[1].replace(':', '\\:')
# comments in signatures are italic
name[1] = name[1].replace('/\\*', '*/\\*')
name[1] = name[1].replace('\\*/', '\\*/*')
@ -942,17 +945,17 @@ for cat in categories:
functions = categories[cat]['functions']
enums = categories[cat]['enums']
out.write('%s\n' % heading(cat, '='))
out.write('''
:Author: Arvid Norberg, arvid@libtorrent.org
:Version: 1.1.0
%s
.. contents:: Table of contents
:depth: 1
:depth: 2
:backlinks: none
''')
''' % heading(cat, '='))
if 'overview' in categories[cat]:
out.write('%s\n' % linkify_symbols(categories[cat]['overview']))

View File

@ -10,7 +10,6 @@ REFERENCE_TARGETS = \
reference-Plugins \
reference-Create_Torrents \
reference-Error_Codes \
reference-Time \
reference-Storage \
reference-Custom_Storage \
reference-Utility \

View File

@ -30,8 +30,6 @@ div.section div.section div.section {
margin-bottom: 2em;
}
h3 { text-transform: uppercase; }
div.section p, div.section ul, div.section dl {
}
@ -77,25 +75,19 @@ table.docinfo tr.field td, table.docinfo tr.field th {display: none;}
#h1.title { display: none; }
dt {
font-size: 100%;
letter-spacing: 2px;
line-height: 1em;
color: #315586;
margin-bottom: 0.5em;
color: #000;
font-family: Tahoma;
font-weight: bold;
}
dd {
line-height: 1.5em;
margin-left: 1em;
margin-left: 2em;
margin-bottom: 1em;
font-size: 92%;
}
tt {
font: 1em "Courier New", "Courier";
color: #315566;
font-size: 110%;
}
pre {
@ -129,25 +121,11 @@ p.admonition-title {
border-bottom: solid 1px #D1DFD5
}
div.sidebar {
background: #f8f8e8;
float: right;
width: 20em;
margin-right: 1em;
border: solid 1px #e5e5d5;
padding: 1.3em;
}
h1 { font-size: 180%; }
h2 { font-size: 130%; }
h3 { font-size: 100%; }
div.sidebar p.sidebar-title {
font: 1.3em Georgia;
border-bottom: solid 1px #e5e5d5;
padding-bottom: 0.5em;
margin: 0 0 0.5em 0;
}
h1 { font-size: 230%; }
h2 { font-size: 180%; }
h3 { font-size: 130%; }
h1.title { text-align: center; }
table { margin-bottom: 1em; border-collapse: collapse; }
table, th, td { border: none; }
@ -240,23 +218,26 @@ div.contents {
padding: 0;
}
#table-of-contents a.reference:hover {text-decoration: underline;}
dd p {
font-size: 100%;
#table-of-contents a.reference:hover
{
border-bottom: solid 1px #8D370A;
}
dd pre {
font-size: 108.7%;
#librarySidebar {
float: left;
width: 150px;
}
li p, li li { font-size: 100%; }
#libraryBody {
border-left: solid 1px #eee;
padding-left: 10px;
margin-left: 158px;
margin-right: 10px;
}
/* IE Hacks */
/* Hides from IE-mac \*/
* html li pre { height: 1%; }
* html .topic pre { height: 1%; }
* html #table-of-contents ul ul { height: 1%; }
/* End hide from IE-mac */
.keyword { font-weight: bold }
.string { color: #771; }
.comment { font-style: italic; color: #559; }
.preproc { font-style: italic; color: #959; }
.number { color: #595; }

View File

@ -2,7 +2,6 @@
#main {
font-family: Verdana;
line-height: 1.25em;
text-align: left;
margin-top: 10px;
}
@ -10,22 +9,29 @@
/* Base elements */
* {margin: 0; padding: 0;}
body, table { font: 0.8em Verdana, sans-serif;}
body, table { font: 0.9em Verdana, sans-serif;}
h1, h2, h3 {
font: 1.5em Georgia "Times New Roman", serif;
/* letter-spacing: 1px; */
padding-bottom: 0.5em;
font-weight: bold;
font-weight: bold;
}
h1 { font-size: 180%; }
h2 { font-size: 130%; }
h3 { font-size: 100%; }
div.sidebar {
background: #f8f8e8;
float: right;
width: 20em;
margin-right: 1em;
border: solid 1px #e5e5d5;
padding: 1.3em;
}
p {
font-size: 92%;
line-height: 1.7em;
div.sidebar p.sidebar-title {
font: 1.3em Georgia;
border-bottom: solid 1px #e5e5d5;
padding-bottom: 0.5em;
margin: 0 0 0.5em 0;
}
a {
@ -34,11 +40,6 @@ a {
border-bottom: dotted 1px #8D370A;
}
a:hover {
border-bottom: solid 1px #8D370A;
background: #eee;
}
ul, ol { line-height: 1.8em; }
ul { list-style: square; }
li { margin-left: 2.8em; font-size: 92%; }
@ -53,25 +54,6 @@ p, ul, ol, img {margin-bottom: 1em;}
margin: 0px;
}
.document a {
border: none;
color: black;
}
.document a:hover {
background: none;
}
.document a.reference {
color: #8D370A;
border-bottom: dotted 1px #8D370A;
}
.document a.reference:hover {
border-bottom: solid 1px #8D370A;
background: #eee;
}
div.section {
margin-bottom: 3em;
}
@ -168,212 +150,5 @@ div.section p, div.section ul, div.section dl {
background: linear-gradient(#ddd, #fff);
}
table.docinfo {
text-align: left;
float: right;
width: 200px;
margin-right: 0px;
margin-left: 20px;
margin-bottom: 20px;
}
table.docinfo th {
border-top: none;
font-size: 72%;
padding-left: 10px;
}
table.docinfo td {
padding-left: 10px;
font-size: 88%;
}
table.docinfo tr.field td, table.docinfo tr.field th {display: none;}
h1.title { text-align: center; }
dt {
line-height: 1.2em;
margin-bottom: 0.5em;
color: #315586;
color: #000;
font-style: italic;
}
dd {
margin-left: 1em;
margin-bottom: 1em;
}
tt {
font: 1em "Courier New", "Courier";
color: #315566;
}
pre {
font-family: "Courier", monospace;
margin-right: 10px;
background: #C1E5F6;
border-left: solid 2px #6185A6;
border-right: solid 2px #6185A6;
padding: 5px 10px 5px 10px;
background: #f6f6f6;
border: solid 1px #ddd;
margin: 1em 0;
}
div.warning, div.note, div.important {
width: 80%;
margin: 1.5em auto;
background: #C1E5F6;
background: #F1FFF5;
border: solid 1px #D1DFD5;
padding: 5px 10px 5px 10px;
}
p.admonition-title {
font-family: Georgia, "Lucida Grande";
font-size: 128%;
letter-spacing: 2px;
text-transform: uppercase;
margin: 0 0 0.5em 0;
border-bottom: solid 1px #D1DFD5
}
div.sidebar {
background: #f8f8e8;
float: right;
width: 20em;
margin-right: 1em;
border: solid 1px #e5e5d5;
padding: 1.3em;
}
div.sidebar p.sidebar-title {
font: 1.3em Georgia;
border-bottom: solid 1px #e5e5d5;
padding-bottom: 0.5em;
margin: 0 0 0.5em 0;
}
table { margin-bottom: 1em; border-collapse: collapse; }
table, th, td { border: none; }
th, td { padding: 0.3em; }
th {
text-align: left;
background: #f0f0e0;
border-right: solid 1px #f0f0e0;
border-top: solid 1px #e8e8d8;
border-bottom: solid 1px #e8e8d8;
}
td {
background: #f8f8e8;
border-right: solid 1px #f8f8e8;
border-bottom: solid 1px #e8e8d8;
}
td td {
background: #e8e8d8;
border-right: solid 1px #e8e8d8;
border-bottom: solid 1px #d8d8c8;
}
div.topic {
border-left: solid 1px #eee;
padding-left: 1em;
margin: 0 0 1.5em;
}
p.topic-title {
font: 1.3em Georgia, "Times New Roman", serif;
}
/* TOC */
div.contents {
border: none;
}
#table-of-contents {
margin-left: 20px;
padding: 0 0 1em;
width: 200px;
float: right;
clear: right;
border-right: solid 1px #A1C5D6;
}
#table-of-contents p {
font-family: Georgia, "Times New Roman", serif;
color: #AD370A;
padding: 0.5em;
margin: 0;
}
#table-of-contents li {
margin: 0 0.5em 0 0.5em;
}
#table-of-contents ul {
margin: 0;
padding: 0 0 0 0.8em;
list-style: none;
text-align: left;
}
#table-of-contents a.reference {
border: none;
font: 0.88em Tahoma;
font-weight: bold;
color: #000050;
margin-right: 1em;
padding-left: 15px;
}
#table-of-contents li li a.reference {
font-weight: normal;
background: none;
padding: 0;
}
#table-of-contents a.reference:hover {text-decoration: underline;}
dd p {
font-size: 100%;
}
dd pre {
font-size: 108.7%;
}
li p, li li { font-size: 100%; }
#librarySidebar {
float: left;
width: 150px;
}
#libraryBody {
border-left: solid 1px #eee;
padding-left: 10px;
margin-left: 158px;
margin-right: 10px;
}
/* IE Hacks */
/* Hides from IE-mac \*/
* html li pre { height: 1%; }
* html .topic pre { height: 1%; }
* html #table-of-contents ul ul { height: 1%; }
/* End hide from IE-mac */
.keyword { font-weight: bold }
.string { color: #771; }
.comment { font-style: italic; color: #559; }
.preproc { font-style: italic; color: #959; }
.number { color: #595; }