Set the HTML/Qt Help theme when building either one of those, otherwise use the default theme.

This commit is contained in:
Raoul Snyman 2011-03-27 22:25:02 +02:00
parent a8249b99ec
commit 3efb36c9e3

View File

@ -14,6 +14,8 @@
import sys
import os
print sys.argv
# If extensions (or modules to document with autodoc) are in another directory,
# add these directories to sys.path here. If the directory is relative to the
# documentation root, use os.path.abspath to make it absolute, like shown here.
@ -42,7 +44,7 @@ master_doc = 'index'
# General information about the project.
project = u'OpenLP'
copyright = u'2010, Raoul Snyman'
copyright = u'2004 - 2011, Raoul Snyman'
# The version info for the project you're documenting, acts as replacement for
# |version| and |release|, also used in various other places throughout the
@ -92,19 +94,30 @@ pygments_style = 'sphinx'
# The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes.
if sys.argv[2] == 'qthelp' or sys.argv[2] == 'htmlhelp':
html_theme = 'openlp_qthelp'
else:
html_theme = 'default'
# 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 = {}
if sys.argv[2] == 'html':
html_theme_options = {
'sidebarbgcolor': '#3a60a9',
'relbarbgcolor': '#203b6f',
'footerbgcolor': '#26437c',
'headtextcolor': '#203b6f',
'linkcolor': '#26437c',
'sidebarlinkcolor': '#ceceff'
}
# Add any paths that contain custom themes here, relative to this directory.
#html_theme_path = []
html_theme_path = [os.path.join(os.path.abspath('..'), 'themes')]
# The name for this set of Sphinx documents. If None, it defaults to
# "<project> v<release> documentation".
#html_title = None
html_title = u'OpenLP 2.0 Reference Manual'
# A shorter title for the navigation bar. Default is the same as html_title.
#html_short_title = None
@ -125,7 +138,7 @@ html_static_path = ['_static']
# If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
# using the given strftime format.
#html_last_updated_fmt = '%b %d, %Y'
html_last_updated_fmt = '%b %d, %Y'
# If true, SmartyPants will be used to convert quotes and dashes to
# typographically correct entities.
@ -165,7 +178,7 @@ html_static_path = ['_static']
#html_file_suffix = None
# Output file base name for HTML help builder.
htmlhelp_basename = 'OpenLPdoc'
htmlhelp_basename = 'OpenLP'
# -- Options for LaTeX output --------------------------------------------------
@ -179,7 +192,7 @@ htmlhelp_basename = 'OpenLPdoc'
# Grouping the document tree into LaTeX files. List of tuples
# (source start file, target name, title, author, documentclass [howto/manual]).
latex_documents = [
('index', 'OpenLP.tex', u'OpenLP Documentation',
('index', 'OpenLP.tex', u'OpenLP Reference Manual',
u'Wesley Stout', 'manual'),
]
@ -212,6 +225,6 @@ latex_documents = [
# One entry per manual page. List of tuples
# (source start file, name, description, authors, manual section).
man_pages = [
('index', 'openlp', u'OpenLP Documentation',
('index', 'openlp', u'OpenLP Reference Manual',
[u'Wesley Stout'], 1)
]