# HG changeset patch # User Steve Losh # Date 1312950245 14400 # Node ID 99b79096ff32d1c11d2b96ed80b16748a862352c # Parent 313f4e56654138619f991648c015e042a8825df9 Start some docs. diff -r 313f4e566541 -r 99b79096ff32 README.markdown --- a/README.markdown Tue Aug 09 23:36:06 2011 -0400 +++ b/README.markdown Wed Aug 10 00:24:05 2011 -0400 @@ -1,66 +1,4 @@ Clojurecraft ============ -Clojurecraft is a framework for writing Minecraft bots in Clojure. - -**It's definitely not ready for actual use yet, but if you want to poke around it has -some very basic functionality. Just remember that *everything* is subject to -change.** - -Quick Start ------------ - -Clone down the repo with Mercurial or Git: - - hg clone http://bitbucket.org/sjl/clojurecraft - git clone http://github.com/sjl/clojurecraft.git - -Grab the dependencies using Leiningen (Cake will probably work too) and fire up -a REPL: - - cd clojurecraft - lein deps - lein repl - -Now you'll need to open another terminal window to download and run the vanilla -server: - - cd path/to/clojurecraft - bundled/bootstrap.sh - bundled/runserver.sh - -Wait for the server to finish loading (it'll say "Done") and then connect to it with -a normal Minecraft client so you can watch your bot. - -Now you can go back to your REPL and get started. Import the things you'll need: - - (require '(clojurecraft [core :as cc] [actions :as act])) - -Create a bot connected to your local server: - - (def bot (cc/connect cc/minecraft-local "desired_username")) - -Right now Clojurecraft doesn't support authentication, so it's turned off on the -bundled server and you can choose any username you like. You can pass `nil` instead -of a username to get a random one. - -Give your bot a little time to connect. You should see it appear in the world -through your Minecraft client. - -Once your bot is in the world you're all set to play around. At the moment the only -action implemented is basic movement. Move your bot around with `act/move`: - - (act/move bot 2 0 1) - -The numbers are the x, y, and z distance you wish to move. - -If the bot doesn't appear to move, you may have tried to make an illegal move (like -moving into a block). Try some other numbers. Check the server output for more -information if something goes wrong. - -More Information -================ - -Clojurecraft isn't stable and is evolving quickly, but you can check out the -[preliminary docs](https://github.com/sjl/clojurecraft/blob/master/docs.markdown) to -read about some of the design decisions. +Read [the docs](http://clojurecraft.rtfd.org/). diff -r 313f4e566541 -r 99b79096ff32 docs.markdown --- a/docs.markdown Tue Aug 09 23:36:06 2011 -0400 +++ b/docs.markdown Wed Aug 10 00:24:05 2011 -0400 @@ -7,72 +7,6 @@ Once you've got a bot you can query it for data about its world and tell it to perform actions. -Data Structures -=============== - -World data is shared between all the bots you create in a single process. This helps -keep memory usage down by not storing duplicate copies of chunk and entity -information for each bot in the same world. - -Worlds ------- - -`World` objects have several pieces of data. Please read the Transactions section to -learn why the data is structured the way it is. - -`(:time world)` is a ref containing the current world time. - -`(:entities world)` is a ref containing a map of entity IDs to `Entity` refs. - -`(:chunks world)` is a ref containing a map of chunk coordinates ([x y z] vectors) -to `Chunk` refs. - -Locations ---------- - -`Location` objects represent the locations of entities in the world. They have the -following pieces of data: - -* `(:x location)` -* `(:y location)` -* `(:z location)` -* `(:yaw location)` -* `(:pitch location)` -* `(:stance location)` -* `(:onground location)` - -Entities --------- - -`Entity` objects represent a single entity in the world. One of these is your bot's -player. - -`(:eid entity)` is the ID of the entity. - -`(:loc entity)` is a `Location` object representing the location of the entity in the -world. - -`(:despawned entity)` is a boolean that indicates whether the entity has despawned. -You should never need to read this, but please read the Transactions section for the -reason why it's included. - -Chunks ------- - -Blocks ------- - -Bots ----- - -`Bot` objects are your gateway to observing and interacting with the world. - -`(:world bot)` is a `World` object representing the bot's world. - -`(:player bot)` is a ref containing the `Entity` representing the bot. This is just -a shortcut so you don't have to pull it out of the `:entities` map in the bot's world -all the time. - Transactions ============ @@ -137,8 +71,17 @@ The `move` action adjusts the location of the bot. This lets it move around the world. -At the moment it does not do any error checking, so moving too far at once or moving -into a block will simply be rejected by the server without any warning. +Right now you can't really use the `y` argument. Use `clojurecraft.actions/jump` +instead. This action is fairly low level. Expect to see some fun path-finding algorithms/libraries in the future that will remove the need to call this directly. + +### jump + +`(clojurecraft.actions/jump bot)` + +Tells the bot to jump, if possible. + +Events +====== diff -r 313f4e566541 -r 99b79096ff32 docs/Makefile --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/docs/Makefile Wed Aug 10 00:24:05 2011 -0400 @@ -0,0 +1,130 @@ +# 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 + +.PHONY: help clean html dirhtml singlehtml pickle json htmlhelp qthelp devhelp epub latex latexpdf text man changes linkcheck doctest + +help: + @echo "Please use \`make ' where 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 " 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/DumbwaiterDesign.qhcp" + @echo "To view the help file:" + @echo "# assistant -collectionFile $(BUILDDIR)/qthelp/DumbwaiterDesign.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/DumbwaiterDesign" + @echo "# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/DumbwaiterDesign" + @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." + +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." diff -r 313f4e566541 -r 99b79096ff32 docs/source/conf.py --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/docs/source/conf.py Wed Aug 10 00:24:05 2011 -0400 @@ -0,0 +1,216 @@ +# -*- coding: utf-8 -*- +# +# Clojurecraft documentation build configuration file, created by +# sphinx-quickstart on Thu May 19 14:06:46 2011. +# +# This file is execfile()d with the current directory set to its containing dir. +# +# Note that not all possible configuration values are present in this +# autogenerated file. +# +# All configuration values have a default; values that are commented out +# serve to show the default. + +import sys, os + +# If extensions (or modules to document with autodoc) are in another directory, +# add these directories to sys.path here. If the directory is relative to the +# documentation root, use os.path.abspath to make it absolute, like shown here. +#sys.path.insert(0, os.path.abspath('.')) + +# -- General configuration ----------------------------------------------------- + +# If your documentation needs a minimal Sphinx version, state it here. +#needs_sphinx = '1.0' + +# Add any Sphinx extension module names here, as strings. They can be extensions +# coming with Sphinx (named 'sphinx.ext.*') or your custom ones. +extensions = [] + +# Add any paths that contain templates here, relative to this directory. +templates_path = ['_templates'] + +# The suffix of source filenames. +source_suffix = '.rst' + +# The encoding of source files. +#source_encoding = 'utf-8-sig' + +# The master toctree document. +master_doc = 'index' + +# General information about the project. +project = u'Clojurecraft' +copyright = u'2011, Steve Losh' + +# 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.0.1' +# The full version, including alpha/beta/rc tags. +release = '0.0.1' + +# The language for content autogenerated by Sphinx. Refer to documentation +# for a list of supported languages. +#language = None + +# There are two options for replacing |today|: either, you set today to some +# non-false value, then it is used: +#today = '' +# Else, today_fmt is used as the format for a strftime call. +#today_fmt = '%B %d, %Y' + +# List of patterns, relative to source directory, that match files and +# directories to ignore when looking for source files. +exclude_patterns = [] + +# The reST default role (used for this markup: `text`) to use for all documents. +#default_role = None + +# If true, '()' will be appended to :func: etc. cross-reference text. +#add_function_parentheses = True + +# If true, the current module name will be prepended to all description +# unit titles (such as .. function::). +#add_module_names = True + +# If true, sectionauthor and moduleauthor directives will be shown in the +# output. They are ignored by default. +#show_authors = False + +# The name of the Pygments (syntax highlighting) style to use. +pygments_style = 'sphinx' + +# A list of ignored prefixes for module index sorting. +#modindex_common_prefix = [] + + +# -- Options for HTML output --------------------------------------------------- + +# The theme to use for HTML and HTML Help pages. See the documentation for +# a list of builtin themes. +html_theme = 'waiter' + +# Theme options are theme-specific and customize the look and feel of a theme +# further. For a list of options available for each theme, see the +# documentation. +#html_theme_options = {} + +# Add any paths that contain custom themes here, relative to this directory. +html_theme_path = ['../themes'] + +# The name for this set of Sphinx documents. If None, it defaults to +# " v documentation". +#html_title = None + +# A shorter title for the navigation bar. Default is the same as html_title. +#html_short_title = None + +# The name of an image file (relative to this directory) to place at the top +# of the sidebar. +#html_logo = None + +# 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 +# pixels large. +#html_favicon = None + +# Add any paths that contain custom static files (such as style sheets) here, +# relative to this directory. They are copied after the builtin static files, +# so a file named "default.css" will overwrite the builtin "default.css". +html_static_path = ['_static'] + +# If not '', a 'Last updated on:' timestamp is inserted at every page bottom, +# using the given strftime format. +#html_last_updated_fmt = '%b %d, %Y' + +# If true, SmartyPants will be used to convert quotes and dashes to +# typographically correct entities. +#html_use_smartypants = True + +# Custom sidebar templates, maps document names to template names. +#html_sidebars = {} + +# Additional templates that should be rendered to pages, maps page names to +# template names. +#html_additional_pages = {} + +# If false, no module index is generated. +#html_domain_indices = True + +# If false, no index is generated. +#html_use_index = True + +# If true, the index is split into individual pages for each letter. +#html_split_index = False + +# If true, links to the reST sources are added to the pages. +#html_show_sourcelink = True + +# If true, "Created using Sphinx" is shown in the HTML footer. Default is True. +#html_show_sphinx = True + +# If true, "(C) Copyright ..." is shown in the HTML footer. Default is True. +#html_show_copyright = True + +# If true, an OpenSearch description file will be output, and all pages will +# contain a tag referring to it. The value of this option must be the +# base URL from which the finished HTML is served. +#html_use_opensearch = '' + +# This is the file name suffix for HTML files (e.g. ".xhtml"). +#html_file_suffix = None + +# Output file base name for HTML help builder. +htmlhelp_basename = 'Clojurecraftdoc' + + +# -- Options for LaTeX output -------------------------------------------------- + +# The paper size ('letter' or 'a4'). +#latex_paper_size = 'letter' + +# The font size ('10pt', '11pt' or '12pt'). +#latex_font_size = '10pt' + +# Grouping the document tree into LaTeX files. List of tuples +# (source start file, target name, title, author, documentclass [howto/manual]). +latex_documents = [ + ('index', 'Clojurecraft.tex', u'Clojurecraft Documentation', + u'Steve Losh', 'manual'), +] + +# The name of an image file (relative to this directory) to place at the top of +# the title page. +#latex_logo = None + +# For "manual" documents, if this is true, then toplevel headings are parts, +# not chapters. +#latex_use_parts = False + +# If true, show page references after internal links. +#latex_show_pagerefs = False + +# If true, show URL addresses after external links. +#latex_show_urls = False + +# Additional stuff for the LaTeX preamble. +#latex_preamble = '' + +# Documents to append as an appendix to all manuals. +#latex_appendices = [] + +# If false, no module index is generated. +#latex_domain_indices = True + + +# -- Options for manual page output -------------------------------------------- + +# One entry per manual page. List of tuples +# (source start file, name, description, authors, manual section). +man_pages = [ + ('index', 'clojurecraft', u'Clojurecraft Documentation', + [u'Steve Losh'], 1) +] diff -r 313f4e566541 -r 99b79096ff32 docs/source/datastructures.rst --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/docs/source/datastructures.rst Wed Aug 10 00:24:05 2011 -0400 @@ -0,0 +1,73 @@ +Data Structures +=============== + +World data is shared between all the bots you create in a single process. This helps +keep memory usage down by not storing duplicate copies of chunk and entity +information for each bot in the same world. + +Worlds +------ + +``World`` objects have several pieces of data. Please read the Transactions section +to learn why the data is structured the way it is. + +``(:time world)`` is a ref containing the current world time. + +``(:entities world)`` is a ref containing a map of entity IDs to ``Entity`` refs. + +``(:chunks world)`` is a ref containing a map of chunk coordinates ([x y z] vectors) +to ``Chunk`` refs. + +Locations +--------- + +``Location`` objects represent the locations of entities in the world. They have the +following pieces of data: + +* ``(:x location)`` +* ``(:y location)`` +* ``(:z location)`` +* ``(:yaw location)`` +* ``(:pitch location)`` +* ``(:stance location)`` +* ``(:onground location)`` + +Entities +-------- + +``Entity`` objects represent a single entity in the world. One of these is your +bot's player. + +``(:eid entity)`` is the ID of the entity. + +``(:loc entity)`` is a ``Location`` object representing the location of the entity in +the world. + +``(:despawned entity)`` is a boolean that indicates whether the entity has despawned. +You should never need to read this, but please read the Transactions section for the +reason why it's included. + +``(:velocity entity)`` is the y velocity of the entity. Only exists for bots, and +you should never need to touch it. + +Chunks +------ + +A chunk has four arrays representing the data for blocks in the chunk. You shouldn't +need to access chunk data directly -- there are helper functions in +``clojurecraft.chunks`` that will look up block objects for you. + +Blocks +------ + +Bots +---- + +``Bot`` objects are your gateway to observing and interacting with the world. + +``(:world bot)`` is a ``World`` object representing the bot's world. + +``(:player bot)`` is a ref containing the ``Entity`` representing the bot. This is +just a shortcut so you don't have to pull it out of the ``:entities`` map in the +bot's world all the time. + diff -r 313f4e566541 -r 99b79096ff32 docs/source/index.rst --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/docs/source/index.rst Wed Aug 10 00:24:05 2011 -0400 @@ -0,0 +1,26 @@ +Clojurecraft +============ + +Clojurecraft is a framework for writing Minecraft bots in Clojure. + +**It's definitely not ready for actual use yet, but if you want to poke around it has +some very basic functionality. Just remember that *everything* is subject to +change.** + +Check out the :doc:`Quick Start Guide ` if you want to poke around. + +Concepts: + +.. toctree:: + :maxdepth: 2 + + quickstart + datastructures + + +Indices and tables +================== + +* :ref:`genindex` +* :ref:`search` + diff -r 313f4e566541 -r 99b79096ff32 docs/source/quickstart.rst --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/docs/source/quickstart.rst Wed Aug 10 00:24:05 2011 -0400 @@ -0,0 +1,59 @@ +Quick Start +=========== + +Clone down the repo with Mercurial or Git:: + + hg clone http://bitbucket.org/sjl/clojurecraft + git clone http://github.com/sjl/clojurecraft.git + +Grab the dependencies using Leiningen (Cake will probably work too) and fire up +a REPL:: + + cd clojurecraft + lein deps + lein repl + +Now you'll need to open another terminal window to download and run the vanilla +server:: + + cd path/to/clojurecraft + bundled/bootstrap.sh + bundled/runserver.sh + +Wait for the server to finish loading (it'll say "Done") and then connect to it with +a normal Minecraft client so you can watch your bot. + +Now you can go back to your REPL and get started. Import the things you'll need:: + + (require '(clojurecraft [core :as cc] [actions :as act] [events :as es])) + +Create a bot connected to your local server:: + + (def bot (cc/connect cc/minecraft-local "desired_username")) + +Right now Clojurecraft doesn't support authentication, so it's turned off on the +bundled server and you can choose any username you like. You can pass ``nil`` +instead of a username to get a random one. + +Give your bot a little time to connect. You should see it appear in the world +through your Minecraft client. + +Once your bot is in the world you're all set to play around. At the moment the only +action implemented is basic movement. Move your bot around with ``act/move``:: + + (act/move bot 2 0 1) + +The numbers are the x, y, and z distance you wish to move. For now you can't use the +``y`` argument -- you must always pass ``0``. + +If the bot doesn't appear to move, you may have tried to make an illegal move (like +moving into a block). Try some other numbers. Check the server output for more +information if something goes wrong. + +Now try jumping:: + + (act/jump bot) + +Clojurecraft isn't stable and is evolving quickly, but you can check out these docs +to read about some of the design decisions. As soon as you see a ``v1.0.0`` tag +in the repo you'll know I've started caring about backwards compatibility. diff -r 313f4e566541 -r 99b79096ff32 docs/themes/waiter/layout.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/docs/themes/waiter/layout.html Wed Aug 10 00:24:05 2011 -0400 @@ -0,0 +1,74 @@ +{% extends "basic/layout.html" %} + +{% block htmltitle %} + {{ super() }} + + {% if using_theme %} + + {% endif %} +{% endblock %} + +{% block sidebarlogo %} + {{ super() }} +{% endblock %} + +{% block footer %} + {{ super() }} + + +{% endblock %} diff -r 313f4e566541 -r 99b79096ff32 docs/themes/waiter/static/rtd.css --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/docs/themes/waiter/static/rtd.css Wed Aug 10 00:24:05 2011 -0400 @@ -0,0 +1,766 @@ +/* + * rtd.css + * ~~~~~~~~~~~~~~~ + * + * Sphinx stylesheet -- sphinxdoc theme. Originally created by + * Armin Ronacher for Werkzeug. + * + * Customized for ReadTheDocs by Eric Pierce & Eric Holscher + * + * :copyright: Copyright 2007-2010 by the Sphinx team, see AUTHORS. + * :license: BSD, see LICENSE for details. + * + */ + +/* RTD colors + * light blue: #e8ecef + * medium blue: #8ca1af + * dark blue: #465158 + * dark grey: #444444 + * + * white hover: #d1d9df; + * medium blue hover: #697983; + * green highlight: #8ecc4c + * light blue (project bar): #e8ecef + */ + +@import url("basic.css"); + +/* PAGE LAYOUT -------------------------------------------------------------- */ + +body { + font: 100%/1.5 "ff-meta-web-pro-1","ff-meta-web-pro-2",Arial,"Helvetica Neue",sans-serif; + text-align: center; + color: black; + background-color: #465158; + padding: 0; + margin: 0; +} + +div.document { + text-align: left; + background-color: #e8ecef; +} + +div.bodywrapper { + background-color: #ffffff; + border-left: 1px solid #ccc; + border-bottom: 1px solid #ccc; + margin: 0 0 0 16em; +} + +div.body { + margin: 0; + padding: 0.5em 1.3em; + max-width: 55em; + min-width: 20em; +} + +div.related { + font-size: 1em; + background-color: #465158; +} + +div.documentwrapper { + float: left; + width: 100%; + background-color: #e8ecef; +} + + +/* HEADINGS --------------------------------------------------------------- */ + +h1 { + margin: 0; + padding: 0.7em 0 0.3em 0; + font-size: 1.5em; + line-height: 1.15; + color: #111; + clear: both; +} + +h2 { + margin: 2em 0 0.2em 0; + font-size: 1.35em; + padding: 0; + color: #465158; +} + +h3 { + margin: 1em 0 -0.3em 0; + font-size: 1.2em; + color: #6c818f; +} + +div.body h1 a, div.body h2 a, div.body h3 a, div.body h4 a, div.body h5 a, div.body h6 a { + color: black; +} + +h1 a.anchor, h2 a.anchor, h3 a.anchor, h4 a.anchor, h5 a.anchor, h6 a.anchor { + display: none; + margin: 0 0 0 0.3em; + padding: 0 0.2em 0 0.2em; + color: #aaa !important; +} + +h1:hover a.anchor, h2:hover a.anchor, h3:hover a.anchor, h4:hover a.anchor, +h5:hover a.anchor, h6:hover a.anchor { + display: inline; +} + +h1 a.anchor:hover, h2 a.anchor:hover, h3 a.anchor:hover, h4 a.anchor:hover, +h5 a.anchor:hover, h6 a.anchor:hover { + color: #777; + background-color: #eee; +} + + +/* LINKS ------------------------------------------------------------------ */ + +/* Normal links get a pseudo-underline */ +a { + color: #444; + text-decoration: none; + border-bottom: 1px solid #ccc; +} + +/* Links in sidebar, TOC, index trees and tables have no underline */ +.sphinxsidebar a, +.toctree-wrapper a, +.indextable a, +#indices-and-tables a { + color: #444; + text-decoration: none; + border-bottom: none; +} + +/* Most links get an underline-effect when hovered */ +a:hover, +div.toctree-wrapper a:hover, +.indextable a:hover, +#indices-and-tables a:hover { + color: #111; + text-decoration: none; + border-bottom: 1px solid #111; +} + +/* Footer links */ +div.footer a { + color: #86989B; + text-decoration: none; + border: none; +} +div.footer a:hover { + color: #a6b8bb; + text-decoration: underline; + border: none; +} + +/* Permalink anchor (subtle grey with a red hover) */ +div.body a.headerlink { + color: #ccc; + font-size: 1em; + margin-left: 6px; + padding: 0 4px 0 4px; + text-decoration: none; + border: none; +} +div.body a.headerlink:hover { + color: #c60f0f; + border: none; +} + + +/* NAVIGATION BAR --------------------------------------------------------- */ + +div.related ul { + height: 2.5em; +} + +div.related ul li { + margin: 0; + padding: 0.65em 0; + float: left; + display: block; + color: white; /* For the >> separators */ + font-size: 0.8em; +} + +div.related ul li.right { + float: right; + margin-right: 5px; + color: transparent; /* Hide the | separators */ +} + +/* "Breadcrumb" links in nav bar */ +div.related ul li a { + order: none; + background-color: inherit; + font-weight: bold; + margin: 6px 0 6px 4px; + line-height: 1.75em; + color: #ffffff; + padding: 0.4em 0.8em; + border: none; + border-radius: 3px; +} +/* previous / next / modules / index links look more like buttons */ +div.related ul li.right a { + margin: 0.375em 0; + background-color: #697983; + text-shadow: 0 1px rgba(0, 0, 0, 0.5); + border-radius: 3px; + -webkit-border-radius: 3px; + -moz-border-radius: 3px; +} +/* All navbar links light up as buttons when hovered */ +div.related ul li a:hover { + background-color: #8ca1af; + color: #ffffff; + text-decoration: none; + border-radius: 3px; + -webkit-border-radius: 3px; + -moz-border-radius: 3px; +} +/* Take extra precautions for tt within links */ +a tt, +div.related ul li a tt { + background: inherit !important; + color: inherit !important; +} + + +/* SIDEBAR ---------------------------------------------------------------- */ + +div.sphinxsidebarwrapper { + padding: 0; +} + +div.sphinxsidebar { + margin: 0; + margin-left: -100%; + float: left; + top: 3em; + left: 0; + padding: 0 1em; + width: 14em; + font-size: 1em; + text-align: left; + background-color: #e8ecef; +} + +div.sphinxsidebar img { + max-width: 12em; +} + +div.sphinxsidebar h3, div.sphinxsidebar h4 { + margin: 1.2em 0 0.3em 0; + font-size: 1em; + padding: 0; + color: #222222; + font-family: "ff-meta-web-pro-1", "ff-meta-web-pro-2", "Arial", "Helvetica Neue", sans-serif; +} + +div.sphinxsidebar h3 a { + color: #444444; +} + +div.sphinxsidebar ul, +div.sphinxsidebar p { + margin-top: 0; + padding-left: 0; + line-height: 130%; + background-color: #e8ecef; +} + +/* No bullets for nested lists, but a little extra indentation */ +div.sphinxsidebar ul ul { + list-style-type: none; + margin-left: 1.5em; + padding: 0; +} + +/* A little top/bottom padding to prevent adjacent links' borders + * from overlapping each other */ +div.sphinxsidebar ul li { + padding: 1px 0; +} + +/* A little left-padding to make these align with the ULs */ +div.sphinxsidebar p.topless { + padding-left: 0 0 0 1em; +} + +/* Make these into hidden one-liners */ +div.sphinxsidebar ul li, +div.sphinxsidebar p.topless { + white-space: nowrap; + overflow: hidden; +} +/* ...which become visible when hovered */ +div.sphinxsidebar ul li:hover, +div.sphinxsidebar p.topless:hover { + overflow: visible; +} + +/* Search text box and "Go" button */ +#searchbox { + margin-top: 2em; + margin-bottom: 1em; + background: #ddd; + padding: 0.5em; + border-radius: 6px; + -moz-border-radius: 6px; + -webkit-border-radius: 6px; +} +#searchbox h3 { + margin-top: 0; +} + +/* Make search box and button abut and have a border */ +input, +div.sphinxsidebar input { + border: 1px solid #999; + float: left; +} + +/* Search textbox */ +input[type="text"] { + margin: 0; + padding: 0 3px; + height: 20px; + width: 144px; + border-top-left-radius: 3px; + border-bottom-left-radius: 3px; + -moz-border-radius-topleft: 3px; + -moz-border-radius-bottomleft: 3px; + -webkit-border-top-left-radius: 3px; + -webkit-border-bottom-left-radius: 3px; +} +/* Search button */ +input[type="submit"] { + margin: 0 0 0 -1px; /* -1px prevents a double-border with textbox */ + height: 22px; + color: #444; + background-color: #e8ecef; + padding: 1px 4px; + font-weight: bold; + border-top-right-radius: 3px; + border-bottom-right-radius: 3px; + -moz-border-radius-topright: 3px; + -moz-border-radius-bottomright: 3px; + -webkit-border-top-right-radius: 3px; + -webkit-border-bottom-right-radius: 3px; +} +input[type="submit"]:hover { + color: #ffffff; + background-color: #8ecc4c; +} + +div.sphinxsidebar p.searchtip { + clear: both; + padding: 0.5em 0 0 0; + background: #ddd; + color: #666; + font-size: 0.9em; +} + +/* Sidebar links are unusual */ +div.sphinxsidebar li a, +div.sphinxsidebar p a { + background: #e8ecef; /* In case links overlap main content */ + border-radius: 3px; + -moz-border-radius: 3px; + -webkit-border-radius: 3px; + border: 1px solid transparent; /* To prevent things jumping around on hover */ + padding: 0 5px 0 5px; +} +div.sphinxsidebar li a:hover, +div.sphinxsidebar p a:hover { + color: #111; + text-decoration: none; + border: 1px solid #888; +} + +/* Tweak any link appearing in a heading */ +div.sphinxsidebar h3 a { +} + + + + +/* OTHER STUFF ------------------------------------------------------------ */ + +cite, code, tt { + font-family: 'Consolas', 'Deja Vu Sans Mono', + 'Bitstream Vera Sans Mono', monospace; + font-size: 0.95em; + letter-spacing: 0.01em; +} + +tt { + background-color: #f2f2f2; + color: #444; +} + +tt.descname, tt.descclassname, tt.xref { + border: 0; +} + +hr { + border: 1px solid #abc; + margin: 2em; +} + +pre, #_fontwidthtest { + font-family: 'Consolas', 'Deja Vu Sans Mono', + 'Bitstream Vera Sans Mono', monospace; + margin: 1em 2em; + font-size: 0.95em; + letter-spacing: 0.015em; + line-height: 120%; + padding: 0.5em; + border: 1px solid #ccc; + background-color: #eee; + border-radius: 6px; + -moz-border-radius: 6px; + -webkit-border-radius: 6px; +} + +pre a { + color: inherit; + text-decoration: underline; +} + +td.linenos pre { + padding: 0.5em 0; +} + +div.quotebar { + background-color: #f8f8f8; + max-width: 250px; + float: right; + padding: 2px 7px; + border: 1px solid #ccc; +} + +div.topic { + background-color: #f8f8f8; +} + +table { + border-collapse: collapse; + margin: 0 -0.5em 0 -0.5em; +} + +table td, table th { + padding: 0.2em 0.5em 0.2em 0.5em; +} + + +/* ADMONITIONS AND WARNINGS ------------------------------------------------- */ + +/* Shared by admonitions and warnings */ +div.admonition, div.warning { + font-size: 0.9em; + margin: 2em; + padding: 0; + /* + border-radius: 6px; + -moz-border-radius: 6px; + -webkit-border-radius: 6px; + */ +} +div.admonition p, div.warning p { + margin: 0.5em 1em 0.5em 1em; + padding: 0; +} +div.admonition pre, div.warning pre { + margin: 0.4em 1em 0.4em 1em; +} +div.admonition p.admonition-title, +div.warning p.admonition-title { + margin: 0; + padding: 0.1em 0 0.1em 0.5em; + color: white; + font-weight: bold; + font-size: 1.1em; + text-shadow: 0 1px rgba(0, 0, 0, 0.5); +} +div.admonition ul, div.admonition ol, +div.warning ul, div.warning ol { + margin: 0.1em 0.5em 0.5em 3em; + padding: 0; +} + + +/* Admonitions only */ +div.admonition { + border: 1px solid #609060; + background-color: #e9ffe9; +} +div.admonition p.admonition-title { + background-color: #70A070; + border-bottom: 1px solid #609060; +} + + +/* Warnings only */ +div.warning { + border: 1px solid #900000; + background-color: #ffe9e9; +} +div.warning p.admonition-title { + background-color: #b04040; + border-bottom: 1px solid #900000; +} + + + +div.versioninfo { + margin: 1em 0 0 0; + border: 1px solid #ccc; + background-color: #DDEAF0; + padding: 8px; + line-height: 1.3em; + font-size: 0.9em; +} + +.viewcode-back { + font-family: 'Lucida Grande', 'Lucida Sans Unicode', 'Geneva', + 'Verdana', sans-serif; +} + +div.viewcode-block:target { + background-color: #f4debf; + border-top: 1px solid #ac9; + border-bottom: 1px solid #ac9; +} + +dl { + margin: 1em 0 2.5em 0; +} + +/* Highlight target when you click an internal link */ +dt:target { + background: #ffe080; +} +/* Don't highlight whole divs */ +div.highlight { + background: transparent; +} +/* But do highlight spans (so search results can be highlighted) */ +span.highlight { + background: #ffe080; +} + +div.footer { + background-color: #465158; + color: #eeeeee; + padding: 0 2em 2em 2em; + clear: both; + font-size: 0.8em; + text-align: center; +} + +p { + margin: 0.8em 0 0.5em 0; +} + +.section p img { + margin: 1em 2em; +} + + +/* MOBILE LAYOUT -------------------------------------------------------------- */ + +@media screen and (max-width: 600px) { + + h1, h2, h3, h4, h5 { + position: relative; + } + + ul { + padding-left: 1.75em; + } + + div.bodywrapper a.headerlink, #indices-and-tables h1 a { + color: #e6e6e6; + font-size: 80%; + float: right; + line-height: 1.8; + position: absolute; + right: -0.7em; + visibility: inherit; + } + + div.bodywrapper h1 a.headerlink, #indices-and-tables h1 a { + line-height: 1.5; + } + + pre { + font-size: 0.7em; + overflow: auto; + word-wrap: break-word; + white-space: pre-wrap; + } + + div.related ul { + height: 2.5em; + padding: 0; + text-align: left; + } + + div.related ul li { + clear: both; + color: #465158; + padding: 0.2em 0; + } + + div.related ul li:last-child { + border-bottom: 1px dotted #8ca1af; + padding-bottom: 0.4em; + margin-bottom: 1em; + width: 100%; + } + + div.related ul li a { + color: #465158; + padding-right: 0; + } + + div.related ul li a:hover { + background: inherit; + color: inherit; + } + + div.related ul li.right { + clear: none; + padding: 0.65em 0; + margin-bottom: 0.5em; + } + + div.related ul li.right a { + color: #fff; + padding-right: 0.8em; + } + + div.related ul li.right a:hover { + background-color: #8ca1af; + } + + div.body { + clear: both; + min-width: 0; + word-wrap: break-word; + } + + div.bodywrapper { + margin: 0 0 0 0; + } + + div.sphinxsidebar { + float: none; + margin: 0; + width: auto; + } + + div.sphinxsidebar input[type="text"] { + height: 2em; + line-height: 2em; + width: 70%; + } + + div.sphinxsidebar input[type="submit"] { + height: 2em; + margin-left: 0.5em; + width: 20%; + } + + div.sphinxsidebar p.searchtip { + background: inherit; + margin-bottom: 1em; + } + + div.sphinxsidebar ul li, div.sphinxsidebar p.topless { + white-space: normal; + } + + .bodywrapper img { + display: block; + margin-left: auto; + margin-right: auto; + max-width: 100%; + } + + div.documentwrapper { + float: none; + } + + div.admonition, div.warning, pre, blockquote { + margin-left: 0em; + margin-right: 0em; + } + + .body p img { + margin: 0; + } + + #searchbox { + background: transparent; + } + + .related:not(:first-child) li { + display: none; + } + + .related:not(:first-child) li.right { + display: block; + } + + div.footer { + padding: 1em; + } + + .rtd_doc_footer .badge { + float: none; + margin: 1em auto; + position: static; + } + + .rtd_doc_footer .badge.revsys-inline { + margin-right: auto; + margin-bottom: 2em; + } + + table.indextable { + display: block; + width: auto; + } + + .indextable tr { + display: block; + } + + .indextable td { + display: block; + padding: 0; + width: auto !important; + } + + .indextable td dt { + margin: 1em 0; + } + + ul.search { + margin-left: 0.25em; + } + + ul.search li div.context { + font-size: 90%; + line-height: 1.1; + margin-bottom: 1; + margin-left: 0; + } + +} diff -r 313f4e566541 -r 99b79096ff32 docs/themes/waiter/theme.conf --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/docs/themes/waiter/theme.conf Wed Aug 10 00:24:05 2011 -0400 @@ -0,0 +1,3 @@ +[theme] +inherit = basic +stylesheet = rtd.css