From 28aad00b9d85a78f8c919f5291e6178761c59011 Mon Sep 17 00:00:00 2001 From: Thijs Triemstra Date: Mon, 23 Aug 2010 01:31:57 +0200 Subject: [PATCH] Refactored the sphinx document style and layout. Most of the styles and common layout have been moved into a Sphinx theme that is maintained elsewhere. See the doc/conf.py for details. Author: thijs Fixes: #752 --- .gitignore | 5 +- doc/Makefile | 4 +- doc/conf.py | 47 +- doc/html/{indexcontent.html => defindex.html} | 2 +- doc/html/layout.html | 43 +- doc/html/static/bg_gradient.jpg | Bin 554 -> 0 bytes doc/html/static/default.css | 887 ------------------ setup.py | 1 - 8 files changed, 36 insertions(+), 953 deletions(-) rename doc/html/{indexcontent.html => defindex.html} (98%) delete mode 100644 doc/html/static/bg_gradient.jpg delete mode 100644 doc/html/static/default.css diff --git a/.gitignore b/.gitignore index be512953..a46934a9 100644 --- a/.gitignore +++ b/.gitignore @@ -3,6 +3,9 @@ _trial_temp/ build/ cpyamf/*.so doc/_build/ +doc/changelog.rst +doc/html/intro.html +doc/themes cpyamf/amf3.pyd cpyamf/codec.pyd -cpyamf/util.pyd \ No newline at end of file +cpyamf/util.pyd diff --git a/doc/Makefile b/doc/Makefile index 64fd6406..d09dd53b 100644 --- a/doc/Makefile +++ b/doc/Makefile @@ -31,8 +31,8 @@ clean: -rm -rf $(BUILDDIR)/* html: - mkdir -p $(BUILDDIR)/html $(BUILDDIR)/doctrees - find tutorials/examples ! -name "*.svn*" | cpio -admup $(BUILDDIR)/html/ + mkdir -p $(BUILDDIR)/html/tutorials $(BUILDDIR)/doctrees + cp -R tutorials/examples $(BUILDDIR)/html/tutorials/ $(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html @echo @echo "Build finished. The HTML pages are in $(BUILDDIR)/html." diff --git a/doc/conf.py b/doc/conf.py index 38f38ca2..52bb8761 100644 --- a/doc/conf.py +++ b/doc/conf.py @@ -23,11 +23,14 @@ # -- General configuration ----------------------------------------------------- +# If your documentation needs a minimal Sphinx version, state it here. +needs_sphinx = '1.0' + # Add any Sphinx extension module names here, as strings. They can be extensions # coming with Sphinx (named 'sphinx.ext.*') or your custom ones. extensions = ['sphinx.ext.autodoc', 'sphinx.ext.intersphinx'] -# Paths that contain templates, relative to this directory. +# Paths that contain additional templates, relative to this directory. templates_path = ['html'] # The suffix of source filenames. @@ -37,7 +40,7 @@ #source_encoding = 'utf-8' # The master toctree document. -#master_doc = 'index' +#master_doc = 'contents' # create content template for the homepage from util import rst2html, copy_file @@ -71,10 +74,9 @@ # List of documents that shouldn't be included in the build. #unused_docs = [] -# A list of directory paths, relative to the source directory, that are to -# be recursively excluded from the search for source files, that is, their -# subdirectories won’t be searched too. -exclude_trees = ['_build', 'tutorials/examples'] +# List of patterns, relative to source directory, that match files and +# directories to ignore when looking for source files. +exclude_patterns = ['_build', 'tutorials/examples'] # If true, '()' will be appended to :func: etc. cross-reference text. add_function_parentheses = True @@ -88,7 +90,7 @@ #show_authors = False # The name of the Pygments (syntax highlighting) style to use. -pygments_style = 'trac' +#pygments_style = 'trac' # A list of ignored prefixes for module index sorting. #modindex_common_prefix = [] @@ -96,10 +98,20 @@ # -- Options for HTML output --------------------------------------------------- -# The style sheet to use for HTML and HTML Help pages. A file of that name -# must exist either in Sphinx' static/ path, or in one of the custom paths -# given in html_static_path. -html_style = 'default.css' +# The theme to use for HTML and HTML Help pages. See the documentation for +# a list of builtin themes. +# Note: you can download the 'beam' theme from: +# http://github.com/collab-project/sphinx-themes +# and place it in a 'themes' directory relative to this config file. +html_theme = 'beam' + +# Theme options are theme-specific and customize the look and feel of a theme +# further. For a list of options available for each theme, see the +# documentation. +#html_theme_options = {} + +# Add any paths that contain custom themes here, relative to this directory. +html_theme_path = ['themes'] # The name for this set of Sphinx documents. If None, it defaults to # " v documentation". @@ -111,7 +123,7 @@ html_static_path = ['html/static'] # The name of an image file (.ico) that is the favicon of the docs. -html_favicon = 'pyamf.ico' +html_favicon = 'html/static/pyamf.ico' # If not '', a 'Last updated on:' timestamp is inserted at every page bottom, # using the given strftime format. @@ -121,20 +133,15 @@ # typographically correct entities. #html_use_smartypants = True -# Custom sidebar templates, maps document names to template names. -html_sidebars = { - 'toc': 'sidebartoc.html' -} - # Additional templates that should be rendered to pages, maps page names to # template names. html_additional_pages = { - 'index': 'indexcontent.html', + 'index': 'defindex.html', 'tutorials/index': 'tutorials.html', } # Content template for the index page, filename relative to this file. -html_index = 'indexcontent.html' +#html_index = 'indexcontent.html' # If false, no module index is generated. html_use_modindex = True @@ -186,4 +193,4 @@ # Example configuration for intersphinx: refer to the Python standard library. -intersphinx_mapping = {'http://python.org/': None} +intersphinx_mapping = {'http://docs.python.org/': None} diff --git a/doc/html/indexcontent.html b/doc/html/defindex.html similarity index 98% rename from doc/html/indexcontent.html rename to doc/html/defindex.html index cb1a30ff..99945cde 100644 --- a/doc/html/indexcontent.html +++ b/doc/html/defindex.html @@ -1,4 +1,4 @@ -{% extends "defindex.html" %} +{% extends "basic/defindex.html" %} {% block body %}

{{ docstitle|e }}

diff --git a/doc/html/layout.html b/doc/html/layout.html index ffef1bc0..1c365742 100644 --- a/doc/html/layout.html +++ b/doc/html/layout.html @@ -1,30 +1,5 @@ -{% extends "!layout.html" %} -{% block document %} - -
- - - - -
-{{ super() }} -{% endblock %} -{% block relbar1 %} -{% endblock %} -{% block relbar2 %} +{% extends "beam/layout.html" %} -{% endblock %} {% block sidebartoc %}

Download

-{% endblock %} -{% block sidebarrel %} -{% endblock %} -{% block sidebarsourcelink %} -{% endblock %} -{% block sidebarsearch %} -{% endblock %} -{% block footer %} - -{% endblock %} -{% block rootrellink %} -{{ super() }} -{% endblock %} +{% endblock %} \ No newline at end of file diff --git a/doc/html/static/bg_gradient.jpg b/doc/html/static/bg_gradient.jpg deleted file mode 100644 index 019b49b8f4bdb6917bac18e9f2405995224a7155..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 554 zcmex=C5UDGKfoZ!!LXD;gqcy0fk}{&S&;Gn5r%Y- z!x)%>&V&PI7Dgs6uyt@D5QCA4S%86wk(r4dNtjVcFfj4MM8(2|8!tW-7KG?RGEIHjST9%e?Mt;~W9_6*;dN*q9Dh-GjtQ0sQ*Ua;n@a_fblOc}kV$)WwmqInaa zX_oXGdavTwWj?{LbRlZxvU(S>Rs0uOS2cgR>@4!RmDT2a6$pRcNBKO7Qx?$sfUSVa-Ni5V#cFM0Z86(=5ED{!(FNWXZ= z)9)VEy-l0T~-JGo%NbHEoA;J#6;)^!jh~?7OZM^_uh<9x-y1&6SddL2RuI+_& jhXbd~U`pU@2w;%;u={4EK6C56( a.headerlink, -h2:hover > a.headerlink, -h3:hover > a.headerlink, -h4:hover > a.headerlink, -h5:hover > a.headerlink, -h6:hover > a.headerlink, -dt:hover > a.headerlink { - visibility: visible; -} - -a.headerlink:hover { - background-color: #585858; - color: white; -} - -div.body p, div.body dd, div.body li { - /*text-align: justify;*/ - line-height: 130%; -} - -div.body p.caption { - text-align: inherit; -} - -div.body td { - text-align: left; -} - -ul.fakelist { - list-style: none; - margin: 10px 0 10px 20px; - padding: 0; -} - -.field-list ul { - padding-left: 1em; -} - -.first { - margin-top: 0 !important; -} - -/* "Footnotes" heading */ -p.rubric { - margin-top: 30px; - font-weight: bold; -} - -/* "Topics" */ - -div.topic { - background-color: #F8F8F8; - border: 1px solid #ccc; - padding: 10px 10px 10px 10px; - margin: 10px 10px 10px 0; -} - -p.topic-title { - font-size: 1.1em; - font-weight: bold; - margin-top: 10px; -} - -/* Admonitions */ - -div.admonition { - margin-top: 10px; - margin-bottom: 10px; - padding: 7px; -} - -div.admonition dt { - font-weight: bold; -} - -div.admonition dl { - margin-bottom: 0; -} - -div.admonition p { - display: inline; -} - -div.seealso { - background-color: #ffc; - border: 1px solid #ff6; -} - -div.warning { - background-color: #ffe4e4; - border: 1px solid #f66; -} - -div.note { - background-color: #eee; - border: 1px solid #ccc; -} - -p.admonition-title { - margin: 0px 10px 5px 0px; - font-weight: bold; - display: inline; -} - -p.admonition-title:after { - content: ":"; -} - -div.body p.centered { - text-align: center; - margin-top: 25px; -} - -table.docutils { - border: 0; -} - -table.docutils td, table.docutils th { - padding: 1px 8px 1px 0; - border-top: 0; - border-left: 0; - border-right: 0; - border-bottom: 1px solid #aaa; -} - -table.field-list td, table.field-list th { - border: 0 !important; -} - -table.footnote td, table.footnote th { - border: 0 !important; -} - -.field-list ul { - margin: 0; - padding-left: 1em; -} - -.field-list p { - margin: 0; -} - -dl { - margin-bottom: 15px; - clear: both; -} - -dd p { - margin-top: 0px; -} - -dd ul, dd table { - margin-bottom: 10px; -} - -dd { - margin-top: 3px; - margin-bottom: 10px; - margin-left: 30px; -} - -.refcount { - color: #060; -} - -dt:target, -.highlight { - background-color: #fbe54e; -} - -dl.glossary dt { - font-weight: bold; - font-size: 1.1em; -} - -th { - text-align: left; - padding-right: 5px; -} - -pre { - padding: 5px; - background-color: #FAFAFA; - color: #333; - border: 1px solid #999999; - border-left: none; - border-right: none; - overflow: auto; -} - -td.linenos pre { - padding: 5px 0px; - border: 0; - background-color: transparent; - color: #aaa; -} - -table.highlighttable { - margin-left: 0.5em; -} - -table.highlighttable td { - padding: 0 0.5em 0 0.5em; -} - -tt { - background-color: #ecf0f3; - padding: 0 1px 0 1px; - font-size: 0.95em; -} - -tt.descname { - background-color: transparent; - font-weight: bold; - font-size: 1.2em; -} - -tt.descclassname { - background-color: transparent; -} - -tt.xref, a tt { - background-color: transparent; - font-weight: bold; -} - -.footnote:target { background-color: #ffa } - -h1 tt, h2 tt, h3 tt, h4 tt, h5 tt, h6 tt { - background-color: transparent; -} - -.optional { - font-size: 1.3em; -} - -.versionmodified { - font-style: italic; -} - -form.comment { - margin: 0; - padding: 10px 30px 10px 30px; - background-color: #eee; -} - -form.comment h3 { - background-color: #326591; - color: white; - margin: -10px -30px 10px -30px; - padding: 5px; - font-size: 1.4em; -} - -form.comment input, -form.comment textarea { - border: 1px solid #ccc; - padding: 2px; - font-family: sans-serif; - font-size: 100%; -} - -form.comment input[type="text"] { - width: 240px; -} - -form.comment textarea { - width: 100%; - height: 200px; - margin-bottom: 10px; -} - -.system-message { - background-color: #fda; - padding: 5px; - border: 3px solid red; -} - -/* :::: PRINT :::: */ -@media print { - div.document, - div.documentwrapper, - div.bodywrapper { - margin: 0; - width : 100%; - } - - div.sphinxsidebar, - div.related, - div.footer, - div#comments div.new-comment-box, - #top-link { - display: none; - } -} diff --git a/setup.py b/setup.py index 1cfbe8e5..be595a0f 100644 --- a/setup.py +++ b/setup.py @@ -185,7 +185,6 @@ def main(): "Operating System :: OS Independent", "Programming Language :: C", "Programming Language :: Python", - "Programming Language :: Python :: 2.3", "Programming Language :: Python :: 2.4", "Programming Language :: Python :: 2.5", "Programming Language :: Python :: 2.6",