Merge branch 'master' into fix-273
@ -4,8 +4,16 @@ python:
|
||||
- 3.4
|
||||
- 3.5
|
||||
- 3.6
|
||||
matrix:
|
||||
include:
|
||||
- python: 2.7
|
||||
env: TOXENV=docs
|
||||
sudo: false
|
||||
install:
|
||||
- pip install tox-travis
|
||||
script:
|
||||
- tox
|
||||
|
||||
branches:
|
||||
only:
|
||||
- master
|
||||
|
29
Gruntfile.js
@ -14,7 +14,7 @@ module.exports = function(grunt) {
|
||||
server: {
|
||||
options: {
|
||||
port: 1919,
|
||||
base: 'demo_docs/build',
|
||||
base: 'docs/build',
|
||||
livereload: true
|
||||
}
|
||||
}
|
||||
@ -32,8 +32,10 @@ module.exports = function(grunt) {
|
||||
{
|
||||
expand: true,
|
||||
flatten: true,
|
||||
src: ['bower_components/lato-googlefont/Lato-Bold.ttf',
|
||||
'bower_components/lato-googlefont/Lato-Regular.ttf'],
|
||||
src: ['bower_components/lato-googlefont/Lato-Regular.ttf',
|
||||
'bower_components/lato-googlefont/Lato-Italic.ttf',
|
||||
'bower_components/lato-googlefont/Lato-Bold.ttf',
|
||||
'bower_components/lato-googlefont/Lato-BoldItalic.ttf'],
|
||||
dest: 'sphinx_rtd_theme/static/fonts/',
|
||||
filter: 'isFile'
|
||||
},
|
||||
@ -74,6 +76,7 @@ module.exports = function(grunt) {
|
||||
build: {
|
||||
options: {
|
||||
style: 'compressed',
|
||||
sourcemap: 'none',
|
||||
loadPath: ['bower_components/bourbon/dist', 'bower_components/neat/app/assets/stylesheets', 'bower_components/font-awesome/scss', 'bower_components/wyrm/sass']
|
||||
},
|
||||
files: [{
|
||||
@ -114,12 +117,14 @@ module.exports = function(grunt) {
|
||||
cmd: 'bower update'
|
||||
},
|
||||
build_sphinx: {
|
||||
cmd: 'sphinx-build demo_docs/source demo_docs/build'
|
||||
cmd: 'sphinx-build docs/ docs/build'
|
||||
}
|
||||
},
|
||||
clean: {
|
||||
build: ["demo_docs/build"],
|
||||
fonts: ["sphinx_rtd_theme/static/fonts"]
|
||||
build: ["docs/build"],
|
||||
fonts: ["sphinx_rtd_theme/static/fonts"],
|
||||
css: ["sphinx_rtd_theme/static/css"],
|
||||
js: ["sphinx_rtd_theme/static/js/*", "!sphinx_rtd_theme/static/js/modernizr.min.js"]
|
||||
},
|
||||
|
||||
watch: {
|
||||
@ -130,7 +135,7 @@ module.exports = function(grunt) {
|
||||
},
|
||||
/* Changes in theme dir rebuild sphinx */
|
||||
sphinx: {
|
||||
files: ['sphinx_rtd_theme/**/*', 'demo_docs/**/*.rst', 'demo_docs/**/*.py'],
|
||||
files: ['sphinx_rtd_theme/**/*', 'README.rst', 'docs/**/*.rst', 'docs/**/*.py'],
|
||||
tasks: ['clean:build','exec:build_sphinx']
|
||||
},
|
||||
/* JavaScript */
|
||||
@ -138,9 +143,9 @@ module.exports = function(grunt) {
|
||||
files: ['js/*.js'],
|
||||
tasks: ['browserify:dev']
|
||||
},
|
||||
/* live-reload the demo_docs if sphinx re-builds */
|
||||
/* live-reload the docs if sphinx re-builds */
|
||||
livereload: {
|
||||
files: ['demo_docs/build/**/*'],
|
||||
files: ['docs/build/**/*'],
|
||||
options: { livereload: true }
|
||||
}
|
||||
}
|
||||
@ -156,8 +161,6 @@ module.exports = function(grunt) {
|
||||
grunt.loadNpmTasks('grunt-open');
|
||||
grunt.loadNpmTasks('grunt-browserify');
|
||||
|
||||
grunt.registerTask('fonts', ['clean:fonts','copy:fonts']);
|
||||
grunt.registerTask('default', ['exec:bower_update','clean:build','sass:dev','browserify:dev','exec:build_sphinx','connect','open','watch']);
|
||||
grunt.registerTask('build', ['exec:bower_update','clean:build','sass:build','browserify:build','exec:build_sphinx']);
|
||||
grunt.registerTask('default', ['exec:bower_update','clean','copy:fonts','sass:dev','browserify:dev','exec:build_sphinx','connect','open','watch']);
|
||||
grunt.registerTask('build', ['exec:bower_update','clean','copy:fonts','sass:build','browserify:build','exec:build_sphinx']);
|
||||
}
|
||||
|
||||
|
169
README.rst
@ -6,14 +6,26 @@
|
||||
.. _wyrm: http://www.github.com/snide/wyrm/
|
||||
.. _grunt: http://www.gruntjs.com
|
||||
.. _node: http://www.nodejs.com
|
||||
.. _demo: http://docs.readthedocs.org
|
||||
.. _demo: https://sphinx-rtd-theme.readthedocs.io/en/latest/
|
||||
.. _hidden: http://sphinx-doc.org/markup/toctree.html
|
||||
|
||||
.. image:: https://img.shields.io/pypi/v/sphinx_rtd_theme.svg
|
||||
:target: https://pypi.python.org/pypi/sphinx_rtd_theme
|
||||
.. image:: https://travis-ci.org/rtfd/sphinx_rtd_theme.svg?branch=master
|
||||
:target: https://travis-ci.org/rtfd/sphinx_rtd_theme
|
||||
.. image:: https://img.shields.io/pypi/l/sphinx_rtd_theme.svg
|
||||
:target: https://pypi.python.org/pypi/sphinx_rtd_theme/
|
||||
:alt: license
|
||||
.. image:: https://readthedocs.org/projects/sphinx-rtd-theme/badge/?version=latest
|
||||
:target: http://sphinx-rtd-theme.readthedocs.io/en/latest/?badge=latest
|
||||
:alt: Documentation Status
|
||||
|
||||
**************************
|
||||
Read the Docs Sphinx Theme
|
||||
**************************
|
||||
|
||||
.. contents::
|
||||
:backlinks: none
|
||||
|
||||
View a working demo_ over on readthedocs.org_.
|
||||
|
||||
@ -23,9 +35,6 @@ If you'd like to update the theme,
|
||||
please make your edits to the SASS files here,
|
||||
rather than the .css files on checked into the repo.
|
||||
|
||||
.. image:: screen_mobile.png
|
||||
:width: 100%
|
||||
|
||||
Installation
|
||||
============
|
||||
|
||||
@ -36,33 +45,28 @@ Download the package or add it to your ``requirements.txt`` file:
|
||||
|
||||
.. code:: bash
|
||||
|
||||
$ pip install sphinx_rtd_theme
|
||||
pip install sphinx_rtd_theme
|
||||
|
||||
In your ``conf.py`` file:
|
||||
|
||||
.. code:: python
|
||||
|
||||
import sphinx_rtd_theme
|
||||
|
||||
html_theme = "sphinx_rtd_theme"
|
||||
|
||||
html_theme_path = [sphinx_rtd_theme.get_html_theme_path()]
|
||||
|
||||
You may also specify a canonical url in conf.py to let search engines know
|
||||
they should give higher ranking to latest version of the docs:
|
||||
or (since v0.2.5):
|
||||
|
||||
.. code:: python
|
||||
|
||||
html_theme_options['canonical_url'] = 'http://domain.tld/latest/docs/'
|
||||
|
||||
The url points to the root of the documentation. It requires a trailing slash.
|
||||
html_theme = "sphinx_rtd_theme"
|
||||
|
||||
Via git or download
|
||||
-------------------
|
||||
|
||||
Symlink or subtree the ``sphinx_rtd_theme/sphinx_rtd_theme`` repository into your documentation at
|
||||
``docs/_themes/sphinx_rtd_theme`` then add the following two settings to your Sphinx
|
||||
conf.py file:
|
||||
``conf.py`` file:
|
||||
|
||||
.. code:: python
|
||||
|
||||
@ -84,11 +88,48 @@ file of this repository, and can be defined in your project's ``conf.py`` via
|
||||
.. code:: python
|
||||
|
||||
html_theme_options = {
|
||||
'typekit_id': '',
|
||||
'canonical_url': '',
|
||||
'analytics_id': '',
|
||||
'logo_only': False,
|
||||
'display_version': True,
|
||||
'prev_next_buttons_location': bottom,
|
||||
'style_external_links': False,
|
||||
# Toc options
|
||||
'collapse_navigation': False,
|
||||
'display_version': False,
|
||||
'navigation_depth': 3,
|
||||
'sticky_navigation': True,
|
||||
'navigation_depth': 4,
|
||||
'includehidden': True,
|
||||
'titles_only': False
|
||||
}
|
||||
|
||||
The following options are available:
|
||||
|
||||
Base options
|
||||
~~~~~~~~~~~~
|
||||
|
||||
* ``typekit_id`` This will let users specify a typekit id to use for displaying nicer fonts.
|
||||
* ``canonical_url`` String. This will specify a `canonical url <https://en.wikipedia.org/wiki/Canonical_link_element>`__
|
||||
to let search engines know they should give higher ranking to latest version of the docs.
|
||||
The url points to the root of the documentation and requires a trailing slash.
|
||||
* ``analytics_id`` String. Change the Google Analytics ID that is included on pages.
|
||||
* ``display_version`` Bool. With this disabled, the version number isn't shown at the top of the sidebar.
|
||||
* ``prev_next_buttons_location`` String. can take the value ``bottom``, ``top``, ``both`` , or ``None``
|
||||
and will display the "Next" and "Previous" buttons accordingly.
|
||||
* ``style_external_links`` Bool. Add an icon next to external links. Defaults to ``False``.
|
||||
|
||||
TOC Options
|
||||
~~~~~~~~~~~
|
||||
|
||||
These effect how we display the Table of Contents in the side bar. You can read more about them here: http://www.sphinx-doc.org/en/stable/templating.html#toctree
|
||||
|
||||
* ``collapse_navigation`` Bool. With this enabled, you will lose the `[+]` drop downs next to each section in the sidebar.
|
||||
This is useful for _very large_ documents.
|
||||
* ``sticky_navigation`` Bool. This causes the sidebar to scroll with the main page content as you scroll the page.
|
||||
* ``navigation_depth`` Int. Indicate the max depth of the tree; by default, all levels are included.
|
||||
* ``includehidden`` Bool. Specifies if the sidebar includes toctrees marked with the `:hidden:` option
|
||||
* ``titles_only`` Bool. If True, removes headers within a page from the sidebar.
|
||||
|
||||
Page-level configuration
|
||||
------------------------
|
||||
|
||||
@ -105,6 +146,20 @@ Changelog
|
||||
master
|
||||
------
|
||||
|
||||
* Include fontawesome-webfont.woff2 in pip package
|
||||
* Updated wyrm_ and Font Awesome
|
||||
* Split multiple data types on different lines
|
||||
* Italicize ``.versionmodified``
|
||||
* Fix line number spacing to align with the code lines
|
||||
* Hide Edit links on auto created pages
|
||||
* Align ``.. centered::`` text to the center
|
||||
* Increase contrast for footnotes
|
||||
* Add language to the JS output variable
|
||||
* Include the lato italics font with the theme
|
||||
* Fix padding on field lists
|
||||
* Add setuptools entry point allowing to use ``sphinx_rtd_theme`` as
|
||||
Sphinx ``html_theme`` directly.
|
||||
|
||||
v0.2.4
|
||||
------
|
||||
|
||||
@ -140,15 +195,12 @@ v0.2.0
|
||||
v0.1.10-alpha
|
||||
-------------
|
||||
|
||||
.. note::
|
||||
This is a pre-release version
|
||||
.. note:: This is a pre-release version
|
||||
|
||||
* Removes Sphinx dependency
|
||||
* Fixes hamburger on mobile display
|
||||
* Adds a ``body_begin`` block to the template
|
||||
* Add ``prev_next_buttons_location`` which can take the value ``bottom``,
|
||||
``top``, ``both`` , ``None`` and will display the "Next" and "Previous"
|
||||
buttons accordingly
|
||||
* Added ``prev_next_buttons_location``
|
||||
|
||||
v0.1.9
|
||||
------
|
||||
@ -165,7 +217,7 @@ v0.1.9
|
||||
* Fixed modernizr URL
|
||||
* Small display style changes on code blocks, figure captions, and nav elements
|
||||
|
||||
.. _#215: https://github.com/snide/sphinx_rtd_theme/pull/215
|
||||
.. _#215: https://github.com/rtfd/sphinx_rtd_theme/pull/215
|
||||
|
||||
v0.1.8
|
||||
------
|
||||
@ -179,7 +231,7 @@ v0.1.8
|
||||
How the Table of Contents builds
|
||||
================================
|
||||
|
||||
Currently the left menu will build based upon any ``toctree(s)`` defined in your index.rst file.
|
||||
Currently the left menu will build based upon any ``toctree(s)`` defined in your ``index.rst`` file.
|
||||
It outputs 2 levels of depth, which should give your visitors a high level of access to your
|
||||
docs. If no toctrees are set the theme reverts to sphinx's usual local toctree.
|
||||
|
||||
@ -187,7 +239,7 @@ It's important to note that if you don't follow the same styling for your rST he
|
||||
your documents, the toctree will misbuild, and the resulting menu might not show the correct
|
||||
depth when it renders.
|
||||
|
||||
Also note that the table of contents is set with ``includehidden=true``. This allows you
|
||||
Also note that by default the table of contents is set with ``includehidden=True``. This allows you
|
||||
to set a hidden toc in your index file with the hidden_ property that will allow you
|
||||
to build a toc without it rendering in your index.
|
||||
|
||||
@ -208,29 +260,29 @@ of a front-end developer (vs. that of a python developer). That means installing
|
||||
Set up your environment
|
||||
-----------------------
|
||||
|
||||
1. Install sphinx_ into a virtual environment.
|
||||
#. Install sphinx_ into a virtual environment.
|
||||
|
||||
.. code::
|
||||
.. code:: bash
|
||||
|
||||
pip install sphinx
|
||||
pip install sphinx sphinxcontrib-httpdomain
|
||||
|
||||
2. Install sass
|
||||
#. Install sass.
|
||||
|
||||
.. code::
|
||||
.. code:: bash
|
||||
|
||||
gem install sass
|
||||
|
||||
2. Install node, bower and grunt.
|
||||
#. Install node, bower, grunt, and theme dependencies.
|
||||
|
||||
.. code::
|
||||
.. code:: bash
|
||||
|
||||
// Install node
|
||||
# Install node
|
||||
brew install node
|
||||
|
||||
// Install bower and grunt
|
||||
# Install bower and grunt
|
||||
npm install -g bower grunt-cli
|
||||
|
||||
// Now that everything is installed, let's install the theme dependecies.
|
||||
# Now that everything is installed, let's install the theme dependencies.
|
||||
npm install
|
||||
|
||||
Now that our environment is set up, make sure you're in your virtual environment, go to
|
||||
@ -240,14 +292,13 @@ this repository in your terminal and run grunt:
|
||||
|
||||
grunt
|
||||
|
||||
This default task will do the following **very cool things that make it worth the trouble**.
|
||||
|
||||
1. It'll install and update any bower dependencies.
|
||||
2. It'll run sphinx and build new docs.
|
||||
3. It'll watch for changes to the sass files and build css from the changes.
|
||||
4. It'll rebuild the sphinx docs anytime it notices a change to .rst, .html, .js
|
||||
or .css files.
|
||||
This default task will do the following **very cool things that make it worth the trouble**:
|
||||
|
||||
#. Install and update any bower dependencies.
|
||||
#. Run sphinx and build new docs.
|
||||
#. Watch for changes to the sass files and build css from the changes.
|
||||
#. Rebuild the sphinx docs anytime it notices a change to ``.rst``, ``.html``, ``.js``
|
||||
or ``.css`` files.
|
||||
|
||||
Before you create an issue
|
||||
--------------------------
|
||||
@ -260,34 +311,22 @@ way for me to ignore your request. RST unfortunately can spit out a lot of thing
|
||||
in a lot of ways. I don't have time to research your problem for you, but I do
|
||||
have time to fix the actual styling issue if you can replicate the problem for me.
|
||||
|
||||
Releasing the Theme
|
||||
===================
|
||||
|
||||
Before you send a Pull Request
|
||||
------------------------------
|
||||
When you release a new version,
|
||||
you should do the following:
|
||||
|
||||
When you're done with your edits, you can run ``grunt build`` to clean out the old
|
||||
files and rebuild a new distribution, compressing the css and cleaning out
|
||||
extraneous files. Please do this before you send in a PR.
|
||||
|
||||
Using this theme locally, then building on Read the Docs?
|
||||
==========================================================
|
||||
|
||||
Currently if you import sphinx_rtd_theme in your local sphinx build, then pass
|
||||
that same config to Read the Docs, it will fail, since RTD gets confused. If
|
||||
you want to run this theme locally and then also have it build on RTD, then
|
||||
you can add something like this to your config. Thanks to Daniel Oaks for this.
|
||||
|
||||
.. code:: python
|
||||
|
||||
# on_rtd is whether we are on readthedocs.org, this line of code grabbed from docs.readthedocs.org
|
||||
on_rtd = os.environ.get('READTHEDOCS', None) == 'True'
|
||||
|
||||
if not on_rtd: # only import and set the theme if we're building docs locally
|
||||
import sphinx_rtd_theme
|
||||
html_theme = 'sphinx_rtd_theme'
|
||||
html_theme_path = [sphinx_rtd_theme.get_html_theme_path()]
|
||||
|
||||
# otherwise, readthedocs.org uses their theme by default, so no need to specify it
|
||||
#. Bump the version in ``sphinx_rtd_theme/__init__.py`` – we try to follow `semver <http://semver.org/>`_, so be careful with breaking changes.
|
||||
#. Run a ``grunt build`` to rebuild all the theme assets.
|
||||
#. Commit that change.
|
||||
#. Tag the release in git: ``git tag $NEW_VERSION``.
|
||||
#. Push the tag to GitHub: ``git push --tags origin``.
|
||||
#. Upload the package to PyPI: ``python setup.py sdist bdist_wheel upload``.
|
||||
#. In the ``readthedocs.org`` repo, edit the ``bower.json`` file to point at the correct version (``sphinx-rtd-theme": "https://github.com/rtfd/sphinx-rtd-theme.git#$NEW_VERSION"``).
|
||||
#. In the ``readthedocs.org`` repo, run ``gulp build`` to update the distributed theme files.
|
||||
|
||||
TODO
|
||||
====
|
||||
|
||||
* Separate some sass variables at the theme level so you can overwrite some basic colors.
|
||||
|
@ -12,7 +12,6 @@
|
||||
],
|
||||
"ignore": [
|
||||
"docs",
|
||||
"demo_docs",
|
||||
".gitignore",
|
||||
".DS_Store",
|
||||
".sass-cache*",
|
||||
|
@ -1,153 +0,0 @@
|
||||
# Makefile for Sphinx documentation
|
||||
#
|
||||
|
||||
# You can set these variables from the command line.
|
||||
SPHINXOPTS =
|
||||
SPHINXBUILD = sphinx-build
|
||||
PAPER =
|
||||
BUILDDIR = build
|
||||
|
||||
# Internal variables.
|
||||
PAPEROPT_a4 = -D latex_paper_size=a4
|
||||
PAPEROPT_letter = -D latex_paper_size=letter
|
||||
ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) source
|
||||
# the i18n builder cannot share the environment and doctrees with the others
|
||||
I18NSPHINXOPTS = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) source
|
||||
|
||||
.PHONY: help clean html dirhtml singlehtml pickle json htmlhelp qthelp devhelp epub latex latexpdf text man changes linkcheck doctest gettext
|
||||
|
||||
help:
|
||||
@echo "Please use \`make <target>' where <target> is one of"
|
||||
@echo " html to make standalone HTML files"
|
||||
@echo " dirhtml to make HTML files named index.html in directories"
|
||||
@echo " singlehtml to make a single large HTML file"
|
||||
@echo " pickle to make pickle files"
|
||||
@echo " json to make JSON files"
|
||||
@echo " htmlhelp to make HTML files and a HTML help project"
|
||||
@echo " qthelp to make HTML files and a qthelp project"
|
||||
@echo " devhelp to make HTML files and a Devhelp project"
|
||||
@echo " epub to make an epub"
|
||||
@echo " latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter"
|
||||
@echo " latexpdf to make LaTeX files and run them through pdflatex"
|
||||
@echo " text to make text files"
|
||||
@echo " man to make manual pages"
|
||||
@echo " texinfo to make Texinfo files"
|
||||
@echo " info to make Texinfo files and run them through makeinfo"
|
||||
@echo " gettext to make PO message catalogs"
|
||||
@echo " changes to make an overview of all changed/added/deprecated items"
|
||||
@echo " linkcheck to check all external links for integrity"
|
||||
@echo " doctest to run all doctests embedded in the documentation (if enabled)"
|
||||
|
||||
clean:
|
||||
-rm -rf $(BUILDDIR)/*
|
||||
|
||||
html:
|
||||
$(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html
|
||||
@echo
|
||||
@echo "Build finished. The HTML pages are in $(BUILDDIR)/html."
|
||||
|
||||
dirhtml:
|
||||
$(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml
|
||||
@echo
|
||||
@echo "Build finished. The HTML pages are in $(BUILDDIR)/dirhtml."
|
||||
|
||||
singlehtml:
|
||||
$(SPHINXBUILD) -b singlehtml $(ALLSPHINXOPTS) $(BUILDDIR)/singlehtml
|
||||
@echo
|
||||
@echo "Build finished. The HTML page is in $(BUILDDIR)/singlehtml."
|
||||
|
||||
pickle:
|
||||
$(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) $(BUILDDIR)/pickle
|
||||
@echo
|
||||
@echo "Build finished; now you can process the pickle files."
|
||||
|
||||
json:
|
||||
$(SPHINXBUILD) -b json $(ALLSPHINXOPTS) $(BUILDDIR)/json
|
||||
@echo
|
||||
@echo "Build finished; now you can process the JSON files."
|
||||
|
||||
htmlhelp:
|
||||
$(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) $(BUILDDIR)/htmlhelp
|
||||
@echo
|
||||
@echo "Build finished; now you can run HTML Help Workshop with the" \
|
||||
".hhp project file in $(BUILDDIR)/htmlhelp."
|
||||
|
||||
qthelp:
|
||||
$(SPHINXBUILD) -b qthelp $(ALLSPHINXOPTS) $(BUILDDIR)/qthelp
|
||||
@echo
|
||||
@echo "Build finished; now you can run "qcollectiongenerator" with the" \
|
||||
".qhcp project file in $(BUILDDIR)/qthelp, like this:"
|
||||
@echo "# qcollectiongenerator $(BUILDDIR)/qthelp/SphinxRTDthemedemo.qhcp"
|
||||
@echo "To view the help file:"
|
||||
@echo "# assistant -collectionFile $(BUILDDIR)/qthelp/SphinxRTDthemedemo.qhc"
|
||||
|
||||
devhelp:
|
||||
$(SPHINXBUILD) -b devhelp $(ALLSPHINXOPTS) $(BUILDDIR)/devhelp
|
||||
@echo
|
||||
@echo "Build finished."
|
||||
@echo "To view the help file:"
|
||||
@echo "# mkdir -p $$HOME/.local/share/devhelp/SphinxRTDthemedemo"
|
||||
@echo "# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/SphinxRTDthemedemo"
|
||||
@echo "# devhelp"
|
||||
|
||||
epub:
|
||||
$(SPHINXBUILD) -b epub $(ALLSPHINXOPTS) $(BUILDDIR)/epub
|
||||
@echo
|
||||
@echo "Build finished. The epub file is in $(BUILDDIR)/epub."
|
||||
|
||||
latex:
|
||||
$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
|
||||
@echo
|
||||
@echo "Build finished; the LaTeX files are in $(BUILDDIR)/latex."
|
||||
@echo "Run \`make' in that directory to run these through (pdf)latex" \
|
||||
"(use \`make latexpdf' here to do that automatically)."
|
||||
|
||||
latexpdf:
|
||||
$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
|
||||
@echo "Running LaTeX files through pdflatex..."
|
||||
$(MAKE) -C $(BUILDDIR)/latex all-pdf
|
||||
@echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex."
|
||||
|
||||
text:
|
||||
$(SPHINXBUILD) -b text $(ALLSPHINXOPTS) $(BUILDDIR)/text
|
||||
@echo
|
||||
@echo "Build finished. The text files are in $(BUILDDIR)/text."
|
||||
|
||||
man:
|
||||
$(SPHINXBUILD) -b man $(ALLSPHINXOPTS) $(BUILDDIR)/man
|
||||
@echo
|
||||
@echo "Build finished. The manual pages are in $(BUILDDIR)/man."
|
||||
|
||||
texinfo:
|
||||
$(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo
|
||||
@echo
|
||||
@echo "Build finished. The Texinfo files are in $(BUILDDIR)/texinfo."
|
||||
@echo "Run \`make' in that directory to run these through makeinfo" \
|
||||
"(use \`make info' here to do that automatically)."
|
||||
|
||||
info:
|
||||
$(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo
|
||||
@echo "Running Texinfo files through makeinfo..."
|
||||
make -C $(BUILDDIR)/texinfo info
|
||||
@echo "makeinfo finished; the Info files are in $(BUILDDIR)/texinfo."
|
||||
|
||||
gettext:
|
||||
$(SPHINXBUILD) -b gettext $(I18NSPHINXOPTS) $(BUILDDIR)/locale
|
||||
@echo
|
||||
@echo "Build finished. The message catalogs are in $(BUILDDIR)/locale."
|
||||
|
||||
changes:
|
||||
$(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) $(BUILDDIR)/changes
|
||||
@echo
|
||||
@echo "The overview file is in $(BUILDDIR)/changes."
|
||||
|
||||
linkcheck:
|
||||
$(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) $(BUILDDIR)/linkcheck
|
||||
@echo
|
||||
@echo "Link check complete; look for any errors in the above output " \
|
||||
"or in $(BUILDDIR)/linkcheck/output.txt."
|
||||
|
||||
doctest:
|
||||
$(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) $(BUILDDIR)/doctest
|
||||
@echo "Testing of doctests in the sources finished, look at the " \
|
||||
"results in $(BUILDDIR)/doctest/output.txt."
|
@ -1,7 +0,0 @@
|
||||
:mod:`test_py_module`
|
||||
=====================
|
||||
|
||||
.. automodule:: test_py_module.test
|
||||
:members:
|
||||
:private-members:
|
||||
:special-members:
|
@ -1,601 +0,0 @@
|
||||
.. This is a comment. Note how any initial comments are moved by
|
||||
transforms to after the document title, subtitle, and docinfo.
|
||||
|
||||
================================
|
||||
reStructuredText Demonstration
|
||||
================================
|
||||
|
||||
.. Above is the document title, and below is the subtitle.
|
||||
They are transformed from section titles after parsing.
|
||||
|
||||
--------------------------------
|
||||
Examples of Syntax Constructs
|
||||
--------------------------------
|
||||
|
||||
.. bibliographic fields (which also require a transform):
|
||||
|
||||
:Author: David Goodger
|
||||
:Address: 123 Example Street
|
||||
Example, EX Canada
|
||||
A1B 2C3
|
||||
:Contact: docutils-develop@lists.sourceforge.net
|
||||
:Authors: Me; Myself; I
|
||||
:organization: humankind
|
||||
:date: $Date: 2012-01-03 19:23:53 +0000 (Tue, 03 Jan 2012) $
|
||||
:status: This is a "work in progress"
|
||||
:revision: $Revision: 7302 $
|
||||
:version: 1
|
||||
:copyright: This document has been placed in the public domain. You
|
||||
may do with it as you wish. You may copy, modify,
|
||||
redistribute, reattribute, sell, buy, rent, lease,
|
||||
destroy, or improve it, quote it at length, excerpt,
|
||||
incorporate, collate, fold, staple, or mutilate it, or do
|
||||
anything else to it that your or anyone else's heart
|
||||
desires.
|
||||
:field name: This is a generic bibliographic field.
|
||||
:field name 2:
|
||||
Generic bibliographic fields may contain multiple body elements.
|
||||
|
||||
Like this.
|
||||
|
||||
:Dedication:
|
||||
|
||||
For Docutils users & co-developers.
|
||||
|
||||
:abstract:
|
||||
|
||||
This document is a demonstration of the reStructuredText markup
|
||||
language, containing examples of all basic reStructuredText
|
||||
constructs and many advanced constructs.
|
||||
|
||||
.. meta::
|
||||
:keywords: reStructuredText, demonstration, demo, parser
|
||||
:description lang=en: A demonstration of the reStructuredText
|
||||
markup language, containing examples of all basic
|
||||
constructs and many advanced constructs.
|
||||
|
||||
.. contents:: Table of Contents
|
||||
.. section-numbering::
|
||||
|
||||
|
||||
Structural Elements
|
||||
===================
|
||||
|
||||
Section Title
|
||||
-------------
|
||||
|
||||
That's it, the text just above this line.
|
||||
|
||||
Transitions
|
||||
-----------
|
||||
|
||||
Here's a transition:
|
||||
|
||||
---------
|
||||
|
||||
It divides the section.
|
||||
|
||||
Body Elements
|
||||
=============
|
||||
|
||||
Paragraphs
|
||||
----------
|
||||
|
||||
A paragraph.
|
||||
|
||||
Inline Markup
|
||||
`````````````
|
||||
|
||||
Paragraphs contain text and may contain inline markup: *emphasis*,
|
||||
**strong emphasis**, ``inline literals``, standalone hyperlinks
|
||||
(http://www.python.org), external hyperlinks (Python_), internal
|
||||
cross-references (example_), external hyperlinks with embedded URIs
|
||||
(`Python web site <http://www.python.org>`__), footnote references
|
||||
(manually numbered [1]_, anonymous auto-numbered [#]_, labeled
|
||||
auto-numbered [#label]_, or symbolic [*]_), citation references
|
||||
([CIT2002]_), substitution references (|example|), and _`inline hyperlink targets`
|
||||
(see Targets_ below for a reference back to here).
|
||||
Character-level inline markup is also possible (although exceedingly ugly!)
|
||||
in *re*\ ``Structured``\ *Text*. Problems are indicated by |problematic| text
|
||||
(generated by processing errors; this one is intentional).
|
||||
|
||||
The default role for interpreted text is `Title Reference`. Here are
|
||||
some explicit interpreted text roles: a PEP reference (:PEP:`287`); an
|
||||
RFC reference (:RFC:`2822`); a :sub:`subscript`; a :sup:`superscript`;
|
||||
and explicit roles for :emphasis:`standard` :strong:`inline` :literal:`markup`.
|
||||
|
||||
GUI labels are a useful way to indicate that :guilabel:`Some action` is
|
||||
to be taken by the user. The GUI label should not run over
|
||||
``line-height`` so as not to :guilabel:`interfere` with text from adjacent lines.
|
||||
|
||||
Key-bindings indicate that the read is to press a button on the keyboard or mouse,
|
||||
for example :kbd:`MMB` and :kbd:`Shift-MMB`. Another useful markup to indicate a user action
|
||||
is to use ``menuselection`` this can be used to show short and long menus in software.
|
||||
For example, and ``menuselection`` can be seen here that breaks is too long to fit on this line.
|
||||
:menuselection:`My --> Software --> Some menu --> Some sub menu 1 --> sub menu 2`.
|
||||
|
||||
.. DO NOT RE-WRAP THE FOLLOWING PARAGRAPH!
|
||||
|
||||
Let's test wrapping and whitespace significance in inline literals:
|
||||
``This is an example of --inline-literal --text, --including some--
|
||||
strangely--hyphenated-words. Adjust-the-width-of-your-browser-window
|
||||
to see how the text is wrapped. -- ---- -------- Now note the
|
||||
spacing between the words of this sentence (words
|
||||
should be grouped in pairs).``
|
||||
|
||||
If the ``--pep-references`` option was supplied, there should be a
|
||||
live link to PEP 258 here.
|
||||
|
||||
Bullet Lists
|
||||
------------
|
||||
|
||||
- A bullet list
|
||||
|
||||
+ Nested bullet list.
|
||||
+ Nested item 2.
|
||||
|
||||
- Item 2.
|
||||
|
||||
Paragraph 2 of item 2.
|
||||
|
||||
* Nested bullet list.
|
||||
* Nested item 2.
|
||||
|
||||
- Third level.
|
||||
- Item 2.
|
||||
|
||||
* Nested item 3.
|
||||
|
||||
Enumerated Lists
|
||||
----------------
|
||||
|
||||
1. Arabic numerals.
|
||||
|
||||
a) lower alpha)
|
||||
|
||||
(i) (lower roman)
|
||||
|
||||
A. upper alpha.
|
||||
|
||||
I) upper roman)
|
||||
|
||||
2. Lists that don't start at 1:
|
||||
|
||||
3. Three
|
||||
|
||||
4. Four
|
||||
|
||||
C. C
|
||||
|
||||
D. D
|
||||
|
||||
iii. iii
|
||||
|
||||
iv. iv
|
||||
|
||||
#. List items may also be auto-enumerated.
|
||||
|
||||
Definition Lists
|
||||
----------------
|
||||
|
||||
Term
|
||||
Definition
|
||||
Term : classifier
|
||||
Definition paragraph 1.
|
||||
|
||||
Definition paragraph 2.
|
||||
Term
|
||||
Definition
|
||||
|
||||
Field Lists
|
||||
-----------
|
||||
|
||||
:what: Field lists map field names to field bodies, like database
|
||||
records. They are often part of an extension syntax. They are
|
||||
an unambiguous variant of RFC 2822 fields.
|
||||
|
||||
:how arg1 arg2:
|
||||
|
||||
The field marker is a colon, the field name, and a colon.
|
||||
|
||||
The field body may contain one or more body elements, indented
|
||||
relative to the field marker.
|
||||
|
||||
Option Lists
|
||||
------------
|
||||
|
||||
For listing command-line options:
|
||||
|
||||
-a command-line option "a"
|
||||
-b file options can have arguments
|
||||
and long descriptions
|
||||
--long options can be long also
|
||||
--input=file long options can also have
|
||||
arguments
|
||||
|
||||
--very-long-option
|
||||
The description can also start on the next line.
|
||||
|
||||
The description may contain multiple body elements,
|
||||
regardless of where it starts.
|
||||
|
||||
-x, -y, -z Multiple options are an "option group".
|
||||
-v, --verbose Commonly-seen: short & long options.
|
||||
-1 file, --one=file, --two file
|
||||
Multiple options with arguments.
|
||||
/V DOS/VMS-style options too
|
||||
|
||||
There must be at least two spaces between the option and the
|
||||
description.
|
||||
|
||||
Literal Blocks
|
||||
--------------
|
||||
|
||||
Literal blocks are indicated with a double-colon ("::") at the end of
|
||||
the preceding paragraph (over there ``-->``). They can be indented::
|
||||
|
||||
if literal_block:
|
||||
text = 'is left as-is'
|
||||
spaces_and_linebreaks = 'are preserved'
|
||||
markup_processing = None
|
||||
|
||||
Or they can be quoted without indentation::
|
||||
|
||||
>> Great idea!
|
||||
>
|
||||
> Why didn't I think of that?
|
||||
|
||||
Line Blocks
|
||||
-----------
|
||||
|
||||
| This is a line block. It ends with a blank line.
|
||||
| Each new line begins with a vertical bar ("|").
|
||||
| Line breaks and initial indents are preserved.
|
||||
| Continuation lines are wrapped portions of long lines;
|
||||
they begin with a space in place of the vertical bar.
|
||||
| The left edge of a continuation line need not be aligned with
|
||||
the left edge of the text above it.
|
||||
|
||||
| This is a second line block.
|
||||
|
|
||||
| Blank lines are permitted internally, but they must begin with a "|".
|
||||
|
||||
Take it away, Eric the Orchestra Leader!
|
||||
|
||||
| A one, two, a one two three four
|
||||
|
|
||||
| Half a bee, philosophically,
|
||||
| must, *ipso facto*, half not be.
|
||||
| But half the bee has got to be,
|
||||
| *vis a vis* its entity. D'you see?
|
||||
|
|
||||
| But can a bee be said to be
|
||||
| or not to be an entire bee,
|
||||
| when half the bee is not a bee,
|
||||
| due to some ancient injury?
|
||||
|
|
||||
| Singing...
|
||||
|
||||
Block Quotes
|
||||
------------
|
||||
|
||||
Block quotes consist of indented body elements:
|
||||
|
||||
My theory by A. Elk. Brackets Miss, brackets. This theory goes
|
||||
as follows and begins now. All brontosauruses are thin at one
|
||||
end, much much thicker in the middle and then thin again at the
|
||||
far end. That is my theory, it is mine, and belongs to me and I
|
||||
own it, and what it is too.
|
||||
|
||||
-- Anne Elk (Miss)
|
||||
|
||||
Doctest Blocks
|
||||
--------------
|
||||
|
||||
>>> print 'Python-specific usage examples; begun with ">>>"'
|
||||
Python-specific usage examples; begun with ">>>"
|
||||
>>> print '(cut and pasted from interactive Python sessions)'
|
||||
(cut and pasted from interactive Python sessions)
|
||||
|
||||
Tables
|
||||
------
|
||||
|
||||
Here's a grid table followed by a simple table:
|
||||
|
||||
+------------------------+------------+----------+----------+
|
||||
| Header row, column 1 | Header 2 | Header 3 | Header 4 |
|
||||
| (header rows optional) | | | |
|
||||
+========================+============+==========+==========+
|
||||
| body row 1, column 1 | column 2 | column 3 | column 4 |
|
||||
+------------------------+------------+----------+----------+
|
||||
| body row 2 | Cells may span columns. |
|
||||
+------------------------+------------+---------------------+
|
||||
| body row 3 | Cells may | - Table cells |
|
||||
+------------------------+ span rows. | - contain |
|
||||
| body row 4 | | - body elements. |
|
||||
+------------------------+------------+----------+----------+
|
||||
| body row 5 | Cells may also be | |
|
||||
| | empty: ``-->`` | |
|
||||
+------------------------+-----------------------+----------+
|
||||
|
||||
===== ===== ======
|
||||
Inputs Output
|
||||
------------ ------
|
||||
A B A or B
|
||||
===== ===== ======
|
||||
False False False
|
||||
True False True
|
||||
False True True
|
||||
True True True
|
||||
===== ===== ======
|
||||
|
||||
Footnotes
|
||||
---------
|
||||
|
||||
.. [1] A footnote contains body elements, consistently indented by at
|
||||
least 3 spaces.
|
||||
|
||||
This is the footnote's second paragraph.
|
||||
|
||||
.. [#label] Footnotes may be numbered, either manually (as in [1]_) or
|
||||
automatically using a "#"-prefixed label. This footnote has a
|
||||
label so it can be referred to from multiple places, both as a
|
||||
footnote reference ([#label]_) and as a hyperlink reference
|
||||
(label_).
|
||||
|
||||
.. [#] This footnote is numbered automatically and anonymously using a
|
||||
label of "#" only.
|
||||
|
||||
.. [*] Footnotes may also use symbols, specified with a "*" label.
|
||||
Here's a reference to the next footnote: [*]_.
|
||||
|
||||
.. [*] This footnote shows the next symbol in the sequence.
|
||||
|
||||
.. [4] Here's an unreferenced footnote, with a reference to a
|
||||
nonexistent footnote: [5]_.
|
||||
|
||||
Citations
|
||||
---------
|
||||
|
||||
.. [CIT2002] Citations are text-labeled footnotes. They may be
|
||||
rendered separately and differently from footnotes.
|
||||
|
||||
Here's a reference to the above, [CIT2002]_, and a [nonexistent]_
|
||||
citation.
|
||||
|
||||
Glossary
|
||||
--------
|
||||
|
||||
This is a glossary with definition terms for thing like :term:`Writing`:
|
||||
|
||||
.. glossary::
|
||||
|
||||
Documentation
|
||||
Provides users with the knowledge they need to use something.
|
||||
|
||||
Reading
|
||||
The process of taking information into ones mind through the use of eyes.
|
||||
|
||||
Writing
|
||||
The process of putting thoughts into a medium for other people to :term:`read <Reading>`.
|
||||
|
||||
Targets
|
||||
-------
|
||||
|
||||
.. _example:
|
||||
|
||||
This paragraph is pointed to by the explicit "example" target. A
|
||||
reference can be found under `Inline Markup`_, above. `Inline
|
||||
hyperlink targets`_ are also possible.
|
||||
|
||||
Section headers are implicit targets, referred to by name. See
|
||||
Targets_, which is a subsection of `Body Elements`_.
|
||||
|
||||
Explicit external targets are interpolated into references such as
|
||||
"Python_".
|
||||
|
||||
.. _Python: http://www.python.org/
|
||||
|
||||
Targets may be indirect and anonymous. Thus `this phrase`__ may also
|
||||
refer to the Targets_ section.
|
||||
|
||||
__ Targets_
|
||||
|
||||
Here's a `hyperlink reference without a target`_, which generates an
|
||||
error.
|
||||
|
||||
Duplicate Target Names
|
||||
``````````````````````
|
||||
|
||||
Duplicate names in section headers or other implicit targets will
|
||||
generate "info" (level-1) system messages. Duplicate names in
|
||||
explicit targets will generate "warning" (level-2) system messages.
|
||||
|
||||
Duplicate Target Names
|
||||
``````````````````````
|
||||
|
||||
Since there are two "Duplicate Target Names" section headers, we
|
||||
cannot uniquely refer to either of them by name. If we try to (like
|
||||
this: `Duplicate Target Names`_), an error is generated.
|
||||
|
||||
Directives
|
||||
----------
|
||||
|
||||
.. contents:: :local:
|
||||
|
||||
These are just a sample of the many reStructuredText Directives. For
|
||||
others, please see
|
||||
http://docutils.sourceforge.net/docs/ref/rst/directives.html.
|
||||
|
||||
Document Parts
|
||||
``````````````
|
||||
|
||||
An example of the "contents" directive can be seen above this section
|
||||
(a local, untitled table of contents_) and at the beginning of the
|
||||
document (a document-wide `table of contents`_).
|
||||
|
||||
Images
|
||||
``````
|
||||
|
||||
An image directive (also clickable -- a hyperlink reference):
|
||||
|
||||
.. image:: images/title.png
|
||||
:target: directives_
|
||||
|
||||
A figure directive:
|
||||
|
||||
.. figure:: images/title.png
|
||||
:alt: reStructuredText, the markup syntax
|
||||
|
||||
A figure is an image with a caption and/or a legend:
|
||||
|
||||
+------------+-----------------------------------------------+
|
||||
| re | Revised, revisited, based on 're' module. |
|
||||
+------------+-----------------------------------------------+
|
||||
| Structured | Structure-enhanced text, structuredtext. |
|
||||
+------------+-----------------------------------------------+
|
||||
| Text | Well it is, isn't it? |
|
||||
+------------+-----------------------------------------------+
|
||||
|
||||
This paragraph is also part of the legend.
|
||||
|
||||
A figure directive with center alignment
|
||||
|
||||
.. figure:: images/title.png
|
||||
:align: center
|
||||
:width: 300
|
||||
|
||||
Admonitions
|
||||
```````````
|
||||
|
||||
.. Attention:: Directives at large.
|
||||
|
||||
.. Caution::
|
||||
|
||||
Don't take any wooden nickels.
|
||||
|
||||
.. DANGER:: Mad scientist at work!
|
||||
|
||||
.. Error:: Does not compute.
|
||||
|
||||
.. Hint:: It's bigger than a bread box.
|
||||
|
||||
.. Important::
|
||||
- Wash behind your ears.
|
||||
- Clean up your room.
|
||||
- Call your mother.
|
||||
- Back up your data.
|
||||
|
||||
.. Note:: This is a note.
|
||||
|
||||
.. Tip:: 15% if the service is good.
|
||||
|
||||
.. WARNING:: Strong prose may provoke extreme mental exertion.
|
||||
Reader discretion is strongly advised.
|
||||
|
||||
.. admonition:: And, by the way...
|
||||
|
||||
You can make up your own admonition too.
|
||||
|
||||
Topics, Sidebars, and Rubrics
|
||||
`````````````````````````````
|
||||
|
||||
.. sidebar:: Sidebar Title
|
||||
:subtitle: Optional Subtitle
|
||||
|
||||
This is a sidebar. It is for text outside the flow of the main
|
||||
text.
|
||||
|
||||
.. rubric:: This is a rubric inside a sidebar
|
||||
|
||||
Sidebars often appears beside the main text with a border and
|
||||
background color.
|
||||
|
||||
.. topic:: Topic Title
|
||||
|
||||
This is a topic.
|
||||
|
||||
.. rubric:: This is a rubric
|
||||
|
||||
Target Footnotes
|
||||
````````````````
|
||||
|
||||
.. target-notes::
|
||||
|
||||
Replacement Text
|
||||
````````````````
|
||||
|
||||
I recommend you try |Python|_.
|
||||
|
||||
.. |Python| replace:: Python, *the* best language around
|
||||
|
||||
Compound Paragraph
|
||||
``````````````````
|
||||
|
||||
.. compound::
|
||||
|
||||
This paragraph contains a literal block::
|
||||
|
||||
Connecting... OK
|
||||
Transmitting data... OK
|
||||
Disconnecting... OK
|
||||
|
||||
and thus consists of a simple paragraph, a literal block, and
|
||||
another simple paragraph. Nonetheless it is semantically *one*
|
||||
paragraph.
|
||||
|
||||
This construct is called a *compound paragraph* and can be produced
|
||||
with the "compound" directive.
|
||||
|
||||
Substitution Definitions
|
||||
------------------------
|
||||
|
||||
An inline image (|example|) example:
|
||||
|
||||
.. |EXAMPLE| image:: images/biohazard.png
|
||||
|
||||
(Substitution definitions are not visible in the HTML source.)
|
||||
|
||||
Comments
|
||||
--------
|
||||
|
||||
Here's one:
|
||||
|
||||
.. Comments begin with two dots and a space. Anything may
|
||||
follow, except for the syntax of footnotes, hyperlink
|
||||
targets, directives, or substitution definitions.
|
||||
|
||||
Double-dashes -- "--" -- must be escaped somehow in HTML output.
|
||||
|
||||
(View the HTML source to see the comment.)
|
||||
|
||||
Field Lists
|
||||
===========
|
||||
|
||||
:Field List:
|
||||
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do
|
||||
eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad
|
||||
minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip
|
||||
ex ea commodo consequat.
|
||||
|
||||
Duis aute irure dolor in reprehenderit in voluptate velit esse cillum
|
||||
dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non
|
||||
proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
|
||||
|
||||
some text
|
||||
|
||||
:Field List 2: Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor
|
||||
|
||||
Error Handling
|
||||
==============
|
||||
|
||||
Any errors caught during processing will generate system messages.
|
||||
|
||||
|*** Expect 6 errors (including this one). ***|
|
||||
|
||||
There should be six messages in the following, auto-generated
|
||||
section, "Docutils System Messages":
|
||||
|
||||
.. section should be added by Docutils automatically
|
||||
|
||||
demo.rst from: http://docutils.sourceforge.net/docs/user/rst/demo.txt
|
@ -1,325 +0,0 @@
|
||||
.. Sphinx RTD theme demo documentation master file, created by
|
||||
sphinx-quickstart on Sun Nov 3 11:56:36 2013.
|
||||
You can adapt this file completely to your liking, but it should at least
|
||||
contain the root `toctree` directive.
|
||||
|
||||
=================================================
|
||||
Demo Docs
|
||||
=================================================
|
||||
|
||||
:Page Status: Incomplete
|
||||
:Last Reviewed: 2013-10-29
|
||||
|
||||
Contents:
|
||||
|
||||
.. toctree::
|
||||
:maxdepth: 2
|
||||
:caption: Sweet Docs
|
||||
|
||||
demo
|
||||
list
|
||||
|
||||
.. toctree::
|
||||
:maxdepth: 2
|
||||
|
||||
toc
|
||||
|
||||
.. toctree::
|
||||
:maxdepth: 2
|
||||
:caption: This is an incredibly long caption for a long menu
|
||||
|
||||
long
|
||||
api
|
||||
|
||||
You can also read the :ref:`genindex`
|
||||
|
||||
Maaaaath!
|
||||
=========
|
||||
|
||||
This is a test. Here is an equation:
|
||||
:math:`X_{0:5} = (X_0, X_1, X_2, X_3, X_4)`.
|
||||
Here is another:
|
||||
|
||||
.. math::
|
||||
|
||||
\nabla^2 f =
|
||||
\frac{1}{r^2} \frac{\partial}{\partial r}
|
||||
\left( r^2 \frac{\partial f}{\partial r} \right) +
|
||||
\frac{1}{r^2 \sin \theta} \frac{\partial f}{\partial \theta}
|
||||
\left( \sin \theta \, \frac{\partial f}{\partial \theta} \right) +
|
||||
\frac{1}{r^2 \sin^2\theta} \frac{\partial^2 f}{\partial \phi^2}
|
||||
|
||||
Tables
|
||||
======
|
||||
|
||||
List tables
|
||||
-----------
|
||||
|
||||
.. list-table:: List tables can have captions like this one.
|
||||
:widths: 10 5 10 50
|
||||
:header-rows: 1
|
||||
:stub-columns: 1
|
||||
|
||||
* - List table
|
||||
- Header 1
|
||||
- Header 2
|
||||
- Header 3 long. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam sit amet mauris arcu.
|
||||
* - Stub Row 1
|
||||
- Row 1
|
||||
- Column 2
|
||||
- Column 3 long. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam sit amet mauris arcu.
|
||||
* - Stub Row 2
|
||||
- Row 2
|
||||
- Column 2
|
||||
- Column 3 long. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam sit amet mauris arcu.
|
||||
* - Stub Row 3
|
||||
- Row 3
|
||||
- Column 2
|
||||
- Column 3 long. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam sit amet mauris arcu.
|
||||
|
||||
.. list-table:: This is a list table with images in it.
|
||||
|
||||
* - .. figure:: static/yi_jing_01_chien.jpg
|
||||
|
||||
This is a short caption for a figure.
|
||||
|
||||
- .. figure:: static/yi_jing_01_chien.jpg
|
||||
|
||||
This is a long caption for a figure. Lorem ipsum dolor sit amet, consectetur adipiscing elit.
|
||||
Donec porttitor dolor in odio posuere, vitae ornare libero mattis. In lobortis justo vestibulum nibh aliquet, non.
|
||||
|
||||
Hlists
|
||||
------
|
||||
|
||||
.. hlist::
|
||||
:columns: 2
|
||||
|
||||
- First item
|
||||
- Second item
|
||||
- Third item
|
||||
- Forth item
|
||||
- Fifth item
|
||||
- Sixths item
|
||||
|
||||
.. rubric:: Hlist with images
|
||||
|
||||
.. hlist::
|
||||
:columns: 2
|
||||
|
||||
- .. figure:: static/yi_jing_01_chien.jpg
|
||||
|
||||
This is a short caption for a figure.
|
||||
|
||||
- .. figure:: static/yi_jing_01_chien.jpg
|
||||
|
||||
This is a long caption for a figure. Lorem ipsum dolor sit amet, consectetur adipiscing elit.
|
||||
Donec porttitor dolor in odio posuere, vitae ornare libero mattis. In lobortis justo vestibulum nibh aliquet, non.
|
||||
|
||||
Giant tables
|
||||
------------
|
||||
|
||||
+------------+------------+-----------+------------+------------+-----------+------------+------------+-----------+------------+------------+-----------+
|
||||
| Header 1 | Header 2 | Header 3 | Header 1 | Header 2 | Header 3 | Header 1 | Header 2 | Header 3 | Header 1 | Header 2 | Header 3 |
|
||||
+============+============+===========+============+============+===========+============+============+===========+============+============+===========+
|
||||
| body row 1 | column 2 | column 3 | body row 1 | column 2 | column 3 | body row 1 | column 2 | column 3 | body row 1 | column 2 | column 3 |
|
||||
+------------+------------+-----------+------------+------------+-----------+------------+------------+-----------+------------+------------+-----------+
|
||||
| body row 1 | column 2 | column 3 | body row 1 | column 2 | column 3 | body row 1 | column 2 | column 3 | body row 1 | column 2 | column 3 |
|
||||
+------------+------------+-----------+------------+------------+-----------+------------+------------+-----------+------------+------------+-----------+
|
||||
| body row 1 | column 2 | column 3 | body row 1 | column 2 | column 3 | body row 1 | column 2 | column 3 | body row 1 | column 2 | column 3 |
|
||||
+------------+------------+-----------+------------+------------+-----------+------------+------------+-----------+------------+------------+-----------+
|
||||
| body row 1 | column 2 | column 3 | body row 1 | column 2 | column 3 | body row 1 | column 2 | column 3 | body row 1 | column 2 | column 3 |
|
||||
+------------+------------+-----------+------------+------------+-----------+------------+------------+-----------+------------+------------+-----------+
|
||||
|
||||
Optional parameter args
|
||||
-----------------------
|
||||
|
||||
At this point optional parameters `cannot be generated from code`_.
|
||||
However, some projects will manually do it, like so:
|
||||
|
||||
This example comes from `django-payments module docs`_.
|
||||
|
||||
.. class:: payments.dotpay.DotpayProvider(seller_id, pin[, channel=0[, lock=False], lang='pl'])
|
||||
|
||||
This backend implements payments using a popular Polish gateway, `Dotpay.pl <http://www.dotpay.pl>`_.
|
||||
|
||||
Due to API limitations there is no support for transferring purchased items.
|
||||
|
||||
|
||||
:param seller_id: Seller ID assigned by Dotpay
|
||||
:param pin: PIN assigned by Dotpay
|
||||
:param channel: Default payment channel (consult reference guide)
|
||||
:param lang: UI language
|
||||
:param lock: Whether to disable channels other than the default selected above
|
||||
|
||||
.. _cannot be generated from code: https://groups.google.com/forum/#!topic/sphinx-users/_qfsVT5Vxpw
|
||||
.. _django-payments module docs: http://django-payments.readthedocs.org/en/latest/modules.html#payments.authorizenet.AuthorizeNetProvider
|
||||
|
||||
Code test
|
||||
=========
|
||||
|
||||
.. parsed-literal::
|
||||
|
||||
# parsed-literal test
|
||||
curl -O http://someurl/release-|version|.tar-gz
|
||||
|
||||
|
||||
.. code-block:: json
|
||||
|
||||
{
|
||||
"windows": [
|
||||
{
|
||||
"panes": [
|
||||
{
|
||||
"shell_command": [
|
||||
"echo 'did you know'",
|
||||
"echo 'you can inline'"
|
||||
]
|
||||
},
|
||||
{
|
||||
"shell_command": "echo 'single commands'"
|
||||
},
|
||||
"echo 'for panes'"
|
||||
],
|
||||
"window_name": "long form"
|
||||
}
|
||||
],
|
||||
"session_name": "shorthands"
|
||||
}
|
||||
|
||||
Sidebar
|
||||
=======
|
||||
|
||||
.. sidebar:: Ch'ien / The Creative
|
||||
|
||||
.. image:: static/yi_jing_01_chien.jpg
|
||||
|
||||
*Above* CH'IEN THE CREATIVE, HEAVEN
|
||||
|
||||
*Below* CH'IEN THE CREATIVE, HEAVEN
|
||||
|
||||
The first hexagram is made up of six unbroken lines. These unbroken lines stand for the primal power, which is light-giving, active, strong, and of the spirit. The hexagram is consistently strong in character, and since it is without weakness, its essence is power or energy. Its image is heaven. Its energy is represented as unrestricted by any fixed conditions in space and is therefore conceived of as motion. Time is regarded as the basis of this motion. Thus the hexagram includes also the power of time and the power of persisting in time, that is, duration.
|
||||
|
||||
The power represented by the hexagram is to be interpreted in a dual sense in terms of its action on the universe and of its action on the world of men. In relation to the universe, the hexagram expresses the strong, creative action of the Deity. In relation to the human world, it denotes the creative action of the holy man or sage, of the ruler or leader of men, who through his power awakens and develops their higher nature.
|
||||
|
||||
Code with Sidebar
|
||||
=================
|
||||
|
||||
.. sidebar:: A code example
|
||||
|
||||
With a sidebar on the right.
|
||||
|
||||
.. literalinclude:: test_py_module/test.py
|
||||
:language: python
|
||||
:caption: Literal includes can also have captions.
|
||||
:linenos:
|
||||
:lines: 1-40
|
||||
|
||||
Boxes
|
||||
=====
|
||||
|
||||
.. tip::
|
||||
Equations within a note
|
||||
:math:`G_{\mu\nu} = 8 \pi G (T_{\mu\nu} + \rho_\Lambda g_{\mu\nu})`.
|
||||
|
||||
.. note::
|
||||
Equations within a note
|
||||
:math:`G_{\mu\nu} = 8 \pi G (T_{\mu\nu} + \rho_\Lambda g_{\mu\nu})`.
|
||||
|
||||
.. danger::
|
||||
Equations within a note
|
||||
:math:`G_{\mu\nu} = 8 \pi G (T_{\mu\nu} + \rho_\Lambda g_{\mu\nu})`.
|
||||
|
||||
.. warning::
|
||||
Equations within a note
|
||||
:math:`G_{\mu\nu} = 8 \pi G (T_{\mu\nu} + \rho_\Lambda g_{\mu\nu})`.
|
||||
|
||||
|
||||
Inline code and references
|
||||
==========================
|
||||
|
||||
`reStructuredText`_ is a markup language. It can use roles and
|
||||
declarations to turn reST into HTML.
|
||||
|
||||
In reST, ``*hello world*`` becomes ``<em>hello world</em>``. This is
|
||||
because a library called `Docutils`_ was able to parse the reST and use a
|
||||
``Writer`` to output it that way.
|
||||
|
||||
If I type ````an inline literal```` it will wrap it in ``<tt>``. You can
|
||||
see more details on the `Inline Markup`_ on the Docutils homepage.
|
||||
|
||||
Also with ``sphinx.ext.autodoc``, which I use in the demo, I can link to
|
||||
:class:`test_py_module.test.Foo`. It will link you right my code
|
||||
documentation for it.
|
||||
|
||||
.. _reStructuredText: http://docutils.sourceforge.net/rst.html
|
||||
.. _Docutils: http://docutils.sourceforge.net/
|
||||
.. _Inline Markup: http://docutils.sourceforge.net/docs/ref/rst/restructuredtext.html#inline-markup
|
||||
|
||||
.. note:: Every other line in this table will have white text on a white background.
|
||||
This is bad.
|
||||
|
||||
+---------+
|
||||
| Example |
|
||||
+=========+
|
||||
| Thing1 |
|
||||
+---------+
|
||||
| Thing2 |
|
||||
+---------+
|
||||
| Thing3 |
|
||||
+---------+
|
||||
|
||||
Emphasized lines with line numbers
|
||||
==================================
|
||||
|
||||
.. code-block:: python
|
||||
:linenos:
|
||||
:emphasize-lines: 3,5
|
||||
|
||||
def some_function():
|
||||
interesting = False
|
||||
print 'This line is highlighted.'
|
||||
print 'This one is not...'
|
||||
print '...but this one is.'
|
||||
|
||||
|
||||
Citation
|
||||
========
|
||||
|
||||
Here I am making a citation [1]_, another [2]_ and another [3]_
|
||||
|
||||
.. [1] This is the citation I made, let's make this extremely long so that we can tell that it doesn't follow the normal responsive table stuff.
|
||||
|
||||
.. [2] This citation has some ``code blocks`` in it, maybe some **bold** and
|
||||
*italics* too. Heck, lets put a link to a meta citation [3]_ too.
|
||||
|
||||
.. [3] This citation will have two backlinks.
|
||||
|
||||
======
|
||||
Images
|
||||
======
|
||||
|
||||
.. figure:: static/yi_jing_01_chien.jpg
|
||||
:align: right
|
||||
|
||||
This is a caption for a figure. It can be very long and span several lines.
|
||||
|
||||
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Praesent sed facilisis metus.
|
||||
Ut non dui tellus. Fusce at posuere urna, id posuere elit. Donec pretium sit amet arcu ut eleifend.
|
||||
Nullam venenatis quis ex sit amet ultricies. Cras euismod ex sed hendrerit vestibulum.
|
||||
Phasellus aliquam efficitur lectus, a laoreet turpis dignissim sit amet. Nullam euismod ornare rhoncus.
|
||||
Donec semper felis vitae turpis malesuada, at imperdiet sem elementum.
|
||||
Nullam non leo nec nunc accumsan rhoncus in vel quam. Vivamus rutrum molestie tellus vitae commodo.
|
||||
Praesent congue interdum lobortis. Ut a arcu suscipit, vehicula mi sit amet, suscipit risus.
|
||||
Suspendisse pulvinar sagittis tincidunt. Sed et ornare urna. Integer mauris lectus, facilisis et nulla id,
|
||||
semper faucibus eros. Ut rhoncus enim est, sit amet dapibus arcu gravida a.
|
||||
Morbi quam nisl, feugiat id vehicula non, fringilla ac nisi. Nulla ac risus et nisl semper interdum non vitae odio.
|
||||
Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas.
|
||||
Aenean nec tincidunt odio. Nam ex quam, egestas ut nisi eu, interdum commodo arcu.
|
||||
Mauris venenatis nisi eu condimentum tincidunt. Maecenas eu odio eleifend, fermentum turpis sit amet, faucibus ex.
|
||||
|
||||
|
||||
|
||||
Download links
|
||||
==============
|
||||
|
||||
:download:`This long long long long long long long long long long long long long long long download link should be blue, normal weight text with a leading icon, and should wrap white-spaces <static/yi_jing_01_chien.jpg>`
|
@ -1,83 +0,0 @@
|
||||
|
||||
=================================================
|
||||
Lists
|
||||
=================================================
|
||||
|
||||
A list
|
||||
======
|
||||
|
||||
- here
|
||||
- is
|
||||
- some
|
||||
- list
|
||||
- items
|
||||
- `yahoo <http://www.yahoo.com>`_
|
||||
- ``huh``
|
||||
- how
|
||||
- ``inline literall``
|
||||
- ``inline literall``
|
||||
- ``inline literall``
|
||||
|
||||
Second list level
|
||||
-----------------
|
||||
|
||||
- here is a list in a second-level section.
|
||||
- `yahoo <http://www.yahoo.com>`_
|
||||
- `yahoo <http://www.yahoo.com>`_
|
||||
|
||||
- `yahoo <http://www.yahoo.com>`_
|
||||
- here is an inner bullet ``oh``
|
||||
|
||||
- one more ``with an inline literally``. `yahoo <http://www.yahoo.com>`_
|
||||
|
||||
heh heh. child. try to beat this embed:
|
||||
|
||||
.. literalinclude:: test_py_module/test.py
|
||||
:language: python
|
||||
:linenos:
|
||||
:lines: 1-10
|
||||
- and another. `yahoo <http://www.yahoo.com>`_
|
||||
- `yahoo <http://www.yahoo.com>`_
|
||||
- ``hi``
|
||||
- and hehe
|
||||
|
||||
But deeper down the rabbit hole
|
||||
"""""""""""""""""""""""""""""""
|
||||
|
||||
- I kept saying that, "deeper down the rabbit hole". `yahoo <http://www.yahoo.com>`_
|
||||
|
||||
- I cackle at night `yahoo <http://www.yahoo.com>`_.
|
||||
- I'm so lonely here in GZ ``guangzhou``
|
||||
- A man of python destiny, hopes and dreams. `yahoo <http://www.yahoo.com>`_
|
||||
|
||||
- `yahoo <http://www.yahoo.com>`_
|
||||
|
||||
- `yahoo <http://www.yahoo.com>`_ ``hi``
|
||||
- ``destiny``
|
||||
|
||||
.. important::
|
||||
|
||||
wanna play a game?
|
||||
|
||||
- inside
|
||||
- this
|
||||
|
||||
- list
|
||||
- ``in the world``
|
||||
|
||||
- hi
|
||||
- his
|
||||
|
||||
hi
|
||||
|
||||
Numbered List
|
||||
=============
|
||||
|
||||
#. One,
|
||||
#. Two.
|
||||
#. Three with long text. Lorem ipsum dolor sit amet, consectetur adipiscing elit.
|
||||
Sed feugiat sagittis neque quis eleifend. Duis rutrum lectus sit amet mattis suscipit.
|
||||
|
||||
- A) Using bullets and letters. (A)
|
||||
- B) Using bullets and letters. (B)
|
||||
- C) Using bullets and letters. (C)
|
@ -1,24 +0,0 @@
|
||||
=========
|
||||
TOC Tests
|
||||
=========
|
||||
|
||||
One
|
||||
===
|
||||
|
||||
Two
|
||||
---
|
||||
|
||||
Three
|
||||
.....
|
||||
|
||||
|
||||
Four //five
|
||||
```````````
|
||||
|
||||
|
||||
.. http:post:: /foobar
|
||||
|
||||
:synopsis: Some synopsis
|
||||
|
||||
Some content
|
||||
|
20
docs/Makefile
Normal file
@ -0,0 +1,20 @@
|
||||
# Minimal makefile for Sphinx documentation
|
||||
#
|
||||
|
||||
# You can set these variables from the command line.
|
||||
SPHINXOPTS =
|
||||
SPHINXBUILD = sphinx-build
|
||||
SPHINXPROJ = ReadtheDocsSphinxTheme
|
||||
SOURCEDIR = .
|
||||
BUILDDIR = _build
|
||||
|
||||
# Put it first so that "make" without argument is like "make help".
|
||||
help:
|
||||
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
|
||||
|
||||
.PHONY: help Makefile
|
||||
|
||||
# Catch-all target: route all unknown targets to Sphinx using the new
|
||||
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
|
||||
%: Makefile
|
||||
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
|
@ -3,7 +3,7 @@
|
||||
# Sphinx RTD theme demo documentation build configuration file, created by
|
||||
# sphinx-quickstart on Sun Nov 3 11:56:36 2013.
|
||||
#
|
||||
# This file is execfile()d with the current directory set to its containing dir.
|
||||
# This file is executed with the current directory set to its containing dir.
|
||||
#
|
||||
# Note that not all possible configuration values are present in this
|
||||
# autogenerated file.
|
||||
@ -11,10 +11,14 @@
|
||||
# All configuration values have a default; values that are commented out
|
||||
# serve to show the default.
|
||||
|
||||
import sys, os
|
||||
import sys
|
||||
import os
|
||||
|
||||
sys.path.append(os.path.abspath('.'))
|
||||
sys.path.append(os.path.abspath('./test_py_module'))
|
||||
|
||||
sys.path.append(os.path.abspath('..'))
|
||||
sys.path.append(os.path.abspath('./demo/'))
|
||||
|
||||
from sphinx_rtd_theme import __version__
|
||||
|
||||
# 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
|
||||
@ -35,8 +39,8 @@ extensions = [
|
||||
'sphinxcontrib.httpdomain',
|
||||
]
|
||||
|
||||
# Math
|
||||
mathjax_path = "http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"
|
||||
# Do not warn about external images (status badges in README.rst)
|
||||
suppress_warnings = ['image.nonlocal_uri']
|
||||
|
||||
# Add any paths that contain templates here, relative to this directory.
|
||||
templates_path = ['_templates']
|
||||
@ -51,21 +55,21 @@ source_suffix = '.rst'
|
||||
master_doc = 'index'
|
||||
|
||||
# General information about the project.
|
||||
project = u'Sphinx RTD theme demo'
|
||||
copyright = u'2013, Dave Snider'
|
||||
project = u'Read the Docs Sphinx Theme'
|
||||
copyright = u'Read the Docs, Inc & contributors'
|
||||
|
||||
# The version info for the project you're documenting, acts as replacement for
|
||||
# |version| and |release|, also used in various other places throughout the
|
||||
# built documents.
|
||||
#
|
||||
# The short X.Y version.
|
||||
version = '0.2.4'
|
||||
version = __version__
|
||||
# The full version, including alpha/beta/rc tags.
|
||||
release = '0.2.4'
|
||||
release = __version__
|
||||
|
||||
# The language for content autogenerated by Sphinx. Refer to documentation
|
||||
# for a list of supported languages.
|
||||
#language = None
|
||||
language = 'en'
|
||||
|
||||
# There are two options for replacing |today|: either, you set today to some
|
||||
# non-false value, then it is used:
|
||||
@ -92,7 +96,7 @@ exclude_patterns = []
|
||||
#show_authors = False
|
||||
|
||||
# The name of the Pygments (syntax highlighting) style to use.
|
||||
pygments_style = 'sphinx'
|
||||
pygments_style = 'default'
|
||||
|
||||
# A list of ignored prefixes for module index sorting.
|
||||
#modindex_common_prefix = []
|
||||
@ -110,6 +114,7 @@ html_theme = 'sphinx_rtd_theme'
|
||||
html_theme_options = {
|
||||
# 'sticky_navigation': True # Set to False to disable the sticky nav while scrolling.
|
||||
# 'logo_only': True, # if we have a html_logo below, this shows /only/ the logo with no title text
|
||||
# 'titles_only': False # If True, it'll remove headers within a page from the sidebar.
|
||||
}
|
||||
|
||||
# Add any paths that contain custom themes here, relative to this directory.
|
||||
@ -124,7 +129,7 @@ html_theme_path = ["../.."]
|
||||
|
||||
# The name of an image file (relative to this directory) to place at the top
|
||||
# of the sidebar.
|
||||
html_logo = "static/logo-wordmark-light.svg"
|
||||
html_logo = "demo/static/logo-wordmark-light.svg"
|
||||
|
||||
# The name of an image file (within the static path) to use as favicon of the
|
||||
# docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32
|
48
docs/demo/api.rst
Normal file
@ -0,0 +1,48 @@
|
||||
|
||||
*********************
|
||||
:mod:`test_py_module`
|
||||
*********************
|
||||
|
||||
.. contents:: Table of Contents
|
||||
|
||||
.. automodule:: test_py_module.test
|
||||
:members:
|
||||
:private-members:
|
||||
:special-members:
|
||||
|
||||
|
||||
Optional parameter args
|
||||
=======================
|
||||
|
||||
At this point optional parameters `cannot be generated from code`_.
|
||||
However, some projects will manually do it, like so:
|
||||
|
||||
This example comes from `django-payments module docs`_.
|
||||
|
||||
.. class:: payments.dotpay.DotpayProvider(seller_id, pin[, channel=0[, lock=False], lang='pl'])
|
||||
|
||||
This backend implements payments using a popular Polish gateway, `Dotpay.pl <http://www.dotpay.pl>`_.
|
||||
|
||||
Due to API limitations there is no support for transferring purchased items.
|
||||
|
||||
|
||||
:param seller_id: Seller ID assigned by Dotpay
|
||||
:param pin: PIN assigned by Dotpay
|
||||
:param channel: Default payment channel (consult reference guide)
|
||||
:param lang: UI language
|
||||
:param lock: Whether to disable channels other than the default selected above
|
||||
|
||||
.. _cannot be generated from code: https://groups.google.com/forum/#!topic/sphinx-users/_qfsVT5Vxpw
|
||||
.. _django-payments module docs: http://django-payments.readthedocs.org/en/latest/modules.html#payments.authorizenet.AuthorizeNetProvide
|
||||
|
||||
|
||||
Data
|
||||
====
|
||||
|
||||
.. data:: Data_item_1
|
||||
Data_item_2
|
||||
Data_item_3
|
||||
|
||||
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Fusce congue elit eu hendrerit mattis.
|
||||
|
||||
Some data link :data:`Data_item_1`.
|
475
docs/demo/demo.rst
Normal file
@ -0,0 +1,475 @@
|
||||
.. This is a comment. Note how any initial comments are moved by
|
||||
transforms to after the document title, subtitle, and docinfo.
|
||||
|
||||
.. demo.rst from: http://docutils.sourceforge.net/docs/user/rst/demo.txt
|
||||
|
||||
.. |EXAMPLE| image:: static/yi_jing_01_chien.jpg
|
||||
:width: 1em
|
||||
|
||||
**********************
|
||||
Paragraph Level Markup
|
||||
**********************
|
||||
|
||||
.. contents:: Table of Contents
|
||||
|
||||
Inline Markup
|
||||
=============
|
||||
|
||||
Paragraphs contain text and may contain inline markup: *emphasis*, **strong emphasis**, ``inline literals``,
|
||||
standalone hyperlinks (http://www.python.org), external hyperlinks (Python_), internal cross-references (example_),
|
||||
external hyperlinks with embedded URIs (`Python web site <http://www.python.org>`__), footnote references
|
||||
(manually numbered [1]_, anonymous auto-numbered [#]_, labeled auto-numbered [#label]_, or symbolic [*]_),
|
||||
citation references ([12]_), substitution references (|example|), and _`inline hyperlink targets`
|
||||
(see Targets_ below for a reference back to here). Character-level inline markup is also possible
|
||||
(although exceedingly ugly!) in *re*\ ``Structured``\ *Text*. Problems are indicated by |problematic|
|
||||
text (generated by processing errors; this one is intentional).
|
||||
|
||||
Also with ``sphinx.ext.autodoc``, which I use in the demo, I can link to :class:`test_py_module.test.Foo`.
|
||||
It will link you right my code documentation for it.
|
||||
|
||||
The default role for interpreted text is `Title Reference`. Here are some explicit interpreted text roles:
|
||||
a PEP reference (:PEP:`287`); an RFC reference (:RFC:`2822`); a :sub:`subscript`; a :sup:`superscript`;
|
||||
and explicit roles for :emphasis:`standard` :strong:`inline` :literal:`markup`.
|
||||
|
||||
GUI labels are a useful way to indicate that :guilabel:`Some action` is to be taken by the user.
|
||||
The GUI label should not run over ``line-height`` so as not to :guilabel:`interfere` with text from adjacent lines.
|
||||
|
||||
Key-bindings indicate that the read is to press a button on the keyboard or mouse,
|
||||
for example :kbd:`MMB` and :kbd:`Shift-MMB`. Another useful markup to indicate a user action
|
||||
is to use ``menuselection`` this can be used to show short and long menus in software.
|
||||
For example, and ``menuselection`` can be seen here that breaks is too long to fit on this line.
|
||||
:menuselection:`My --> Software --> Some menu --> Some sub menu 1 --> sub menu 2`.
|
||||
|
||||
.. DO NOT RE-WRAP THE FOLLOWING PARAGRAPH!
|
||||
|
||||
Let's test wrapping and whitespace significance in inline literals:
|
||||
``This is an example of --inline-literal --text, --including some--
|
||||
strangely--hyphenated-words. Adjust-the-width-of-your-browser-window
|
||||
to see how the text is wrapped. -- ---- -------- Now note the
|
||||
spacing between the words of this sentence (words
|
||||
should be grouped in pairs).``
|
||||
|
||||
If the ``--pep-references`` option was supplied, there should be a live link to PEP 258 here.
|
||||
|
||||
Math
|
||||
====
|
||||
|
||||
This is a test. Here is an equation:
|
||||
:math:`X_{0:5} = (X_0, X_1, X_2, X_3, X_4)`.
|
||||
Here is another:
|
||||
|
||||
.. math::
|
||||
:label: This is a label
|
||||
|
||||
\nabla^2 f =
|
||||
\frac{1}{r^2} \frac{\partial}{\partial r}
|
||||
\left( r^2 \frac{\partial f}{\partial r} \right) +
|
||||
\frac{1}{r^2 \sin \theta} \frac{\partial f}{\partial \theta}
|
||||
\left( \sin \theta \, \frac{\partial f}{\partial \theta} \right) +
|
||||
\frac{1}{r^2 \sin^2\theta} \frac{\partial^2 f}{\partial \phi^2}
|
||||
|
||||
You can add a link to equations like the one above :eq:`This is a label` by using ``:eq:``.
|
||||
|
||||
Meta
|
||||
====
|
||||
|
||||
.. meta::
|
||||
:keywords: reStructuredText, demonstration, demo, parser
|
||||
:description lang=en: A demonstration of the reStructuredText
|
||||
markup language, containing examples of all basic
|
||||
constructs and many advanced constructs.
|
||||
|
||||
Blocks
|
||||
======
|
||||
|
||||
Literal Blocks
|
||||
--------------
|
||||
|
||||
Literal blocks are indicated with a double-colon ("::") at the end of
|
||||
the preceding paragraph (over there ``-->``). They can be indented::
|
||||
|
||||
if literal_block:
|
||||
text = 'is left as-is'
|
||||
spaces_and_linebreaks = 'are preserved'
|
||||
markup_processing = None
|
||||
|
||||
Or they can be quoted without indentation::
|
||||
|
||||
>> Great idea!
|
||||
>
|
||||
> Why didn't I think of that?
|
||||
|
||||
Line Blocks
|
||||
-----------
|
||||
|
||||
| This is a line block. It ends with a blank line.
|
||||
| Each new line begins with a vertical bar ("|").
|
||||
| Line breaks and initial indents are preserved.
|
||||
| Continuation lines are wrapped portions of long lines;
|
||||
they begin with a space in place of the vertical bar.
|
||||
| The left edge of a continuation line need not be aligned with
|
||||
the left edge of the text above it.
|
||||
|
||||
| This is a second line block.
|
||||
|
|
||||
| Blank lines are permitted internally, but they must begin with a "|".
|
||||
|
||||
Take it away, Eric the Orchestra Leader!
|
||||
|
||||
| A one, two, a one two three four
|
||||
|
|
||||
| Half a bee, philosophically,
|
||||
| must, *ipso facto*, half not be.
|
||||
| But half the bee has got to be,
|
||||
| *vis a vis* its entity. D'you see?
|
||||
|
|
||||
| But can a bee be said to be
|
||||
| or not to be an entire bee,
|
||||
| when half the bee is not a bee,
|
||||
| due to some ancient injury?
|
||||
|
|
||||
| Singing...
|
||||
|
||||
Block Quotes
|
||||
------------
|
||||
|
||||
Block quotes consist of indented body elements:
|
||||
|
||||
My theory by A. Elk. Brackets Miss, brackets. This theory goes
|
||||
as follows and begins now. All brontosauruses are thin at one
|
||||
end, much much thicker in the middle and then thin again at the
|
||||
far end. That is my theory, it is mine, and belongs to me and I
|
||||
own it, and what it is too.
|
||||
|
||||
-- Anne Elk (Miss)
|
||||
|
||||
Doctest Blocks
|
||||
--------------
|
||||
|
||||
>>> print 'Python-specific usage examples; begun with ">>>"'
|
||||
Python-specific usage examples; begun with ">>>"
|
||||
>>> print '(cut and pasted from interactive Python sessions)'
|
||||
(cut and pasted from interactive Python sessions)
|
||||
|
||||
Code Blocks
|
||||
-----------
|
||||
|
||||
.. parsed-literal::
|
||||
|
||||
# parsed-literal test
|
||||
curl -O http://someurl/release-|version|.tar-gz
|
||||
|
||||
|
||||
.. code-block:: json
|
||||
:caption: Code Blocks can have captions.
|
||||
|
||||
{
|
||||
"windows": [
|
||||
{
|
||||
"panes": [
|
||||
{
|
||||
"shell_command": [
|
||||
"echo 'did you know'",
|
||||
"echo 'you can inline'"
|
||||
]
|
||||
},
|
||||
{
|
||||
"shell_command": "echo 'single commands'"
|
||||
},
|
||||
"echo 'for panes'"
|
||||
],
|
||||
"window_name": "long form"
|
||||
}
|
||||
],
|
||||
"session_name": "shorthands"
|
||||
}
|
||||
|
||||
Emphasized lines with line numbers
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
.. code-block:: python
|
||||
:linenos:
|
||||
:emphasize-lines: 3,5
|
||||
|
||||
def some_function():
|
||||
interesting = False
|
||||
print 'This line is highlighted.'
|
||||
print 'This one is not...'
|
||||
print '...but this one is.'
|
||||
|
||||
Sidebar
|
||||
=======
|
||||
|
||||
.. sidebar:: Ch'ien / The Creative
|
||||
|
||||
.. image:: static/yi_jing_01_chien.jpg
|
||||
|
||||
*Above* CH'IEN THE CREATIVE, HEAVEN
|
||||
|
||||
*Below* CH'IEN THE CREATIVE, HEAVEN
|
||||
|
||||
The first hexagram is made up of six unbroken lines. These unbroken lines stand for the primal power,
|
||||
which is light-giving, active, strong, and of the spirit. The hexagram is consistently strong in character,
|
||||
and since it is without weakness, its essence is power or energy. Its image is heaven.
|
||||
Its energy is represented as unrestricted by any fixed conditions in space and is therefore conceived of as motion.
|
||||
Time is regarded as the basis of this motion.
|
||||
Thus the hexagram includes also the power of time and the power of persisting in time, that is, duration.
|
||||
|
||||
The power represented by the hexagram is to be interpreted in a dual sense in terms of its action
|
||||
on the universe and of its action on the world of men. In relation to the universe, the hexagram expresses the strong,
|
||||
creative action of the Deity. In relation to the human world, it denotes the creative action of the holy man or sage,
|
||||
of the ruler or leader of men, who through his power awakens and develops their higher nature.
|
||||
|
||||
Code with Sidebar
|
||||
-----------------
|
||||
|
||||
.. sidebar:: A code example
|
||||
|
||||
With a sidebar on the right.
|
||||
|
||||
.. literalinclude:: test_py_module/test.py
|
||||
:language: python
|
||||
:caption: Literal includes can also have captions.
|
||||
:linenos:
|
||||
:lines: 1-40
|
||||
|
||||
References
|
||||
==========
|
||||
|
||||
Footnotes
|
||||
---------
|
||||
|
||||
.. [1] A footnote contains body elements, consistently indented by at
|
||||
least 3 spaces.
|
||||
|
||||
This is the footnote's second paragraph.
|
||||
|
||||
.. [#label] Footnotes may be numbered, either manually (as in [1]_) or
|
||||
automatically using a "#"-prefixed label. This footnote has a
|
||||
label so it can be referred to from multiple places, both as a
|
||||
footnote reference ([#label]_) and as a hyperlink reference
|
||||
(label_).
|
||||
|
||||
.. [#] This footnote is numbered automatically and anonymously using a
|
||||
label of "#" only.
|
||||
|
||||
.. [*] Footnotes may also use symbols, specified with a "*" label.
|
||||
Here's a reference to the next footnote: [*]_.
|
||||
|
||||
.. [*] This footnote shows the next symbol in the sequence.
|
||||
|
||||
.. [4] Here's an unreferenced footnote, with a reference to a
|
||||
nonexistent footnote: [5]_.
|
||||
|
||||
Citations
|
||||
---------
|
||||
|
||||
.. [11] This is the citation I made, let's make this extremely long so that we can tell that it doesn't follow the normal responsive table stuff.
|
||||
|
||||
.. [12] This citation has some ``code blocks`` in it, maybe some **bold** and
|
||||
*italics* too. Heck, lets put a link to a meta citation [13]_ too.
|
||||
|
||||
.. [13] This citation will have two backlinks.
|
||||
|
||||
|
||||
Here's a reference to the above, [12]_, and a [nonexistent]_ citation.
|
||||
|
||||
Here is another type of citation: `citation`
|
||||
|
||||
Glossary
|
||||
--------
|
||||
|
||||
This is a glossary with definition terms for thing like :term:`Writing`:
|
||||
|
||||
.. glossary::
|
||||
|
||||
Documentation
|
||||
Provides users with the knowledge they need to use something.
|
||||
|
||||
Reading
|
||||
The process of taking information into ones mind through the use of eyes.
|
||||
|
||||
Writing
|
||||
The process of putting thoughts into a medium for other people to :term:`read <Reading>`.
|
||||
|
||||
Targets
|
||||
-------
|
||||
|
||||
.. _example:
|
||||
|
||||
This paragraph is pointed to by the explicit "example" target.
|
||||
A reference can be found under `Inline Markup`_, above. `Inline
|
||||
hyperlink targets`_ are also possible.
|
||||
|
||||
Section headers are implicit targets, referred to by name. See
|
||||
Targets_, which is a subsection of `Body Elements`_.
|
||||
|
||||
Explicit external targets are interpolated into references such as "Python_".
|
||||
|
||||
.. _Python: http://www.python.org/
|
||||
|
||||
Targets may be indirect and anonymous. Thus `this phrase`__ may also
|
||||
refer to the Targets_ section.
|
||||
|
||||
__ Targets_
|
||||
|
||||
Here's a `hyperlink reference without a target`_, which generates an error.
|
||||
|
||||
|
||||
Directives
|
||||
==========
|
||||
|
||||
Contents
|
||||
--------
|
||||
|
||||
.. contents:: :local:
|
||||
|
||||
These are just a sample of the many reStructuredText Directives. For others, please see:
|
||||
http://docutils.sourceforge.net/docs/ref/rst/directives.html.
|
||||
|
||||
|
||||
Centered text
|
||||
-------------
|
||||
|
||||
You can create a statement with centered text with ``.. centered::``
|
||||
|
||||
.. centered:: This is centered text!
|
||||
|
||||
Images & Figures
|
||||
----------------
|
||||
|
||||
Images
|
||||
^^^^^^
|
||||
|
||||
An image directive (also clickable -- a hyperlink reference):
|
||||
|
||||
.. image:: static/yi_jing_01_chien.jpg
|
||||
:target: directives_
|
||||
|
||||
Figures
|
||||
^^^^^^^
|
||||
|
||||
.. figure:: static/yi_jing_01_chien.jpg
|
||||
:alt: reStructuredText, the markup syntax
|
||||
|
||||
A figure is an image with a caption and/or a legend:
|
||||
|
||||
+------------+-----------------------------------------------+
|
||||
| re | Revised, revisited, based on 're' module. |
|
||||
+------------+-----------------------------------------------+
|
||||
| Structured | Structure-enhanced text, structuredtext. |
|
||||
+------------+-----------------------------------------------+
|
||||
| Text | Well it is, isn't it? |
|
||||
+------------+-----------------------------------------------+
|
||||
|
||||
This paragraph is also part of the legend.
|
||||
|
||||
A figure directive with center alignment
|
||||
|
||||
.. figure:: static/yi_jing_01_chien.jpg
|
||||
:align: center
|
||||
|
||||
This caption should be centered.
|
||||
|
||||
Admonitions
|
||||
-----------
|
||||
|
||||
.. Attention:: Directives at large.
|
||||
|
||||
.. Caution:: Don't take any wooden nickels.
|
||||
|
||||
.. DANGER:: Mad scientist at work!
|
||||
|
||||
.. Error:: Does not compute.
|
||||
|
||||
.. Hint:: It's bigger than a bread box.
|
||||
|
||||
.. Important::
|
||||
- Wash behind your ears.
|
||||
- Clean up your room.
|
||||
|
||||
- Including the closet.
|
||||
- The bathroom too.
|
||||
|
||||
- Take the trash out of the bathroom.
|
||||
- Clean the sink.
|
||||
- Call your mother.
|
||||
- Back up your data.
|
||||
|
||||
.. Note:: This is a note.
|
||||
Equations within a note:
|
||||
:math:`G_{\mu\nu} = 8 \pi G (T_{\mu\nu} + \rho_\Lambda g_{\mu\nu})`.
|
||||
|
||||
.. Tip:: 15% if the service is good.
|
||||
|
||||
+---------+
|
||||
| Example |
|
||||
+=========+
|
||||
| Thing1 |
|
||||
+---------+
|
||||
| Thing2 |
|
||||
+---------+
|
||||
| Thing3 |
|
||||
+---------+
|
||||
|
||||
.. WARNING:: Strong prose may provoke extreme mental exertion.
|
||||
Reader discretion is strongly advised.
|
||||
|
||||
.. admonition:: And, by the way...
|
||||
|
||||
You can make up your own admonition too.
|
||||
|
||||
Topics, Sidebars, and Rubrics
|
||||
-----------------------------
|
||||
|
||||
.. sidebar:: Sidebar Title
|
||||
:subtitle: Optional Subtitle
|
||||
|
||||
This is a sidebar. It is for text outside the flow of the main
|
||||
text.
|
||||
|
||||
.. rubric:: This is a rubric inside a sidebar
|
||||
|
||||
Sidebars often appears beside the main text with a border and
|
||||
background color.
|
||||
|
||||
.. topic:: Topic Title
|
||||
|
||||
This is a topic.
|
||||
|
||||
.. rubric:: This is a rubric
|
||||
|
||||
Target Footnotes
|
||||
----------------
|
||||
|
||||
.. target-notes::
|
||||
|
||||
Replacement Text
|
||||
----------------
|
||||
|
||||
I recommend you try |Python|_.
|
||||
|
||||
.. |Python| replace:: Python, *the* best language around
|
||||
|
||||
Compound Paragraph
|
||||
------------------
|
||||
|
||||
.. compound::
|
||||
|
||||
This paragraph contains a literal block::
|
||||
|
||||
Connecting... OK
|
||||
Transmitting data... OK
|
||||
Disconnecting... OK
|
||||
|
||||
and thus consists of a simple paragraph, a literal block, and
|
||||
another simple paragraph. Nonetheless it is semantically *one*
|
||||
paragraph.
|
||||
|
||||
This construct is called a *compound paragraph* and can be produced
|
||||
with the "compound" directive.
|
||||
|
||||
Download Links
|
||||
==============
|
||||
|
||||
:download:`This long long long long long long long long long long long long long long long download link should be blue, normal weight text with a leading icon, and should wrap white-spaces <static/yi_jing_01_chien.jpg>`
|
28
docs/demo/index.rst
Normal file
@ -0,0 +1,28 @@
|
||||
Read the Docs Theme Demo
|
||||
************************
|
||||
|
||||
These documents are used to test and stress test the Read the Docs Theme.
|
||||
|
||||
:Last Reviewed: 2017-3-15
|
||||
|
||||
Contents
|
||||
========
|
||||
|
||||
.. toctree::
|
||||
:maxdepth: 3
|
||||
:numbered:
|
||||
:caption: Syntax Constructs
|
||||
|
||||
structure
|
||||
demo
|
||||
lists_tables
|
||||
api
|
||||
|
||||
.. toctree::
|
||||
:maxdepth: 3
|
||||
:numbered:
|
||||
:caption: This is an incredibly long caption for a long menu
|
||||
|
||||
long
|
||||
|
||||
You can also read the :ref:`genindex`
|
302
docs/demo/lists_tables.rst
Normal file
@ -0,0 +1,302 @@
|
||||
|
||||
**************
|
||||
Lists & Tables
|
||||
**************
|
||||
|
||||
.. contents:: Table of Contents
|
||||
|
||||
Lists
|
||||
=====
|
||||
|
||||
Enumerated Lists
|
||||
----------------
|
||||
|
||||
1. Arabic numerals.
|
||||
|
||||
a) lower alpha)
|
||||
|
||||
(i) (lower roman)
|
||||
|
||||
A. upper alpha.
|
||||
|
||||
I) upper roman)
|
||||
|
||||
2. Lists that don't start at 1:
|
||||
|
||||
3. Three
|
||||
|
||||
4. Four
|
||||
|
||||
C. C
|
||||
|
||||
D. D
|
||||
|
||||
iii. iii
|
||||
|
||||
iv. iv
|
||||
|
||||
#. List items may also be auto-enumerated.
|
||||
|
||||
Definition Lists
|
||||
----------------
|
||||
|
||||
Term
|
||||
Definition
|
||||
Term : classifier
|
||||
Definition paragraph 1.
|
||||
|
||||
Definition paragraph 2.
|
||||
Term
|
||||
Definition
|
||||
|
||||
|
||||
Option Lists
|
||||
------------
|
||||
|
||||
For listing command-line options:
|
||||
|
||||
-a command-line option "a"
|
||||
-b file options can have arguments
|
||||
and long descriptions
|
||||
--long options can be long also
|
||||
--input=file long options can also have
|
||||
arguments
|
||||
|
||||
--very-long-option
|
||||
The description can also start on the next line.
|
||||
|
||||
The description may contain multiple body elements,
|
||||
regardless of where it starts.
|
||||
|
||||
-x, -y, -z Multiple options are an "option group".
|
||||
-v, --verbose Commonly-seen: short & long options.
|
||||
-1 file, --one=file, --two file
|
||||
Multiple options with arguments.
|
||||
/V DOS/VMS-style options too
|
||||
|
||||
There must be at least two spaces between the option and the description.
|
||||
|
||||
Field list
|
||||
----------
|
||||
|
||||
.. bibliographic fields (which also require a transform):
|
||||
|
||||
:Author: David Goodger
|
||||
:Address: 123 Example Street
|
||||
Example, EX Canada
|
||||
A1B 2C3
|
||||
:Contact: docutils-develop@lists.sourceforge.net
|
||||
:Authors: Me; Myself; I
|
||||
:organization: humankind
|
||||
:date: $Date: 2012-01-03 19:23:53 +0000 (Tue, 03 Jan 2012) $
|
||||
:status: This is a "work in progress"
|
||||
:revision: $Revision: 7302 $
|
||||
:version: 1
|
||||
:copyright: This document has been placed in the public domain. You
|
||||
may do with it as you wish. You may copy, modify,
|
||||
redistribute, reattribute, sell, buy, rent, lease,
|
||||
destroy, or improve it, quote it at length, excerpt,
|
||||
incorporate, collate, fold, staple, or mutilate it, or do
|
||||
anything else to it that your or anyone else's heart
|
||||
desires.
|
||||
:field name: This is a generic bibliographic field.
|
||||
:field name 2:
|
||||
Generic bibliographic fields may contain multiple body elements.
|
||||
|
||||
Like this.
|
||||
|
||||
:Dedication:
|
||||
|
||||
For Docutils users & co-developers.
|
||||
|
||||
:abstract:
|
||||
|
||||
This document is a demonstration of the reStructuredText markup
|
||||
language, containing examples of all basic reStructuredText
|
||||
constructs and many advanced constructs.
|
||||
|
||||
Bullet Lists
|
||||
------------
|
||||
|
||||
- A bullet list
|
||||
|
||||
+ Nested bullet list.
|
||||
+ Nested item 2.
|
||||
|
||||
- Item 2.
|
||||
|
||||
Paragraph 2 of item 2.
|
||||
|
||||
* Nested bullet list.
|
||||
* Nested item 2.
|
||||
|
||||
- Third level.
|
||||
- Item 2.
|
||||
|
||||
* Nested item 3.
|
||||
|
||||
- ``inline literall``
|
||||
- ``inline literall``
|
||||
- ``inline literall``
|
||||
|
||||
Second list level
|
||||
^^^^^^^^^^^^^^^^^
|
||||
|
||||
- here is a list in a second-level section.
|
||||
- `yahoo <http://www.yahoo.com>`_
|
||||
- `yahoo <http://www.yahoo.com>`_
|
||||
|
||||
- `yahoo <http://www.yahoo.com>`_
|
||||
- here is an inner bullet ``oh``
|
||||
|
||||
- one more ``with an inline literally``. `yahoo <http://www.yahoo.com>`_
|
||||
|
||||
heh heh. child. try to beat this embed:
|
||||
|
||||
.. literalinclude:: test_py_module/test.py
|
||||
:language: python
|
||||
:linenos:
|
||||
:lines: 1-10
|
||||
- and another. `yahoo <http://www.yahoo.com>`_
|
||||
- `yahoo <http://www.yahoo.com>`_
|
||||
- ``hi``
|
||||
- and hehe
|
||||
|
||||
But deeper down the rabbit hole
|
||||
"""""""""""""""""""""""""""""""
|
||||
|
||||
- I kept saying that, "deeper down the rabbit hole". `yahoo <http://www.yahoo.com>`_
|
||||
|
||||
- I cackle at night `yahoo <http://www.yahoo.com>`_.
|
||||
- I'm so lonely here in GZ ``guangzhou``
|
||||
- A man of python destiny, hopes and dreams. `yahoo <http://www.yahoo.com>`_
|
||||
|
||||
- `yahoo <http://www.yahoo.com>`_
|
||||
|
||||
- `yahoo <http://www.yahoo.com>`_ ``hi``
|
||||
- ``destiny``
|
||||
|
||||
Hlists
|
||||
------
|
||||
|
||||
.. hlist::
|
||||
:columns: 2
|
||||
|
||||
- First item
|
||||
- Second item
|
||||
- Third item
|
||||
- Forth item
|
||||
- Fifth item
|
||||
- Sixths item
|
||||
|
||||
.. rubric:: Hlist with images
|
||||
|
||||
.. hlist::
|
||||
:columns: 2
|
||||
|
||||
- .. figure:: static/yi_jing_01_chien.jpg
|
||||
|
||||
This is a short caption for a figure.
|
||||
|
||||
- .. figure:: static/yi_jing_01_chien.jpg
|
||||
|
||||
This is a long caption for a figure. Lorem ipsum dolor sit amet, consectetur adipiscing elit.
|
||||
Donec porttitor dolor in odio posuere, vitae ornare libero mattis. In lobortis justo vestibulum nibh aliquet, non.
|
||||
|
||||
Numbered List
|
||||
-------------
|
||||
|
||||
#. One,
|
||||
#. Two.
|
||||
#. Three with long text. Lorem ipsum dolor sit amet, consectetur adipiscing elit.
|
||||
Sed feugiat sagittis neque quis eleifend. Duis rutrum lectus sit amet mattis suscipit.
|
||||
|
||||
- A) Using bullets and letters. (A)
|
||||
- B) Using bullets and letters. (B)
|
||||
- C) Using bullets and letters. (C)
|
||||
|
||||
Tables
|
||||
======
|
||||
|
||||
Grid Tables
|
||||
-----------
|
||||
|
||||
Here's a grid table followed by a simple table:
|
||||
|
||||
+------------------------+------------+----------+----------+
|
||||
| Header row, column 1 | Header 2 | Header 3 | Header 4 |
|
||||
| (header rows optional) | | | |
|
||||
+========================+============+==========+==========+
|
||||
| body row 1, column 1 | column 2 | column 3 | column 4 |
|
||||
+------------------------+------------+----------+----------+
|
||||
| body row 2 | Cells may span columns. |
|
||||
+------------------------+------------+---------------------+
|
||||
| body row 3 | Cells may | - Table cells |
|
||||
+------------------------+ span rows. | - contain |
|
||||
| body row 4 | | - body elements. |
|
||||
+------------------------+------------+----------+----------+
|
||||
| body row 5 | Cells may also be | |
|
||||
| | empty: ``-->`` | |
|
||||
+------------------------+-----------------------+----------+
|
||||
|
||||
===== ===== ======
|
||||
Inputs Output
|
||||
------------ ------
|
||||
A B A or B
|
||||
===== ===== ======
|
||||
False False False
|
||||
True False True
|
||||
False True True
|
||||
True True True
|
||||
===== ===== ======
|
||||
|
||||
Giant Tables
|
||||
^^^^^^^^^^^^
|
||||
|
||||
+------------+------------+-----------+------------+------------+-----------+------------+------------+-----------+------------+------------+-----------+
|
||||
| Header 1 | Header 2 | Header 3 | Header 1 | Header 2 | Header 3 | Header 1 | Header 2 | Header 3 | Header 1 | Header 2 | Header 3 |
|
||||
+============+============+===========+============+============+===========+============+============+===========+============+============+===========+
|
||||
| body row 1 | column 2 | column 3 | body row 1 | column 2 | column 3 | body row 1 | column 2 | column 3 | body row 1 | column 2 | column 3 |
|
||||
+------------+------------+-----------+------------+------------+-----------+------------+------------+-----------+------------+------------+-----------+
|
||||
| body row 1 | column 2 | column 3 | body row 1 | column 2 | column 3 | body row 1 | column 2 | column 3 | body row 1 | column 2 | column 3 |
|
||||
+------------+------------+-----------+------------+------------+-----------+------------+------------+-----------+------------+------------+-----------+
|
||||
| body row 1 | column 2 | column 3 | body row 1 | column 2 | column 3 | body row 1 | column 2 | column 3 | body row 1 | column 2 | column 3 |
|
||||
+------------+------------+-----------+------------+------------+-----------+------------+------------+-----------+------------+------------+-----------+
|
||||
| body row 1 | column 2 | column 3 | body row 1 | column 2 | column 3 | body row 1 | column 2 | column 3 | body row 1 | column 2 | column 3 |
|
||||
+------------+------------+-----------+------------+------------+-----------+------------+------------+-----------+------------+------------+-----------+
|
||||
|
||||
List Tables
|
||||
-----------
|
||||
|
||||
.. list-table:: List tables can have captions like this one.
|
||||
:widths: 10 5 10 50
|
||||
:header-rows: 1
|
||||
:stub-columns: 1
|
||||
|
||||
* - List table
|
||||
- Header 1
|
||||
- Header 2
|
||||
- Header 3 long. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam sit amet mauris arcu.
|
||||
* - Stub Row 1
|
||||
- Row 1
|
||||
- Column 2
|
||||
- Column 3 long. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam sit amet mauris arcu.
|
||||
* - Stub Row 2
|
||||
- Row 2
|
||||
- Column 2
|
||||
- Column 3 long. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam sit amet mauris arcu.
|
||||
* - Stub Row 3
|
||||
- Row 3
|
||||
- Column 2
|
||||
- Column 3 long. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam sit amet mauris arcu.
|
||||
|
||||
.. list-table:: This is a list table with images in it.
|
||||
|
||||
* - .. figure:: static/yi_jing_01_chien.jpg
|
||||
|
||||
This is a short caption for a figure.
|
||||
|
||||
- .. figure:: static/yi_jing_01_chien.jpg
|
||||
|
||||
This is a long caption for a figure. Lorem ipsum dolor sit amet, consectetur adipiscing elit.
|
||||
Donec porttitor dolor in odio posuere, vitae ornare libero mattis. In lobortis justo vestibulum nibh aliquet, non.
|
@ -1,209 +1,214 @@
|
||||
Long Sticky Nav
|
||||
===============
|
||||
|
||||
This section demonstrates how the 'sticky_navigation' setting behaves when the menu is very long. When this section is selected, it will make the menu and the main area scroll when you are at the top of the page.
|
||||
***************
|
||||
Long Sticky Nav
|
||||
***************
|
||||
|
||||
.. contents:: Table of Contents
|
||||
|
||||
This section demonstrates how the 'sticky_navigation' setting behaves when the menu is very long.
|
||||
When this section is selected, it will make the menu and the main area scroll when you are at the top of the page.
|
||||
|
||||
|
||||
Example Menu 1
|
||||
--------------
|
||||
==============
|
||||
|
||||
Just a place holder...
|
||||
|
||||
|
||||
Example Menu 2
|
||||
--------------
|
||||
==============
|
||||
|
||||
Just a place holder...
|
||||
|
||||
|
||||
Example Menu 3
|
||||
--------------
|
||||
==============
|
||||
|
||||
Just a place holder...
|
||||
|
||||
|
||||
Example Menu 4
|
||||
--------------
|
||||
==============
|
||||
|
||||
Just a place holder...
|
||||
|
||||
|
||||
Example Menu 5
|
||||
--------------
|
||||
==============
|
||||
|
||||
Just a place holder...
|
||||
|
||||
|
||||
Example Menu 6
|
||||
--------------
|
||||
==============
|
||||
|
||||
Just a place holder...
|
||||
|
||||
|
||||
Example Menu 7
|
||||
--------------
|
||||
==============
|
||||
|
||||
Just a place holder...
|
||||
|
||||
|
||||
Example Menu 8
|
||||
--------------
|
||||
==============
|
||||
|
||||
Just a place holder...
|
||||
|
||||
|
||||
Example Menu 9
|
||||
--------------
|
||||
==============
|
||||
|
||||
Just a place holder...
|
||||
|
||||
|
||||
Example Menu 10
|
||||
---------------
|
||||
===============
|
||||
|
||||
Just a place holder...
|
||||
|
||||
|
||||
Example Menu 11
|
||||
---------------
|
||||
===============
|
||||
|
||||
Just a place holder...
|
||||
|
||||
|
||||
Example Menu 12
|
||||
---------------
|
||||
===============
|
||||
|
||||
Just a place holder...
|
||||
|
||||
|
||||
Example Menu 13
|
||||
---------------
|
||||
===============
|
||||
|
||||
Just a place holder...
|
||||
|
||||
|
||||
Example Menu 14
|
||||
---------------
|
||||
===============
|
||||
|
||||
Just a place holder...
|
||||
|
||||
|
||||
Example Menu 15
|
||||
---------------
|
||||
===============
|
||||
|
||||
Just a place holder...
|
||||
|
||||
|
||||
Example Menu 16
|
||||
---------------
|
||||
===============
|
||||
|
||||
Just a place holder...
|
||||
|
||||
|
||||
Example Menu 17
|
||||
---------------
|
||||
===============
|
||||
|
||||
Just a place holder...
|
||||
|
||||
|
||||
Example Menu 18
|
||||
---------------
|
||||
===============
|
||||
|
||||
Just a place holder...
|
||||
|
||||
|
||||
Example Menu 19
|
||||
---------------
|
||||
===============
|
||||
|
||||
Just a place holder...
|
||||
|
||||
|
||||
Example Menu 20
|
||||
---------------
|
||||
===============
|
||||
|
||||
Just a place holder...
|
||||
|
||||
Example Submenu 1
|
||||
-----------------
|
||||
=================
|
||||
|
||||
Just a place holder...
|
||||
|
||||
Submenu 1
|
||||
~~~~~~~~~
|
||||
---------
|
||||
|
||||
Just a place holder...
|
||||
|
||||
Subsubmenu 1
|
||||
````````````
|
||||
^^^^^^^^^^^^
|
||||
|
||||
Just a place holder...
|
||||
|
||||
Subsubmenu 2
|
||||
````````````
|
||||
^^^^^^^^^^^^
|
||||
|
||||
Just a place holder...
|
||||
|
||||
Submenu 2
|
||||
~~~~~~~~~
|
||||
---------
|
||||
|
||||
Just a place holder...
|
||||
|
||||
Subsubmenu 1
|
||||
````````````
|
||||
^^^^^^^^^^^^
|
||||
|
||||
Just a place holder...
|
||||
|
||||
Submenu 3
|
||||
~~~~~~~~~
|
||||
---------
|
||||
|
||||
Just a place holder...
|
||||
|
||||
Submenu 4
|
||||
~~~~~~~~~
|
||||
---------
|
||||
|
||||
Just a place holder...
|
||||
|
||||
Submenu 5
|
||||
~~~~~~~~~
|
||||
---------
|
||||
|
||||
Just a place holder...
|
||||
|
||||
Example Submenu 2
|
||||
-----------------
|
||||
=================
|
||||
|
||||
Just a place holder...
|
||||
|
||||
Submenu 1
|
||||
~~~~~~~~~
|
||||
---------
|
||||
|
||||
Just a place holder...
|
||||
|
||||
Subsubmenu 1
|
||||
````````````
|
||||
^^^^^^^^^^^^
|
||||
|
||||
Just a place holder...
|
||||
|
||||
Submenu 2
|
||||
~~~~~~~~~
|
||||
---------
|
||||
|
||||
Just a place holder...
|
||||
|
||||
Subsubmenu 1
|
||||
````````````
|
||||
^^^^^^^^^^^^
|
||||
|
||||
Just a place holder...
|
||||
|
||||
Submenu 3
|
||||
~~~~~~~~~
|
||||
---------
|
||||
|
||||
Just a place holder...
|
||||
|
||||
Submenu 4
|
||||
~~~~~~~~~
|
||||
---------
|
||||
|
||||
Just a place holder...
|
||||
|
||||
Submenu 5
|
||||
~~~~~~~~~
|
||||
---------
|
||||
|
||||
Just a place holder...
|
Before Width: | Height: | Size: 16 KiB After Width: | Height: | Size: 16 KiB |
Before Width: | Height: | Size: 137 KiB After Width: | Height: | Size: 137 KiB |
Before Width: | Height: | Size: 84 KiB After Width: | Height: | Size: 84 KiB |
Before Width: | Height: | Size: 6.5 KiB After Width: | Height: | Size: 6.5 KiB |
101
docs/demo/structure.rst
Normal file
@ -0,0 +1,101 @@
|
||||
|
||||
*******************
|
||||
Structural Elements
|
||||
*******************
|
||||
|
||||
.. contents:: Table of Contents
|
||||
|
||||
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec lorem neque, interdum in ipsum nec,
|
||||
finibus dictum velit. Ut eu efficitur arcu, id aliquam erat. In sit amet diam gravida, imperdiet tellus eu,
|
||||
gravida nisl. Praesent aliquet odio eget libero elementum, quis rhoncus tellus tincidunt.
|
||||
Suspendisse quis volutpat ipsum. Sed lobortis scelerisque tristique. Aenean condimentum risus tellus,
|
||||
quis accumsan ipsum laoreet ut. Integer porttitor maximus suscipit. Mauris in posuere sapien.
|
||||
Aliquam accumsan feugiat ligula, nec fringilla libero commodo sed. Proin et erat pharetra.
|
||||
|
||||
---------
|
||||
|
||||
Etiam turpis ante, luctus sed velit tristique, finibus volutpat dui. Nam sagittis vel ante nec malesuada.
|
||||
Praesent dignissim mi nec ornare elementum. Nunc eu augue vel sem dignissim cursus sed et nulla.
|
||||
Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas.
|
||||
Pellentesque dictum dui sem, non placerat tortor rhoncus in. Sed placerat nulla at rhoncus iaculis.
|
||||
|
||||
Document Section
|
||||
================
|
||||
|
||||
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed condimentum nulla vel neque venenatis,
|
||||
nec placerat lorem placerat. Cras purus eros, gravida vitae tincidunt id, vehicula nec nulla.
|
||||
Fusce aliquet auctor cursus. Phasellus ex neque, vestibulum non est vitae, viverra fringilla tortor.
|
||||
Donec vestibulum convallis justo, a faucibus lorem vulputate vel. Aliquam cursus odio eu felis sodales aliquet.
|
||||
Aliquam erat volutpat. Maecenas eget dictum mauris. Suspendisse arcu eros, condimentum eget risus sed,
|
||||
luctus efficitur arcu. Cras ut dictum mi. Nulla congue interdum lorem, semper semper enim commodo nec.
|
||||
|
||||
Document Subsection
|
||||
-------------------
|
||||
|
||||
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Etiam efficitur in eros et blandit. Nunc maximus,
|
||||
nisl at auctor vestibulum, justo ex sollicitudin ligula, id faucibus urna orci tristique nisl.
|
||||
Duis auctor rutrum orci, in ornare lacus condimentum quis. Quisque arcu velit, facilisis quis interdum ac,
|
||||
hendrerit auctor mauris. Curabitur urna nibh, porttitor at ante sit amet, vestibulum interdum dolor.
|
||||
Duis dictum elit orci, tincidunt imperdiet sem pellentesque et. In vehicula pellentesque varius.
|
||||
Phasellus a turpis sollicitudin, bibendum massa et, imperdiet neque. Integer quis sapien in magna rutrum bibendum.
|
||||
Integer cursus ex sed magna vehicula finibus. Proin tempus orci quis dolor tempus, nec condimentum odio vestibulum.
|
||||
Etiam efficitur sollicitudin libero, tincidunt volutpat ligula interdum sed.
|
||||
|
||||
Document Subsubsection
|
||||
^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
Donec non rutrum lorem. Aenean sagittis metus at pharetra fringilla. Nunc sapien dolor, cursus sed nisi at,
|
||||
pretium tristique lectus. Sed pellentesque leo lectus, et convallis ipsum euismod a.
|
||||
Integer at leo vitae felis pretium aliquam fringilla quis odio. Sed pharetra enim accumsan feugiat pretium.
|
||||
Maecenas at pharetra tortor. Morbi semper eget mi vel finibus. Cras rutrum nulla eros, id feugiat arcu pellentesque ut.
|
||||
Sed finibus tortor ac nisi ultrices viverra. Duis feugiat malesuada sapien, at commodo ante porttitor ac.
|
||||
Curabitur posuere mauris mi, vel ornare orci scelerisque sit amet. Suspendisse nec fringilla dui.
|
||||
|
||||
Document Paragraph
|
||||
""""""""""""""""""
|
||||
|
||||
Pellentesque nec est in odio ultrices elementum. Vestibulum et hendrerit sapien, quis vulputate turpis.
|
||||
Suspendisse potenti. Curabitur tristique sit amet lectus non viverra. Phasellus rutrum dapibus turpis sed imperdiet.
|
||||
Mauris maximus viverra ante. Donec eu egestas mauris. Morbi vulputate tincidunt euismod. Integer vel porttitor neque.
|
||||
Donec at lacus suscipit, lacinia lectus vel, sagittis lectus.
|
||||
|
||||
*********************
|
||||
Structural Elements 2
|
||||
*********************
|
||||
|
||||
Etiam turpis ante, luctus sed velit tristique, finibus volutpat dui. Nam sagittis vel ante nec malesuada.
|
||||
Praesent dignissim mi nec ornare elementum. Nunc eu augue vel sem dignissim cursus sed et nulla.
|
||||
Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas.
|
||||
Pellentesque dictum dui sem, non placerat tortor rhoncus in. Sed placerat nulla at rhoncus iaculis.
|
||||
|
||||
Document Section
|
||||
================
|
||||
|
||||
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed condimentum nulla vel neque venenatis,
|
||||
nec placerat lorem placerat. Cras purus eros, gravida vitae tincidunt id, vehicula nec nulla.
|
||||
Fusce aliquet auctor cursus. Phasellus ex neque, vestibulum non est vitae, viverra fringilla tortor.
|
||||
Donec vestibulum convallis justo, a faucibus lorem vulputate vel. Aliquam cursus odio eu felis sodales aliquet.
|
||||
Aliquam erat volutpat. Maecenas eget dictum mauris. Suspendisse arcu eros, condimentum eget risus sed,
|
||||
luctus efficitur arcu. Cras ut dictum mi. Nulla congue interdum lorem, semper semper enim commodo nec.
|
||||
|
||||
Document Subsection
|
||||
-------------------
|
||||
|
||||
.. figure:: static/yi_jing_01_chien.jpg
|
||||
:align: right
|
||||
:figwidth: 200px
|
||||
|
||||
This is a caption for a figure. Text should wrap around the caption.
|
||||
|
||||
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Etiam efficitur in eros et blandit. Nunc maximus,
|
||||
nisl at auctor vestibulum, justo ex sollicitudin ligula, id faucibus urna orci tristique nisl.
|
||||
Duis auctor rutrum orci, in ornare lacus condimentum quis. Quisque arcu velit, facilisis quis interdum ac,
|
||||
hendrerit auctor mauris. Curabitur urna nibh, porttitor at ante sit amet, vestibulum interdum dolor.
|
||||
Duis dictum elit orci, tincidunt imperdiet sem pellentesque et. In vehicula pellentesque varius.
|
||||
Phasellus a turpis sollicitudin, bibendum massa et, imperdiet neque. Integer quis sapien in magna rutrum bibendum.
|
||||
Integer cursus ex sed magna vehicula finibus. Proin tempus orci quis dolor tempus, nec condimentum odio vestibulum.
|
||||
Etiam efficitur sollicitudin libero, tincidunt volutpat ligula interdum sed. Praesent congue sagittis nisl et suscipit.
|
||||
Vivamus sagittis risus et egestas commodo.Cras venenatis arcu in pharetra interdum.
|
||||
Donec quis metus porttitor tellus cursus lobortis. Quisque et orci magna. Fusce rhoncus mi mi,
|
||||
at vehicula massa rhoncus quis. Mauris augue leo, pretium eget molestie vitae, efficitur nec nulla.
|
||||
In hac habitasse platea dictumst. Sed sit amet imperdiet purus.
|
@ -4,7 +4,7 @@
|
||||
|
||||
class Foo:
|
||||
|
||||
r"""Docstring for class Foo.
|
||||
"""Docstring for class Foo.
|
||||
|
||||
This text tests for the formatting of docstrings generated from output
|
||||
``sphinx.ext.autodoc``. Which contain reST, but sphinx nests it in the
|
||||
@ -103,5 +103,11 @@ class Foo:
|
||||
|
||||
:raises ValueError: When ``a`` is not an integer.
|
||||
|
||||
.. versionadded:: 1.0
|
||||
This was added in 1.0
|
||||
.. versionchanged:: 2.0
|
||||
This was changed in 2.0
|
||||
.. deprecated:: 3.0
|
||||
This is deprecated since 3.0
|
||||
"""
|
||||
return sum(kwargs.values()) / len(kwargs), a + b
|
13
docs/index.rst
Normal file
@ -0,0 +1,13 @@
|
||||
|
||||
.. include:: ../README.rst
|
||||
|
||||
Content
|
||||
=======
|
||||
|
||||
.. toctree::
|
||||
:caption: Theme
|
||||
|
||||
.. toctree::
|
||||
:caption: Demo
|
||||
|
||||
demo/index
|
38
docs/make.bat
Normal file
@ -0,0 +1,38 @@
|
||||
@ECHO OFF
|
||||
|
||||
pushd %~dp0
|
||||
|
||||
REM Command file for Sphinx documentation
|
||||
|
||||
if "%SPHINXBUILD%" == "" (
|
||||
set SPHINXBUILD=python -msphinx
|
||||
)
|
||||
set SPHINXOPTS=
|
||||
set SPHINXBUILD=sphinx-build
|
||||
set SOURCEDIR=.
|
||||
set BUILDDIR=_build
|
||||
set SPHINXPROJ=ReadtheDocsSphinxTheme
|
||||
|
||||
if "%1" == "" goto help
|
||||
|
||||
%SPHINXBUILD% >NUL 2>NUL
|
||||
if errorlevel 9009 (
|
||||
echo.
|
||||
echo.The Sphinx module was not found. Make sure you have Sphinx installed,
|
||||
echo.then set the SPHINXBUILD environment variable to point to the full
|
||||
echo.path of the 'sphinx-build' executable. Alternatively you may add the
|
||||
echo.Sphinx directory to PATH.
|
||||
echo.
|
||||
echo.If you don't have Sphinx installed, grab it from
|
||||
echo.http://sphinx-doc.org/
|
||||
exit /b 1
|
||||
)
|
||||
|
||||
%SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS%
|
||||
goto end
|
||||
|
||||
:help
|
||||
%SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS%
|
||||
|
||||
:end
|
||||
popd
|
2
docs/requirements.txt
Normal file
@ -0,0 +1,2 @@
|
||||
sphinxcontrib.httpdomain
|
||||
sphinx
|
72
js/theme.js
@ -15,10 +15,14 @@ function ThemeNav () {
|
||||
isRunning: false
|
||||
};
|
||||
|
||||
nav.enable = function () {
|
||||
nav.enable = function (withStickyNav) {
|
||||
var self = this;
|
||||
|
||||
if (!self.isRunning) {
|
||||
if (self.isRunning) {
|
||||
// Only allow enabling nav logic once
|
||||
return;
|
||||
}
|
||||
|
||||
self.isRunning = true;
|
||||
jQuery(function ($) {
|
||||
self.init($);
|
||||
@ -26,22 +30,33 @@ function ThemeNav () {
|
||||
self.reset();
|
||||
self.win.on('hashchange', self.reset);
|
||||
|
||||
if (withStickyNav) {
|
||||
// Set scroll monitor
|
||||
self.win.on('scroll', function () {
|
||||
if (!self.linkScroll) {
|
||||
if (!self.winScroll) {
|
||||
self.winScroll = true;
|
||||
requestAnimationFrame(function() { self.onScroll(); });
|
||||
}
|
||||
}
|
||||
});
|
||||
setInterval(function () { if (self.winScroll) self.onScroll(); }, 25);
|
||||
}
|
||||
|
||||
// Set resize monitor
|
||||
self.win.on('resize', function () {
|
||||
if (!self.winResize) {
|
||||
self.winResize = true;
|
||||
requestAnimationFrame(function() { self.onResize(); });
|
||||
}
|
||||
});
|
||||
setInterval(function () { if (self.winResize) self.onResize(); }, 25);
|
||||
|
||||
self.onResize();
|
||||
});
|
||||
|
||||
};
|
||||
|
||||
nav.enableSticky = function() {
|
||||
this.enable(true);
|
||||
};
|
||||
|
||||
nav.init = function ($) {
|
||||
@ -74,9 +89,16 @@ function ThemeNav () {
|
||||
})
|
||||
|
||||
// Make tables responsive
|
||||
$("table.docutils:not(.field-list)")
|
||||
$("table.docutils:not(.field-list,.footnote,.citation)")
|
||||
.wrap("<div class='wy-table-responsive'></div>");
|
||||
|
||||
// Add extra class to responsive tables that contain
|
||||
// footnotes or citations so that we can target them for styling
|
||||
$("table.docutils.footnote")
|
||||
.wrap("<div class='wy-table-responsive footnote'></div>");
|
||||
$("table.docutils.citation")
|
||||
.wrap("<div class='wy-table-responsive citation'></div>");
|
||||
|
||||
// Add expand links to all parents of nested ul
|
||||
$('.wy-menu-vertical ul').not('.simple').siblings('a').each(function () {
|
||||
var link = $(this);
|
||||
@ -108,14 +130,16 @@ function ThemeNav () {
|
||||
// Try again with the closest section entry.
|
||||
link = $('.wy-menu-vertical')
|
||||
.find('[href="#' + closest_section.attr("id") + '"]');
|
||||
|
||||
}
|
||||
$('.wy-menu-vertical li.toctree-l1 li.current')
|
||||
.removeClass('current');
|
||||
// If we found a matching link then reset current and re-apply
|
||||
// otherwise retain the existing match
|
||||
if (link.length > 0) {
|
||||
$('.wy-menu-vertical li.toctree-l1 li.current').removeClass('current');
|
||||
link.closest('li.toctree-l2').addClass('current');
|
||||
link.closest('li.toctree-l3').addClass('current');
|
||||
link.closest('li.toctree-l4').addClass('current');
|
||||
}
|
||||
}
|
||||
catch (err) {
|
||||
console.log("Error expanding nav for anchor", err);
|
||||
}
|
||||
@ -162,5 +186,35 @@ function ThemeNav () {
|
||||
module.exports.ThemeNav = ThemeNav();
|
||||
|
||||
if (typeof(window) != 'undefined') {
|
||||
window.SphinxRtdTheme = { StickyNav: module.exports.ThemeNav };
|
||||
window.SphinxRtdTheme = { Navigation: module.exports.ThemeNav };
|
||||
}
|
||||
|
||||
|
||||
// requestAnimationFrame polyfill by Erik Möller. fixes from Paul Irish and Tino Zijdel
|
||||
// https://gist.github.com/paulirish/1579671
|
||||
// MIT license
|
||||
|
||||
(function() {
|
||||
var lastTime = 0;
|
||||
var vendors = ['ms', 'moz', 'webkit', 'o'];
|
||||
for(var x = 0; x < vendors.length && !window.requestAnimationFrame; ++x) {
|
||||
window.requestAnimationFrame = window[vendors[x]+'RequestAnimationFrame'];
|
||||
window.cancelAnimationFrame = window[vendors[x]+'CancelAnimationFrame']
|
||||
|| window[vendors[x]+'CancelRequestAnimationFrame'];
|
||||
}
|
||||
|
||||
if (!window.requestAnimationFrame)
|
||||
window.requestAnimationFrame = function(callback, element) {
|
||||
var currTime = new Date().getTime();
|
||||
var timeToCall = Math.max(0, 16 - (currTime - lastTime));
|
||||
var id = window.setTimeout(function() { callback(currTime + timeToCall); },
|
||||
timeToCall);
|
||||
lastTime = currTime + timeToCall;
|
||||
return id;
|
||||
};
|
||||
|
||||
if (!window.cancelAnimationFrame)
|
||||
window.cancelAnimationFrame = function(id) {
|
||||
clearTimeout(id);
|
||||
};
|
||||
}());
|
||||
|
26
package.json
@ -1,20 +1,20 @@
|
||||
{
|
||||
"name": "sphinx_rtd_theme",
|
||||
"version": "0.0.11",
|
||||
"version": "0.2.5b2",
|
||||
"private": true,
|
||||
"dependencies": {},
|
||||
"devDependencies": {
|
||||
"browserify": "^11.0.0",
|
||||
"connect-livereload": "~0.3.0",
|
||||
"grunt": "~0.4.1",
|
||||
"grunt-browserify": "^3.8.0",
|
||||
"grunt-contrib-clean": "0.5.0",
|
||||
"grunt-contrib-connect": "0.5.0",
|
||||
"grunt-contrib-copy": "0.5.0",
|
||||
"grunt-contrib-sass": "~0.7.2",
|
||||
"grunt-contrib-watch": "~0.4.3",
|
||||
"grunt-exec": "~0.4.2",
|
||||
"grunt-open": "0.2.2",
|
||||
"matchdep": "~0.1.2"
|
||||
"browserify": "^13.0.0",
|
||||
"connect-livereload": "~0.6.0",
|
||||
"grunt": "~1.0.1",
|
||||
"grunt-browserify": "^5.0.0",
|
||||
"grunt-contrib-clean": "^1.0.0",
|
||||
"grunt-contrib-connect": "^1.0.2",
|
||||
"grunt-contrib-copy": "~1.0.0",
|
||||
"grunt-contrib-sass": "~1.0.0",
|
||||
"grunt-contrib-watch": "~1.0.0",
|
||||
"grunt-exec": "~1.0.1",
|
||||
"grunt-open": "0.2.3",
|
||||
"matchdep": "~1.0.1"
|
||||
}
|
||||
}
|
||||
|
@ -1,3 +1,6 @@
|
||||
.wy-breadcrumbs
|
||||
+clearfix
|
||||
|
||||
.wy-breadcrumbs li
|
||||
display: inline-block
|
||||
&.wy-breadcrumbs-aside
|
||||
|
@ -22,6 +22,18 @@
|
||||
font-weight: 700
|
||||
src: local('Lato Bold'), local('Lato-Bold'), url(../fonts/Lato-Bold.ttf) format('truetype')
|
||||
|
||||
@font-face
|
||||
font-family: 'Lato'
|
||||
font-style: italic
|
||||
font-weight: 400
|
||||
src: local('Lato Italic'), local('Lato-Italic'), url(../fonts/Lato-Italic.ttf) format('truetype')
|
||||
|
||||
@font-face
|
||||
font-family: 'Lato'
|
||||
font-style: italic
|
||||
font-weight: 700
|
||||
src: local('Lato Bold Italic'), local('Lato-BoldItalic'), url(../fonts/Lato-BoldItalic.ttf) format('truetype')
|
||||
|
||||
@font-face
|
||||
font-family: 'Roboto Slab'
|
||||
font-style: normal
|
||||
|
@ -35,7 +35,7 @@
|
||||
font-weight: bold
|
||||
text-transform: uppercase
|
||||
font-size: 80%
|
||||
color: $menu-color
|
||||
color: $menu-dark
|
||||
white-space: nowrap
|
||||
|
||||
ul
|
||||
@ -336,6 +336,8 @@ footer
|
||||
color: $footer-color
|
||||
|
||||
.rst-footer-buttons
|
||||
&:before, &:after
|
||||
width: 100%
|
||||
+clearfix
|
||||
|
||||
.rst-breadcrumbs-buttons
|
||||
|
@ -17,10 +17,7 @@
|
||||
// Sphinx by default applies HxW style attributes to images. This fixes that oversite.
|
||||
img
|
||||
max-width: 100%
|
||||
height: auto !important
|
||||
|
||||
.highlight > pre
|
||||
line-height: normal
|
||||
height: auto
|
||||
|
||||
div.figure
|
||||
margin-bottom: $base-line-height
|
||||
@ -33,13 +30,19 @@
|
||||
// Usually it's a good idea to give images some space.
|
||||
.section > img, .section > a > img
|
||||
margin-bottom: $base-line-height
|
||||
// Questionable whether this is nice or not. It styles eternal links, but comes with some baggage.
|
||||
// a.reference.external:after
|
||||
// font-family: FontAwesome
|
||||
// content: " \f08e "
|
||||
// color: $text-light
|
||||
// vertical-align: super
|
||||
// font-size: 60%
|
||||
|
||||
// normalize browser styling
|
||||
abbr[title]
|
||||
text-decoration: none
|
||||
|
||||
// Style external links
|
||||
&.style-external-links a.reference.external:after
|
||||
font-family: FontAwesome
|
||||
content: "\f08e"
|
||||
color: $text-light
|
||||
vertical-align: super
|
||||
font-size: 60%
|
||||
margin: 0 0.2em
|
||||
|
||||
// For the most part, its safe to assume that sphinx wants you to use a blockquote as an indent. It gets
|
||||
// used in many different ways, so don't assume you can apply some fancy style, just leave it be.
|
||||
@ -47,10 +50,41 @@
|
||||
margin-left: $base-line-height
|
||||
line-height: $base-line-height
|
||||
margin-bottom: $base-line-height
|
||||
.literal-block, pre.literal-block
|
||||
@extend .codeblock
|
||||
|
||||
pre.literal-block, div[class^='highlight']
|
||||
border: 1px solid $table-border-color
|
||||
padding: 0px
|
||||
overflow-x: auto
|
||||
// 1px hack otherwise border won't show. lame
|
||||
margin: 1px 0 $base-line-height 0
|
||||
div[class^='highlight']
|
||||
border: none
|
||||
margin: 0
|
||||
// Needs 100% width for line highlighting to work properly
|
||||
div[class^='highlight'] td.code
|
||||
width: 100%
|
||||
.linenodiv pre
|
||||
border-right: solid 1px lighten($table-border-color, 2%)
|
||||
margin: 0
|
||||
padding: $base-line-height / 2 $base-line-height / 2
|
||||
font-family: $code-font-family
|
||||
div[class^='highlight'] pre
|
||||
white-space: pre
|
||||
margin: 0
|
||||
padding: $base-line-height / 2 $base-line-height / 2
|
||||
font-family: $code-font-family
|
||||
display: block
|
||||
overflow: auto
|
||||
pre.literal-block, div[class^='highlight'] pre, .linenodiv pre
|
||||
font-size: 12px
|
||||
line-height: normal
|
||||
|
||||
@media print
|
||||
.codeblock, div[class^='highlight'], div[class^='highlight'] pre
|
||||
white-space: pre-wrap
|
||||
|
||||
// These are the various note pullouts that sphinx applies
|
||||
.note, .attention, .caution, .danger, .error, .hint, .important, .tip, .warning, .seealso, .admonition-todo
|
||||
.note, .attention, .caution, .danger, .error, .hint, .important, .tip, .warning, .seealso, .admonition-todo, .admonition
|
||||
@extend .wy-alert
|
||||
.last
|
||||
margin-bottom: 0
|
||||
@ -110,19 +144,22 @@
|
||||
@extend h2
|
||||
|
||||
// This is the #href that shows up on hover. Sphinx's is terrible so I hack it away.
|
||||
h1, h2, h3, h4, h5, h6, dl dt, p.caption
|
||||
h1, h2, h3, h4, h5, h6, dl dt, p.caption, table > caption
|
||||
.headerlink
|
||||
display: none
|
||||
visibility: hidden
|
||||
font-size: 14px
|
||||
@extend .fa
|
||||
&:after
|
||||
visibility: visible
|
||||
content: "\f0c1"
|
||||
font-family: FontAwesome
|
||||
display: inline-block
|
||||
&:hover .headerlink
|
||||
display: inline-block
|
||||
&:hover .headerlink:after
|
||||
visibility: visible
|
||||
|
||||
table > caption .headerlink:after
|
||||
font-size: 12px
|
||||
|
||||
.centered
|
||||
text-align: center
|
||||
|
||||
// Sidebar content. You'll see at the bottom of this file I change it in mobile.
|
||||
.sidebar
|
||||
@ -156,7 +193,10 @@
|
||||
|
||||
// These are the little citation links [1] that show up within paragraphs.
|
||||
.footnote-reference, .citation-reference
|
||||
vertical-align: super
|
||||
vertical-align: baseline
|
||||
position: relative
|
||||
top: -0.4em
|
||||
line-height: 0
|
||||
font-size: 90%
|
||||
|
||||
// Tables! Sphinx LOVES TABLES. Most of wyrm assumes you're only going to use a table as a table
|
||||
@ -164,7 +204,7 @@
|
||||
table.docutils.citation, table.docutils.footnote
|
||||
background: none
|
||||
border: none
|
||||
color: $gray-light
|
||||
color: $text-medium
|
||||
td, tr
|
||||
border: none
|
||||
background-color: transparent !important
|
||||
@ -175,6 +215,17 @@
|
||||
vertical-align: top
|
||||
code
|
||||
color: $gray
|
||||
// Remove the large vertical space between citations and footnotes
|
||||
.wy-table-responsive.citation, .wy-table-responsive.footnote
|
||||
margin-bottom: 0
|
||||
// Re-add vertical space to element directly following citation and footnotes,
|
||||
// if the following element is of a different type
|
||||
.wy-table-responsive.citation + :not(.citation),
|
||||
.wy-table-responsive.footnote + :not(.footnote)
|
||||
margin-top: $base-line-height
|
||||
// Re-add vertical space after citation and footnotes if it is the last child of a parent
|
||||
.wy-table-responsive.citation:last-child, .wy-table-responsive.footnote:last-child
|
||||
margin-bottom: $base-line-height
|
||||
table.docutils
|
||||
@extend .wy-table
|
||||
@extend .wy-table-bordered-all
|
||||
@ -186,17 +237,14 @@
|
||||
border: none
|
||||
td
|
||||
border: none
|
||||
padding-top: 5px
|
||||
td > strong
|
||||
display: inline-block
|
||||
margin-top: 3px
|
||||
.field-name
|
||||
padding-right: 10px
|
||||
text-align: left
|
||||
white-space: nowrap
|
||||
.field-body
|
||||
text-align: left
|
||||
padding-left: 0
|
||||
|
||||
// These are the "literals" that get spit out when you mark stuff as ``code`` as your write.
|
||||
tt, code
|
||||
@ -234,7 +282,7 @@
|
||||
margin-bottom: $base-line-height
|
||||
// This would be the equivilant of a .. class::
|
||||
dt
|
||||
display: inline-block
|
||||
display: table
|
||||
margin: $base-line-height / 4 0
|
||||
font-size: 90%
|
||||
line-height: normal
|
||||
@ -315,6 +363,8 @@
|
||||
border-radius: $base-line-height / 6
|
||||
padding: $base-line-height / 10 $base-line-height / 4
|
||||
margin: auto $base-line-height / 12
|
||||
.versionmodified
|
||||
font-style: italic
|
||||
|
||||
|
||||
// Mobile specific
|
||||
|
@ -20,14 +20,14 @@ $method-color: $gray
|
||||
$guilabel-color: $blue
|
||||
|
||||
// Footer colors
|
||||
$footer-color: $gray-light
|
||||
$footer-color: $text-medium
|
||||
|
||||
// Menu colors
|
||||
$menu-vertical-background-color: $section-background-color
|
||||
|
||||
// Menu text colors
|
||||
$menu-color: $gray
|
||||
$menu-dark: lighten($menu-color,15%) !default
|
||||
$menu-dark: lighten($menu-color,10%) !default
|
||||
$menu-medium: lighten($menu-color,25%) !default
|
||||
$menu-light: lighten($menu-color,45%) !default
|
||||
$menu-lighter: lighten($menu-color,60%) !default
|
||||
|
@ -40,10 +40,6 @@
|
||||
@import wyrm_core/table
|
||||
@import wyrm_core/type
|
||||
|
||||
// Pygments styling
|
||||
@import wyrm_addons/pygments/pygments
|
||||
@import wyrm_addons/pygments/pygments_light
|
||||
|
||||
// Theme specific styles. These are likely the files you want to edit.
|
||||
@import theme_breadcrumbs
|
||||
@import theme_layout
|
||||
|
11
setup.py
@ -4,6 +4,7 @@
|
||||
.. _github: https://www.github.com/snide/sphinx_rtd_theme
|
||||
|
||||
"""
|
||||
from io import open
|
||||
from setuptools import setup
|
||||
from sphinx_rtd_theme import __version__
|
||||
|
||||
@ -16,7 +17,7 @@ setup(
|
||||
author='Dave Snider',
|
||||
author_email='dave.snider@gmail.com',
|
||||
description='Read the Docs theme for Sphinx',
|
||||
long_description=open('README.rst').read(),
|
||||
long_description=open('README.rst', encoding='utf-8').read(),
|
||||
zip_safe=False,
|
||||
packages=['sphinx_rtd_theme'],
|
||||
package_data={'sphinx_rtd_theme': [
|
||||
@ -27,7 +28,15 @@ setup(
|
||||
'static/font/*.*'
|
||||
]},
|
||||
include_package_data=True,
|
||||
# See http://www.sphinx-doc.org/en/stable/theming.html#distribute-your-theme-as-a-python-package
|
||||
entry_points = {
|
||||
'sphinx.html_themes': [
|
||||
'sphinx_rtd_theme = sphinx_rtd_theme',
|
||||
]
|
||||
},
|
||||
classifiers=[
|
||||
'Framework :: Sphinx',
|
||||
'Framework :: Sphinx :: Theme',
|
||||
'Development Status :: 5 - Production/Stable',
|
||||
'License :: OSI Approved :: MIT License',
|
||||
'Environment :: Console',
|
||||
|
@ -3,13 +3,17 @@
|
||||
From https://github.com/ryan-roemer/sphinx-bootstrap-theme.
|
||||
|
||||
"""
|
||||
import os
|
||||
from os import path
|
||||
|
||||
__version__ = '0.2.4'
|
||||
__version__ = '0.2.5b2'
|
||||
__version_full__ = __version__
|
||||
|
||||
|
||||
def get_html_theme_path():
|
||||
"""Return list of HTML theme paths."""
|
||||
cur_dir = os.path.abspath(os.path.dirname(os.path.dirname(__file__)))
|
||||
cur_dir = path.abspath(path.dirname(path.dirname(__file__)))
|
||||
return cur_dir
|
||||
|
||||
# See http://www.sphinx-doc.org/en/stable/theming.html#distribute-your-theme-as-a-python-package
|
||||
def setup(app):
|
||||
app.add_html_theme('sphinx_rtd_theme', path.abspath(path.dirname(__file__)))
|
||||
|
@ -36,7 +36,7 @@
|
||||
{% endblock %}
|
||||
{% block breadcrumbs_aside %}
|
||||
<li class="wy-breadcrumbs-aside">
|
||||
{% if pagename != "search" %}
|
||||
{% if hasdoc(pagename) %}
|
||||
{% if display_github %}
|
||||
{% if check_meta and 'github_url' in meta %}
|
||||
<!-- User defined GitHub URL -->
|
||||
|
@ -6,10 +6,11 @@
|
||||
{%- else %}
|
||||
{%- set titlesuffix = "" %}
|
||||
{%- endif %}
|
||||
{%- set lang_attr = 'en' if language == None else (language | replace('_', '-')) %}
|
||||
|
||||
<!DOCTYPE html>
|
||||
<!--[if IE 8]><html class="no-js lt-ie9" lang="en" > <![endif]-->
|
||||
<!--[if gt IE 8]><!--> <html class="no-js" lang="en" > <!--<![endif]-->
|
||||
<!--[if IE 8]><html class="no-js lt-ie9" lang="{{ lang_attr }}" > <![endif]-->
|
||||
<!--[if gt IE 8]><!--> <html class="no-js" lang="{{ lang_attr }}" > <!--<![endif]-->
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
{{ metatags }}
|
||||
@ -42,6 +43,8 @@
|
||||
<link rel="stylesheet" href="{{ pathto('_static/' + style, 1) }}" type="text/css" />
|
||||
{% endif %}
|
||||
|
||||
<link rel="stylesheet" href="{{ pathto('_static/pygments.css', 1) }}" type="text/css" />
|
||||
|
||||
{% for cssfile in css_files %}
|
||||
<link rel="stylesheet" href="{{ pathto(cssfile, 1) }}" type="text/css" />
|
||||
{% endfor %}
|
||||
@ -130,7 +133,10 @@
|
||||
toctree is empty. Skip building this for now.
|
||||
#}
|
||||
{% if 'singlehtml' not in builder %}
|
||||
{% set global_toc = toctree(maxdepth=theme_navigation_depth|int, collapse=theme_collapse_navigation, includehidden=True) %}
|
||||
{% set global_toc = toctree(maxdepth=theme_navigation_depth|int,
|
||||
collapse=theme_collapse_navigation|tobool,
|
||||
includehidden=theme_includehidden|tobool,
|
||||
titles_only=theme_titles_only|tobool) %}
|
||||
{% endif %}
|
||||
{% if global_toc %}
|
||||
{{ global_toc }}
|
||||
@ -156,7 +162,11 @@
|
||||
|
||||
{# PAGE CONTENT #}
|
||||
<div class="wy-nav-content">
|
||||
{% if theme_style_external_links|tobool %}
|
||||
<div class="rst-content style-external-links">
|
||||
{% else %}
|
||||
<div class="rst-content">
|
||||
{% endif %}
|
||||
{% include "breadcrumbs.html" %}
|
||||
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
|
||||
<div itemprop="articleBody">
|
||||
@ -181,6 +191,7 @@
|
||||
var DOCUMENTATION_OPTIONS = {
|
||||
URL_ROOT:'{{ url_root }}',
|
||||
VERSION:'{{ release|e }}',
|
||||
LANGUAGE:'{{ language }}',
|
||||
COLLAPSE_INDEX:false,
|
||||
FILE_SUFFIX:'{{ '' if no_search_suffix else file_suffix }}',
|
||||
HAS_SOURCE: {{ has_source|lower }},
|
||||
@ -198,14 +209,15 @@
|
||||
<script type="text/javascript" src="{{ pathto('_static/js/theme.js', 1) }}"></script>
|
||||
{% endif %}
|
||||
|
||||
{# STICKY NAVIGATION #}
|
||||
{% if theme_sticky_navigation %}
|
||||
<script type="text/javascript">
|
||||
jQuery(function () {
|
||||
SphinxRtdTheme.StickyNav.enable();
|
||||
{% if theme_sticky_navigation|tobool %}
|
||||
SphinxRtdTheme.Navigation.enableSticky();
|
||||
{% else %}
|
||||
SphinxRtdTheme.Navigation.enable();
|
||||
{% endif %}
|
||||
});
|
||||
</script>
|
||||
{% endif %}
|
||||
|
||||
{%- block footer %} {% endblock %}
|
||||
|
||||
|
@ -1,209 +0,0 @@
|
||||
{#
|
||||
basic/layout.html
|
||||
~~~~~~~~~~~~~~~~~
|
||||
|
||||
Master layout template for Sphinx themes.
|
||||
|
||||
:copyright: Copyright 2007-2013 by the Sphinx team, see AUTHORS.
|
||||
:license: BSD, see LICENSE for details.
|
||||
#}
|
||||
{%- block doctype -%}
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
{%- endblock %}
|
||||
{%- set reldelim1 = reldelim1 is not defined and ' »' or reldelim1 %}
|
||||
{%- set reldelim2 = reldelim2 is not defined and ' |' or reldelim2 %}
|
||||
{%- set render_sidebar = (not embedded) and (not theme_nosidebar|tobool) and
|
||||
(sidebars != []) %}
|
||||
{%- set url_root = pathto('', 1) %}
|
||||
{# XXX necessary? #}
|
||||
{%- if url_root == '#' %}{% set url_root = '' %}{% endif %}
|
||||
{%- if not embedded and docstitle %}
|
||||
{%- set titlesuffix = " — "|safe + docstitle|e %}
|
||||
{%- else %}
|
||||
{%- set titlesuffix = "" %}
|
||||
{%- endif %}
|
||||
|
||||
{%- macro relbar() %}
|
||||
<div class="related">
|
||||
<h3>{{ _('Navigation') }}</h3>
|
||||
<ul>
|
||||
{%- for rellink in rellinks %}
|
||||
<li class="right" {% if loop.first %}style="margin-right: 10px"{% endif %}>
|
||||
<a href="{{ pathto(rellink[0]) }}" title="{{ rellink[1]|striptags|e }}"
|
||||
{{ accesskey(rellink[2]) }}>{{ rellink[3] }}</a>
|
||||
{%- if not loop.first %}{{ reldelim2 }}{% endif %}</li>
|
||||
{%- endfor %}
|
||||
{%- block rootrellink %}
|
||||
<li><a href="{{ pathto(master_doc) }}">{{ shorttitle|e }}</a>{{ reldelim1 }}</li>
|
||||
{%- endblock %}
|
||||
{%- for parent in parents %}
|
||||
<li><a href="{{ parent.link|e }}" {% if loop.last %}{{ accesskey("U") }}{% endif %}>{{ parent.title }}</a>{{ reldelim1 }}</li>
|
||||
{%- endfor %}
|
||||
{%- block relbaritems %} {% endblock %}
|
||||
</ul>
|
||||
</div>
|
||||
{%- endmacro %}
|
||||
|
||||
{%- macro sidebar() %}
|
||||
{%- if render_sidebar %}
|
||||
<div class="sphinxsidebar">
|
||||
<div class="sphinxsidebarwrapper">
|
||||
{%- block sidebarlogo %}
|
||||
{%- if logo %}
|
||||
<p class="logo"><a href="{{ pathto(master_doc) }}">
|
||||
<img class="logo" src="{{ pathto('_static/' + logo, 1) }}" alt="Logo"/>
|
||||
</a></p>
|
||||
{%- endif %}
|
||||
{%- endblock %}
|
||||
{%- if sidebars != None %}
|
||||
{#- new style sidebar: explicitly include/exclude templates #}
|
||||
{%- for sidebartemplate in sidebars %}
|
||||
{%- include sidebartemplate %}
|
||||
{%- endfor %}
|
||||
{%- else %}
|
||||
{#- old style sidebars: using blocks -- should be deprecated #}
|
||||
{%- block sidebartoc %}
|
||||
{%- include "localtoc.html" %}
|
||||
{%- endblock %}
|
||||
{%- block sidebarrel %}
|
||||
{%- include "relations.html" %}
|
||||
{%- endblock %}
|
||||
{%- block sidebarsourcelink %}
|
||||
{%- include "sourcelink.html" %}
|
||||
{%- endblock %}
|
||||
{%- if customsidebar %}
|
||||
{%- include customsidebar %}
|
||||
{%- endif %}
|
||||
{%- block sidebarsearch %}
|
||||
{%- include "searchbox.html" %}
|
||||
{%- endblock %}
|
||||
{%- endif %}
|
||||
</div>
|
||||
</div>
|
||||
{%- endif %}
|
||||
{%- endmacro %}
|
||||
|
||||
{%- macro script() %}
|
||||
<script type="text/javascript">
|
||||
var DOCUMENTATION_OPTIONS = {
|
||||
URL_ROOT: '{{ url_root }}',
|
||||
VERSION: '{{ release|e }}',
|
||||
COLLAPSE_INDEX: false,
|
||||
FILE_SUFFIX: '{{ '' if no_search_suffix else file_suffix }}',
|
||||
HAS_SOURCE: {{ has_source|lower }},
|
||||
SOURCELINK_SUFFIX: '{{ sourcelink_suffix }}'
|
||||
};
|
||||
</script>
|
||||
{%- for scriptfile in script_files %}
|
||||
<script type="text/javascript" src="{{ pathto(scriptfile, 1) }}"></script>
|
||||
{%- endfor %}
|
||||
{%- endmacro %}
|
||||
|
||||
{%- macro css() %}
|
||||
<link rel="stylesheet" href="{{ pathto('_static/' + style, 1) }}" type="text/css" />
|
||||
<link rel="stylesheet" href="{{ pathto('_static/pygments.css', 1) }}" type="text/css" />
|
||||
{%- for cssfile in css_files %}
|
||||
<link rel="stylesheet" href="{{ pathto(cssfile, 1) }}" type="text/css" />
|
||||
{%- endfor %}
|
||||
{%- endmacro %}
|
||||
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset={{ encoding }}" />
|
||||
{{ metatags }}
|
||||
{%- block htmltitle %}
|
||||
<title>{{ title|striptags|e }}{{ titlesuffix }}</title>
|
||||
{%- endblock %}
|
||||
{{ css() }}
|
||||
{%- if not embedded %}
|
||||
{{ script() }}
|
||||
{%- if use_opensearch %}
|
||||
<link rel="search" type="application/opensearchdescription+xml"
|
||||
title="{% trans docstitle=docstitle|e %}Search within {{ docstitle }}{% endtrans %}"
|
||||
href="{{ pathto('_static/opensearch.xml', 1) }}"/>
|
||||
{%- endif %}
|
||||
{%- if favicon %}
|
||||
<link rel="shortcut icon" href="{{ pathto('_static/' + favicon, 1) }}"/>
|
||||
{%- endif %}
|
||||
{%- if theme_canonical_url %}
|
||||
<link rel="canonical" href="{{ theme_canonical_url }}{{ pagename }}.html"/>
|
||||
{%- endif %}
|
||||
{%- endif %}
|
||||
{%- block linktags %}
|
||||
{%- if hasdoc('about') %}
|
||||
<link rel="author" title="{{ _('About these documents') }}" href="{{ pathto('about') }}" />
|
||||
{%- endif %}
|
||||
{%- if hasdoc('genindex') %}
|
||||
<link rel="index" title="{{ _('Index') }}" href="{{ pathto('genindex') }}" />
|
||||
{%- endif %}
|
||||
{%- if hasdoc('search') %}
|
||||
<link rel="search" title="{{ _('Search') }}" href="{{ pathto('search') }}" />
|
||||
{%- endif %}
|
||||
{%- if hasdoc('copyright') %}
|
||||
<link rel="copyright" title="{{ _('Copyright') }}" href="{{ pathto('copyright') }}" />
|
||||
{%- endif %}
|
||||
<link rel="top" title="{{ docstitle|e }}" href="{{ pathto('index') }}" />
|
||||
{%- if parents %}
|
||||
<link rel="up" title="{{ parents[-1].title|striptags|e }}" href="{{ parents[-1].link|e }}" />
|
||||
{%- endif %}
|
||||
{%- if next %}
|
||||
<link rel="next" title="{{ next.title|striptags|e }}" href="{{ next.link|e }}" />
|
||||
{%- endif %}
|
||||
{%- if prev %}
|
||||
<link rel="prev" title="{{ prev.title|striptags|e }}" href="{{ prev.link|e }}" />
|
||||
{%- endif %}
|
||||
{%- endblock %}
|
||||
{%- block extrahead %} {% endblock %}
|
||||
</head>
|
||||
<body>
|
||||
{%- block header %}{% endblock %}
|
||||
|
||||
{%- block relbar1 %}{{ relbar() }}{% endblock %}
|
||||
|
||||
{%- block content %}
|
||||
{%- block sidebar1 %} {# possible location for sidebar #} {% endblock %}
|
||||
|
||||
<div class="document">
|
||||
{%- block document %}
|
||||
<div class="documentwrapper">
|
||||
{%- if render_sidebar %}
|
||||
<div class="bodywrapper">
|
||||
{%- endif %}
|
||||
<div class="body">
|
||||
{% block body %} {% endblock %}
|
||||
</div>
|
||||
{%- if render_sidebar %}
|
||||
</div>
|
||||
{%- endif %}
|
||||
</div>
|
||||
{%- endblock %}
|
||||
|
||||
{%- block sidebar2 %}{{ sidebar() }}{% endblock %}
|
||||
<div class="clearer"></div>
|
||||
</div>
|
||||
{%- endblock %}
|
||||
|
||||
{%- block relbar2 %}{{ relbar() }}{% endblock %}
|
||||
|
||||
{%- block footer %}
|
||||
<div class="footer">
|
||||
{%- if show_copyright %}
|
||||
{%- if hasdoc('copyright') %}
|
||||
{% trans path=pathto('copyright'), copyright=copyright|e %}© <a href="{{ path }}">Copyright</a> {{ copyright }}.{% endtrans %}
|
||||
{%- else %}
|
||||
{% trans copyright=copyright|e %}© Copyright {{ copyright }}.{% endtrans %}
|
||||
{%- endif %}
|
||||
{%- endif %}
|
||||
{%- if last_updated %}
|
||||
{% trans last_updated=last_updated|e %}Last updated on {{ last_updated }}.{% endtrans %}
|
||||
{%- endif %}
|
||||
{%- if show_sphinx %}
|
||||
{% trans sphinx_version=sphinx_version|e %}Created using <a href="http://sphinx-doc.org/">Sphinx</a> {{ sphinx_version }}.{% endtrans %}
|
||||
{%- endif %}
|
||||
</div>
|
||||
<p>asdf asdf asdf asdf 22</p>
|
||||
{%- endblock %}
|
||||
</body>
|
||||
</html>
|
||||
|
@ -1,2 +1 @@
|
||||
.fa:before{-webkit-font-smoothing:antialiased}.clearfix{*zoom:1}.clearfix:before,.clearfix:after{display:table;content:""}.clearfix:after{clear:both}@font-face{font-family:FontAwesome;font-weight:normal;font-style:normal;src:url("../fonts/fontawesome-webfont.eot");src:url("../fonts/fontawesome-webfont.eot?#iefix") format("embedded-opentype"),url("../fonts/fontawesome-webfont.woff") format("woff"),url("../fonts/fontawesome-webfont.ttf") format("truetype"),url("../fonts/fontawesome-webfont.svg#FontAwesome") format("svg")}.fa:before{display:inline-block;font-family:FontAwesome;font-style:normal;font-weight:normal;line-height:1;text-decoration:inherit}a .fa{display:inline-block;text-decoration:inherit}li .fa{display:inline-block}li .fa-large:before,li .fa-large:before{width:1.875em}ul.fas{list-style-type:none;margin-left:2em;text-indent:-0.8em}ul.fas li .fa{width:0.8em}ul.fas li .fa-large:before,ul.fas li .fa-large:before{vertical-align:baseline}.fa-book:before{content:""}.icon-book:before{content:""}.fa-caret-down:before{content:""}.icon-caret-down:before{content:""}.fa-caret-up:before{content:""}.icon-caret-up:before{content:""}.fa-caret-left:before{content:""}.icon-caret-left:before{content:""}.fa-caret-right:before{content:""}.icon-caret-right:before{content:""}.rst-versions{position:fixed;bottom:0;left:0;width:300px;color:#fcfcfc;background:#1f1d1d;border-top:solid 10px #343131;font-family:"Lato","proxima-nova","Helvetica Neue",Arial,sans-serif;z-index:400}.rst-versions a{color:#2980B9;text-decoration:none}.rst-versions .rst-badge-small{display:none}.rst-versions .rst-current-version{padding:12px;background-color:#272525;display:block;text-align:right;font-size:90%;cursor:pointer;color:#27AE60;*zoom:1}.rst-versions .rst-current-version:before,.rst-versions .rst-current-version:after{display:table;content:""}.rst-versions .rst-current-version:after{clear:both}.rst-versions .rst-current-version .fa{color:#fcfcfc}.rst-versions .rst-current-version .fa-book{float:left}.rst-versions .rst-current-version .icon-book{float:left}.rst-versions .rst-current-version.rst-out-of-date{background-color:#E74C3C;color:#fff}.rst-versions .rst-current-version.rst-active-old-version{background-color:#F1C40F;color:#000}.rst-versions.shift-up .rst-other-versions{display:block}.rst-versions .rst-other-versions{font-size:90%;padding:12px;color:gray;display:none}.rst-versions .rst-other-versions hr{display:block;height:1px;border:0;margin:20px 0;padding:0;border-top:solid 1px #413d3d}.rst-versions .rst-other-versions dd{display:inline-block;margin:0}.rst-versions .rst-other-versions dd a{display:inline-block;padding:6px;color:#fcfcfc}.rst-versions.rst-badge{width:auto;bottom:20px;right:20px;left:auto;border:none;max-width:300px}.rst-versions.rst-badge .icon-book{float:none}.rst-versions.rst-badge .fa-book{float:none}.rst-versions.rst-badge.shift-up .rst-current-version{text-align:right}.rst-versions.rst-badge.shift-up .rst-current-version .fa-book{float:left}.rst-versions.rst-badge.shift-up .rst-current-version .icon-book{float:left}.rst-versions.rst-badge .rst-current-version{width:auto;height:30px;line-height:30px;padding:0 6px;display:block;text-align:center}@media screen and (max-width: 768px){.rst-versions{width:85%;display:none}.rst-versions.shift{display:block}}
|
||||
/*# sourceMappingURL=badge_only.css.map */
|
||||
|
@ -1,7 +0,0 @@
|
||||
{
|
||||
"version": 3,
|
||||
"mappings": "CAyDA,SAAY,EACV,qBAAsB,EAAE,UAAW,EAqDrC,QAAS,EARP,IAAK,EAAE,AAAC,EACR,+BAAS,EAEP,MAAO,EAAE,IAAK,EACd,MAAO,EAAE,CAAE,EACb,cAAO,EACL,IAAK,EAAE,GAAI,EC1Gb,SAkBC,EAjBC,UAAW,ECFJ,UAAW,EDGlB,UAAW,EAHqC,KAAM,EAItD,SAAU,EAJsD,KAAM,EAapE,EAAG,EAAE,sCAAwB,EAC7B,EAAG,EAAE,8PAG2D,ECftE,SAAU,EACR,MAAO,EAAE,WAAY,EACrB,UAAW,EAAE,UAAW,EACxB,SAAU,EAAE,KAAM,EAClB,UAAW,EAAE,KAAM,EACnB,UAAW,EAAE,AAAC,EACd,cAAe,EAAE,MAAO,EAG1B,IAAK,EACH,MAAO,EAAE,WAAY,EACrB,cAAe,EAAE,MAAO,EAIxB,KAAG,EACD,MAAO,EAAE,WAAY,EACvB,sCAAiB,EAGf,IAAK,EAAE,MAAY,EAEvB,KAAM,EACJ,cAAe,EAAE,GAAI,EACrB,UAAW,EAAE,EAAG,EAChB,UAAW,EAAE,KAAM,EAEjB,YAAG,EACD,IAAK,EAAE,IAAI,EACb,oDAAiB,EAGf,aAAc,EAAE,OAAQ,EAG9B,cAAe,EACb,MAAO,EAAE,EAAO,EAElB,gBAAiB,EACf,MAAO,EAAE,EAAO,EAElB,oBAAqB,EACnB,MAAO,EAAE,EAAO,EAElB,sBAAuB,EACrB,MAAO,EAAE,EAAO,EAElB,kBAAmB,EACjB,MAAO,EAAE,EAAO,EAElB,oBAAqB,EACnB,MAAO,EAAE,EAAO,EAElB,oBAAqB,EACnB,MAAO,EAAE,EAAO,EAElB,sBAAuB,EACrB,MAAO,EAAE,EAAO,EAElB,qBAAsB,EACpB,MAAO,EAAE,EAAO,EAElB,uBAAwB,EACtB,MAAO,EAAE,EAAO,ECnElB,YAAa,EACX,OAAQ,EAAE,IAAK,EACf,KAAM,EAAE,AAAC,EACT,GAAI,EAAE,AAAC,EACP,IAAK,EC6E+B,IAAK,ED5EzC,IAAK,EEuC+B,MAAyB,EFtC7D,SAAU,EAAE,MAAkC,EAC9C,SAAU,EAAE,iBAAiC,EAC7C,UAAW,EEkDyB,sDAA2D,EFjD/F,MAAO,EC+E6B,EAAG,ED9EvC,cAAC,EACC,IAAK,EEkC6B,MAAK,EFjCvC,cAAe,EAAE,GAAI,EACvB,6BAAgB,EACd,MAAO,EAAE,GAAI,EACf,iCAAoB,EAClB,MAAO,EAAE,GAAqB,EAC9B,eAAgB,EAAE,MAAkC,EACpD,MAAO,EAAE,IAAK,EACd,SAAU,EAAE,IAAK,EACjB,QAAS,EAAE,EAAG,EACd,KAAM,EAAE,MAAO,EACf,IAAK,EEX6B,MAAM,EL4F1C,IAAK,EAAE,AAAC,EACR,iFAAS,EAEP,MAAO,EAAE,IAAK,EACd,MAAO,EAAE,CAAE,EACb,uCAAO,EACL,IAAK,EAAE,GAAI,EGrFX,qCAAG,EACD,IAAK,EEmB2B,MAAyB,EFlB3D,0CAAQ,EACN,IAAK,EAAE,GAAI,EACb,4CAAU,EACR,IAAK,EAAE,GAAI,EACb,iDAAiB,EACf,eAAgB,ECQgB,MAAI,EDPpC,IAAK,EEO2B,GAAM,EFNxC,wDAAwB,EACtB,eAAgB,EEsBgB,MAAO,EFrBvC,IAAK,ECzB2B,GAAI,ED0BxC,yCAA8B,EAC5B,MAAO,EAAE,IAAK,EAChB,gCAAmB,EACjB,QAAS,EAAE,EAAG,EACd,MAAO,EAAE,GAAqB,EAC9B,IAAK,EEJ6B,GAAY,EFK9C,MAAO,EAAE,GAAI,EACb,mCAAE,EACA,MAAO,EAAE,IAAK,EACd,KAAM,EAAE,EAAG,EACX,KAAM,EAAE,AAAC,EACT,KAAM,EAAE,KAAM,EACd,MAAO,EAAE,AAAC,EACV,SAAU,EAAE,gBAA6C,EAC3D,mCAAE,EACA,MAAO,EAAE,WAAY,EACrB,KAAM,EAAE,AAAC,EACT,qCAAC,EACC,MAAO,EAAE,WAAY,EACrB,MAAO,EAAE,EAAqB,EAC9B,IAAK,EEZyB,MAAyB,EFa7D,sBAAW,EACT,IAAK,EAAE,GAAI,EACX,KAAM,EAAE,GAAI,EACZ,IAAK,EAAE,GAAI,EACX,GAAI,EAAE,GAAI,EACV,KAAM,EAAE,GAAI,EACZ,QAAS,ECkByB,IAAK,EDjBvC,iCAAU,EACR,IAAK,EAAE,GAAI,EACb,+BAAQ,EACN,IAAK,EAAE,GAAI,EACb,oDAA+B,EAC7B,SAAU,EAAE,IAAK,EACjB,6DAAQ,EACN,IAAK,EAAE,GAAI,EACb,+DAAU,EACR,IAAK,EAAE,GAAI,EACf,2CAAoB,EAClB,IAAK,EAAE,GAAI,EACX,KAAM,EAAE,GAAI,EACZ,UAAW,EAAE,GAAI,EACjB,MAAO,EAAE,IAAuB,EAChC,MAAO,EAAE,IAAK,EACd,SAAU,EAAE,KAAM,EGhDpB,mCAAsB,EHmDxB,YAAa,EACX,IAAK,EAAE,EAAG,EACV,MAAO,EAAE,GAAI,EACb,kBAAO,EACL,MAAO,EAAE,IAAK",
|
||||
"sources": ["../../../bower_components/wyrm/sass/wyrm_core/_mixin.sass","../../../bower_components/bourbon/dist/css3/_font-face.scss","../../../sass/_theme_badge_fa.sass","../../../sass/_theme_badge.sass","../../../bower_components/wyrm/sass/wyrm_core/_wy_variables.sass","../../../sass/_theme_variables.sass","../../../bower_components/neat/app/assets/stylesheets/grid/_media.scss"],
|
||||
"names": [],
|
||||
"file": "badge_only.css"
|
||||
}
|
BIN
sphinx_rtd_theme/static/fonts/Lato-BoldItalic.ttf
Normal file
BIN
sphinx_rtd_theme/static/fonts/Lato-Italic.ttf
Normal file
Before Width: | Height: | Size: 382 KiB After Width: | Height: | Size: 434 KiB |
@ -16,10 +16,14 @@ function ThemeNav () {
|
||||
isRunning: false
|
||||
};
|
||||
|
||||
nav.enable = function () {
|
||||
nav.enable = function (withStickyNav) {
|
||||
var self = this;
|
||||
|
||||
if (!self.isRunning) {
|
||||
if (self.isRunning) {
|
||||
// Only allow enabling nav logic once
|
||||
return;
|
||||
}
|
||||
|
||||
self.isRunning = true;
|
||||
jQuery(function ($) {
|
||||
self.init($);
|
||||
@ -27,22 +31,33 @@ function ThemeNav () {
|
||||
self.reset();
|
||||
self.win.on('hashchange', self.reset);
|
||||
|
||||
if (withStickyNav) {
|
||||
// Set scroll monitor
|
||||
self.win.on('scroll', function () {
|
||||
if (!self.linkScroll) {
|
||||
if (!self.winScroll) {
|
||||
self.winScroll = true;
|
||||
requestAnimationFrame(function() { self.onScroll(); });
|
||||
}
|
||||
}
|
||||
});
|
||||
setInterval(function () { if (self.winScroll) self.onScroll(); }, 25);
|
||||
}
|
||||
|
||||
// Set resize monitor
|
||||
self.win.on('resize', function () {
|
||||
if (!self.winResize) {
|
||||
self.winResize = true;
|
||||
requestAnimationFrame(function() { self.onResize(); });
|
||||
}
|
||||
});
|
||||
setInterval(function () { if (self.winResize) self.onResize(); }, 25);
|
||||
|
||||
self.onResize();
|
||||
});
|
||||
|
||||
};
|
||||
|
||||
nav.enableSticky = function() {
|
||||
this.enable(true);
|
||||
};
|
||||
|
||||
nav.init = function ($) {
|
||||
@ -75,9 +90,16 @@ function ThemeNav () {
|
||||
})
|
||||
|
||||
// Make tables responsive
|
||||
$("table.docutils:not(.field-list)")
|
||||
$("table.docutils:not(.field-list,.footnote,.citation)")
|
||||
.wrap("<div class='wy-table-responsive'></div>");
|
||||
|
||||
// Add extra class to responsive tables that contain
|
||||
// footnotes or citations so that we can target them for styling
|
||||
$("table.docutils.footnote")
|
||||
.wrap("<div class='wy-table-responsive footnote'></div>");
|
||||
$("table.docutils.citation")
|
||||
.wrap("<div class='wy-table-responsive citation'></div>");
|
||||
|
||||
// Add expand links to all parents of nested ul
|
||||
$('.wy-menu-vertical ul').not('.simple').siblings('a').each(function () {
|
||||
var link = $(this);
|
||||
@ -109,14 +131,16 @@ function ThemeNav () {
|
||||
// Try again with the closest section entry.
|
||||
link = $('.wy-menu-vertical')
|
||||
.find('[href="#' + closest_section.attr("id") + '"]');
|
||||
|
||||
}
|
||||
$('.wy-menu-vertical li.toctree-l1 li.current')
|
||||
.removeClass('current');
|
||||
// If we found a matching link then reset current and re-apply
|
||||
// otherwise retain the existing match
|
||||
if (link.length > 0) {
|
||||
$('.wy-menu-vertical li.toctree-l1 li.current').removeClass('current');
|
||||
link.closest('li.toctree-l2').addClass('current');
|
||||
link.closest('li.toctree-l3').addClass('current');
|
||||
link.closest('li.toctree-l4').addClass('current');
|
||||
}
|
||||
}
|
||||
catch (err) {
|
||||
console.log("Error expanding nav for anchor", err);
|
||||
}
|
||||
@ -163,7 +187,37 @@ function ThemeNav () {
|
||||
module.exports.ThemeNav = ThemeNav();
|
||||
|
||||
if (typeof(window) != 'undefined') {
|
||||
window.SphinxRtdTheme = { StickyNav: module.exports.ThemeNav };
|
||||
window.SphinxRtdTheme = { Navigation: module.exports.ThemeNav };
|
||||
}
|
||||
|
||||
|
||||
// requestAnimationFrame polyfill by Erik Möller. fixes from Paul Irish and Tino Zijdel
|
||||
// https://gist.github.com/paulirish/1579671
|
||||
// MIT license
|
||||
|
||||
(function() {
|
||||
var lastTime = 0;
|
||||
var vendors = ['ms', 'moz', 'webkit', 'o'];
|
||||
for(var x = 0; x < vendors.length && !window.requestAnimationFrame; ++x) {
|
||||
window.requestAnimationFrame = window[vendors[x]+'RequestAnimationFrame'];
|
||||
window.cancelAnimationFrame = window[vendors[x]+'CancelAnimationFrame']
|
||||
|| window[vendors[x]+'CancelRequestAnimationFrame'];
|
||||
}
|
||||
|
||||
if (!window.requestAnimationFrame)
|
||||
window.requestAnimationFrame = function(callback, element) {
|
||||
var currTime = new Date().getTime();
|
||||
var timeToCall = Math.max(0, 16 - (currTime - lastTime));
|
||||
var id = window.setTimeout(function() { callback(currTime + timeToCall); },
|
||||
timeToCall);
|
||||
lastTime = currTime + timeToCall;
|
||||
return id;
|
||||
};
|
||||
|
||||
if (!window.cancelAnimationFrame)
|
||||
window.cancelAnimationFrame = function(id) {
|
||||
clearTimeout(id);
|
||||
};
|
||||
}());
|
||||
|
||||
},{"jquery":"jquery"}]},{},["sphinx-rtd-theme"]);
|
||||
|
@ -1,14 +1,18 @@
|
||||
[theme]
|
||||
inherit = basic
|
||||
stylesheet = css/theme.css
|
||||
pygments_style = default
|
||||
|
||||
[options]
|
||||
typekit_id = hiw1hhg
|
||||
analytics_id =
|
||||
sticky_navigation = False
|
||||
logo_only =
|
||||
collapse_navigation = False
|
||||
display_version = True
|
||||
navigation_depth = 4
|
||||
prev_next_buttons_location = bottom
|
||||
canonical_url =
|
||||
analytics_id =
|
||||
collapse_navigation = False
|
||||
sticky_navigation = True
|
||||
navigation_depth = 4
|
||||
includehidden = True
|
||||
titles_only =
|
||||
logo_only =
|
||||
display_version = True
|
||||
prev_next_buttons_location = bottom
|
||||
style_external_links = False
|
||||
|
10
tox.ini
@ -1,5 +1,5 @@
|
||||
[tox]
|
||||
envlist = py{27,34,35,36}-sphinx{13,14,15}
|
||||
envlist = py{27,34,35,36}-sphinx{13,14,15,16}, docs
|
||||
|
||||
[tox:travis]
|
||||
2.7 = py27-sphinx{13,14,15}
|
||||
@ -17,5 +17,13 @@ deps =
|
||||
sphinx13: Sphinx < 1.4
|
||||
sphinx14: Sphinx < 1.5
|
||||
sphinx15: Sphinx < 1.6
|
||||
sphinx16: Sphinx < 1.7
|
||||
commands =
|
||||
py.test {posargs}
|
||||
|
||||
[testenv:docs]
|
||||
changedir = {toxinidir}/docs
|
||||
deps =
|
||||
-r{toxinidir}/docs/requirements.txt
|
||||
commands =
|
||||
sphinx-build -b html -d {envtmpdir}/doctrees . {envtmpdir}/html
|
||||
|