diff --git a/Procfile b/Procfile deleted file mode 100644 index 52616f6d1..000000000 --- a/Procfile +++ /dev/null @@ -1 +0,0 @@ -web: uwsgi -w aspen_io --callable website --http :$PORT --workers 4 diff --git a/aspen_io.py b/aspen_io.py deleted file mode 100644 index fe40b3a4f..000000000 --- a/aspen_io.py +++ /dev/null @@ -1,72 +0,0 @@ -"""Configuration script for the http://aspen.io/ website. -""" -import os -import os.path -from pando.configuration import parse -from pando.website import Website - -distribution_root = os.path.dirname(__file__) -website = Website( www_root=os.path.join(distribution_root, 'doc') - , project_root=os.path.join(distribution_root, 'doc', '.aspen') - ) -opts = {} - -def add_stuff_to_request_context(website, dispatch_result): - - # Define some closures for generating image markup. - # ================================================= - - def translate(src): - if src[0] != '/': - rel = os.path.dirname(dispatch_result.match)[len(website.www_root):] - src = '/'.join([rel, src]) - src = opts['base'] + src - return src - - def img(src): - src = translate(src) - html = '' % src - return html - - def screenshot(short, imgtype='png', href=''): - """Given foo, go with foo.small.png and foo.png. - """ - small = img(short + '.small.' + imgtype) - if not href: - href = translate(short + '.' + imgtype) - html = ('%s') - return html % (href, small) - - - # Make these available within simplates. - # ====================================== - - return { - 'img': img, - 'screenshot': screenshot, - 'translate': translate, - 'version': opts['version'], - 'homepage': False, - 'show_ga': opts['show_ga'], - } - - -opts['show_ga'] = parse.yes_no(os.environ.get( 'ASPEN_IO_SHOW_GA' - , 'no' - ).decode('US-ASCII')) -opts['base'] = '' - -# this is a dirty nasty hack. We should store the version in the pando module somewhere -opts['version'] = open(os.path.join(website.www_root,'..','version.txt')).read()[:-len('-dev')] - -# no idea why this doesn't work -website.renderer_default = 'tornado' -open('/tmp/debugout','a').write('doccnf:' + website.renderer_default + '\n') - -website.algorithm.insert_after('dispatch_request_to_filesystem', add_stuff_to_request_context) - - -if __name__ == '__main__': - from pando import serve - serve(website) diff --git a/doc/.aspen/base.html b/doc/.aspen/base.html deleted file mode 100644 index 2f7329594..000000000 --- a/doc/.aspen/base.html +++ /dev/null @@ -1,37 +0,0 @@ - - - - Aspen: Python Web Framework with Simplates - - - - {% block head %}{% end %} - - -
-
- -

Aspen

- -

- A Python web framework that makes the most of the - filesystem.
- - Simplates are the - main attraction. -

- -
- {% block content %}{% end %} - -
-{% if show_ga %} -{% include "ga.html" %} -{% end %} - - - diff --git a/doc/.aspen/doc.html b/doc/.aspen/doc.html deleted file mode 100644 index f8ef4df34..000000000 --- a/doc/.aspen/doc.html +++ /dev/null @@ -1,22 +0,0 @@ -{% extends base.html %} -{% block content %} -
- -

{{ doc_title }}

- - {% block doc %}{% end %} - - {% if doc_next %} - Home - {{ doc_next[0] }} - {% else %} - Home - {% end %} - -
- -
-{% block other %}{% end %} -{% end %} - diff --git a/doc/.aspen/ga.html b/doc/.aspen/ga.html deleted file mode 100644 index 8bf518638..000000000 --- a/doc/.aspen/ga.html +++ /dev/null @@ -1,17 +0,0 @@ - diff --git a/doc/.aspen/grove.acorn b/doc/.aspen/grove.acorn deleted file mode 100644 index 427ad91a0..000000000 Binary files a/doc/.aspen/grove.acorn and /dev/null differ diff --git a/doc/.aspen/grove.jpg b/doc/.aspen/grove.jpg deleted file mode 100644 index 850faf2cc..000000000 Binary files a/doc/.aspen/grove.jpg and /dev/null differ diff --git a/doc/.aspen/power-of-python.acorn b/doc/.aspen/power-of-python.acorn deleted file mode 100644 index 7527e9a48..000000000 Binary files a/doc/.aspen/power-of-python.acorn and /dev/null differ diff --git a/doc/0-page.png b/doc/0-page.png deleted file mode 100644 index 5d3c16e73..000000000 Binary files a/doc/0-page.png and /dev/null differ diff --git a/doc/1-simplate.png b/doc/1-simplate.png deleted file mode 100644 index 8dd659ef1..000000000 Binary files a/doc/1-simplate.png and /dev/null differ diff --git a/doc/2-library.png b/doc/2-library.png deleted file mode 100644 index 042c6ac03..000000000 Binary files a/doc/2-library.png and /dev/null differ diff --git a/doc/CONTRIBUTORS b/doc/CONTRIBUTORS deleted file mode 100644 index de465f559..000000000 --- a/doc/CONTRIBUTORS +++ /dev/null @@ -1,34 +0,0 @@ -Contributors are listed in alphabetical order by surname, per version. - -Thank you! - - -======================================== - 0.9 - January, 2011 -======================================== - -Please check github for acknowledgements from now on. - - -======================================== - 0.8 - December, 2007 -======================================== - -Lawrence Akka -Christopher Baus -Chris Beaven -Steven Brown -Chad Whitacre - - -======================================== - 0.7.1 -- March 1, 2007 -======================================== - -Chris Beaven -Steven Brown -LD Gus Landis -Giorgi Lekishvili -Vizcayno Tamparantan -Gordon Tillman -Chad Whitacre diff --git a/doc/HISTORY b/doc/HISTORY deleted file mode 100644 index f705223ef..000000000 --- a/doc/HISTORY +++ /dev/null @@ -1,128 +0,0 @@ -======================================== - 0.9 -- January, 2011 -======================================== - -Revitalizing Aspen. Check github for the changelog from now on. - - -======================================== - 0.8 -- December, 2007 -======================================== - -In this release we debut simplates, which combine the power of Python web -frameworks with the ease of filesystem-based development patterns. You will -also find new helper programs: one to serve Aspen websites (unchanged) with -mod_wsgi, and another to monitor an aspen daemon and restart it if it dies. -Lastly, the documentation has been refactored, and a number of issues -addressed: - - - Fixed a couple little bugs in the autoindex handler [issues 104, 105]. - - - Pruned the pyscript handler (simplates make it obsolete) [issue 114]. - - - Removed doc references to lib537/mode [issue 99] - - - Added documentation on Aspen's apps, handlers, and rules [issue 61]. - - - Now easier to configure/unconfigure from 3rd-party tools [issue 77]. - - - All config files now documented under UI > Config Files [issue 91]. - - -======================================== - 0.7.1 -- March 1, 2007 -======================================== - -This is a minor release, with both bug-fixes and feature enhancements. - - - Started to refactor into an apps subpackage, to contain framework glue - and the handler infrastructure. - - - Now providing better feedback on exit [issue 87]. - - - Now tidier with our pidfile [issue 87]. - - - Fixed heinous bug in static file serving on Windows [issue 92]. - - - Upgraded to CherryPyWSGIServer from CherryPy 3.0.1 [issue 88, 81?]. - - - Downstream errors triggered in conf files now propagate more transparently - through colonize(). - - - Exposed HTTP version to configuration [issue 88]. - - - Commandeered the outbound Server header. - - - Started doc/ACKNOWLEDGMENTS. - - - Started fine-grained tracking in doc/HISTORY. - - -======================================== - 0.7 -- January 15, 2007 -======================================== - -The focus of this release is configuration. We have cleaned up and documented -Aspen's main configuration file, and we have exposed a documented interface for -interacting with Aspen's configuration from your plugin modules. There is one -API change to note: Aspen no longer instantiates plugin classes; instead, you -may import configuration objects as needed from the top-level aspen package. -Please see the Subversion logs for full details of this release. - - -======================================== - 0.6 -- December 8, 2006 -======================================== - -This release adds daemonization functionality to Aspen, using Walter Dörwald's -ll.daemon module. This marks a shift in emphasis from Aspen as a development -environment to Aspen as a production server. From here to 1.0 the API should be -more or less stable as we focus on configuration for deployment, testing, -documentation, security, and optimization. - - -======================================== - 0.5 -- December 4, 2006 -======================================== - -This release implements automatic restarting when source files change in -debugging and development modes (issue 10; see also: lib537). - -The other major change here is to the protocol for handler rules: they now take -a path instead of a file object. This means that handlers can be used for -directories as well as files (issue 9). As such, I've reimplemented default -resource serving as a handler, and have also added a directory browsing handler. - - -======================================== - 0.4 -- December 2, 2006 -======================================== - -Aspen now speaks pure WSGI, rather than the slight superset it spoke before. If -you want the superset, include httpy in your middleware stack: - - http://www.zetadev.com/software/httpy/ - -This release also includes a few minor improvements: - - - Obsolete README.aspen files are now removed automatically. - - The paths in the GIF image are now ordered properly. - - Aspen now also adds lib/python2.x/site-packages to sys.path. - - -======================================== - 0.3.1 -- November 30, 2006 -======================================== - -This release addresses some minor issues raised in producing the "Five -Development Models" screencast. - - -======================================== - 0.3 -- November 17, 2006 -======================================== - -This is the first release of Aspen. This is alpha-quality software, and this -release is aimed at Python web enthusiasts. Aspen represents the culmination of -about two years of design and development effort. This is my best attempt at a -system for building and deploying many highly heterogenous websites. diff --git a/doc/README b/doc/README deleted file mode 100644 index ebc302f59..000000000 --- a/doc/README +++ /dev/null @@ -1,3 +0,0 @@ -Aspen's documentation is an Aspen website. So check out this repo -and run 'make docs' from the top level; it will start up an -aspen server on http://localhost:5370/ diff --git a/doc/_lib/aspen.0.css b/doc/_lib/aspen.0.css deleted file mode 100644 index 49a6a3faf..000000000 --- a/doc/_lib/aspen.0.css +++ /dev/null @@ -1,131 +0,0 @@ -/* -http://colorschemedesigner.com/#3221Tw0tBw0w0 -*/ -BODY { - background: #FFF; - color: #999; - margin: 0; - padding: 20px; - font: normal 12pt/14pt Arial, sans-serif; - text-align: center; -} -#body { - width: 600px; - position: relative; - margin: 0 auto; - text-align: left; -} - -A { color: #B1502C; } -A:visited { color: #552311; } -A:hover { color: #F5936E; } -A:visited:hover {} -A IMG { border: none; } - -H1 A, -#definition I A { - text-decoration: none; - color: #00A359; -} -H1 A:visited, #definition I A:visited { color: #00A359; } -H1 A:hover, #definition I A:hover { color: #00A359; } -H1 A:visited, #definition I A:visited { color: #00A359; } -H1, I { - display: inline; - color: #00A359; - font-style: normal; -} -H1, #definition { - font: normal 20pt/24pt Arial, sans-serif; - margin: 0; - padding: 0; -} -A.screencap { - display: block; - margin: 1em 0; - padding: 1em 20px; - border: 2px solid #00A359; - border-style: solid none; -} -#topnav { - position: absolute; - top: 5px; - right: 0; - font: normal 10pt/14pt Arial, sans-serif; -} -H2 { - font: bold 16pt/18pt Arial, sans-serif; - color: #B1502C; - margin: 2em 0 0.5em; - padding: 0; -} -H3 { - font: normal 14pt/16pt Arial, sans-serif; - color: #B1502C; - margin: 2em 0 0.5em; - padding: 0; -} -H4 { - font: normal 10pt/12pt Arial, sans-serif; - color: #B1502C; - text-transform: uppercase; - margin: 2em 0 0.5em; - padding: 0; -} -.tutorial { - position: relative; - background: #EFEFEF; - color: #666; - border: 2px solid #B1502C; - border-style: solid none; - margin: 20px 0; - padding: 20px 20px 80px; -} -.tutorial H2.first { - margin-top: 0; -} -PRE { - font: normal 12px/14px "Lucida Console", Monaco, monospace; - margin: 1em 0 3em 20px; - color: black; -} -A.continue { - display: block; - position: absolute; - bottom: 20px; - right: 20px; - color: white; - background: #F5936E; - background: #B1502C; - padding: 5px 10px; - text-decoration: none; - border-radius: 5px; - -moz-border-radius: 5px; -} -A.continue:hover { - color: #F5936E; -} -.clear { - clear: both; - height: 0px; -} -TABLE { - margin: 1em 1em 3em; - padding: 0; - font: normal 12px/14px "Lucida Console", Monaco, monospace; - color: #666; - border-collapse: collapse; - border-spacing: 0; -} -TH { - font-weight: normal; - text-align: left; - width: 120px; - vertical-align: top; - padding: 1em 0 0; -} -TD { - vertical-align: top; - padding: 0.75em 0 0; -} - diff --git a/doc/_lib/aspen.1.css b/doc/_lib/aspen.1.css deleted file mode 100644 index 63eac20ac..000000000 --- a/doc/_lib/aspen.1.css +++ /dev/null @@ -1,149 +0,0 @@ -/* -http://colorschemedesigner.com/#3221Tw0tBw0w0 -*/ -BODY { - background: #FFF; - color: #999; - margin: 0; - padding: 20px; - font: normal 12pt/14pt Arial, sans-serif; - text-align: center; -} -#body { - width: 600px; - position: relative; - margin: 0 auto; - text-align: left; -} - -A { color: #B1502C; } -A:visited { color: #552311; } -A:hover { color: #F5936E; } -A:visited:hover {} -A IMG { border: none; } - -H1 A, -#definition I A { - text-decoration: none; - color: #00A359; -} -H1 A:visited, #definition I A:visited { color: #00A359; } -H1 A:hover, #definition I A:hover { color: #00A359; } -H1 A:visited, #definition I A:visited { color: #00A359; } -H1, #definition I { - display: inline; - color: #00A359; - font-style: normal; -} -H1, #definition { - font: normal 20pt/24pt Arial, sans-serif; - margin: 0; - padding: 0; -} -A.screencap { - display: block; - margin: 1em 0; - padding: 1em 20px; - border: 2px solid #00A359; - border-style: solid none; -} -#topnav { - position: absolute; - top: 5px; - right: 0; - font: normal 10pt/14pt Arial, sans-serif; -} -H2 { - font: bold 16pt/18pt Arial, sans-serif; - color: #B1502C; - margin: 2em 0 0.5em; - padding: 0; -} -H3 { - font: normal 14pt/16pt Arial, sans-serif; - color: #B1502C; - margin: 2em 0 0.5em; - padding: 0; -} -H4 { - font: normal 10pt/12pt Arial, sans-serif; - color: #B1502C; - text-transform: uppercase; - margin: 2em 0 0.5em; - padding: 0; -} -.doc { - position: relative; - background: #EFEFEF; - color: #666; - border: 2px solid #B1502C; - border-style: solid none; - margin: 20px 0; - padding: 20px 20px 80px; -} -.doc H2.first { - margin-top: 0; -} -PRE { - font: normal 12px/14px "Lucida Console", Monaco, monospace; - margin: 1em 0 3em 20px; - color: black; -} -A.button { - display: block; - position: absolute; - bottom: 20px; - color: white; - background: #F5936E; - background: #B1502C; - padding: 5px 10px; - text-decoration: none; - border-radius: 5px; - -moz-border-radius: 5px; -} -A.button:hover { - color: #F5936E; -} -A.home { - left: 20px; -} -A.continue { - right: 20px; -} -TABLE { - margin: 1em 1em 3em; - padding: 0; - font: normal 12px/14px "Lucida Console", Monaco, monospace; - color: #666; - border-collapse: collapse; - border-spacing: 0; -} -TH { - font-weight: normal; - text-align: left; - width: 120px; - vertical-align: top; - padding: 1em 0 0; -} -TD { - vertical-align: top; - padding: 0.75em 0 0; -} -.highlighted { - background: #FFFE98; -} -#index { - margin: 20px 0; - border: 2px solid #B1502C; - border-style: solid none; - padding: 20px 0; -} -#index P { - margin: 0; - padding: 0 0 0.6em 1.5em; - text-indent: -1.5em; - line-height: 130%; -} -#footer { - font-size: smaller; -} diff --git a/doc/_lib/aspen.2.css b/doc/_lib/aspen.2.css deleted file mode 100644 index bc090f694..000000000 --- a/doc/_lib/aspen.2.css +++ /dev/null @@ -1,159 +0,0 @@ -/* -http://colorschemedesigner.com/#3221Tw0tBw0w0 -*/ -BODY { - background: #FFF; - color: #999; - margin: 0; - padding: 20px; - font: normal 12pt/14pt Arial, sans-serif; - text-align: center; -} -#body { - width: 600px; - position: relative; - margin: 0 auto; - text-align: left; -} - -A { color: #B1502C; } -A:visited { color: #552311; } -A:hover { color: #F5936E; } -A:visited:hover {} -A IMG { border: none; } - -H1 A, -#definition I A { - text-decoration: none; - color: #00A359; -} -H1 A:visited, #definition I A:visited { color: #00A359; } -H1 A:hover, #definition I A:hover { color: #00A359; } -H1 A:visited, #definition I A:visited { color: #00A359; } -H1, #definition I { - display: inline; - color: #00A359; - font-style: normal; -} -H1, #definition { - font: normal 20pt/24pt Arial, sans-serif; - margin: 0; - padding: 0; -} -A.screencap { - display: block; - margin: 1em 0; - padding: 1em 20px; - border: 2px solid #00A359; - border-style: solid none; -} -#topnav { - position: absolute; - top: 5px; - right: 0; - font: normal 10pt/14pt Arial, sans-serif; -} -H2 { - font: bold 16pt/18pt Arial, sans-serif; - color: #B1502C; - margin: 2em 0 0.5em; - padding: 0; -} -H3 { - font: normal 14pt/16pt Arial, sans-serif; - color: #B1502C; - margin: 2em 0 0.5em; - padding: 0; -} -H4 { - font: normal 10pt/12pt Arial, sans-serif; - color: #B1502C; - text-transform: uppercase; - margin: 2em 0 0.5em; - padding: 0; -} -.doc { - position: relative; - background: #EFEFEF; - color: #666; - border: 2px solid #B1502C; - border-style: solid none; - margin: 20px 0; - padding: 20px 20px 80px; -} -.doc H2.first { - margin-top: 0; -} -PRE { - font: normal 12px/14px "Lucida Console", Monaco, monospace; - margin: 1em 0 3em 20px; - color: black; -} -A.button { - display: block; - position: absolute; - bottom: 20px; - color: white; - background: #F5936E; - background: #B1502C; - padding: 5px 10px; - text-decoration: none; - border-radius: 5px; - -moz-border-radius: 5px; -} -A.button:hover { - color: #F5936E; -} -A.home { - left: 20px; -} -A.continue { - right: 20px; -} -TABLE { - margin: 1em 1em 3em; - padding: 0; - font: normal 12px/14px "Lucida Console", Monaco, monospace; - color: #666; - border-collapse: collapse; - border-spacing: 0; -} -TH { - font-weight: normal; - text-align: left; - width: 120px; - vertical-align: top; - padding: 1em 0 0; -} -TD { - vertical-align: top; - padding: 0.75em 0 0; -} -.warning { - background: #FABCA8 url("exclamation.png") 10px 10px no-repeat; - padding: 10px 10px 10px 30px; - margin: 20px 0 30px; - box-shadow: 5px 5px 5px #666; - color: #481A10; -} -#index .warning { - margin-top: 0; -} -.highlighted { - background: #FFFE98; -} -#index { - margin: 20px 0; - border: 2px solid #B1502C; - border-style: solid none; - padding: 20px 0; -} -#index P { - margin: 0; - padding: 0 0 0.6em 1.5em; - text-indent: -1.5em; - line-height: 130%; -} -#footer { - font-size: smaller; -} diff --git a/doc/_lib/aspen.3.css b/doc/_lib/aspen.3.css deleted file mode 100644 index 0899e6b78..000000000 --- a/doc/_lib/aspen.3.css +++ /dev/null @@ -1,171 +0,0 @@ -/* -http://colorschemedesigner.com/#3221Tw0tBw0w0 -*/ -BODY { - background: #FFF; - color: #999; - margin: 0; - padding: 20px; - font: normal 12pt/14pt Arial, sans-serif; - text-align: center; -} -#body { - width: 600px; - position: relative; - margin: 0 auto; - text-align: left; -} - -A { color: #B1502C; } -A:visited { color: #552311; } -A:hover { color: #F5936E; } -A:visited:hover {} -A IMG { border: none; } - -H1 A, -#definition I A { - text-decoration: none; - color: #00A359; -} -H1 A:visited, #definition I A:visited { color: #00A359; } -H1 A:hover, #definition I A:hover { color: #00A359; } -H1 A:visited, #definition I A:visited { color: #00A359; } -H1, #definition I { - display: inline; - color: #00A359; - font-style: normal; -} -H1, #definition { - font: normal 20pt/24pt Arial, sans-serif; - margin: 0; - padding: 0; -} -A.screencap { - display: block; - margin: 1em 0; - padding: 1em 20px; - border: 2px solid #00A359; - border-style: solid none; -} -#topnav { - position: absolute; - top: 5px; - right: 0; - font: normal 10pt/14pt Arial, sans-serif; -} -H2 { - font: bold 16pt/18pt Arial, sans-serif; - color: #B1502C; - margin: 2em 0 0.5em; - padding: 0; -} -H3 { - font: normal 14pt/16pt Arial, sans-serif; - color: #B1502C; - margin: 2em 0 0.5em; - padding: 0; -} -H4 { - font: normal 10pt/12pt Arial, sans-serif; - color: #B1502C; - text-transform: uppercase; - margin: 2em 0 0.5em; - padding: 0; -} -.doc { - position: relative; - background: #EFEFEF; - color: #666; - border: 2px solid #B1502C; - border-style: solid none; - margin: 20px 0; - padding: 20px 20px 80px; -} -.doc H2.first { - margin-top: 0; -} -PRE { - font: normal 12px/14px "Lucida Console", Monaco, monospace; - margin: 1em 0 3em 20px; - color: black; -} -A.button { - display: block; - position: absolute; - bottom: 20px; - color: white; - background: #F5936E; - background: #B1502C; - padding: 5px 10px; - text-decoration: none; - border-radius: 5px; - -moz-border-radius: 5px; -} -A.button:hover { - color: #F5936E; -} -A.home { - left: 20px; -} -A.continue { - right: 20px; -} -TABLE { - margin: 1em 1em 3em; - padding: 0; - font: normal 12px/14px "Lucida Console", Monaco, monospace; - color: #666; - border-collapse: collapse; - border-spacing: 0; -} -TH { - font-weight: normal; - text-align: left; - width: 120px; - vertical-align: top; - padding: 1em 0 0; -} -TD { - vertical-align: top; - padding: 0.75em 0 0; -} -DL { - margin: 0; - padding: 0; -} -DT { - margin: 1.5em 0 0; - padding: 0; -} -DD { - margin: 0; - padding: 0 0 0 1.5em; -} -.warning { - background: #FABCA8 url("exclamation.png") 10px 10px no-repeat; - padding: 10px 10px 10px 30px; - margin: 20px 0 30px; - box-shadow: 5px 5px 5px #666; - color: #481A10; -} -#index .warning { - margin-top: 0; -} -.highlighted { - background: #FFFE98; -} -#index { - margin: 20px 0; - border: 2px solid #B1502C; - border-style: solid none; - padding: 20px 0; -} -#index P { - margin: 0; - padding: 0 0 0.6em 1.5em; - text-indent: -1.5em; - line-height: 130%; -} -#footer { - font-size: smaller; -} diff --git a/doc/_lib/aspen.4.css b/doc/_lib/aspen.4.css deleted file mode 100644 index 4ea9401a7..000000000 --- a/doc/_lib/aspen.4.css +++ /dev/null @@ -1,171 +0,0 @@ -/* -http://colorschemedesigner.com/#3221Tw0tBw0w0 -*/ -BODY { - background: #FFF; - color: #999; - margin: 0; - padding: 20px; - font: normal 12pt/14pt Arial, sans-serif; - text-align: center; -} -#body { - width: 600px; - position: relative; - margin: 0 auto; - text-align: left; -} - -A { color: #B1502C; } -A:visited { color: #552311; } -A:hover { color: #F5936E; } -A:visited:hover {} -A IMG { border: none; } - -H1 A, -#definition I A { - text-decoration: none; - color: #00A359; -} -H1 A:visited, #definition I A:visited { color: #00A359; } -H1 A:hover, #definition I A:hover { color: #00A359; } -H1 A:visited, #definition I A:visited { color: #00A359; } -H1, #definition I { - display: inline; - color: #00A359; - font-style: normal; -} -H1, #definition { - font: normal 20pt/24pt Arial, sans-serif; - margin: 0; - padding: 0; -} -.screencap { - display: block; - margin: 1em 0; - padding: 1em 20px; - border: 2px solid #00A359; - border-style: solid none; -} -#topnav { - position: absolute; - top: 5px; - right: 0; - font: normal 10pt/14pt Arial, sans-serif; -} -H2 { - font: bold 16pt/18pt Arial, sans-serif; - color: #B1502C; - margin: 2em 0 0.5em; - padding: 0; -} -H3 { - font: normal 14pt/16pt Arial, sans-serif; - color: #B1502C; - margin: 2em 0 0.5em; - padding: 0; -} -H4 { - font: normal 10pt/12pt Arial, sans-serif; - color: #B1502C; - text-transform: uppercase; - margin: 2em 0 0.5em; - padding: 0; -} -.doc { - position: relative; - background: #EFEFEF; - color: #666; - border: 2px solid #B1502C; - border-style: solid none; - margin: 20px 0; - padding: 20px 20px 80px; -} -.doc H2.first { - margin-top: 0; -} -PRE { - font: normal 12px/14px "Lucida Console", Monaco, monospace; - margin: 1em 0 3em 20px; - color: black; -} -A.button { - display: block; - position: absolute; - bottom: 20px; - color: white; - background: #F5936E; - background: #B1502C; - padding: 5px 10px; - text-decoration: none; - border-radius: 5px; - -moz-border-radius: 5px; -} -A.button:hover { - color: #F5936E; -} -A.home { - left: 20px; -} -A.continue { - right: 20px; -} -TABLE { - margin: 1em 1em 3em; - padding: 0; - font: normal 12px/14px "Lucida Console", Monaco, monospace; - color: #666; - border-collapse: collapse; - border-spacing: 0; -} -TH { - font-weight: normal; - text-align: left; - width: 120px; - vertical-align: top; - padding: 1em 0 0; -} -TD { - vertical-align: top; - padding: 0.75em 0 0; -} -DL { - margin: 0; - padding: 0; -} -DT { - margin: 1.5em 0 0; - padding: 0; -} -DD { - margin: 0; - padding: 0 0 0 1.5em; -} -.warning { - background: #FABCA8 url("exclamation.png") 10px 10px no-repeat; - padding: 10px 10px 10px 30px; - margin: 20px 0 30px; - box-shadow: 5px 5px 5px #666; - color: #481A10; -} -#index .warning { - margin-top: 0; -} -.highlighted { - background: #FFFE98; -} -#index { - margin: 20px 0; - border: 2px solid #B1502C; - border-style: solid none; - padding: 20px 0; -} -#index P { - margin: 0; - padding: 0 0 0.6em 1.5em; - text-indent: -1.5em; - line-height: 130%; -} -#footer { - font-size: smaller; -} diff --git a/doc/_lib/aspen.5.css b/doc/_lib/aspen.5.css deleted file mode 100644 index 6dec5cbe0..000000000 --- a/doc/_lib/aspen.5.css +++ /dev/null @@ -1,174 +0,0 @@ -/* -http://colorschemedesigner.com/#3221Tw0tBw0w0 -*/ -BODY { - background: #FFF; - color: #999; - margin: 0; - padding: 20px; - font: normal 12pt/14pt Arial, sans-serif; - text-align: center; -} -#body { - width: 600px; - position: relative; - margin: 0 auto; - text-align: left; -} - -A { color: #B1502C; } -A:visited { color: #552311; } -A:hover { color: #F5936E; } -A:visited:hover {} -A IMG { border: none; } - -H1 A, -#definition I A { - text-decoration: none; - color: #00A359; -} -H1 A:visited, #definition I A:visited { color: #00A359; } -H1 A:hover, #definition I A:hover { color: #00A359; } -H1 A:visited, #definition I A:visited { color: #00A359; } -H1, #definition I { - display: inline; - color: #00A359; - font-style: normal; -} -H1, #definition { - font: normal 20pt/24pt Arial, sans-serif; - margin: 0; - padding: 0; -} -.screencap { - display: block; - margin: 1em 0; - padding: 1em 20px; - border: 2px solid #00A359; - border-style: solid none; -} -#topnav { - position: absolute; - top: 5px; - right: 0; - font: normal 10pt/14pt Arial, sans-serif; -} -H2 { - font: bold 16pt/18pt Arial, sans-serif; - color: #B1502C; - margin: 2em 0 0.5em; - padding: 0; -} -H3 { - font: normal 14pt/16pt Arial, sans-serif; - color: #B1502C; - margin: 2em 0 0.5em; - padding: 0; -} -H4 { - font: normal 10pt/12pt Arial, sans-serif; - color: #B1502C; - text-transform: uppercase; - margin: 2em 0 0.5em; - padding: 0; -} -.doc { - position: relative; - background: #EFEFEF; - color: #666; - border: 2px solid #B1502C; - border-style: solid none; - margin: 20px 0; - padding: 20px 20px 80px; -} -.doc H2.first { - margin-top: 0; -} -PRE { - font: normal 12px/14px "Lucida Console", Monaco, monospace; - margin: 1em 0 3em 20px; - padding: 3px 5px; - color: #00D843; - background: black; - overflow: auto; -} -A.button { - display: block; - position: absolute; - bottom: 20px; - color: white; - background: #F5936E; - background: #B1502C; - padding: 5px 10px; - text-decoration: none; - border-radius: 5px; - -moz-border-radius: 5px; -} -A.button:hover { - color: #F5936E; -} -A.home { - left: 20px; -} -A.continue { - right: 20px; -} -TABLE { - margin: 1em 1em 3em; - padding: 0; - font: normal 12px/14px "Lucida Console", Monaco, monospace; - color: #666; - border-collapse: collapse; - border-spacing: 0; -} -TH { - font-weight: normal; - text-align: left; - width: 120px; - vertical-align: top; - padding: 1em 0 0; -} -TD { - vertical-align: top; - padding: 0.75em 0 0; -} -DL { - margin: 0; - padding: 0; -} -DT { - margin: 1.5em 0 0; - padding: 0; -} -DD { - margin: 0; - padding: 0 0 0 1.5em; -} -.warning { - background: #FABCA8 url("exclamation.png") 10px 10px no-repeat; - padding: 10px 10px 10px 30px; - margin: 20px 0 30px; - box-shadow: 5px 5px 5px #666; - color: #481A10; -} -#index .warning { - margin-top: 0; -} -.highlighted { - background: #FFFE98; -} -#index { - margin: 20px 0; - border: 2px solid #B1502C; - border-style: solid none; - padding: 20px 0; -} -#index P { - margin: 0; - padding: 0 0 0.6em 1.5em; - text-indent: -1.5em; - line-height: 130%; -} -#footer { - font-size: smaller; -} diff --git a/doc/_lib/aspen.6.css b/doc/_lib/aspen.6.css deleted file mode 100644 index b3064135f..000000000 --- a/doc/_lib/aspen.6.css +++ /dev/null @@ -1,178 +0,0 @@ -/* -http://colorschemedesigner.com/#3221Tw0tBw0w0 -*/ -@import url("/_lib/reset.css"); -@import url("http://fonts.googleapis.com/css?family=Lato:300,400,700,300italic,400italic,700italic&v2"); - -BODY { - background: #FFF; - color: #999; - margin: 0; - padding: 20px; - font: normal 12pt/14pt Lato, sans-serif; - text-align: center; -} -#body { - width: 600px; - position: relative; - margin: 0 auto; - text-align: left; -} - -A { color: #B1502C; } -A:visited { color: #552311; } -A:hover { color: #F5936E; } -A:visited:hover {} -A IMG { border: none; } - -H1 A, -#definition I A { - text-decoration: none; - color: #00A359; -} -H1 A:visited, #definition I A:visited { color: #00A359; } -H1 A:hover, #definition I A:hover { color: #00A359; } -H1 A:visited, #definition I A:visited { color: #00A359; } -H1, #definition I { - display: inline; - color: #00A359; - font-style: normal; -} -H1 { - font: normal 20pt/24pt Lato, sans-serif; -} -#definition { -} -.screencap { - display: block; - margin: 1em 0; - padding: 1em 20px; - border: 2px solid #00A359; - border-style: solid none; -} -#topnav { - position: absolute; - top: 5px; - right: 0; - font: normal 10pt/14pt Lato, sans-serif; -} -H2 { - font: bold 16pt/18pt Lato, sans-serif; - color: #B1502C; - margin: 2em 0 0.5em; - padding: 0; -} -H3 { - font: normal 14pt/16pt Lato, sans-serif; - color: #B1502C; - margin: 2em 0 0.5em; - padding: 0; -} -H4 { - font: normal 10pt/12pt Lato, sans-serif; - color: #B1502C; - text-transform: uppercase; - margin: 2em 0 0.5em; - padding: 0; -} -.doc { - position: relative; - background: #EFEFEF; - color: #666; - border: 2px solid #B1502C; - border-style: solid none; - margin: 20px 0; - padding: 20px 20px 80px; -} -.doc H2.first { - margin-top: 0; -} -.doc P { - margin: 0 0 1em; -} -H2 CODE { - font: bold 14pt/18pt "Lucida Console", Monaco, monospace; -} -CODE, PRE { - font: normal 10pt/14pt "Lucida Console", Monaco, monospace; -} -PRE { - font: normal 12px/14px "Lucida Console", Monaco, monospace; - margin: 1em 0 1em 1.5em; - padding: 3px 5px; - border-left: 2px solid #999; - overflow: auto; -} -A.button { - display: block; - position: absolute; - bottom: 20px; - color: white; - background: #F5936E; - background: #B1502C; - padding: 5px 10px; - text-decoration: none; - border-radius: 5px; - -moz-border-radius: 5px; -} -A.button:hover { - color: #F5936E; -} -A.home { - left: 20px; -} -A.continue { - right: 20px; -} -TABLE { - margin: 1em 1em 3em; - padding: 0; - font: normal 12px/14px "Lucida Console", Monaco, monospace; - color: #666; - border-collapse: collapse; - border-spacing: 0; -} -TH { - font-weight: normal; - text-align: left; - width: 120px; - vertical-align: top; - padding: 1em 0 0; -} -TD { - vertical-align: top; - padding: 0.75em 0 0; -} -OL, UL { - margin: 0 0 1em 2.25em; -} -OL LI { list-style: decimal; } -UL LI { list-style: disc; } -DL { - margin: 0; - padding: 0; -} -DT { - margin: 1.5em 0 0; - padding: 0; -} -DD { - margin: 0; - padding: 0 0 0 1.5em; -} -.warning { - background: #FABCA8 url("exclamation.png") 10px 10px no-repeat; - padding: 10px 10px 10px 30px; - margin: 20px 0 30px; - box-shadow: 5px 5px 5px #666; - color: #481A10; -} -.highlighted { - background: #FFFE98; -} -#footer { - font-size: smaller; -} -.clear { - clear: both; -} diff --git a/doc/_lib/aspen.7.css b/doc/_lib/aspen.7.css deleted file mode 100644 index a35bcb29a..000000000 --- a/doc/_lib/aspen.7.css +++ /dev/null @@ -1,193 +0,0 @@ -/* -http://colorschemedesigner.com/#3221Tw0tBw0w0 -*/ -@import url("/_lib/reset.css"); -@import url("http://fonts.googleapis.com/css?family=Lato:300,400,700,300italic,400italic,700italic&v2"); - -BODY { - background: #FFF; - color: #999; - margin: 0; - padding: 20px; - font: normal 12pt/14pt Lato, sans-serif; - text-align: center; -} -#body { - width: 600px; - position: relative; - margin: 0 auto; - text-align: left; -} - -A { color: #B1502C; } -A:visited { color: #552311; } -A:hover { color: #F5936E; } -A:visited:hover {} -A IMG { border: none; } - -H1 A, -#definition I A { - text-decoration: none; - color: #00A359; -} -H1 A:visited, #definition I A:visited { color: #00A359; } -H1 A:hover, #definition I A:hover { color: #00A359; } -H1 A:visited, #definition I A:visited { color: #00A359; } -H1, #definition I { - display: inline; - color: #00A359; - font-style: normal; -} -H1 { - margin: 0; - padding: 0; - font: normal 20pt/24pt Lato, sans-serif; -} -.screencap { - display: block; - margin: 1em 0; - padding: 1em 20px; - border: 2px solid #00A359; - border-style: solid none; -} -#topnav { - position: absolute; - top: 5px; - right: 0; - font: normal 10pt/14pt Lato, sans-serif; -} -H2 { - font: bold 16pt/18pt Lato, sans-serif; - color: #B1502C; - margin: 2em 0 0.5em; - padding: 0; -} -H3 { - font: normal 14pt/16pt Lato, sans-serif; - color: #B1502C; - margin: 2em 0 0.5em; - padding: 0; -} -H4 { - font: normal 10pt/12pt Lato, sans-serif; - color: #B1502C; - text-transform: uppercase; - margin: 2em 0 0.5em; - padding: 0; -} -.doc { - position: relative; - background: #EFEFEF; - color: #666; - border: 2px solid #B1502C; - border-style: solid none; - margin: 20px 0; - padding: 20px 20px 80px; -} -.doc H2.first { - margin-top: 0; -} -.doc P { - margin: 0 0 1em; -} -H2 CODE { - font: bold 14pt/18pt "Lucida Console", Monaco, monospace; -} -CODE, PRE { - font: normal 10pt/14pt "Lucida Console", Monaco, monospace; -} -PRE { - font: normal 12px/14px "Lucida Console", Monaco, monospace; - margin: 1em 0 1em 1.5em; - padding: 3px 5px; - border-left: 2px solid #999; - overflow: auto; -} -A.button { - display: block; - position: absolute; - bottom: 20px; - color: white; - background: #F5936E; - background: #B1502C; - padding: 5px 10px; - text-decoration: none; - border-radius: 5px; - -moz-border-radius: 5px; -} -A.button:hover { - color: #F5936E; -} -A.home { - left: 20px; -} -A.continue { - right: 20px; -} -TABLE { - margin: 1em 1em 3em; - padding: 0; - font: normal 12px/14px "Lucida Console", Monaco, monospace; - color: #666; - border-collapse: collapse; - border-spacing: 0; -} -TH { - font-weight: normal; - text-align: left; - width: 120px; - vertical-align: top; - padding: 1em 0 0; -} -TD { - vertical-align: top; - padding: 0.75em 0 0; -} -OL, UL { - margin: 0 0 1em 2.25em; -} -OL LI { list-style: decimal; } -UL LI { list-style: disc; } -DL { - margin: 0; - padding: 0; -} -DT { - margin: 1.5em 0 0; - padding: 0; -} -DD { - margin: 0; - padding: 0 0 0 1.5em; -} -.warning { - background: #FABCA8 url("exclamation.png") 10px 10px no-repeat; - padding: 10px 10px 10px 30px; - margin: 20px 0 30px; - box-shadow: 5px 5px 5px #666; - color: #481A10; -} -.highlighted { - background: #FFFE98; -} -#footer { - font-size: smaller; -} -.clear { - clear: both; -} -@media screen and (max-width: 639px) { - BODY { padding: 10px; } - #body { - width: 100%; - } - BR.maybe { - display: none; - } - IMG { - width: 100%; - } -} -@media screen and (max-width: 319px) { - BODY { padding: 5px; } -} diff --git a/doc/_lib/aspen.8.css b/doc/_lib/aspen.8.css deleted file mode 100644 index 19dea853a..000000000 --- a/doc/_lib/aspen.8.css +++ /dev/null @@ -1,193 +0,0 @@ -/* -http://colorschemedesigner.com/#3221Tw0tBw0w0 -*/ -@import url("/_lib/reset.css"); -@import url("http://fonts.googleapis.com/css?family=Lato:300,400,700,300italic,400italic,700italic&v2"); - -BODY { - background: #FFF; - color: #999; - margin: 0; - padding: 20px; - font: normal 12pt/14pt Lato, sans-serif; - text-align: center; -} -#body { - width: 600px; - position: relative; - margin: 0 auto; - text-align: left; -} - -A { color: #B1502C; text-decoration: none; } -A:visited { color: #552311; } -A:hover { color: #F5936E; text-decoration: underline; } -A:visited:hover {} -A IMG { border: none; } - -H1 A, -#definition I A { - text-decoration: none; - color: #00A359; -} -H1 A:visited, #definition I A:visited { color: #00A359; } -H1 A:hover, #definition I A:hover { color: #00A359; } -H1 A:visited, #definition I A:visited { color: #00A359; } -H1, #definition I { - display: inline; - color: #00A359; - font-style: normal; -} -H1 { - margin: 0; - padding: 0; - font: normal 20pt/24pt Lato, sans-serif; -} -.screencap { - display: block; - margin: 1em 0; - padding: 1em 20px; - border: 2px solid #00A359; - border-style: solid none; -} -#topnav { - position: absolute; - top: 5px; - right: 0; - font: normal 10pt/14pt Lato, sans-serif; -} -H2 { - font: bold 16pt/18pt Lato, sans-serif; - color: #B1502C; - margin: 2em 0 0.5em; - padding: 0; -} -H3 { - font: normal 14pt/16pt Lato, sans-serif; - color: #B1502C; - margin: 2em 0 0.5em; - padding: 0; -} -H4 { - font: normal 10pt/12pt Lato, sans-serif; - color: #B1502C; - text-transform: uppercase; - margin: 2em 0 0.5em; - padding: 0; -} -.doc { - position: relative; - background: #EFEFEF; - color: #666; - border: 2px solid #B1502C; - border-style: solid none; - margin: 20px 0; - padding: 20px 20px 80px; -} -.doc H2.first { - margin-top: 0; -} -.doc P { - margin: 0 0 1em; -} -H2 CODE { - font: bold 14pt/18pt "Lucida Console", Monaco, monospace; -} -CODE, PRE { - font: normal 10pt/14pt "Lucida Console", Monaco, monospace; -} -PRE { - font: normal 12px/14px "Lucida Console", Monaco, monospace; - margin: 1em 0 1em 1.5em; - padding: 3px 5px; - border-left: 2px solid #999; - overflow: auto; -} -A.button { - display: block; - position: absolute; - bottom: 20px; - color: white; - background: #F5936E; - background: #B1502C; - padding: 5px 10px; - text-decoration: none; - border-radius: 5px; - -moz-border-radius: 5px; -} -A.button:hover { - color: #F5936E; -} -A.home { - left: 20px; -} -A.continue { - right: 20px; -} -TABLE { - margin: 1em 1em 3em; - padding: 0; - font: normal 12px/14px "Lucida Console", Monaco, monospace; - color: #666; - border-collapse: collapse; - border-spacing: 0; -} -TH { - font-weight: normal; - text-align: left; - width: 120px; - vertical-align: top; - padding: 1em 0 0; -} -TD { - vertical-align: top; - padding: 0.75em 0 0; -} -OL, UL { - margin: 0 0 1em 2.25em; -} -OL LI { list-style: decimal; } -UL LI { list-style: disc; } -DL { - margin: 0; - padding: 0; -} -DT { - margin: 1.5em 0 0; - padding: 0; -} -DD { - margin: 0; - padding: 0 0 0 1.5em; -} -.warning { - background: #FABCA8 url("exclamation.png") 10px 10px no-repeat; - padding: 10px 10px 10px 30px; - margin: 20px 0 30px; - box-shadow: 5px 5px 5px #666; - color: #481A10; -} -.highlighted { - background: #FFFE98; -} -#footer { - font-size: smaller; -} -.clear { - clear: both; -} -@media screen and (max-width: 639px) { - BODY { padding: 10px; } - #body { - width: 100%; - } - BR.maybe { - display: none; - } - IMG { - width: 100%; - } -} -@media screen and (max-width: 319px) { - BODY { padding: 5px; } -} diff --git a/doc/_lib/aspen.9.css b/doc/_lib/aspen.9.css deleted file mode 100644 index 19dea853a..000000000 --- a/doc/_lib/aspen.9.css +++ /dev/null @@ -1,193 +0,0 @@ -/* -http://colorschemedesigner.com/#3221Tw0tBw0w0 -*/ -@import url("/_lib/reset.css"); -@import url("http://fonts.googleapis.com/css?family=Lato:300,400,700,300italic,400italic,700italic&v2"); - -BODY { - background: #FFF; - color: #999; - margin: 0; - padding: 20px; - font: normal 12pt/14pt Lato, sans-serif; - text-align: center; -} -#body { - width: 600px; - position: relative; - margin: 0 auto; - text-align: left; -} - -A { color: #B1502C; text-decoration: none; } -A:visited { color: #552311; } -A:hover { color: #F5936E; text-decoration: underline; } -A:visited:hover {} -A IMG { border: none; } - -H1 A, -#definition I A { - text-decoration: none; - color: #00A359; -} -H1 A:visited, #definition I A:visited { color: #00A359; } -H1 A:hover, #definition I A:hover { color: #00A359; } -H1 A:visited, #definition I A:visited { color: #00A359; } -H1, #definition I { - display: inline; - color: #00A359; - font-style: normal; -} -H1 { - margin: 0; - padding: 0; - font: normal 20pt/24pt Lato, sans-serif; -} -.screencap { - display: block; - margin: 1em 0; - padding: 1em 20px; - border: 2px solid #00A359; - border-style: solid none; -} -#topnav { - position: absolute; - top: 5px; - right: 0; - font: normal 10pt/14pt Lato, sans-serif; -} -H2 { - font: bold 16pt/18pt Lato, sans-serif; - color: #B1502C; - margin: 2em 0 0.5em; - padding: 0; -} -H3 { - font: normal 14pt/16pt Lato, sans-serif; - color: #B1502C; - margin: 2em 0 0.5em; - padding: 0; -} -H4 { - font: normal 10pt/12pt Lato, sans-serif; - color: #B1502C; - text-transform: uppercase; - margin: 2em 0 0.5em; - padding: 0; -} -.doc { - position: relative; - background: #EFEFEF; - color: #666; - border: 2px solid #B1502C; - border-style: solid none; - margin: 20px 0; - padding: 20px 20px 80px; -} -.doc H2.first { - margin-top: 0; -} -.doc P { - margin: 0 0 1em; -} -H2 CODE { - font: bold 14pt/18pt "Lucida Console", Monaco, monospace; -} -CODE, PRE { - font: normal 10pt/14pt "Lucida Console", Monaco, monospace; -} -PRE { - font: normal 12px/14px "Lucida Console", Monaco, monospace; - margin: 1em 0 1em 1.5em; - padding: 3px 5px; - border-left: 2px solid #999; - overflow: auto; -} -A.button { - display: block; - position: absolute; - bottom: 20px; - color: white; - background: #F5936E; - background: #B1502C; - padding: 5px 10px; - text-decoration: none; - border-radius: 5px; - -moz-border-radius: 5px; -} -A.button:hover { - color: #F5936E; -} -A.home { - left: 20px; -} -A.continue { - right: 20px; -} -TABLE { - margin: 1em 1em 3em; - padding: 0; - font: normal 12px/14px "Lucida Console", Monaco, monospace; - color: #666; - border-collapse: collapse; - border-spacing: 0; -} -TH { - font-weight: normal; - text-align: left; - width: 120px; - vertical-align: top; - padding: 1em 0 0; -} -TD { - vertical-align: top; - padding: 0.75em 0 0; -} -OL, UL { - margin: 0 0 1em 2.25em; -} -OL LI { list-style: decimal; } -UL LI { list-style: disc; } -DL { - margin: 0; - padding: 0; -} -DT { - margin: 1.5em 0 0; - padding: 0; -} -DD { - margin: 0; - padding: 0 0 0 1.5em; -} -.warning { - background: #FABCA8 url("exclamation.png") 10px 10px no-repeat; - padding: 10px 10px 10px 30px; - margin: 20px 0 30px; - box-shadow: 5px 5px 5px #666; - color: #481A10; -} -.highlighted { - background: #FFFE98; -} -#footer { - font-size: smaller; -} -.clear { - clear: both; -} -@media screen and (max-width: 639px) { - BODY { padding: 10px; } - #body { - width: 100%; - } - BR.maybe { - display: none; - } - IMG { - width: 100%; - } -} -@media screen and (max-width: 319px) { - BODY { padding: 5px; } -} diff --git a/doc/_lib/exclamation.png b/doc/_lib/exclamation.png deleted file mode 100644 index c37bd062e..000000000 Binary files a/doc/_lib/exclamation.png and /dev/null differ diff --git a/doc/_lib/for-facebook.jpg b/doc/_lib/for-facebook.jpg deleted file mode 100644 index 924ad6ad1..000000000 Binary files a/doc/_lib/for-facebook.jpg and /dev/null differ diff --git a/doc/_lib/for-facebook.png b/doc/_lib/for-facebook.png deleted file mode 100644 index dc588a616..000000000 Binary files a/doc/_lib/for-facebook.png and /dev/null differ diff --git a/doc/_lib/for-twitter.acorn b/doc/_lib/for-twitter.acorn deleted file mode 100644 index 4811f3755..000000000 Binary files a/doc/_lib/for-twitter.acorn and /dev/null differ diff --git a/doc/_lib/for-twitter.jpg b/doc/_lib/for-twitter.jpg deleted file mode 100644 index 924ad6ad1..000000000 Binary files a/doc/_lib/for-twitter.jpg and /dev/null differ diff --git a/doc/_lib/for-twitter.png b/doc/_lib/for-twitter.png deleted file mode 100644 index 667c08eff..000000000 Binary files a/doc/_lib/for-twitter.png and /dev/null differ diff --git a/doc/_lib/grove.jpg b/doc/_lib/grove.jpg deleted file mode 100644 index 73fd4c0fd..000000000 Binary files a/doc/_lib/grove.jpg and /dev/null differ diff --git a/doc/_lib/jquery-1.5.min.js b/doc/_lib/jquery-1.5.min.js deleted file mode 100644 index 9144b8ae9..000000000 --- a/doc/_lib/jquery-1.5.min.js +++ /dev/null @@ -1,16 +0,0 @@ -/*! - * jQuery JavaScript Library v1.5 - * http://jquery.com/ - * - * Copyright 2011, John Resig - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * Includes Sizzle.js - * http://sizzlejs.com/ - * Copyright 2011, The Dojo Foundation - * Released under the MIT, BSD, and GPL Licenses. - * - * Date: Mon Jan 31 08:31:29 2011 -0500 - */ -(function(a,b){function b$(a){return d.isWindow(a)?a:a.nodeType===9?a.defaultView||a.parentWindow:!1}function bX(a){if(!bR[a]){var b=d("<"+a+">").appendTo("body"),c=b.css("display");b.remove();if(c==="none"||c==="")c="block";bR[a]=c}return bR[a]}function bW(a,b){var c={};d.each(bV.concat.apply([],bV.slice(0,b)),function(){c[this]=a});return c}function bJ(a,c){a.dataFilter&&(c=a.dataFilter(c,a.dataType));var e=a.dataTypes,f=a.converters,g,h=e.length,i,j=e[0],k,l,m,n,o;for(g=1;g=0===c})}function N(a){return!a||!a.parentNode||a.parentNode.nodeType===11}function F(a,b){return(a&&a!=="*"?a+".":"")+b.replace(q,"`").replace(r,"&")}function E(a){var b,c,e,f,g,h,i,j,k,l,m,n,p,q=[],r=[],s=d._data(this,u);typeof s==="function"&&(s=s.events);if(a.liveFired!==this&&s&&s.live&&!a.target.disabled&&(!a.button||a.type!=="click")){a.namespace&&(n=new RegExp("(^|\\.)"+a.namespace.split(".").join("\\.(?:.*\\.)?")+"(\\.|$)")),a.liveFired=this;var t=s.live.slice(0);for(i=0;ic)break;a.currentTarget=f.elem,a.data=f.handleObj.data,a.handleObj=f.handleObj,p=f.handleObj.origHandler.apply(f.elem,arguments);if(p===!1||a.isPropagationStopped()){c=f.level,p===!1&&(b=!1);if(a.isImmediatePropagationStopped())break}}return b}}function C(a,b,c){c[0].type=a;return d.event.handle.apply(b,c)}function w(){return!0}function v(){return!1}function f(a,c,f){if(f===b&&a.nodeType===1){f=a.getAttribute("data-"+c);if(typeof f==="string"){try{f=f==="true"?!0:f==="false"?!1:f==="null"?null:d.isNaN(f)?e.test(f)?d.parseJSON(f):f:parseFloat(f)}catch(g){}d.data(a,c,f)}else f=b}return f}var c=a.document,d=function(){function I(){if(!d.isReady){try{c.documentElement.doScroll("left")}catch(a){setTimeout(I,1);return}d.ready()}}var d=function(a,b){return new d.fn.init(a,b,g)},e=a.jQuery,f=a.$,g,h=/^(?:[^<]*(<[\w\W]+>)[^>]*$|#([\w\-]+)$)/,i=/\S/,j=/^\s+/,k=/\s+$/,l=/\d/,m=/^<(\w+)\s*\/?>(?:<\/\1>)?$/,n=/^[\],:{}\s]*$/,o=/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,p=/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,q=/(?:^|:|,)(?:\s*\[)+/g,r=/(webkit)[ \/]([\w.]+)/,s=/(opera)(?:.*version)?[ \/]([\w.]+)/,t=/(msie) ([\w.]+)/,u=/(mozilla)(?:.*? rv:([\w.]+))?/,v=navigator.userAgent,w,x=!1,y,z="then done fail isResolved isRejected promise".split(" "),A,B=Object.prototype.toString,C=Object.prototype.hasOwnProperty,D=Array.prototype.push,E=Array.prototype.slice,F=String.prototype.trim,G=Array.prototype.indexOf,H={};d.fn=d.prototype={constructor:d,init:function(a,e,f){var g,i,j,k;if(!a)return this;if(a.nodeType){this.context=this[0]=a,this.length=1;return this}if(a==="body"&&!e&&c.body){this.context=c,this[0]=c.body,this.selector="body",this.length=1;return this}if(typeof a==="string"){g=h.exec(a);if(!g||!g[1]&&e)return!e||e.jquery?(e||f).find(a):this.constructor(e).find(a);if(g[1]){e=e instanceof d?e[0]:e,k=e?e.ownerDocument||e:c,j=m.exec(a),j?d.isPlainObject(e)?(a=[c.createElement(j[1])],d.fn.attr.call(a,e,!0)):a=[k.createElement(j[1])]:(j=d.buildFragment([g[1]],[k]),a=(j.cacheable?d.clone(j.fragment):j.fragment).childNodes);return d.merge(this,a)}i=c.getElementById(g[2]);if(i&&i.parentNode){if(i.id!==g[2])return f.find(a);this.length=1,this[0]=i}this.context=c,this.selector=a;return this}if(d.isFunction(a))return f.ready(a);a.selector!==b&&(this.selector=a.selector,this.context=a.context);return d.makeArray(a,this)},selector:"",jquery:"1.5",length:0,size:function(){return this.length},toArray:function(){return E.call(this,0)},get:function(a){return a==null?this.toArray():a<0?this[this.length+a]:this[a]},pushStack:function(a,b,c){var e=this.constructor();d.isArray(a)?D.apply(e,a):d.merge(e,a),e.prevObject=this,e.context=this.context,b==="find"?e.selector=this.selector+(this.selector?" ":"")+c:b&&(e.selector=this.selector+"."+b+"("+c+")");return e},each:function(a,b){return d.each(this,a,b)},ready:function(a){d.bindReady(),y.done(a);return this},eq:function(a){return a===-1?this.slice(a):this.slice(a,+a+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(E.apply(this,arguments),"slice",E.call(arguments).join(","))},map:function(a){return this.pushStack(d.map(this,function(b,c){return a.call(b,c,b)}))},end:function(){return this.prevObject||this.constructor(null)},push:D,sort:[].sort,splice:[].splice},d.fn.init.prototype=d.fn,d.extend=d.fn.extend=function(){var a,c,e,f,g,h,i=arguments[0]||{},j=1,k=arguments.length,l=!1;typeof i==="boolean"&&(l=i,i=arguments[1]||{},j=2),typeof i!=="object"&&!d.isFunction(i)&&(i={}),k===j&&(i=this,--j);for(;j0)return;y.resolveWith(c,[d]),d.fn.trigger&&d(c).trigger("ready").unbind("ready")}},bindReady:function(){if(!x){x=!0;if(c.readyState==="complete")return setTimeout(d.ready,1);if(c.addEventListener)c.addEventListener("DOMContentLoaded",A,!1),a.addEventListener("load",d.ready,!1);else if(c.attachEvent){c.attachEvent("onreadystatechange",A),a.attachEvent("onload",d.ready);var b=!1;try{b=a.frameElement==null}catch(e){}c.documentElement.doScroll&&b&&I()}}},isFunction:function(a){return d.type(a)==="function"},isArray:Array.isArray||function(a){return d.type(a)==="array"},isWindow:function(a){return a&&typeof a==="object"&&"setInterval"in a},isNaN:function(a){return a==null||!l.test(a)||isNaN(a)},type:function(a){return a==null?String(a):H[B.call(a)]||"object"},isPlainObject:function(a){if(!a||d.type(a)!=="object"||a.nodeType||d.isWindow(a))return!1;if(a.constructor&&!C.call(a,"constructor")&&!C.call(a.constructor.prototype,"isPrototypeOf"))return!1;var c;for(c in a){}return c===b||C.call(a,c)},isEmptyObject:function(a){for(var b in a)return!1;return!0},error:function(a){throw a},parseJSON:function(b){if(typeof b!=="string"||!b)return null;b=d.trim(b);if(n.test(b.replace(o,"@").replace(p,"]").replace(q,"")))return a.JSON&&a.JSON.parse?a.JSON.parse(b):(new Function("return "+b))();d.error("Invalid JSON: "+b)},parseXML:function(b,c,e){a.DOMParser?(e=new DOMParser,c=e.parseFromString(b,"text/xml")):(c=new ActiveXObject("Microsoft.XMLDOM"),c.async="false",c.loadXML(b)),e=c.documentElement,(!e||!e.nodeName||e.nodeName==="parsererror")&&d.error("Invalid XML: "+b);return c},noop:function(){},globalEval:function(a){if(a&&i.test(a)){var b=c.getElementsByTagName("head")[0]||c.documentElement,e=c.createElement("script");e.type="text/javascript",d.support.scriptEval()?e.appendChild(c.createTextNode(a)):e.text=a,b.insertBefore(e,b.firstChild),b.removeChild(e)}},nodeName:function(a,b){return a.nodeName&&a.nodeName.toUpperCase()===b.toUpperCase()},each:function(a,c,e){var f,g=0,h=a.length,i=h===b||d.isFunction(a);if(e){if(i){for(f in a)if(c.apply(a[f],e)===!1)break}else for(;g1?(g=Array(c),d.each(b,function(a,b){d.when(b).then(function(b){g[a]=arguments.length>1?E.call(arguments,0):b,--c||e.resolveWith(f,g)},e.reject)})):e!==a&&e.resolve(a);return f},uaMatch:function(a){a=a.toLowerCase();var b=r.exec(a)||s.exec(a)||t.exec(a)||a.indexOf("compatible")<0&&u.exec(a)||[];return{browser:b[1]||"",version:b[2]||"0"}},sub:function(){function a(b,c){return new a.fn.init(b,c)}d.extend(!0,a,this),a.superclass=this,a.fn=a.prototype=this(),a.fn.constructor=a,a.subclass=this.subclass,a.fn.init=function b(b,c){c&&c instanceof d&&!(c instanceof a)&&(c=a(c));return d.fn.init.call(this,b,c,e)},a.fn.init.prototype=a.fn;var e=a(c);return a},browser:{}}),y=d._Deferred(),d.each("Boolean Number String Function Array Date RegExp Object".split(" "),function(a,b){H["[object "+b+"]"]=b.toLowerCase()}),w=d.uaMatch(v),w.browser&&(d.browser[w.browser]=!0,d.browser.version=w.version),d.browser.webkit&&(d.browser.safari=!0),G&&(d.inArray=function(a,b){return G.call(b,a)}),i.test(" ")&&(j=/^[\s\xA0]+/,k=/[\s\xA0]+$/),g=d(c),c.addEventListener?A=function(){c.removeEventListener("DOMContentLoaded",A,!1),d.ready()}:c.attachEvent&&(A=function(){c.readyState==="complete"&&(c.detachEvent("onreadystatechange",A),d.ready())});return a.jQuery=a.$=d}();(function(){d.support={};var b=c.createElement("div");b.style.display="none",b.innerHTML="
a";var e=b.getElementsByTagName("*"),f=b.getElementsByTagName("a")[0],g=c.createElement("select"),h=g.appendChild(c.createElement("option"));if(e&&e.length&&f){d.support={leadingWhitespace:b.firstChild.nodeType===3,tbody:!b.getElementsByTagName("tbody").length,htmlSerialize:!!b.getElementsByTagName("link").length,style:/red/.test(f.getAttribute("style")),hrefNormalized:f.getAttribute("href")==="/a",opacity:/^0.55$/.test(f.style.opacity),cssFloat:!!f.style.cssFloat,checkOn:b.getElementsByTagName("input")[0].value==="on",optSelected:h.selected,deleteExpando:!0,optDisabled:!1,checkClone:!1,_scriptEval:null,noCloneEvent:!0,boxModel:null,inlineBlockNeedsLayout:!1,shrinkWrapBlocks:!1,reliableHiddenOffsets:!0},g.disabled=!0,d.support.optDisabled=!h.disabled,d.support.scriptEval=function(){if(d.support._scriptEval===null){var b=c.documentElement,e=c.createElement("script"),f="script"+d.now();e.type="text/javascript";try{e.appendChild(c.createTextNode("window."+f+"=1;"))}catch(g){}b.insertBefore(e,b.firstChild),a[f]?(d.support._scriptEval=!0,delete a[f]):d.support._scriptEval=!1,b.removeChild(e),b=e=f=null}return d.support._scriptEval};try{delete b.test}catch(i){d.support.deleteExpando=!1}b.attachEvent&&b.fireEvent&&(b.attachEvent("onclick",function j(){d.support.noCloneEvent=!1,b.detachEvent("onclick",j)}),b.cloneNode(!0).fireEvent("onclick")),b=c.createElement("div"),b.innerHTML="";var k=c.createDocumentFragment();k.appendChild(b.firstChild),d.support.checkClone=k.cloneNode(!0).cloneNode(!0).lastChild.checked,d(function(){var a=c.createElement("div"),b=c.getElementsByTagName("body")[0];if(b){a.style.width=a.style.paddingLeft="1px",b.appendChild(a),d.boxModel=d.support.boxModel=a.offsetWidth===2,"zoom"in a.style&&(a.style.display="inline",a.style.zoom=1,d.support.inlineBlockNeedsLayout=a.offsetWidth===2,a.style.display="",a.innerHTML="
",d.support.shrinkWrapBlocks=a.offsetWidth!==2),a.innerHTML="
t
";var e=a.getElementsByTagName("td");d.support.reliableHiddenOffsets=e[0].offsetHeight===0,e[0].style.display="",e[1].style.display="none",d.support.reliableHiddenOffsets=d.support.reliableHiddenOffsets&&e[0].offsetHeight===0,a.innerHTML="",b.removeChild(a).style.display="none",a=e=null}});var l=function(a){var b=c.createElement("div");a="on"+a;if(!b.attachEvent)return!0;var d=a in b;d||(b.setAttribute(a,"return;"),d=typeof b[a]==="function"),b=null;return d};d.support.submitBubbles=l("submit"),d.support.changeBubbles=l("change"),b=e=f=null}})();var e=/^(?:\{.*\}|\[.*\])$/;d.extend({cache:{},uuid:0,expando:"jQuery"+(d.fn.jquery+Math.random()).replace(/\D/g,""),noData:{embed:!0,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet:!0},hasData:function(a){a=a.nodeType?d.cache[a[d.expando]]:a[d.expando];return!!a&&!d.isEmptyObject(a)},data:function(a,c,e,f){if(d.acceptData(a)){var g=d.expando,h=typeof c==="string",i,j=a.nodeType,k=j?d.cache:a,l=j?a[d.expando]:a[d.expando]&&d.expando;if((!l||f&&l&&!k[l][g])&&h&&e===b)return;l||(j?a[d.expando]=l=++d.uuid:l=d.expando),k[l]||(k[l]={}),typeof c==="object"&&(f?k[l][g]=d.extend(k[l][g],c):k[l]=d.extend(k[l],c)),i=k[l],f&&(i[g]||(i[g]={}),i=i[g]),e!==b&&(i[c]=e);if(c==="events"&&!i[c])return i[g]&&i[g].events;return h?i[c]:i}},removeData:function(b,c,e){if(d.acceptData(b)){var f=d.expando,g=b.nodeType,h=g?d.cache:b,i=g?b[d.expando]:d.expando;if(!h[i])return;if(c){var j=e?h[i][f]:h[i];if(j){delete j[c];if(!d.isEmptyObject(j))return}}if(e){delete h[i][f];if(!d.isEmptyObject(h[i]))return}var k=h[i][f];d.support.deleteExpando||h!=a?delete h[i]:h[i]=null,k?(h[i]={},h[i][f]=k):g&&(d.support.deleteExpando?delete b[d.expando]:b.removeAttribute?b.removeAttribute(d.expando):b[d.expando]=null)}},_data:function(a,b,c){return d.data(a,b,c,!0)},acceptData:function(a){if(a.nodeName){var b=d.noData[a.nodeName.toLowerCase()];if(b)return b!==!0&&a.getAttribute("classid")===b}return!0}}),d.fn.extend({data:function(a,c){var e=null;if(typeof a==="undefined"){if(this.length){e=d.data(this[0]);if(this[0].nodeType===1){var g=this[0].attributes,h;for(var i=0,j=g.length;i-1)return!0;return!1},val:function(a){if(!arguments.length){var c=this[0];if(c){if(d.nodeName(c,"option")){var e=c.attributes.value;return!e||e.specified?c.value:c.text}if(d.nodeName(c,"select")){var f=c.selectedIndex,g=[],h=c.options,j=c.type==="select-one";if(f<0)return null;for(var k=j?f:0,l=j?f+1:h.length;k=0;else if(d.nodeName(this,"select")){var f=d.makeArray(e);d("option",this).each(function(){this.selected=d.inArray(d(this).val(),f)>=0}),f.length||(this.selectedIndex=-1)}else this.value=e}})}}),d.extend({attrFn:{val:!0,css:!0,html:!0,text:!0,data:!0,width:!0,height:!0,offset:!0},attr:function(a,c,e,f){if(!a||a.nodeType===3||a.nodeType===8||a.nodeType===2)return b;if(f&&c in d.attrFn)return d(a)[c](e);var g=a.nodeType!==1||!d.isXMLDoc(a),h=e!==b;c=g&&d.props[c]||c;if(a.nodeType===1){var i=j.test(c);if(c==="selected"&&!d.support.optSelected){var n=a.parentNode;n&&(n.selectedIndex,n.parentNode&&n.parentNode.selectedIndex)}if((c in a||a[c]!==b)&&g&&!i){h&&(c==="type"&&k.test(a.nodeName)&&a.parentNode&&d.error("type property can't be changed"),e===null?a.nodeType===1&&a.removeAttribute(c):a[c]=e);if(d.nodeName(a,"form")&&a.getAttributeNode(c))return a.getAttributeNode(c).nodeValue;if(c==="tabIndex"){var o=a.getAttributeNode("tabIndex");return o&&o.specified?o.value:l.test(a.nodeName)||m.test(a.nodeName)&&a.href?0:b}return a[c]}if(!d.support.style&&g&&c==="style"){h&&(a.style.cssText=""+e);return a.style.cssText}h&&a.setAttribute(c,""+e);if(!a.attributes[c]&&(a.hasAttribute&&!a.hasAttribute(c)))return b;var p=!d.support.hrefNormalized&&g&&i?a.getAttribute(c,2):a.getAttribute(c);return p===null?b:p}h&&(a[c]=e);return a[c]}});var o=/\.(.*)$/,p=/^(?:textarea|input|select)$/i,q=/\./g,r=/ /g,s=/[^\w\s.|`]/g,t=function(a){return a.replace(s,"\\$&")},u="events";d.event={add:function(c,e,f,g){if(c.nodeType!==3&&c.nodeType!==8){d.isWindow(c)&&(c!==a&&!c.frameElement)&&(c=a);if(f===!1)f=v;else if(!f)return;var h,i;f.handler&&(h=f,f=h.handler),f.guid||(f.guid=d.guid++);var j=d._data(c);if(!j)return;var k=j[u],l=j.handle;typeof k==="function"?(l=k.handle,k=k.events):k||(c.nodeType||(j[u]=j=function(){}),j.events=k={}),l||(j.handle=l=function(){return typeof d!=="undefined"&&!d.event.triggered?d.event.handle.apply(l.elem,arguments):b}),l.elem=c,e=e.split(" ");var m,n=0,o;while(m=e[n++]){i=h?d.extend({},h):{handler:f,data:g},m.indexOf(".")>-1?(o=m.split("."),m=o.shift(),i.namespace=o.slice(0).sort().join(".")):(o=[],i.namespace=""),i.type=m,i.guid||(i.guid=f.guid);var p=k[m],q=d.event.special[m]||{};if(!p){p=k[m]=[];if(!q.setup||q.setup.call(c,g,o,l)===!1)c.addEventListener?c.addEventListener(m,l,!1):c.attachEvent&&c.attachEvent("on"+m,l)}q.add&&(q.add.call(c,i),i.handler.guid||(i.handler.guid=f.guid)),p.push(i),d.event.global[m]=!0}c=null}},global:{},remove:function(a,c,e,f){if(a.nodeType!==3&&a.nodeType!==8){e===!1&&(e=v);var g,h,i,j,k=0,l,m,n,o,p,q,r,s=d.hasData(a)&&d._data(a),w=s&&s[u];if(!s||!w)return;typeof w==="function"&&(s=w,w=w.events),c&&c.type&&(e=c.handler,c=c.type);if(!c||typeof c==="string"&&c.charAt(0)==="."){c=c||"";for(h in w)d.event.remove(a,h+c);return}c=c.split(" ");while(h=c[k++]){r=h,q=null,l=h.indexOf(".")<0,m=[],l||(m=h.split("."),h=m.shift(),n=new RegExp("(^|\\.)"+d.map(m.slice(0).sort(),t).join("\\.(?:.*\\.)?")+"(\\.|$)")),p=w[h];if(!p)continue;if(!e){for(j=0;j=0&&(a.type=f=f.slice(0,-1),a.exclusive=!0),e||(a.stopPropagation(),d.event.global[f]&&d.each(d.cache,function(){var b=d.expando,e=this[b];e&&e.events&&e.events[f]&&d.event.trigger(a,c,e.handle.elem)}));if(!e||e.nodeType===3||e.nodeType===8)return b;a.result=b,a.target=e,c=d.makeArray(c),c.unshift(a)}a.currentTarget=e;var h=e.nodeType?d._data(e,"handle"):(d._data(e,u)||{}).handle;h&&h.apply(e,c);var i=e.parentNode||e.ownerDocument;try{e&&e.nodeName&&d.noData[e.nodeName.toLowerCase()]||e["on"+f]&&e["on"+f].apply(e,c)===!1&&(a.result=!1,a.preventDefault())}catch(j){}if(!a.isPropagationStopped()&&i)d.event.trigger(a,c,i,!0);else if(!a.isDefaultPrevented()){var k,l=a.target,m=f.replace(o,""),n=d.nodeName(l,"a")&&m==="click",p=d.event.special[m]||{};if((!p._default||p._default.call(e,a)===!1)&&!n&&!(l&&l.nodeName&&d.noData[l.nodeName.toLowerCase()])){try{l[m]&&(k=l["on"+m],k&&(l["on"+m]=null),d.event.triggered=!0,l[m]())}catch(q){}k&&(l["on"+m]=k),d.event.triggered=!1}}},handle:function(c){var e,f,g,h,i,j=[],k=d.makeArray(arguments);c=k[0]=d.event.fix(c||a.event),c.currentTarget=this,e=c.type.indexOf(".")<0&&!c.exclusive,e||(g=c.type.split("."),c.type=g.shift(),j=g.slice(0).sort(),h=new RegExp("(^|\\.)"+j.join("\\.(?:.*\\.)?")+"(\\.|$)")),c.namespace=c.namespace||j.join("."),i=d._data(this,u),typeof i==="function"&&(i=i.events),f=(i||{})[c.type];if(i&&f){f=f.slice(0);for(var l=0,m=f.length;l-1?d.map(a.options,function(a){return a.selected}).join("-"):"":a.nodeName.toLowerCase()==="select"&&(c=a.selectedIndex);return c},B=function B(a){var c=a.target,e,f;if(p.test(c.nodeName)&&!c.readOnly){e=d._data(c,"_change_data"),f=A(c),(a.type!=="focusout"||c.type!=="radio")&&d._data(c,"_change_data",f);if(e===b||f===e)return;if(e!=null||f){a.type="change",a.liveFired=b;return d.event.trigger(a,arguments[1],c)}}};d.event.special.change={filters:{focusout:B,beforedeactivate:B,click:function(a){var b=a.target,c=b.type;if(c==="radio"||c==="checkbox"||b.nodeName.toLowerCase()==="select")return B.call(this,a)},keydown:function(a){var b=a.target,c=b.type;if(a.keyCode===13&&b.nodeName.toLowerCase()!=="textarea"||a.keyCode===32&&(c==="checkbox"||c==="radio")||c==="select-multiple")return B.call(this,a)},beforeactivate:function(a){var b=a.target;d._data(b,"_change_data",A(b))}},setup:function(a,b){if(this.type==="file")return!1;for(var c in z)d.event.add(this,c+".specialChange",z[c]);return p.test(this.nodeName)},teardown:function(a){d.event.remove(this,".specialChange");return p.test(this.nodeName)}},z=d.event.special.change.filters,z.focus=z.beforeactivate}c.addEventListener&&d.each({focus:"focusin",blur:"focusout"},function(a,b){function c(a){a=d.event.fix(a),a.type=b;return d.event.handle.call(this,a)}d.event.special[b]={setup:function(){this.addEventListener(a,c,!0)},teardown:function(){this.removeEventListener(a,c,!0)}}}),d.each(["bind","one"],function(a,c){d.fn[c]=function(a,e,f){if(typeof a==="object"){for(var g in a)this[c](g,e,a[g],f);return this}if(d.isFunction(e)||e===!1)f=e,e=b;var h=c==="one"?d.proxy(f,function(a){d(this).unbind(a,h);return f.apply(this,arguments)}):f;if(a==="unload"&&c!=="one")this.one(a,e,f);else for(var i=0,j=this.length;i0?this.bind(b,a,c):this.trigger(b)},d.attrFn&&(d.attrFn[b]=!0)}),function(){function s(a,b,c,d,e,f){for(var g=0,h=d.length;g0){k=j;break}}j=j[a]}d[g]=k}}}function r(a,b,c,d,e,f){for(var g=0,h=d.length;g+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,e=0,f=Object.prototype.toString,g=!1,h=!0;[0,0].sort(function(){h=!1;return 0});var i=function(b,d,e,g){e=e||[],d=d||c;var h=d;if(d.nodeType!==1&&d.nodeType!==9)return[];if(!b||typeof b!=="string")return e;var l,m,o,p,q,r,s,u,v=!0,w=i.isXML(d),x=[],y=b;do{a.exec(""),l=a.exec(y);if(l){y=l[3],x.push(l[1]);if(l[2]){p=l[3];break}}}while(l);if(x.length>1&&k.exec(b))if(x.length===2&&j.relative[x[0]])m=t(x[0]+x[1],d);else{m=j.relative[x[0]]?[d]:i(x.shift(),d);while(x.length)b=x.shift(),j.relative[b]&&(b+=x.shift()),m=t(b,m)}else{!g&&x.length>1&&d.nodeType===9&&!w&&j.match.ID.test(x[0])&&!j.match.ID.test(x[x.length-1])&&(q=i.find(x.shift(),d,w),d=q.expr?i.filter(q.expr,q.set)[0]:q.set[0]);if(d){q=g?{expr:x.pop(),set:n(g)}:i.find(x.pop(),x.length===1&&(x[0]==="~"||x[0]==="+")&&d.parentNode?d.parentNode:d,w),m=q.expr?i.filter(q.expr,q.set):q.set,x.length>0?o=n(m):v=!1;while(x.length)r=x.pop(),s=r,j.relative[r]?s=x.pop():r="",s==null&&(s=d),j.relative[r](o,s,w)}else o=x=[]}o||(o=m),o||i.error(r||b);if(f.call(o)==="[object Array]")if(v)if(d&&d.nodeType===1)for(u=0;o[u]!=null;u++)o[u]&&(o[u]===!0||o[u].nodeType===1&&i.contains(d,o[u]))&&e.push(m[u]);else for(u=0;o[u]!=null;u++)o[u]&&o[u].nodeType===1&&e.push(m[u]);else e.push.apply(e,o);else n(o,e);p&&(i(p,h,e,g),i.uniqueSort(e));return e};i.uniqueSort=function(a){if(p){g=h,a.sort(p);if(g)for(var b=1;b0},i.find=function(a,b,c){var d;if(!a)return[];for(var e=0,f=j.order.length;e":function(a,b){var c,d=typeof b==="string",e=0,f=a.length;if(d&&!/\W/.test(b)){b=b.toLowerCase();for(;e=0)?c||d.push(h):c&&(b[g]=!1));return!1},ID:function(a){return a[1].replace(/\\/g,"")},TAG:function(a,b){return a[1].toLowerCase()},CHILD:function(a){if(a[1]==="nth"){a[2]||i.error(a[0]),a[2]=a[2].replace(/^\+|\s*/g,"");var b=/(-?)(\d*)(?:n([+\-]?\d*))?/.exec(a[2]==="even"&&"2n"||a[2]==="odd"&&"2n+1"||!/\D/.test(a[2])&&"0n+"+a[2]||a[2]);a[2]=b[1]+(b[2]||1)-0,a[3]=b[3]-0}else a[2]&&i.error(a[0]);a[0]=e++;return a},ATTR:function(a,b,c,d,e,f){var g=a[1]=a[1].replace(/\\/g,"");!f&&j.attrMap[g]&&(a[1]=j.attrMap[g]),a[4]=(a[4]||a[5]||"").replace(/\\/g,""),a[2]==="~="&&(a[4]=" "+a[4]+" ");return a},PSEUDO:function(b,c,d,e,f){if(b[1]==="not")if((a.exec(b[3])||"").length>1||/^\w/.test(b[3]))b[3]=i(b[3],null,null,c);else{var g=i.filter(b[3],c,d,!0^f);d||e.push.apply(e,g);return!1}else if(j.match.POS.test(b[0])||j.match.CHILD.test(b[0]))return!0;return b},POS:function(a){a.unshift(!0);return a}},filters:{enabled:function(a){return a.disabled===!1&&a.type!=="hidden"},disabled:function(a){return a.disabled===!0},checked:function(a){return a.checked===!0},selected:function(a){a.parentNode.selectedIndex;return a.selected===!0},parent:function(a){return!!a.firstChild},empty:function(a){return!a.firstChild},has:function(a,b,c){return!!i(c[3],a).length},header:function(a){return/h\d/i.test(a.nodeName)},text:function(a){return"text"===a.type},radio:function(a){return"radio"===a.type},checkbox:function(a){return"checkbox"===a.type},file:function(a){return"file"===a.type},password:function(a){return"password"===a.type},submit:function(a){return"submit"===a.type},image:function(a){return"image"===a.type},reset:function(a){return"reset"===a.type},button:function(a){return"button"===a.type||a.nodeName.toLowerCase()==="button"},input:function(a){return/input|select|textarea|button/i.test(a.nodeName)}},setFilters:{first:function(a,b){return b===0},last:function(a,b,c,d){return b===d.length-1},even:function(a,b){return b%2===0},odd:function(a,b){return b%2===1},lt:function(a,b,c){return bc[3]-0},nth:function(a,b,c){return c[3]-0===b},eq:function(a,b,c){return c[3]-0===b}},filter:{PSEUDO:function(a,b,c,d){var e=b[1],f=j.filters[e];if(f)return f(a,c,b,d);if(e==="contains")return(a.textContent||a.innerText||i.getText([a])||"").indexOf(b[3])>=0;if(e==="not"){var g=b[3];for(var h=0,k=g.length;h=0}},ID:function(a,b){return a.nodeType===1&&a.getAttribute("id")===b},TAG:function(a,b){return b==="*"&&a.nodeType===1||a.nodeName.toLowerCase()===b},CLASS:function(a,b){return(" "+(a.className||a.getAttribute("class"))+" ").indexOf(b)>-1},ATTR:function(a,b){var c=b[1],d=j.attrHandle[c]?j.attrHandle[c](a):a[c]!=null?a[c]:a.getAttribute(c),e=d+"",f=b[2],g=b[4];return d==null?f==="!=":f==="="?e===g:f==="*="?e.indexOf(g)>=0:f==="~="?(" "+e+" ").indexOf(g)>=0:g?f==="!="?e!==g:f==="^="?e.indexOf(g)===0:f==="$="?e.substr(e.length-g.length)===g:f==="|="?e===g||e.substr(0,g.length+1)===g+"-":!1:e&&d!==!1},POS:function(a,b,c,d){var e=b[2],f=j.setFilters[e];if(f)return f(a,c,b,d)}}},k=j.match.POS,l=function(a,b){return"\\"+(b-0+1)};for(var m in j.match)j.match[m]=new RegExp(j.match[m].source+/(?![^\[]*\])(?![^\(]*\))/.source),j.leftMatch[m]=new RegExp(/(^(?:.|\r|\n)*?)/.source+j.match[m].source.replace(/\\(\d+)/g,l));var n=function(a,b){a=Array.prototype.slice.call(a,0);if(b){b.push.apply(b,a);return b}return a};try{Array.prototype.slice.call(c.documentElement.childNodes,0)[0].nodeType}catch(o){n=function(a,b){var c=0,d=b||[];if(f.call(a)==="[object Array]")Array.prototype.push.apply(d,a);else if(typeof a.length==="number")for(var e=a.length;c",e.insertBefore(a,e.firstChild),c.getElementById(d)&&(j.find.ID=function(a,c,d){if(typeof c.getElementById!=="undefined"&&!d){var e=c.getElementById(a[1]);return e?e.id===a[1]||typeof e.getAttributeNode!=="undefined"&&e.getAttributeNode("id").nodeValue===a[1]?[e]:b:[]}},j.filter.ID=function(a,b){var c=typeof a.getAttributeNode!=="undefined"&&a.getAttributeNode("id");return a.nodeType===1&&c&&c.nodeValue===b}),e.removeChild(a),e=a=null}(),function(){var a=c.createElement("div");a.appendChild(c.createComment("")),a.getElementsByTagName("*").length>0&&(j.find.TAG=function(a,b){var c=b.getElementsByTagName(a[1]);if(a[1]==="*"){var d=[];for(var e=0;c[e];e++)c[e].nodeType===1&&d.push(c[e]);c=d}return c}),a.innerHTML="",a.firstChild&&typeof a.firstChild.getAttribute!=="undefined"&&a.firstChild.getAttribute("href")!=="#"&&(j.attrHandle.href=function(a){return a.getAttribute("href",2)}),a=null}(),c.querySelectorAll&&function(){var a=i,b=c.createElement("div"),d="__sizzle__";b.innerHTML="

";if(!b.querySelectorAll||b.querySelectorAll(".TEST").length!==0){i=function(b,e,f,g){e=e||c;if(!g&&!i.isXML(e)){var h=/^(\w+$)|^\.([\w\-]+$)|^#([\w\-]+$)/.exec(b);if(h&&(e.nodeType===1||e.nodeType===9)){if(h[1])return n(e.getElementsByTagName(b),f);if(h[2]&&j.find.CLASS&&e.getElementsByClassName)return n(e.getElementsByClassName(h[2]),f)}if(e.nodeType===9){if(b==="body"&&e.body)return n([e.body],f);if(h&&h[3]){var k=e.getElementById(h[3]);if(!k||!k.parentNode)return n([],f);if(k.id===h[3])return n([k],f)}try{return n(e.querySelectorAll(b),f)}catch(l){}}else if(e.nodeType===1&&e.nodeName.toLowerCase()!=="object"){var m=e.getAttribute("id"),o=m||d,p=e.parentNode,q=/^\s*[+~]/.test(b);m?o=o.replace(/'/g,"\\$&"):e.setAttribute("id",o),q&&p&&(e=e.parentNode);try{if(!q||p)return n(e.querySelectorAll("[id='"+o+"'] "+b),f)}catch(r){}finally{m||e.removeAttribute("id")}}}return a(b,e,f,g)};for(var e in a)i[e]=a[e];b=null}}(),function(){var a=c.documentElement,b=a.matchesSelector||a.mozMatchesSelector||a.webkitMatchesSelector||a.msMatchesSelector,d=!1;try{b.call(c.documentElement,"[test!='']:sizzle")}catch(e){d=!0}b&&(i.matchesSelector=function(a,c){c=c.replace(/\=\s*([^'"\]]*)\s*\]/g,"='$1']");if(!i.isXML(a))try{if(d||!j.match.PSEUDO.test(c)&&!/!=/.test(c))return b.call(a,c)}catch(e){}return i(c,null,null,[a]).length>0})}(),function(){var a=c.createElement("div");a.innerHTML="
";if(a.getElementsByClassName&&a.getElementsByClassName("e").length!==0){a.lastChild.className="e";if(a.getElementsByClassName("e").length===1)return;j.order.splice(1,0,"CLASS"),j.find.CLASS=function(a,b,c){if(typeof b.getElementsByClassName!=="undefined"&&!c)return b.getElementsByClassName(a[1])},a=null}}(),c.documentElement.contains?i.contains=function(a,b){return a!==b&&(a.contains?a.contains(b):!0)}:c.documentElement.compareDocumentPosition?i.contains=function(a,b){return!!(a.compareDocumentPosition(b)&16)}:i.contains=function(){return!1},i.isXML=function(a){var b=(a?a.ownerDocument||a:0).documentElement;return b?b.nodeName!=="HTML":!1};var t=function(a,b){var c,d=[],e="",f=b.nodeType?[b]:b;while(c=j.match.PSEUDO.exec(a))e+=c[0],a=a.replace(j.match.PSEUDO,"");a=j.relative[a]?a+"*":a;for(var g=0,h=f.length;g0)for(var g=c;g0},closest:function(a,b){var c=[],e,f,g=this[0];if(d.isArray(a)){var h,i,j={},k=1;if(g&&a.length){for(e=0,f=a.length;e-1:d(g).is(h))&&c.push({selector:i,elem:g,level:k});g=g.parentNode,k++}}return c}var l=L.test(a)?d(a,b||this.context):null;for(e=0,f=this.length;e-1:d.find.matchesSelector(g,a)){c.push(g);break}g=g.parentNode;if(!g||!g.ownerDocument||g===b)break}}c=c.length>1?d.unique(c):c;return this.pushStack(c,"closest",a)},index:function(a){if(!a||typeof a==="string")return d.inArray(this[0],a?d(a):this.parent().children());return d.inArray(a.jquery?a[0]:a,this)},add:function(a,b){var c=typeof a==="string"?d(a,b):d.makeArray(a),e=d.merge(this.get(),c);return this.pushStack(N(c[0])||N(e[0])?e:d.unique(e))},andSelf:function(){return this.add(this.prevObject)}}),d.each({parent:function(a){var b=a.parentNode;return b&&b.nodeType!==11?b:null},parents:function(a){return d.dir(a,"parentNode")},parentsUntil:function(a,b,c){return d.dir(a,"parentNode",c)},next:function(a){return d.nth(a,2,"nextSibling")},prev:function(a){return d.nth(a,2,"previousSibling")},nextAll:function(a){return d.dir(a,"nextSibling")},prevAll:function(a){return d.dir(a,"previousSibling")},nextUntil:function(a,b,c){return d.dir(a,"nextSibling",c)},prevUntil:function(a,b,c){return d.dir(a,"previousSibling",c)},siblings:function(a){return d.sibling(a.parentNode.firstChild,a)},children:function(a){return d.sibling(a.firstChild)},contents:function(a){return d.nodeName(a,"iframe")?a.contentDocument||a.contentWindow.document:d.makeArray(a.childNodes)}},function(a,b){d.fn[a]=function(c,e){var f=d.map(this,b,c),g=K.call(arguments);G.test(a)||(e=c),e&&typeof e==="string"&&(f=d.filter(e,f)),f=this.length>1&&!M[a]?d.unique(f):f,(this.length>1||I.test(e))&&H.test(a)&&(f=f.reverse());return this.pushStack(f,a,g.join(","))}}),d.extend({filter:function(a,b,c){c&&(a=":not("+a+")");return b.length===1?d.find.matchesSelector(b[0],a)?[b[0]]:[]:d.find.matches(a,b)},dir:function(a,c,e){var f=[],g=a[c];while(g&&g.nodeType!==9&&(e===b||g.nodeType!==1||!d(g).is(e)))g.nodeType===1&&f.push(g),g=g[c];return f},nth:function(a,b,c,d){b=b||1;var e=0;for(;a;a=a[c])if(a.nodeType===1&&++e===b)break;return a},sibling:function(a,b){var c=[];for(;a;a=a.nextSibling)a.nodeType===1&&a!==b&&c.push(a);return c}});var P=/ jQuery\d+="(?:\d+|null)"/g,Q=/^\s+/,R=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/ig,S=/<([\w:]+)/,T=/",""],legend:[1,"
","
"],thead:[1,"","
"],tr:[2,"","
"],td:[3,"","
"],col:[2,"","
"],area:[1,"",""],_default:[0,"",""]};X.optgroup=X.option,X.tbody=X.tfoot=X.colgroup=X.caption=X.thead,X.th=X.td,d.support.htmlSerialize||(X._default=[1,"div
","
"]),d.fn.extend({text:function(a){if(d.isFunction(a))return this.each(function(b){var c=d(this);c.text(a.call(this,b,c.text()))});if(typeof a!=="object"&&a!==b)return this.empty().append((this[0]&&this[0].ownerDocument||c).createTextNode(a));return d.text(this)},wrapAll:function(a){if(d.isFunction(a))return this.each(function(b){d(this).wrapAll(a.call(this,b))});if(this[0]){var b=d(a,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&b.insertBefore(this[0]),b.map(function(){var a=this;while(a.firstChild&&a.firstChild.nodeType===1)a=a.firstChild;return a}).append(this)}return this},wrapInner:function(a){if(d.isFunction(a))return this.each(function(b){d(this).wrapInner(a.call(this,b))});return this.each(function(){var b=d(this),c=b.contents();c.length?c.wrapAll(a):b.append(a)})},wrap:function(a){return this.each(function(){d(this).wrapAll(a)})},unwrap:function(){return this.parent().each(function(){d.nodeName(this,"body")||d(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,!0,function(a){this.nodeType===1&&this.appendChild(a)})},prepend:function(){return this.domManip(arguments,!0,function(a){this.nodeType===1&&this.insertBefore(a,this.firstChild)})},before:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,!1,function(a){this.parentNode.insertBefore(a,this)});if(arguments.length){var a=d(arguments[0]);a.push.apply(a,this.toArray());return this.pushStack(a,"before",arguments)}},after:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,!1,function(a){this.parentNode.insertBefore(a,this.nextSibling)});if(arguments.length){var a=this.pushStack(this,"after",arguments);a.push.apply(a,d(arguments[0]).toArray());return a}},remove:function(a,b){for(var c=0,e;(e=this[c])!=null;c++)if(!a||d.filter(a,[e]).length)!b&&e.nodeType===1&&(d.cleanData(e.getElementsByTagName("*")),d.cleanData([e])),e.parentNode&&e.parentNode.removeChild(e);return this},empty:function(){for(var a=0,b;(b=this[a])!=null;a++){b.nodeType===1&&d.cleanData(b.getElementsByTagName("*"));while(b.firstChild)b.removeChild(b.firstChild)}return this},clone:function(a,b){a=a==null?!0:a,b=b==null?a:b;return this.map(function(){return d.clone(this,a,b)})},html:function(a){if(a===b)return this[0]&&this[0].nodeType===1?this[0].innerHTML.replace(P,""):null;if(typeof a!=="string"||V.test(a)||!d.support.leadingWhitespace&&Q.test(a)||X[(S.exec(a)||["",""])[1].toLowerCase()])d.isFunction(a)?this.each(function(b){var c=d(this);c.html(a.call(this,b,c.html()))}):this.empty().append(a);else{a=a.replace(R,"<$1>");try{for(var c=0,e=this.length;c1&&l0?this.clone(!0):this).get();d(f[h])[b](j),e=e.concat(j)}return this.pushStack(e,a,f.selector)}}),d.extend({clone:function(a,b,c){var e=a.cloneNode(!0),f,g,h;if(!d.support.noCloneEvent&&(a.nodeType===1||a.nodeType===11)&&!d.isXMLDoc(a)){f=a.getElementsByTagName("*"),g=e.getElementsByTagName("*");for(h=0;f[h];++h)$(f[h],g[h]);$(a,e)}if(b){Z(a,e);if(c&&"getElementsByTagName"in a){f=a.getElementsByTagName("*"),g=e.getElementsByTagName("*");if(f.length)for(h=0;f[h];++h)Z(f[h],g[h])}}return e},clean:function(a,b,e,f){b=b||c,typeof b.createElement==="undefined"&&(b=b.ownerDocument||b[0]&&b[0].ownerDocument||c);var g=[];for(var h=0,i;(i=a[h])!=null;h++){typeof i==="number"&&(i+="");if(!i)continue;if(typeof i!=="string"||U.test(i)){if(typeof i==="string"){i=i.replace(R,"<$1>");var j=(S.exec(i)||["",""])[1].toLowerCase(),k=X[j]||X._default,l=k[0],m=b.createElement("div");m.innerHTML=k[1]+i+k[2];while(l--)m=m.lastChild;if(!d.support.tbody){var n=T.test(i),o=j==="table"&&!n?m.firstChild&&m.firstChild.childNodes:k[1]===""&&!n?m.childNodes:[];for(var p=o.length-1;p>=0;--p)d.nodeName(o[p],"tbody")&&!o[p].childNodes.length&&o[p].parentNode.removeChild(o[p])}!d.support.leadingWhitespace&&Q.test(i)&&m.insertBefore(b.createTextNode(Q.exec(i)[0]),m.firstChild),i=m.childNodes}}else i=b.createTextNode(i);i.nodeType?g.push(i):g=d.merge(g,i)}if(e)for(h=0;g[h];h++)!f||!d.nodeName(g[h],"script")||g[h].type&&g[h].type.toLowerCase()!=="text/javascript"?(g[h].nodeType===1&&g.splice.apply(g,[h+1,0].concat(d.makeArray(g[h].getElementsByTagName("script")))),e.appendChild(g[h])):f.push(g[h].parentNode?g[h].parentNode.removeChild(g[h]):g[h]);return g},cleanData:function(a){var b,c,e=d.cache,f=d.expando,g=d.event.special,h=d.support.deleteExpando;for(var i=0,j;(j=a[i])!=null;i++){if(j.nodeName&&d.noData[j.nodeName.toLowerCase()])continue;c=j[d.expando];if(c){b=e[c]&&e[c][f];if(b&&b.events){for(var k in b.events)g[k]?d.event.remove(j,k):d.removeEvent(j,k,b.handle);b.handle&&(b.handle.elem=null)}h?delete j[d.expando]:j.removeAttribute&&j.removeAttribute(d.expando),delete e[c]}}}});var ba=/alpha\([^)]*\)/i,bb=/opacity=([^)]*)/,bc=/-([a-z])/ig,bd=/([A-Z])/g,be=/^-?\d+(?:px)?$/i,bf=/^-?\d/,bg={position:"absolute",visibility:"hidden",display:"block"},bh=["Left","Right"],bi=["Top","Bottom"],bj,bk,bl,bm=function(a,b){return b.toUpperCase()};d.fn.css=function(a,c){if(arguments.length===2&&c===b)return this;return d.access(this,a,c,!0,function(a,c,e){return e!==b?d.style(a,c,e):d.css(a,c)})},d.extend({cssHooks:{opacity:{get:function(a,b){if(b){var c=bj(a,"opacity","opacity");return c===""?"1":c}return a.style.opacity}}},cssNumber:{zIndex:!0,fontWeight:!0,opacity:!0,zoom:!0,lineHeight:!0},cssProps:{"float":d.support.cssFloat?"cssFloat":"styleFloat"},style:function(a,c,e,f){if(a&&a.nodeType!==3&&a.nodeType!==8&&a.style){var g,h=d.camelCase(c),i=a.style,j=d.cssHooks[h];c=d.cssProps[h]||h;if(e===b){if(j&&"get"in j&&(g=j.get(a,!1,f))!==b)return g;return i[c]}if(typeof e==="number"&&isNaN(e)||e==null)return;typeof e==="number"&&!d.cssNumber[h]&&(e+="px");if(!j||!("set"in j)||(e=j.set(a,e))!==b)try{i[c]=e}catch(k){}}},css:function(a,c,e){var f,g=d.camelCase(c),h=d.cssHooks[g];c=d.cssProps[g]||g;if(h&&"get"in h&&(f=h.get(a,!0,e))!==b)return f;if(bj)return bj(a,c,g)},swap:function(a,b,c){var d={};for(var e in b)d[e]=a.style[e],a.style[e]=b[e];c.call(a);for(e in b)a.style[e]=d[e]},camelCase:function(a){return a.replace(bc,bm)}}),d.curCSS=d.css,d.each(["height","width"],function(a,b){d.cssHooks[b]={get:function(a,c,e){var f;if(c){a.offsetWidth!==0?f=bn(a,b,e):d.swap(a,bg,function(){f=bn(a,b,e)});if(f<=0){f=bj(a,b,b),f==="0px"&&bl&&(f=bl(a,b,b));if(f!=null)return f===""||f==="auto"?"0px":f}if(f<0||f==null){f=a.style[b];return f===""||f==="auto"?"0px":f}return typeof f==="string"?f:f+"px"}},set:function(a,b){if(!be.test(b))return b;b=parseFloat(b);if(b>=0)return b+"px"}}}),d.support.opacity||(d.cssHooks.opacity={get:function(a,b){return bb.test((b&&a.currentStyle?a.currentStyle.filter:a.style.filter)||"")?parseFloat(RegExp.$1)/100+"":b?"1":""},set:function(a,b){var c=a.style;c.zoom=1;var e=d.isNaN(b)?"":"alpha(opacity="+b*100+")",f=c.filter||"";c.filter=ba.test(f)?f.replace(ba,e):c.filter+" "+e}}),c.defaultView&&c.defaultView.getComputedStyle&&(bk=function(a,c,e){var f,g,h;e=e.replace(bd,"-$1").toLowerCase();if(!(g=a.ownerDocument.defaultView))return b;if(h=g.getComputedStyle(a,null))f=h.getPropertyValue(e),f===""&&!d.contains(a.ownerDocument.documentElement,a)&&(f=d.style(a,e));return f}),c.documentElement.currentStyle&&(bl=function(a,b){var c,d=a.currentStyle&&a.currentStyle[b],e=a.runtimeStyle&&a.runtimeStyle[b],f=a.style;!be.test(d)&&bf.test(d)&&(c=f.left,e&&(a.runtimeStyle.left=a.currentStyle.left),f.left=b==="fontSize"?"1em":d||0,d=f.pixelLeft+"px",f.left=c,e&&(a.runtimeStyle.left=e));return d===""?"auto":d}),bj=bk||bl,d.expr&&d.expr.filters&&(d.expr.filters.hidden=function(a){var b=a.offsetWidth,c=a.offsetHeight;return b===0&&c===0||!d.support.reliableHiddenOffsets&&(a.style.display||d.css(a,"display"))==="none"},d.expr.filters.visible=function(a){return!d.expr.filters.hidden(a)});var bo=/%20/g,bp=/\[\]$/,bq=/\r?\n/g,br=/#.*$/,bs=/^(.*?):\s*(.*?)\r?$/mg,bt=/^(?:color|date|datetime|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i,bu=/^(?:GET|HEAD)$/,bv=/^\/\//,bw=/\?/,bx=/)<[^<]*)*<\/script>/gi,by=/^(?:select|textarea)/i,bz=/\s+/,bA=/([?&])_=[^&]*/,bB=/^(\w+:)\/\/([^\/?#:]+)(?::(\d+))?/,bC=d.fn.load,bD={},bE={};d.fn.extend({load:function(a,b,c){if(typeof a!=="string"&&bC)return bC.apply(this,arguments);if(!this.length)return this;var e=a.indexOf(" ");if(e>=0){var f=a.slice(e,a.length);a=a.slice(0,e)}var g="GET";b&&(d.isFunction(b)?(c=b,b=null):typeof b==="object"&&(b=d.param(b,d.ajaxSettings.traditional),g="POST"));var h=this;d.ajax({url:a,type:g,dataType:"html",data:b,complete:function(a,b,e){e=a.responseText,a.isResolved()&&(a.done(function(a){e=a}),h.html(f?d("
").append(e.replace(bx,"")).find(f):e)),c&&h.each(c,[e,b,a])}});return this},serialize:function(){return d.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?d.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||by.test(this.nodeName)||bt.test(this.type))}).map(function(a,b){var c=d(this).val();return c==null?null:d.isArray(c)?d.map(c,function(a,c){return{name:b.name,value:a.replace(bq,"\r\n")}}):{name:b.name,value:c.replace(bq,"\r\n")}}).get()}}),d.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "),function(a,b){d.fn[b]=function(a){return this.bind(b,a)}}),d.each(["get","post"],function(a,b){d[b]=function(a,c,e,f){d.isFunction(c)&&(f=f||e,e=c,c=null);return d.ajax({type:b,url:a,data:c,success:e,dataType:f})}}),d.extend({getScript:function(a,b){return d.get(a,null,b,"script")},getJSON:function(a,b,c){return d.get(a,b,c,"json")},ajaxSetup:function(a){d.extend(!0,d.ajaxSettings,a),a.context&&(d.ajaxSettings.context=a.context)},ajaxSettings:{url:location.href,global:!0,type:"GET",contentType:"application/x-www-form-urlencoded",processData:!0,async:!0,accepts:{xml:"application/xml, text/xml",html:"text/html",text:"text/plain",json:"application/json, text/javascript","*":"*/*"},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText"},converters:{"* text":a.String,"text html":!0,"text json":d.parseJSON,"text xml":d.parseXML}},ajaxPrefilter:bF(bD),ajaxTransport:bF(bE),ajax:function(a,e){function w(a,c,e,l){if(t!==2){t=2,p&&clearTimeout(p),o=b,m=l||"",v.readyState=a?4:0;var n,q,r,s=e?bI(f,v,e):b,u,w;if(a>=200&&a<300||a===304){if(f.ifModified){if(u=v.getResponseHeader("Last-Modified"))d.lastModified[f.url]=u;if(w=v.getResponseHeader("Etag"))d.etag[f.url]=w}if(a===304)c="notmodified",n=!0;else try{q=bJ(f,s),c="success",n=!0}catch(x){c="parsererror",r=x}}else r=c,a&&(c="error",a<0&&(a=0));v.status=a,v.statusText=c,n?i.resolveWith(g,[q,c,v]):i.rejectWith(g,[v,c,r]),v.statusCode(k),k=b,f.global&&h.trigger("ajax"+(n?"Success":"Error"),[v,f,n?q:r]),j.resolveWith(g,[v,c]),f.global&&(h.trigger("ajaxComplete",[v,f]),--d.active||d.event.trigger("ajaxStop"))}}typeof e!=="object"&&(e=a,a=b),e=e||{};var f=d.extend(!0,{},d.ajaxSettings,e),g=(f.context=("context"in e?e:d.ajaxSettings).context)||f,h=g===f?d.event:d(g),i=d.Deferred(),j=d._Deferred(),k=f.statusCode||{},l={},m,n,o,p,q=c.location,r=q.protocol||"http:",s,t=0,u,v={readyState:0,setRequestHeader:function(a,b){t===0&&(l[a.toLowerCase()]=b);return this},getAllResponseHeaders:function(){return t===2?m:null},getResponseHeader:function(a){var b;if(t===2){if(!n){n={};while(b=bs.exec(m))n[b[1].toLowerCase()]=b[2]}b=n[a.toLowerCase()]}return b||null},abort:function(a){a=a||"abort",o&&o.abort(a),w(0,a);return this}};i.promise(v),v.success=v.done,v.error=v.fail,v.complete=j.done,v.statusCode=function(a){if(a){var b;if(t<2)for(b in a)k[b]=[k[b],a[b]];else b=a[v.status],v.then(b,b)}return this},f.url=(""+(a||f.url)).replace(br,"").replace(bv,r+"//"),f.dataTypes=d.trim(f.dataType||"*").toLowerCase().split(bz),f.crossDomain||(s=bB.exec(f.url.toLowerCase()),f.crossDomain=s&&(s[1]!=r||s[2]!=q.hostname||(s[3]||(s[1]==="http:"?80:443))!=(q.port||(r==="http:"?80:443)))),f.data&&f.processData&&typeof f.data!=="string"&&(f.data=d.param(f.data,f.traditional)),bG(bD,f,e,v),f.type=f.type.toUpperCase(),f.hasContent=!bu.test(f.type),f.global&&d.active++===0&&d.event.trigger("ajaxStart");if(!f.hasContent){f.data&&(f.url+=(bw.test(f.url)?"&":"?")+f.data);if(f.cache===!1){var x=d.now(),y=f.url.replace(bA,"$1_="+x);f.url=y+(y===f.url?(bw.test(f.url)?"&":"?")+"_="+x:"")}}if(f.data&&f.hasContent&&f.contentType!==!1||e.contentType)l["content-type"]=f.contentType;f.ifModified&&(d.lastModified[f.url]&&(l["if-modified-since"]=d.lastModified[f.url]),d.etag[f.url]&&(l["if-none-match"]=d.etag[f.url])),l.accept=f.dataTypes[0]&&f.accepts[f.dataTypes[0]]?f.accepts[f.dataTypes[0]]+(f.dataTypes[0]!=="*"?", */*; q=0.01":""):f.accepts["*"];for(u in f.headers)l[u.toLowerCase()]=f.headers[u];if(!f.beforeSend||f.beforeSend.call(g,v,f)!==!1&&t!==2){for(u in {success:1,error:1,complete:1})v[u](f[u]);o=bG(bE,f,e,v);if(o){t=v.readyState=1,f.global&&h.trigger("ajaxSend",[v,f]),f.async&&f.timeout>0&&(p=setTimeout(function(){v.abort("timeout")},f.timeout));try{o.send(l,w)}catch(z){status<2?w(-1,z):d.error(z)}}else w(-1,"No Transport")}else w(0,"abort"),v=!1;return v},param:function(a,c){var e=[],f=function(a,b){b=d.isFunction(b)?b():b,e[e.length]=encodeURIComponent(a)+"="+encodeURIComponent(b)};c===b&&(c=d.ajaxSettings.traditional);if(d.isArray(a)||a.jquery)d.each(a,function(){f(this.name,this.value)});else for(var g in a)bH(g,a[g],c,f);return e.join("&").replace(bo,"+")}}),d.extend({active:0,lastModified:{},etag:{}});var bK=d.now(),bL=/(\=)\?(&|$)|()\?\?()/i;d.ajaxSetup({jsonp:"callback",jsonpCallback:function(){return d.expando+"_"+bK++}}),d.ajaxPrefilter("json jsonp",function(b,c,e){e=typeof b.data==="string";if(b.dataTypes[0]==="jsonp"||c.jsonpCallback||c.jsonp!=null||b.jsonp!==!1&&(bL.test(b.url)||e&&bL.test(b.data))){var f,g=b.jsonpCallback=d.isFunction(b.jsonpCallback)?b.jsonpCallback():b.jsonpCallback,h=a[g],i=b.url,j=b.data,k="$1"+g+"$2";b.jsonp!==!1&&(i=i.replace(bL,k),b.url===i&&(e&&(j=j.replace(bL,k)),b.data===j&&(i+=(/\?/.test(i)?"&":"?")+b.jsonp+"="+g))),b.url=i,b.data=j,a[g]=function(a){f=[a]},b.complete=[function(){a[g]=h;if(h)f&&d.isFunction(h)&&a[g](f[0]);else try{delete a[g]}catch(b){}},b.complete],b.converters["script json"]=function(){f||d.error(g+" was not called");return f[0]},b.dataTypes[0]="json";return"script"}}),d.ajaxSetup({accepts:{script:"text/javascript, application/javascript"},contents:{script:/javascript/},converters:{"text script":function(a){d.globalEval(a);return a}}}),d.ajaxPrefilter("script",function(a){a.cache===b&&(a.cache=!1),a.crossDomain&&(a.type="GET",a.global=!1)}),d.ajaxTransport("script",function(a){if(a.crossDomain){var d,e=c.getElementsByTagName("head")[0]||c.documentElement;return{send:function(f,g){d=c.createElement("script"),d.async="async",a.scriptCharset&&(d.charset=a.scriptCharset),d.src=a.url,d.onload=d.onreadystatechange=function(a,c){if(!d.readyState||/loaded|complete/.test(d.readyState))d.onload=d.onreadystatechange=null,e&&d.parentNode&&e.removeChild(d),d=b,c||g(200,"success")},e.insertBefore(d,e.firstChild)},abort:function(){d&&d.onload(0,1)}}}});var bM=d.now(),bN={},bO,bP;d.ajaxSettings.xhr=a.ActiveXObject?function(){if(a.location.protocol!=="file:")try{return new a.XMLHttpRequest}catch(b){}try{return new a.ActiveXObject("Microsoft.XMLHTTP")}catch(c){}}:function(){return new a.XMLHttpRequest};try{bP=d.ajaxSettings.xhr()}catch(bQ){}d.support.ajax=!!bP,d.support.cors=bP&&"withCredentials"in bP,bP=b,d.support.ajax&&d.ajaxTransport(function(b){if(!b.crossDomain||d.support.cors){var c;return{send:function(e,f){bO||(bO=1,d(a).bind("unload",function(){d.each(bN,function(a,b){b.onreadystatechange&&b.onreadystatechange(1)})}));var g=b.xhr(),h;b.username?g.open(b.type,b.url,b.async,b.username,b.password):g.open(b.type,b.url,b.async),(!b.crossDomain||b.hasContent)&&!e["x-requested-with"]&&(e["x-requested-with"]="XMLHttpRequest");try{d.each(e,function(a,b){g.setRequestHeader(a,b)})}catch(i){}g.send(b.hasContent&&b.data||null),c=function(a,e){if(c&&(e||g.readyState===4)){c=0,h&&(g.onreadystatechange=d.noop,delete bN[h]);if(e)g.readyState!==4&&g.abort();else{var i=g.status,j,k=g.getAllResponseHeaders(),l={},m=g.responseXML;m&&m.documentElement&&(l.xml=m),l.text=g.responseText;try{j=g.statusText}catch(n){j=""}i=i===0?!b.crossDomain||j?k?304:0:302:i==1223?204:i,f(i,j,l,k)}}},b.async&&g.readyState!==4?(h=bM++,bN[h]=g,g.onreadystatechange=c):c()},abort:function(){c&&c(0,1)}}}});var bR={},bS=/^(?:toggle|show|hide)$/,bT=/^([+\-]=)?([\d+.\-]+)([a-z%]*)$/i,bU,bV=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]];d.fn.extend({show:function(a,b,c){var e,f;if(a||a===0)return this.animate(bW("show",3),a,b,c);for(var g=0,h=this.length;g=0;a--)c[a].elem===this&&(b&&c[a](!0),c.splice(a,1))}),b||this.dequeue();return this}}),d.each({slideDown:bW("show",1),slideUp:bW("hide",1),slideToggle:bW("toggle",1),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(a,b){d.fn[a]=function(a,c,d){return this.animate(b,a,c,d)}}),d.extend({speed:function(a,b,c){var e=a&&typeof a==="object"?d.extend({},a):{complete:c||!c&&b||d.isFunction(a)&&a,duration:a,easing:c&&b||b&&!d.isFunction(b)&&b};e.duration=d.fx.off?0:typeof e.duration==="number"?e.duration:e.duration in d.fx.speeds?d.fx.speeds[e.duration]:d.fx.speeds._default,e.old=e.complete,e.complete=function(){e.queue!==!1&&d(this).dequeue(),d.isFunction(e.old)&&e.old.call(this)};return e},easing:{linear:function(a,b,c,d){return c+d*a},swing:function(a,b,c,d){return(-Math.cos(a*Math.PI)/2+.5)*d+c}},timers:[],fx:function(a,b,c){this.options=b,this.elem=a,this.prop=c,b.orig||(b.orig={})}}),d.fx.prototype={update:function(){this.options.step&&this.options.step.call(this.elem,this.now,this),(d.fx.step[this.prop]||d.fx.step._default)(this)},cur:function(){if(this.elem[this.prop]!=null&&(!this.elem.style||this.elem.style[this.prop]==null))return this.elem[this.prop];var a=parseFloat(d.css(this.elem,this.prop));return a||0},custom:function(a,b,c){function g(a){return e.step(a)}var e=this,f=d.fx;this.startTime=d.now(),this.start=a,this.end=b,this.unit=c||this.unit||"px",this.now=this.start,this.pos=this.state=0,g.elem=this.elem,g()&&d.timers.push(g)&&!bU&&(bU=setInterval(f.tick,f.interval))},show:function(){this.options.orig[this.prop]=d.style(this.elem,this.prop),this.options.show=!0,this.custom(this.prop==="width"||this.prop==="height"?1:0,this.cur()),d(this.elem).show()},hide:function(){this.options.orig[this.prop]=d.style(this.elem,this.prop),this.options.hide=!0,this.custom(this.cur(),0)},step:function(a){var b=d.now(),c=!0;if(a||b>=this.options.duration+this.startTime){this.now=this.end,this.pos=this.state=1,this.update(),this.options.curAnim[this.prop]=!0;for(var e in this.options.curAnim)this.options.curAnim[e]!==!0&&(c=!1);if(c){if(this.options.overflow!=null&&!d.support.shrinkWrapBlocks){var f=this.elem,g=this.options;d.each(["","X","Y"],function(a,b){f.style["overflow"+b]=g.overflow[a]})}this.options.hide&&d(this.elem).hide();if(this.options.hide||this.options.show)for(var h in this.options.curAnim)d.style(this.elem,h,this.options.orig[h]);this.options.complete.call(this.elem)}return!1}var i=b-this.startTime;this.state=i/this.options.duration;var j=this.options.specialEasing&&this.options.specialEasing[this.prop],k=this.options.easing||(d.easing.swing?"swing":"linear");this.pos=d.easing[j||k](this.state,i,0,1,this.options.duration),this.now=this.start+(this.end-this.start)*this.pos,this.update();return!0}},d.extend(d.fx,{tick:function(){var a=d.timers;for(var b=0;b
";d.extend(b.style,{position:"absolute",top:0,left:0,margin:0,border:0,width:"1px",height:"1px",visibility:"hidden"}),b.innerHTML=j,a.insertBefore(b,a.firstChild),e=b.firstChild,f=e.firstChild,h=e.nextSibling.firstChild.firstChild,this.doesNotAddBorder=f.offsetTop!==5,this.doesAddBorderForTableAndCells=h.offsetTop===5,f.style.position="fixed",f.style.top="20px",this.supportsFixedPosition=f.offsetTop===20||f.offsetTop===15,f.style.position=f.style.top="",e.style.overflow="hidden",e.style.position="relative",this.subtractsBorderForOverflowNotVisible=f.offsetTop===-5,this.doesNotIncludeMarginInBodyOffset=a.offsetTop!==i,a.removeChild(b),a=b=e=f=g=h=null,d.offset.initialize=d.noop},bodyOffset:function(a){var b=a.offsetTop,c=a.offsetLeft;d.offset.initialize(),d.offset.doesNotIncludeMarginInBodyOffset&&(b+=parseFloat(d.css(a,"marginTop"))||0,c+=parseFloat(d.css(a,"marginLeft"))||0);return{top:b,left:c}},setOffset:function(a,b,c){var e=d.css(a,"position");e==="static"&&(a.style.position="relative");var f=d(a),g=f.offset(),h=d.css(a,"top"),i=d.css(a,"left"),j=e==="absolute"&&d.inArray("auto",[h,i])>-1,k={},l={},m,n;j&&(l=f.position()),m=j?l.top:parseInt(h,10)||0,n=j?l.left:parseInt(i,10)||0,d.isFunction(b)&&(b=b.call(a,c,g)),b.top!=null&&(k.top=b.top-g.top+m),b.left!=null&&(k.left=b.left-g.left+n),"using"in b?b.using.call(a,k):f.css(k)}},d.fn.extend({position:function(){if(!this[0])return null;var a=this[0],b=this.offsetParent(),c=this.offset(),e=bZ.test(b[0].nodeName)?{top:0,left:0}:b.offset();c.top-=parseFloat(d.css(a,"marginTop"))||0,c.left-=parseFloat(d.css(a,"marginLeft"))||0,e.top+=parseFloat(d.css(b[0],"borderTopWidth"))||0,e.left+=parseFloat(d.css(b[0],"borderLeftWidth"))||0;return{top:c.top-e.top,left:c.left-e.left}},offsetParent:function(){return this.map(function(){var a=this.offsetParent||c.body;while(a&&(!bZ.test(a.nodeName)&&d.css(a,"position")==="static"))a=a.offsetParent;return a})}}),d.each(["Left","Top"],function(a,c){var e="scroll"+c;d.fn[e]=function(c){var f=this[0],g;if(!f)return null;if(c!==b)return this.each(function(){g=b$(this),g?g.scrollTo(a?d(g).scrollLeft():c,a?c:d(g).scrollTop()):this[e]=c});g=b$(f);return g?"pageXOffset"in g?g[a?"pageYOffset":"pageXOffset"]:d.support.boxModel&&g.document.documentElement[e]||g.document.body[e]:f[e]}}),d.each(["Height","Width"],function(a,c){var e=c.toLowerCase();d.fn["inner"+c]=function(){return this[0]?parseFloat(d.css(this[0],e,"padding")):null},d.fn["outer"+c]=function(a){return this[0]?parseFloat(d.css(this[0],e,a?"margin":"border")):null},d.fn[e]=function(a){var f=this[0];if(!f)return a==null?null:this;if(d.isFunction(a))return this.each(function(b){var c=d(this);c[e](a.call(this,b,c[e]()))});if(d.isWindow(f)){var g=f.document.documentElement["client"+c];return f.document.compatMode==="CSS1Compat"&&g||f.document.body["client"+c]||g}if(f.nodeType===9)return Math.max(f.documentElement["client"+c],f.body["scroll"+c],f.documentElement["scroll"+c],f.body["offset"+c],f.documentElement["offset"+c]);if(a===b){var h=d.css(f,e),i=parseFloat(h);return d.isNaN(i)?h:i}return this.css(e,typeof a==="string"?a:a+"px")}})})(window); diff --git a/doc/_lib/reset.css b/doc/_lib/reset.css deleted file mode 100644 index daebe5616..000000000 --- a/doc/_lib/reset.css +++ /dev/null @@ -1,2 +0,0 @@ -/* http://yuilibrary.com/yui/docs/cssreset/ v3.2.0 */ -html{color:#000;background:#FFF;}body,div,dl,dt,dd,ul,ol,li,h1,h2,h3,h4,h5,h6,pre,code,form,fieldset,legend,input,textarea,p,blockquote,th,td{margin:0;padding:0;}table{border-collapse:collapse;border-spacing:0;}fieldset,img{border:0;}address,caption,cite,code,dfn,em,strong,th,var{font-style:normal;font-weight:normal;}li{list-style:none;}caption,th{text-align:left;}h1,h2,h3,h4,h5,h6{font-size:100%;font-weight:normal;}q:before,q:after{content:'';}abbr,acronym{border:0;font-variant:normal;}sup{vertical-align:text-top;}sub{vertical-align:text-bottom;}input,textarea,select{font-family:inherit;font-size:inherit;font-weight:inherit;}input,textarea,select{*font-size:100%;}legend{color:#000;}body{font:13px/1.231 arial,helvetica,clean,sans-serif;*font-size:small;*font:x-small;}select,input,button,textarea{font:99% arial,helvetica,clean,sans-serif;}table{font-size:inherit;font:100%;}pre,code,kbd,samp,tt{font-family:monospace;*font-size:108%;line-height:100%;} diff --git a/doc/api/request/index.html.spt b/doc/api/request/index.html.spt deleted file mode 100644 index 46e5acb6e..000000000 --- a/doc/api/request/index.html.spt +++ /dev/null @@ -1,218 +0,0 @@ -doc_title = "Request" -doc_next = ('Response', '/response/') - -[----------------------------------------] - -{% extends doc.html %} -{% block doc %} - -

The Aspen Request object tries to consistently model the actual structure of -an HTTP Request message. Consequently, it is rather verbose. There are -shortcuts available, however.

- - -

Where?

- -

An instance of the aspen.http.request.Request class is made -available to you in your simplates from the second -page on.

- - -

Shortcuts

- -

The most common parts of the HTTP Request message are given these shortcuts -inside of simplate:

- - - - - - - - - -
bodyrequest.body
cookierequest.headers.cookie
headers request.headers
pathrequest.line.uri.path
qsrequest.line.uri.querystring
- -

For example, here’s how to pull a value out of the querystring:

- -
foo = qs["foo"]
-
- -

There are also booleans for each of the standard HTTP - methods, so simplates in a REST - style will end up looking like this:

- -
if GET:
-    pass # handle GET )
-elif POST:
-    pass # handle POST
- -

There is no API that folds the querystring and body together. It’s -better to be explicit about where you’re expecting your values from.

- - -

Full API

- -

The following object model is used to comprehensively represent an HTTP -Request message. Where “raw” attributes are noted those give the -bytes as supposedly received on the wire. As an optimization, this attribute is -lazily computed for request.body.raw. The request, itself a subclass of -str, is also dealt with lazily.

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
nameclassbase type notes
requestRequeststr
request.lineLinestr
request.line.methodMethodunicode
request.line.method.rawstr
request.line.uriURIunicode
request.line.uri.schemeUnicodeWithRawunicode
request.line.uri.scheme.rawstr
request.line.uri.usernameUnicodeWithRawunicode
request.line.uri.username.rawstr
request.line.uri.passwordUnicodeWithRawunicode
request.line.uri.password.rawstr
request.line.uri.hostUnicodeWithRawunicode
request.line.uri.host.rawstr
request.line.uri.portIntWithRawint0 if absent
request.line.uri.port.rawstr
request.line.uri.pathPathMapping
request.line.uri.path.rawstr
request.line.uri.path.decodedunicode
request.line.uri.path.partsList of PathPartssee below
request.line.uri.querystringQuerystringMapping
request.line.uri.querystring.rawstr
request.line.uri.querystring.decoded unicode
request.line.uri.rawstr
request.line.versionVersionunicode
request.line.version.infotuple
request.line.version.majorint
request.line.version.minorint
request.line.version.rawstr
request.line.rawstr
request.headersHeaders
request.headers.cookieCookie.SimpleCookie -
request.headers.hostunicodeX-Forwarded-For if it exists, Host - otherwise (no Host will raise Response(400))
request.headers.schemeunicodeu"https" or u"http"
request.headers.rawstr
request.bodyBody
request.body.rawstr
- - -

Here are the methods on the Request object:

- -
request.allow(*methods):
-    """Given method strings, raise 405 if we don't meet the requirements.
-
-    The method names are case insensitive (they are uppercased). If 405
-    is raised then the Allow header is set to the methods given.
-
-    """
-
-request.is_xhr():
-    """Check the value of X-Requested-With.
-    """
-
- - -

Mapping Objects

- -

The Body, Headers, Path, and -Querystring objects all have the same API. They are asymetric -dictionaries. With HTTP mappings you always need to deal with the “either -list or value” problem. Using them as simple values is much more common -then using them as lists of values, so the base dictionary access set/get -operations are tuned for that, and then you get this API for working with them -as lists of values:

- -
obj.all(name, default=None):
-    """Given a name, return a list of values.
-    """
-
-obj.add(name, value):
-    """Given a name and value, add another entry.
-    """
- -

Putting those together, here’s what it looks like:

- -
>>> headers['Content-Type'] = "text/html"
->>> headers['Content-Type'] = "text/plain" # changed my mind!
->>> headers['Content-Type']
-text/plain
->>> headers.all('Content-Type')
-['text/plain']
- -

Here’s another example:

- -
>>> qs.add('likes', 'cheese!')
->>> qs.add('likes', 'grommit!')
->>> qs['likes']
-'grommit!'
->>> qs.all('likes')
-['cheese!', 'grommit!']
- -

They’re asymetric in that subscript access respects the underlying -list while subscript assignment clobbers it.

- - - -

File Uploads

- -

If a request is of Content-Type -multipart/form-data, then request.body values that -are file uploads will be instances of the standard library’s cgi.FieldStorage class. -Each such object has filename, value, and -type attributes with the name, bytes, and advertised Content-Type -of the file that was uploaded.

- - - -

Path Parts

- -

Aspen Path objects have a parts attribute, which -is a list of PathPart objects. So if you're in a simplate -at /foo/bar/baz.html.spt, then path.parts[1] will be -'bar' and path.parts[2] will be -'baz.html'.

- - -

RFC2396 specifies a syntax -for attaching parameters to each path part, and Aspen exposes these in a -params attribute (which is a Mapping object) on each -unicode in the path.parts list.

- -

Say what?

- -

If you have:

- -
/foo/index.html.spt
-
- -

and you hit it with:

- -
/foo;a=1;b;a=3/
-
- -

then you can do:

- -
if 'b' in path.parts[0].params:
-    a = path.parts[0].params['a']
-\[---]
-%(a)s
-
- -and you'll get: - -{{ screenshot("path-part-params") }} - -{% end %} - diff --git a/doc/api/request/path-part-params.png b/doc/api/request/path-part-params.png deleted file mode 100644 index a091f0d56..000000000 Binary files a/doc/api/request/path-part-params.png and /dev/null differ diff --git a/doc/api/request/path-part-params.small.png b/doc/api/request/path-part-params.small.png deleted file mode 100644 index b0f432a70..000000000 Binary files a/doc/api/request/path-part-params.small.png and /dev/null differ diff --git a/doc/api/response/fishing.200.png b/doc/api/response/fishing.200.png deleted file mode 100644 index 2d10be191..000000000 Binary files a/doc/api/response/fishing.200.png and /dev/null differ diff --git a/doc/api/response/fishing.200.small.png b/doc/api/response/fishing.200.small.png deleted file mode 100644 index 9aaf1b1da..000000000 Binary files a/doc/api/response/fishing.200.small.png and /dev/null differ diff --git a/doc/api/response/fishing.404.png b/doc/api/response/fishing.404.png deleted file mode 100644 index c1033d899..000000000 Binary files a/doc/api/response/fishing.404.png and /dev/null differ diff --git a/doc/api/response/fishing.404.small.png b/doc/api/response/fishing.404.small.png deleted file mode 100644 index 84f294885..000000000 Binary files a/doc/api/response/fishing.404.small.png and /dev/null differ diff --git a/doc/api/response/index.html.spt b/doc/api/response/index.html.spt deleted file mode 100644 index 29bf99dee..000000000 --- a/doc/api/response/index.html.spt +++ /dev/null @@ -1,84 +0,0 @@ -doc_title = "Response" -doc_next = ('Virtual Paths', '/virtual-paths/') -[----------------------------------------] -{% extends doc.html %} -{% block doc %} - -

The aspen.Response class has this constructor:

- -
def __init__(self, code=200, body='', headers=None):
-    """Takes an int, a string, and a dict (or list of tuples).
-
-        - code        an HTTP response code, e.g., 404
-        - body        the message body as a string
-        - headers     a Headers instance
-
-    Code is first because when you're raising your own Responses, they're
-    usually error conditions. Body is second because one more often wants
-    to specify a body without headers, than a header without a body.
-
-    """
- - -

The Default Response Object

- -

A Response object is automatically instantiated for all -requests. This object is automatically available in the second page of your simplates, where it is named response.

- -

One common thing to do with the response object is to set a -header. The response.headers attribute is the same as on Request objects, so here’s how you -would set a header in a simplate:

- -
response.headers['X-My-Header'] = 'Greetings, program!'
-\[---]
-Check your headers.
- - -

Raising Responses

- -

You can also raise Response instances, because -Response is a subclass of Python's built-in Exception -class.

- -

Make a simplate named fishing.html.spt with this content:

- -
from aspen import Response
-\[---]
-raise Response(200)
-\[---]
-Let's go fishing!
- -{{ screenshot("fishing.200") }} - -

Did you expect to see “Let's go fishing!” instead? The reason -you don’t is that when you raise Response() from a simplate, -the template page of the simplate is skipped. This is because the feature is -really designed for exceptions, things like 404, etc.

- -

So change the HTTP code in fishing.html.spt:

- -
from aspen import Response
-\[---]
-raise Response(404)
-\[---]
-Let's go fishing!
- -

You will get this:

- -{{ screenshot("fishing.404") }} - - -

Custom Response Objects

- -

For advanced use cases, you can define your own Response class -and instantiate it inside of your simplates. Whatever is named -“response” at the end of page two of a simplate will be what Aspen -uses to capture the template output and respond to the client. That is, the -variable named “response” should be your Response -instance. It will be used as a response, and—unless you raise -it—its body attribute will be replaced with the output of the template -page.

- -{% end %} diff --git a/doc/api/website/index.html.spt b/doc/api/website/index.html.spt deleted file mode 100644 index 9878c5a0c..000000000 --- a/doc/api/website/index.html.spt +++ /dev/null @@ -1,86 +0,0 @@ -doc_title = "Website" -doc_next = "" -[----------------------------------------] -{% extends "doc.html" %} -{% block doc %} - -

Aspen creates an instance of aspen.website.Website when it -starts up. It holds all of the global configuration for your application. It is -placed in the namespace of your simplates, where it -is available from the first page onwards. The following attributes are defined -based on configuration in the environment (ASPEN_NAME) and keyword -arguments to Website:

- - - - - - - - - - - - - - - - - - -
attributedefault
base_url''
changes_reloadFalse
charset_dynamicUTF-8
charset_staticNone
indices['index', 'index.html', 'index.json', - 'index.html.spt', 'index.json.spt']
list_directoriesFalse
logging_threshold0 (most verbose)
media_type_defaulttext/plain
media_type_jsonapplication/json
project_rootNone
renderer_defaultstdlib_percent
show_tracebacksFalse
colorize_tracebacksFalse
www_rootNone
unavailable0
- - -

Computations

- -

The following computations are performed after environment and keyword -argument configuration is processed.

- -
    - -
  • If www_root isn’t set, then it’s set to the current - working directory If that is unavailable then aspen exits with a - ConfigurationError. If the current working directory differs from www_root, - it is changed to match www_root.
  • - -
  • If project_root is set, then the directory it points to is used - to resolve {% extends %} and {% include %} templates tags; any mime.types file in there will be loaded; and it will be - placed at the front of sys.path, so you can import Python modules from - there
  • - -
  • Two dictionaries associated with resolving renderers are instantiated - and populated: renderer_factories and - default_renderers_by_media_type.
  • - -
- -

After your configuration scripts are run, Aspen looks at the value for -unavailable, and if it’s greater than zero it installs a handler that -returns 503 - Service Unavailable for all requests. The value of unavailable is -interpreted as the number of minutes of downtime you expect, and the -Retry-After header is set accordingly. You can access the header as a -datetime.datetime object at website.retry_after.

- - -

Methods

- -

Here are the methods on the Website object:

- -
def redirect(self, location, code=None, permanent=False, base_url=None, response=None):
-    """Raise a redirect Response.
-
-    If code is None then it will be set to 301 (Moved Permanently) if
-    permanent is True and 302 (Found) if it is False. If url doesn't start
-    with base_url (defaulting to self.base_url), then we prefix it with
-    base_url before redirecting. This is a protection against open
-    redirects. If you provide your own response we will set .code and
-    .headers['Location'] on it.
-
-    """
-
-{% end %} diff --git a/doc/configuration/index.html.spt b/doc/configuration/index.html.spt deleted file mode 100644 index 2d0464b49..000000000 --- a/doc/configuration/index.html.spt +++ /dev/null @@ -1,32 +0,0 @@ -doc_title = "Configuration" -doc_next = "" -[----------------------------------------] -{% extends doc.html %} -{% block doc %} - -

Aspen websites can be configured consistently from the environment and -keyword arguments. For each of the following there is an environment variable -like ASPEN_NAME and a keyword argument to `aspen.website.Website`. -Here is an example configuration:

- - - - - - - - - - - - - - - - - -
name example value
base_url http://www.example.com
changes_reload yes
charset_dynamic ISO-8859-1
charset_static windows-1252
indices index.html, README
list_directories False
logging_threshold 1
media_type_default text/plain
media_type_json application/json
project_root /usr/local/mysite
show_tracebacks True
colorize_tracebacks True
www_root /usr/local/mysite/www
unavailable 0
- -

Please refer to the website page for -defaults.

-{% end %} diff --git a/doc/core-algorithms/index.html.spt b/doc/core-algorithms/index.html.spt deleted file mode 100644 index 29797b2fa..000000000 --- a/doc/core-algorithms/index.html.spt +++ /dev/null @@ -1,36 +0,0 @@ -doc_title = "Core Algorithms" -doc_next = ("Unicode", "/unicode/") - -from aspen.algorithms import website - -website_funcs = [] -srcfile = website.__file__ -if srcfile.endswith(b'c'): srcfile = srcfile[:-1] # turn .pyc into .py - -for line in open(srcfile): - if line.startswith(b'def '): - website_funcs.append(line[4:].strip().strip(b':')) - -[----------------------------------------] -{% extends doc.html %} -{% block doc %} - -

Aspen's request-processing algorithm is implemented -with a module called algorithm. If you -want to modify - -Aspen's behavior -you should read up on the algorithm module -and refer to the algorithm definitions below and in the Aspen source code.

- - -

Website Algorithm

- -

This is available at website.algorithm. Here are the signatures -of the functions in the stock request-processing algorithm:

- -
{{ b'\n\n'.join(website_funcs) }}
- -{% end %} diff --git a/doc/deployment/index.html.spt b/doc/deployment/index.html.spt deleted file mode 100644 index 7dde43b2b..000000000 --- a/doc/deployment/index.html.spt +++ /dev/null @@ -1,78 +0,0 @@ -doc_title="Deployment" -doc_next = '' -[----------------------------------------] -{% extends doc.html %} -{% block doc %} - -

Aspen is a WSGI application, located at -aspen.wsgi.website. That’s an instance of -aspen.website.Website, configured only from the environment. If -you need more control, you can instantiate that class yourself. In any case, -here are some ways to get it on the network.

- - -

Gunicorn

- -

Gunicorn is a preforking server ported -from Ruby.

- -
-$ cd /path/to/my/website
-$ gunicorn aspen.wsgi:website
-2011-05-17 17:07:53 [40170] [INFO] Starting gunicorn 0.12.1
-2011-05-17 17:07:53 [40170] [INFO] Listening at: http://127.0.0.1:8000 (40170)
-2011-05-17 17:07:53 [40170] [INFO] Using worker: sync
-2011-05-17 17:07:53 [40171] [INFO] Booting worker with pid: 40171
-
- - -

Spawning

- -

Spawning is a preforking -and/or prethreading server that supports graceful code reloading.

- -
-$ cd /path/to/my/website
-$ spawning aspen.wsgi.website
-(40266) *** Controller starting at Tue May 17 17:27:34 2011
-Should start 4 new children
-(40270) wsgi starting up on http://0.0.0.0:8080/
-(40267) wsgi starting up on http://0.0.0.0:8080/
-(40268) wsgi starting up on http://0.0.0.0:8080/
-(40269) wsgi starting up on http://0.0.0.0:8080/
-
- -

Apache mod_fastcgi

- -To get this to work you'll need: - - -An .htaccess file (or other appropriate apache config file) that includes: - -
-<Files myfcgi>
-  SetHandler fastcgi-script
-</Files>
-
- -and then myfcgi is a script that looks like: - -
-#!/bin/bash
-INSTDIR=/path/to/my/aspen/project
-export ASPEN_PROJECT_ROOT=$INSTDIR/src
-export ASPEN_WWW_ROOT=$INSTDIR/www
-
-source $INSTDIR/bin/activate
-$INSTDIR/bin/fcgi_aspen "$@"
-
- -Notes: -
    -
  • fcgi_aspen requires that you have the flup package installed in your virtualenv. -
  • The ASPEN_PROJECT_ROOT and ASPEN_WWW_ROOT dirs are of course relatively arbitrarily named - I just picked obvious ones. -
  • There's a bit of an issue if someone hits the node without a trailing slash: in this case aspen gets the full path from root to the script, instead of just the extra path supplied 'under' the script. Dealing with this is up to the reader. -
- -{% end %} - diff --git a/doc/dotaspen/index.html.spt b/doc/dotaspen/index.html.spt deleted file mode 100644 index bcf5765c4..000000000 --- a/doc/dotaspen/index.html.spt +++ /dev/null @@ -1,2 +0,0 @@ -website.redirect("/project_root/") -[----------------------------------------] diff --git a/doc/hooks/index.html.spt b/doc/hooks/index.html.spt deleted file mode 100644 index e8a45cb4a..000000000 --- a/doc/hooks/index.html.spt +++ /dev/null @@ -1,2 +0,0 @@ -website.redirect('/core-algorithms/') -[---] diff --git a/doc/index.html.spt b/doc/index.html.spt deleted file mode 100644 index fdc3fcc77..000000000 --- a/doc/index.html.spt +++ /dev/null @@ -1,484 +0,0 @@ -import random -impressions = [""" -
  • I'm - finding Aspen frustrating to do simple things and easy to do - complex things.” —Joshua Kehn
  • -""", """ -
  • That's - cool, your files are your routes. [...] That’s - a crazy framework.—asdf12 in #node.js
  • -""", """ -
  • Aspen is - cool.” —Luke Strickland
  • -""", """ -
  • The - more I look at Aspen, the less odd it looks and the more I like - it.” —Ian Cordasco
  • -""", """ -
  • Aspen - is a lifesaver - loving how easy it is to use and get - working.” —Matt Cowger
  • -""", """ -
  • “This is several orders of magnitude easier than every - other web framework.” —Steve Gross
  • -""", """ -
  • Refreshing - in a world of heavyweights.” —Chris Umbel
  • -""", """ -
  • A - delight.” —Jussi Arpalahti
  • -""", """ -
  • It’s - different. Very different.” —Dusty - Phillips
  • -""", """ -
  • “I’m so glad someone has the guts to take on - MVC.” —@pydanny
  • -""", """ -
  • “I am afraid of this.” —some guy at PyCon - 2012
  • -""", """ -
  • “Love it. It was super easy to set up. Really - Impressed.” — Jordan Messina (via IRC) -
  • -""", """ -
  • - Awesome. App Engine feels clunky in comparison.” - —Pat Collins
  • -""", """ -
  • A pleasure to - work with.” —Jeffrey Armstrong
  • -""", """ -
  • A - completely different approach.” —Richard - Jones
  • -""", """ -
  • - Aspen seems insane to me.” —Lee McFadden
  • -"""] - -[------------------] -homepage = True -[------------------] -{% extends base.html %} -{% block head %} - -{% end %} -{% block content %} - -
    - -
    - -
    - -

    Documentation for Developers

    - - - -
    -
    - -

    Documentation for Sysadmins

    - - - -
    -
    - -
    - -
    -
    -

    Your Page

    - -

    Aspen maps your URLs directly to the filesystem. - It’s way simpler than regular expression routing or - object traversal. Capture path parts with virtual paths.

    - -
    -
    -
    -

    Your Simplate

    - -

    On the filesystem you have a simplate. This is one file with - three pages: import, request, and template.

    - -
    -
    -
    -

    Your Library

    - -

    Mature projects keep functionality in object-oriented, - tested, documented libraries. Of course, you have the full - power and depth of Python as well.

    - - Python logo + common libraries - - -

    Want more? Here’s a - 50-minute video from PyOhio 2011.

    - -
    -
    - -
    - -
    - -
    -
    - -{% end %} diff --git a/doc/json/index.html.spt b/doc/json/index.html.spt deleted file mode 100644 index 9b7f90576..000000000 --- a/doc/json/index.html.spt +++ /dev/null @@ -1,105 +0,0 @@ -doc_title = "JSON Helpers" -doc_next = [] -[----------------------------------------] -{% extends doc.html %} -{% block doc %} - -

    Aspen ships with a json_dump renderer that will -Python-eval the contents of the template section and then call -json.dumps on it.

    - -

    Example

    - -

    Make a greetings.json.spt file with this content:

    - -
    import random
    -n = random.choice(range(10))
    -extra_excitement = "!" * n
    -\[---] via json_dumps
    -{'Greetings': 'program!' + extra_excitement}
    - - -

    Now hit this in your -browser:

    - -{{ screenshot("json") }} - - - -

    The aspen.json Library

    - -

    Aspen’s json_dump renderer does not use the standard -library's json module. Rather, it uses an extended version of it -from aspen.json. The purpose of this extension is twofold:

    - -
      -
    1. to delegate to simplejson if available
    2. -
    3. to provide nicer encoder configuration
    4. -
    - - -

    Supported Implementations

    - -

    Aspen's aspen.json library will prefer simplejson if -it is available, falling back to the standard library’s json module, -which was added in Python 2.6. The latter is a more or less out-of-date version -of the former. It also doesn’t have any C speedups. If Aspen can’t -find either, then attempts to use the json_dump renderer will -raise an ImportError.

    - - - -

    Default Encoders

    - -

    Aspen's aspen.json will serialize instances of the following -types. Instances of any other type will raise TypeError, so be -sure to pre-process your output if it contains anything else.

    - -
      -
    • bool
    • -
    • complex (serialized to two floats, [real, imaginary])
    • -
    • datetime.datetime (serialized to ISO 8601)
    • -
    • float
    • -
    • int
    • -
    • long
    • -
    • None
    • -
    • str
    • -
    • unicode
    • -
    - - -

    Custom Encoders

    - -

    It’s fairly common to want to add encoders for custom classes or -classes otherwise unknown to one or another version of simplejson. -To this end, Aspen provides an API to manage a registry of encoders. These -functions can be imported from aspen.json:

    - -
    -def register_encoder(cls, encode):
    -    """Register the encode function for cls.
    -
    -    An encoder should take an instance of cls and return something
    -    basically serializable (strings, lists, dictionaries).
    -
    -    """
    -
    -def unregister_encoder(cls):
    -    """Given a class, remove any encoder that has been registered for it.
    -    """
    -
    - -

    These functions don’t affect the underlying simplejson -library, only the Aspen abstraction layer. So if for example you have a -simplejson that knows about Decimal objects (support for which was - added in version 2.1 of the library), then if you register a custom -encoder for Decimals, Aspen will use that where appropriate, and if you -unregister it, the underlying implementation will be used again. Furthermore, -if you use the simplejson library directly, the encoders -registered with aspen.json won’t be used at all.

    - -{% end %} - diff --git a/doc/json/json.png b/doc/json/json.png deleted file mode 100644 index 83b2219d2..000000000 Binary files a/doc/json/json.png and /dev/null differ diff --git a/doc/json/json.small.png b/doc/json/json.small.png deleted file mode 100644 index 0a93f6938..000000000 Binary files a/doc/json/json.small.png and /dev/null differ diff --git a/doc/mime.types/index.html.spt b/doc/mime.types/index.html.spt deleted file mode 100644 index 37499a317..000000000 --- a/doc/mime.types/index.html.spt +++ /dev/null @@ -1,67 +0,0 @@ -doc_title = "mime.types" -doc_next = [] - - -""" -Here's how to configure mimetypes: - -import mimetypes -mimetypes.knownfiles = ['mymime.types'] -mimetypes.init() -""" -[----------------------------------------] -{% extends doc.html %} -{% block doc %} - -

    Aspen automatically sets the Content-Type response header based -on the file extension of the simplate file being served (you can override this -behavior by setting the header manually in your simplates). Aspen instructs the -mimetypes -module in the Python standard library to use the following mappings to -determine which Content-Type to use for which file extension.

    - -
      -
    • The default type_map in your Python installation's - mimetypes module
    • -
    • a mime.types file bundled with Aspen
    • -
    • ${website.project_root}/mime.types
    • -
    - -

    Later definitions override earlier ones.

    - -

    Example

    - -

    Let’s say that you want to use the .smpl file extension -to denote simplates on your filesystem. You might want to do this because -it’s easier to configure your text editor based on a unique -extension.

    - -

    Create a file named greetings.smpl with this content:

    - -
    <h1>Greetings, program!</h1>
    - -

    Now hit it with your -browser:

    - -{{ screenshot("text.plain") }} - -You get a text/plain response, because the .smpl -extension is unknown to Aspen, and text/plain is Aspen’s -default.

    - -

    Now put the following line in a file named mime.types in your -site’s project_root directory -(note the lack of a period before smpl).

    - -
    text/html  smpl
    - -

    Restart aspen to pick up the new mime.types file, -and then hit foo.smpl again. You should now have a rendered HTML -file:

    - -{{ screenshot("text.html") }} - -{% end %} - - diff --git a/doc/mime.types/text.html.png b/doc/mime.types/text.html.png deleted file mode 100644 index 8435356cd..000000000 Binary files a/doc/mime.types/text.html.png and /dev/null differ diff --git a/doc/mime.types/text.html.small.png b/doc/mime.types/text.html.small.png deleted file mode 100644 index dee78de3f..000000000 Binary files a/doc/mime.types/text.html.small.png and /dev/null differ diff --git a/doc/mime.types/text.plain.png b/doc/mime.types/text.plain.png deleted file mode 100644 index d75aa7af4..000000000 Binary files a/doc/mime.types/text.plain.png and /dev/null differ diff --git a/doc/mime.types/text.plain.small.png b/doc/mime.types/text.plain.small.png deleted file mode 100644 index c5ef2e2e8..000000000 Binary files a/doc/mime.types/text.plain.small.png and /dev/null differ diff --git a/doc/networking-libraries/index.html b/doc/networking-libraries/index.html deleted file mode 100644 index 777c8506d..000000000 --- a/doc/networking-libraries/index.html +++ /dev/null @@ -1,36 +0,0 @@ -doc_title = "Networking Libraries" -doc_next = '' - -""" - -Canonical_Represenation -in the string "G/Y" - -""" - - -{% extends doc.html %} -{% block doc %} - -

    Aspen supports the following networking libraries via plugins. Cheroot is the default -and is packaged with Aspen. They vary -slightly in their implementation of the WSGI spec. This document describes the -differences.

    - - - - -

    Cheroot

    - - -{% end %} diff --git a/doc/nice-errors/index.html.spt b/doc/nice-errors/index.html.spt deleted file mode 100644 index 5b75b1412..000000000 --- a/doc/nice-errors/index.html.spt +++ /dev/null @@ -1,23 +0,0 @@ -doc_title = "Nice Errors and Indexes" -doc_next = ("Unicode", "/unicode/") -[----------------------------------------] -{% extends doc.html %} -{% block doc %} - -

    Aspen comes with default pages for errors (404, 500, etc) and -directory indexes ( if --list-directories is enabled ). You may, -however, wish to override or replace them. If so, Aspen will look for: - -

    - -before falling back to its internal error pages. -

    -

    Similarly, Aspen will look in project_root -for a file 'autoindex.html' if a raw directory is named and there's no index -file in that directory to respond with. -

    - -{% end %} diff --git a/doc/power-of-python.png b/doc/power-of-python.png deleted file mode 100644 index ee990ab6c..000000000 Binary files a/doc/power-of-python.png and /dev/null differ diff --git a/doc/project_root/index.html.spt b/doc/project_root/index.html.spt deleted file mode 100644 index 91deb63e5..000000000 --- a/doc/project_root/index.html.spt +++ /dev/null @@ -1,58 +0,0 @@ -doc_title = "project_root" -doc_next = [] -[----------------------------------------] -{% extends doc.html %} -{% block doc %} - -

    Aspen can be configured with a project_root directory, a catchall for files -that don’t belong in your actual URL hierarchy. Think of it as your -site’s junk drawer.

    - -

    Previous versions of Aspen hard-wired this to a directory named -.aspen inside ${website.www_root}, but that was inflexible and -people struggled with hidden directories on Mac OS. Even earlier versions used -a cleverly-named __ directory as a virtualenv with a UNIX-y userland layout. So -conf files were under etc/, modules under -lib/python/, and templates under etc/templates/. For -reasons of versioning and deployment (most of which were first put into my head -by Jim - Fulton), it turns out to be better for project_root to be -flat.

    - -

    configuration files

    - -

    Aspen will read the mime.types file -from project_root.

    - - -

    Python modules

    - -

    The project_root directory is placed on sys.path -during startup, so you can place Python modules directly inside of this -directory and they will be available to your simplates.

    - -

    This means that the project_root directory is a lightweight sandbox. -It is sufficient as such if Aspen itself is globally installed, and your site -doesn’t need more than pure-Python modules. If you don’t want to -install Aspen globally (and I don’t blame you), or you have other Python -dependencies that have C extension modules, console scripts, or other things -that need to be run through distutils before being made accessible to you, then -you should use a full virtualenv. In this case -I’ve had success using project_root itself as a virtualenv, though -you could also locate your virtualenv outside of your site tree.

    - - -

    Template bases and includes

    - -

    The template page of simplates will look in -project_root for base templates for -{% extends %} and file snippets for {% - include %}. You can specify relative paths there, so if you would -like to add a little structure to project_root here you can.

    - - -{% end %} - diff --git a/doc/quick-start/greetings-program.png b/doc/quick-start/greetings-program.png deleted file mode 100644 index 84d8cce58..000000000 Binary files a/doc/quick-start/greetings-program.png and /dev/null differ diff --git a/doc/quick-start/greetings-program.small.png b/doc/quick-start/greetings-program.small.png deleted file mode 100644 index 997620425..000000000 Binary files a/doc/quick-start/greetings-program.small.png and /dev/null differ diff --git a/doc/quick-start/index.html.spt b/doc/quick-start/index.html.spt deleted file mode 100644 index a8d2f0e7e..000000000 --- a/doc/quick-start/index.html.spt +++ /dev/null @@ -1,45 +0,0 @@ -doc_title = 'Quick Start' -doc_next = ('Simplates', '/simplates/') -[----------------------------------------] -{% extends doc.html %} -{% block doc %} - -

    Given: POSIX -and virtualenv - -

    Step 1: Make a -sandbox:

    - -
    $ virtualenv foo
    -$ cd foo
    -$ . bin/activate
    - -

    Step 2: Install aspen from - PyPI:

    - -
    (foo)$ pip install aspen
    -blah
    -blah
    -blah
    - -

    Step 3: Create a website root:

    - -
    (foo)$ mkdir www
    -(foo)$ cd www
    - -

    Step 4: Create a web page:

    - -
    (foo)$ echo Greetings, program! > index.html.spt
    - -

    Step 5: Start a dev server:

    - -
    (foo)$ python -m aspen
    -[...] Greetings, program! Welcome to port 8080.
    - -

    Step 6: Check localhost for -your new page!

    - -{{ screenshot("greetings-program") }} - -{% end %} diff --git a/doc/request/index.html.spt b/doc/request/index.html.spt deleted file mode 100644 index 782643602..000000000 --- a/doc/request/index.html.spt +++ /dev/null @@ -1,2 +0,0 @@ -website.redirect("/api/request/") -[----------------------------------------] diff --git a/doc/response/index.html.spt b/doc/response/index.html.spt deleted file mode 100644 index a02d11cc4..000000000 --- a/doc/response/index.html.spt +++ /dev/null @@ -1,2 +0,0 @@ -website.redirect("/api/response/") -[----------------------------------------] diff --git a/doc/security.txt b/doc/security.txt deleted file mode 100644 index f40099ee7..000000000 --- a/doc/security.txt +++ /dev/null @@ -1,19 +0,0 @@ - - - -UPDATE: Aspen's security program is now at https://hackerone.com/aspen - - - -Old Acknowledgements -==================== - -Black2Fan https://twitter.com/Black2Fan -https://github.com/gratipay/security-qf35us/issues/1 - -dstufft -https://github.com/gratipay/gratipay.com/issues/800#issuecomment-15493967 -https://twitter.com/dstufft/status/319607503061131266 - -Berkay Aydin -https://twitter.com/Brkay_Aydin/status/377611459942817792 diff --git a/doc/security/index.html b/doc/security/index.html deleted file mode 100644 index 83d3b8855..000000000 --- a/doc/security/index.html +++ /dev/null @@ -1,23 +0,0 @@ -doc_title = "Security" -doc_next = "" -^L -{% extends doc.html %} -{% block doc %} - -

    This page collects security matters that developers should be aware of when -creating applications with Aspen. If you have security bugs to disclose, you -can use the email and PGP key listed here.

    - -

    The biggest thing to be aware of when deploying Aspen applications is to be -careful of what ends up in your web publishing root. If an attacker is able to -write files into your web publishing root, then the attacker can execute -arbitrary Python code with the permissions of the user that the Aspen process -is running as.

    - -

    In particular, watch out for:

    - -
      -
    • File uploads. Never write user-uploaded files -

      - -{% end %} diff --git a/doc/simplates/extra-excitement.png b/doc/simplates/extra-excitement.png deleted file mode 100644 index aa9789528..000000000 Binary files a/doc/simplates/extra-excitement.png and /dev/null differ diff --git a/doc/simplates/extra-excitement.small.png b/doc/simplates/extra-excitement.small.png deleted file mode 100644 index 1cf02bf99..000000000 Binary files a/doc/simplates/extra-excitement.small.png and /dev/null differ diff --git a/doc/simplates/index.html.spt b/doc/simplates/index.html.spt deleted file mode 100644 index 61eb07fd9..000000000 --- a/doc/simplates/index.html.spt +++ /dev/null @@ -1,237 +0,0 @@ -doc_title = "Simplates" -doc_next = ('Request', '/request/') -[---] -[---] -{% extends doc.html %} -{% block doc %} - -

      Simplates are the file format Aspen uses -to represent HTTP resources. They are Aspen’s main attraction. -Here’s what a simplate looks like:

      - -
      """This is my simplate.
      -"""
      -import random
      -
      -\[---]
      -n = random.choice(range(10))
      -extra_excitement = "!" * n
      -
      -\[---]
      -Greetings, program!%(extra_excitement)s
      -
      - -

      Simplates are a single file with one or more sections. The section separator -is [---].

      - - -

      Tutorial

      - -

      Assuming you’ve gone through the Quick -Start, edit index.html.spt with the above content, then refresh.

      - -{{ screenshot("extra-excitement") }} - -

      You’re off and running!

      - -

      Give it a shot: Anything you define in the first two (Python) sections is -available in the third (template) section.

      - -

      Can you guess what the difference is between the first two Python sections? -The first one is run once, the first time the section is hit (not on -startup), and again any time the simplate is changed. It’s designed for -imports and constants. The second is run once for each request.

      - - -

      Reference

      - -

      A simplate is a file that contains multiple sections of varying syntax, -separated by [---].

      - -

      If the simplate only has one section, it's a template.

      - -

      If there's more than one section, the first section is always Python, -and the last section is always a template.

      - -

      If there's more than two sections, the second section is Python -unless it has a specline, which makes it a template.

      - -

      The first Python section is the 'once' section. It is -exec'd once, the first time the resource represented by the -simplate is served, and it has these variables as builtins:

      - -
      __file__   the absolute path to the simplate file (symlinks preserved)
      -
      -website    an instance of a Website object that gives you access to
      -           configuration
      - - -

      The second Python section is the 'every' section. It is -exec'd once per request. Its context cascades from the -'once' section (if it exists), and adds:

      - -
      request    a request object
      -
      -response   a response object
      - -

      The third page uses the templating language of your choosing—we call -this the “renderer.” The default renderer is the basic templating - language that Python uses to render strings: %(varname)s is replaced by the - variable 'varname' as a string. More details are available in the Python - docs. Other built-in templating languages are stdlib_format - (using - Python string formatting), stdlib_template (using Python - template strings), and json. There are - modules available with support for Tornado - (aspen-tornado), Jinja2 - (aspen-jinja2) and Pystache - (aspen-pystache). - -

      The way to specify a renderer is with a so-called “specline” at -the start of the content page:

      - -
      program = "program"
      -\[---] via pystache
      -Greetings, {{ program }}!
      - -

      You can set the default renderer for a given media type (presuming it is -installed) like so:

      - -
      website.default_renderers_by_media_type['text/html'] = 'pystache'
      - -

      Here’s how to directly set the default renderer for all media types:

      - -
      website.default_renderers_by_media_type.default_factory = lambda: 'pystache'
      - -

      This can also be phrased as:

      - -
      website.renderer_default = 'pystache'
      - -

      You can also set the default renderer globally using the renderer_default -keyword argument to Website, or the ASPEN_RENDERER_DEFAULT environment -variable.

      - - -

      Bound Simplates

      - -

      If a simplate file has a penultimate file extension -(foo.html.spt as opposed to foo.spt), then it is -considered to be a “bound simplate”: it is bound to a particular -media type. In this case the first and second sections (the Python sections) -are optional.

      - - -

      Unbound Simplates

      - -

      If a simplate file has no penultimate file extension (foo.spt -as opposed to foo.html.spt), then it is considered to be an “unbound simplate”: it is not bound to any particular media type. - -

      Instead, unbound simplates can have multiple so-called “content” -sections, and the order they appear in will determine their priority in HTTP content - negotiation. If negotiation fails you’ll get a 406 - Not Acceptable response, with a prioritized list of available media - types. Joe Gregorio’s content - negotiation module is vendored in to do the heavy lifting. The format -of the file is like this:

      - -
      import foo, json
      -
      -\[---]
      -data = foo.bar(request)
      -
      -\[---] text/plain via pystache
      -{{ data }}
      -
      -\[---] application/json
      -{{ json.dumps(data) }}
      - -

      The first two sections of the file are logic sections as described above. -Both are required for an unbound simplate. After that may appear an unlimited -number of content sections. The first line of each content section is the -so-called “specline,” where you must specify the media type of that -content section. You may optionally specify a renderer on the specline as -well.

      - -

      If a file does have a file extension, then it is a “bound -simplate” with a media type computed from the file extension. It is a -SyntaxError for a file to have both a penultimate extension and -multiple content sections.

      - - -

      Indirect Negotiation

      - -

      The canonical way to perform HTTP media type negotiation is with the Accept -request header. That’s much more cumbersome than changing the file -extension in the URL, however, so Aspen supports both. If a request comes in -for /foo.html and there’s no foo.html.spt on -the filesystem but there is a foo.spt file, then Aspen will -serve the request with that. If you request foo.txt but -foo.spt doesn’t include a text/plain page then you’ll -get a 404, whereas with direct negotiation as above you would get a 406 with a -list of available media types.

      - - -

      Encoding

      - -

      By default, simplate files are presumed to be ASCII; if non-ASCII characters -(utf8, for example) are to be included in the file, an encoding must be specifed as per -PEP 263, which means -putting the phrase 'encoding: utf8' somewhere on the first two lines of the file. - - -

      Caching

      - -

      All simplate pages are cached in a compiled state. This cache is invalidated -whenever the underlying file changes, so simplate changes are always -immediately available. When you change Python libraries or configuration files, -aspen can restart automatically. But even this extra second or so is a drag -during development. When you change a simplate, the changes are always -available immediately, without restarting the server.

      - - - -

      Ack! Mixing logic and presentation?!?!?

      - -

      Well, I like to think that simplates bring code and presentation as close -together as possible without mixing them. There are no arbitrary Python -blocks inside of the template page, à la PHP/ASP.

      - -

      Simplates are more like MVC, but with controllers, views, and templates -together in the same file instead of in separate files. Your models live in a -Python library, use an ORM, etc. And URL routing is done via the -filesystem. There’s all around less boilerplate.

      - -

      Simplates make it easy to kick off development of an app or feature of an -app. Simplates are, in fact, downright slippery. You won’t be able to -stop innovating. You just open a single file and start writing Python, -JavaScript, CSS, HTML, SQL—whatever. It takes zero wiring to get it on -the network for the first time. And as apps/features mature, you will very -naturally move code out of your single simplate into separate Python libraries, -template files, JSON endpoint simplates, JavaScript libraries, CSS files, -etc.

      - -

      Don’t be scared! This isn’t PHP! It’s MVC with less -crap.

      - - - -

      History

      - -

      My friend Steve came up with the original idea for simplates in the early -aughts, when we were running a web design shop together. We were heavily into -Zope and Plone at the time. This was in the Zope 2 days. The original idea was -something like, “What if you could put a Script (Python) and a ZPT in THE -SAME FILE!?” Steve has since switched careers to philosophy. I debuted -simplates in Aspen 0.8, which came out in December of 2007. I made simplates -the main attraction in Aspen 0.9.

      - -{% end %} diff --git a/doc/simplates/sorry-program.png b/doc/simplates/sorry-program.png deleted file mode 100644 index 9c9c671bd..000000000 Binary files a/doc/simplates/sorry-program.png and /dev/null differ diff --git a/doc/simplates/sorry-program.small.png b/doc/simplates/sorry-program.small.png deleted file mode 100644 index b0d1f1006..000000000 Binary files a/doc/simplates/sorry-program.small.png and /dev/null differ diff --git a/doc/success/approximatrix.html.spt b/doc/success/approximatrix.html.spt deleted file mode 100644 index 519c620fb..000000000 --- a/doc/success/approximatrix.html.spt +++ /dev/null @@ -1,34 +0,0 @@ -doc_title = "Success Story: Approximatrix" -doc_next = () -[----------------------------------------] -{% extends doc.html %} -{% block doc %} - -

      - -

      “I saw your talk - at PyOhio this past summer. After the conference, I decided to give -Aspen a try firsthand, and I found it a pleasure to work with. I have since -converted my small business’s website from a cluttered, obsolete Plone -installation to a very clean Aspen implementation. The site is at http://approximatrix.com.

      - -

      “The site is almost entirely static with the exception of the News. -The goal was to show News from the site itself and also from a product’s -site, which was available through an RSS feed. I was able to build an RSS feed -using Aspen pretty easily. Next, to get the news stories from two sites to -appear on the front page, I simply used the feedparser module to request the -news feed from the product’s site and the site’s own rss feed and -assemble the page, all via Aspen. Not particularly complicated, but it did -simplify creating and maintaining a simple small business home page.

      - -

      “Anyway, I just wanted to share and thank you for the hard work on -Aspen. The whole framework was easy to use, especially for someone with -minimal web development experience like myself. I look forward to seeing and -hearing more about it!”

      - -

      —Jeffrey Armstrong, October 25, 2011

      - -{% end %} - diff --git a/doc/success/approximatrix.png b/doc/success/approximatrix.png deleted file mode 100644 index 55cee927a..000000000 Binary files a/doc/success/approximatrix.png and /dev/null differ diff --git a/doc/testing/index.html.spt b/doc/testing/index.html.spt deleted file mode 100644 index 8f7dac1d6..000000000 --- a/doc/testing/index.html.spt +++ /dev/null @@ -1,39 +0,0 @@ -doc_title = "Testing" -doc_next = '' - -[---] -{% extends doc.html %} -{% block doc %} - -

      Aspen includes a test client to help you test your website.

      - -

      Here's a basic test script using pytest:

      - -
      -from pytest import yield_fixture
      -from aspen.testing.client import Client
      -
      -@yield_fixture
      -def client():
      -    yield Client(www_root='www')
      -
      -def test_my_page_greetings_programs(client):
      -    response = client.GET('/my/page.html')
      -    assert response.body == "Greetings, program!"
      -
      - -

      The client provides both GET and POST methods. The first argument is an URL -path (not a file path). If a given URL is expected to raise a response, you can -capture it using the x variants:

      - -
      -def test_changing_thing_breaks(client):
      -    response = client.PxST('/change-thing.html', data={b'foo': b'bar'})
      -    assert response.code == 400
      -
      - -

      Each client instance instantiates a separate website instance. It does this -lazily, when you actually perform a request using GET or POST. You can call -hydrate_website to trigger this directly.

      - -{% end %} diff --git a/doc/unicode/index.html.spt b/doc/unicode/index.html.spt deleted file mode 100644 index 26573fac4..000000000 --- a/doc/unicode/index.html.spt +++ /dev/null @@ -1,192 +0,0 @@ -# -*- coding: utf-8 -*- -doc_title = "Unicode" -doc_next = ('Virtual Paths', '/virtual-paths/') - -""" - -ERRATA IN #36 -Canonical_Represenation -in the string "G/Y" - -""" - -response.charset = "UTF-8" -[----------------------------------------] -{% extends doc.html %} -{% block doc %} - - - -

      According - to Guido, Python “has excellent support for Unicode, and will -keep getting better.” The same is true of ... oh no! Snowman -is being attacked by Comet! -But, look! Linear - Buck, hero from beyond the Basic - Multilingual Plane, is coming to his rescue! Hooray for Linear -Buck!

      - -

      - ☄
      -
      - ☃ - ð‚‚ -

      - -

      In designing Aspen’s Unicode handling, the following priorities have -been in view:

      - -
        - -
      1. Aspen should handle Unicode securely.
      2. - -
      3. Aspen should observe standards.
      4. - -
      5. Aspen should interoperate with consumer-grade web browsers (Internet - Explorer, etc.) where they diverge from standards.
      6. - -
      7. Aspen should enable access to raw bytestrings for advanced use - cases.
      8. - -
      - -

      This document describes Aspen’s approach to Unicode security, and then -describes Aspen’s algorithms for decoding Requests and encoding -Responses, with reference to the de jure standards, de facto browser -behavior, and advanced use cases.

      - - -

      Security

      - -

      The canonical reference for security issues related to Unicode is this -Technical Report from the Unicode Consortium:

      - - - -

      Most of the discussion revolves around spoofing websites by registering -visually confusing domain names such as paypаl.com, where -the second ‘a’ is actually from the - Cyrillic and not the Latin alphabet. That’s a problem for browser -vendors to solve, and for you to take advantage of, if you’re a Bad Guy -like Comet (just watch out for Linear Buck!).

      - -

      What Snowman has to worry about are the “Non-Visual Security -Issues.” The basic idea is that any algorithm that mutates character data -is a chance for Comet to game that algorithm. If Comet can sneak in an extra -path separator or remove a quotation mark, then she may be able to traverse -Snowman’s filesystem or inject some extra SQL. What is Snowman to do?

      - -

      Validate late!

      - -

      After validating your inputs, make sure that you don’t transcode the -data again before using it. Here’s a simple illustration:

      - -
        - -
      1. Comet sends a request for /..%2Fetc%2Fpassword.
      2. - -
      3. Snowman conscientiously checks the request for path separators - (“/”).
      4. - -
      5. Snowman doesn’t find any path separators and let’s the - request through.
      6. - -
      7. Later on in his program, Snowman decodes the percent-encoding in this - value. Guess what %2F decodes to.
      8. - -
      9. Finally, Snowman runs open("/../etc/password").read() and - returns the result to Comet.
      10. - -
      - -

      Obviously this is a contrived example but it makes the point. TR36 mentions -seven algorithms in Unicode and goes into the details of how to game them:

      - -
        -
      • normalization—e.g., folding multiple accent combinations - together
      • -
      • fallbacks—substituting e or - &#x24D4; for â“”
      • -
      • non-shortest-form—conflating \xC1\x9C with \5C to both - mean backslash
      • -
      • ill-formed sequences—replacing or deleting bad bytes
      • -
      • text comparison—sorting, searching, matching
      • -
      • buffer overruns—falsely assuming data will fit in a - certain amount of memory
      • -
      • deletion—removing non-character data (different than - removing bad bytes)
      • -
      - -

      The good news is that Python handles almost all of these for us, and Aspen -handles the rest. If Aspen is given an HTTP Request that doesn’t decode -cleanly according to the algorithm below, then it returns a 400 Bad -Request.

      - - - -

      Decoding Requests

      - -

      Here are the parts of the Request with notes on how -Aspen decodes them:

      - -
      -request
      -    line
      -        method           subset of ASCII, per spec
      -        uri
      -            path         subset of ASCII, per spec (but WSGI servers do
      -                          things)
      -            querystring  subset of ASCII, per spec (but IE sends raw
      -                          UTF-8)
      -        version
      -    headers              ???
      -    body                 ???
      -
      - -

      If a browser or other program sends anything else to Aspen, it’ll get -400 Bad Request.

      - - - -

      Encoding Responses

      - -

      The Aspen Response object takes body as a -bytestring or iterable of bytestrings. If you set response.charset in a -template resource then that will be added to Content-Type if your mimetype is -of major type 'text'. There is no default charset for static resources, which -means HTTP-conformant clients will try ISO-8859-1, but most will probably try -to guess based on how the bytes smell.

      - -{% end %} diff --git a/doc/unicode/linear-b.eot b/doc/unicode/linear-b.eot deleted file mode 100644 index 9bf7f1f10..000000000 Binary files a/doc/unicode/linear-b.eot and /dev/null differ diff --git a/doc/unicode/linear-b.svg b/doc/unicode/linear-b.svg deleted file mode 100644 index c29af09a7..000000000 --- a/doc/unicode/linear-b.svg +++ /dev/null @@ -1,401 +0,0 @@ - - - - -This is a custom SVG webfont generated by Font Squirrel. -Copyright : Unicode Fonts for Ancient Scripts George Douros 2012 -Designer : George Douros -Foundry : Free -Foundry URL : httpusersteilargrg1951d - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/doc/unicode/linear-b.ttf b/doc/unicode/linear-b.ttf deleted file mode 100644 index e350cc993..000000000 Binary files a/doc/unicode/linear-b.ttf and /dev/null differ diff --git a/doc/unicode/linear-b.woff b/doc/unicode/linear-b.woff deleted file mode 100644 index 322cfef13..000000000 Binary files a/doc/unicode/linear-b.woff and /dev/null differ diff --git "a/doc/unicode/\342\230\203.html.spt" "b/doc/unicode/\342\230\203.html.spt" deleted file mode 100644 index 66bea3aae..000000000 --- "a/doc/unicode/\342\230\203.html.spt" +++ /dev/null @@ -1 +0,0 @@ -Greetings, program! diff --git "a/doc/unicode/\342\230\204.html" "b/doc/unicode/\342\230\204.html" deleted file mode 100644 index 66bea3aae..000000000 --- "a/doc/unicode/\342\230\204.html" +++ /dev/null @@ -1 +0,0 @@ -Greetings, program! diff --git a/doc/virtual-paths/1999.png b/doc/virtual-paths/1999.png deleted file mode 100644 index ea181d3b8..000000000 Binary files a/doc/virtual-paths/1999.png and /dev/null differ diff --git a/doc/virtual-paths/1999.small.png b/doc/virtual-paths/1999.small.png deleted file mode 100644 index 9606e5cc4..000000000 Binary files a/doc/virtual-paths/1999.small.png and /dev/null differ diff --git a/doc/virtual-paths/aspen.png b/doc/virtual-paths/aspen.png deleted file mode 100644 index f184d474f..000000000 Binary files a/doc/virtual-paths/aspen.png and /dev/null differ diff --git a/doc/virtual-paths/aspen.small.png b/doc/virtual-paths/aspen.small.png deleted file mode 100644 index 7cc9e2d88..000000000 Binary files a/doc/virtual-paths/aspen.small.png and /dev/null differ diff --git a/doc/virtual-paths/cheese.png b/doc/virtual-paths/cheese.png deleted file mode 100644 index 4507112f1..000000000 Binary files a/doc/virtual-paths/cheese.png and /dev/null differ diff --git a/doc/virtual-paths/cheese.small.png b/doc/virtual-paths/cheese.small.png deleted file mode 100644 index df86af61f..000000000 Binary files a/doc/virtual-paths/cheese.small.png and /dev/null differ diff --git a/doc/virtual-paths/index.html.spt b/doc/virtual-paths/index.html.spt deleted file mode 100644 index 0207fcc03..000000000 --- a/doc/virtual-paths/index.html.spt +++ /dev/null @@ -1,117 +0,0 @@ -doc_title = "Virtual Paths" -doc_next = '' -[----------------------------------------] -{% extends doc.html %} -{% block doc %} - -

      Aspen supports dynamic URLs using virtual paths, which are specially-named -directories and files on your filesystem.

      - - -

      Directories

      - -

      Make a directory on your filesystem called %name.

      - -
      $ mkdir %name
      - -

      Then make an index.html.spt simplate -in there with this content:

      - -
      [---]
      -Greetings, {{ path['name'] }}!
      - -

      Now hit http://localhost:8080/aspen/. You -should see this:

      - -{{ screenshot("aspen") }} - -

      Now hit http://localhost:8080/python/. You -should see:

      - -{{ screenshot("python") }} - -

      Get it?

      - - -

      Files

      - -

      Aspen will also match files that start with a percent sign (%). -Make a simplate in %name named %cheese.txt, with this -content:

      - -
      [---]
      -{{ path['name'].title() }} likes {{ path['cheese'] }} cheese.
      -
      - -

      Now test it out:

      - -{{ screenshot("cheese") }} - -

      Virtual path files only work for the last URL path part, so if you hit /chad/cheddar.txt/ (with -a trailing slash), you’ll get a 404:

      - -{{ screenshot("no-cheese") }} - -

      Virtual path files (only! not directories!) are greedy, however. -so if you hit -/chad/swiss/gruyere.txt then since it ends in .txt and there's no real -swiss directory to take precedence, the %cheese.txt -file will be used, with cheese equal to swiss/gruyere -.

      -

      The general philosophy of aspen's matching with virtual paths and greedy -virtual filenames is Most specific wins, so if there's a real -directory named swiss with a file named gruyere.txt -in it, then that real file will be preferred over the virtual one. - -

      Typecasting

      - -

      By default, path parts are decoded to Python unicode objects using ASCII, -and are then unquoted (per urllib.unquote). -You can also typecast path parts to arbitrary objects, by registering -typecasters in the website.typecasters dictionary. A typecaster -is a function that takes two positional arguments, the path part as a -unicode and the state dictionary from the current algorithm run, and returns an -object. Typecasters for int and float are included -out of the box.

      - -

      Make a directory called %year.int -(for files, put the cast before the file extension, like -%year.int.html.spt).

      - -
      $ mkdir "%year.int"
      - -

      Then put an index.html.spt in there with this content: - -

      [---]
      -Tonight we're going to party like it's {{ path['year'] }}!
      - -

      Now hit http://localhost:8080/1999/. What -do you get?

      - -{{ screenshot("oops") }} - -

      Wait ... where's the party?

      - - -

      Gotcha!

      - -

      You can only have one variable directory per level. If you have more than -one, the case-insensitive alphabetically first is used. Get it?

      - -

      Remove the %name directory:

      - -
      $ rm -rf %name
      - -

      Now refresh, and you should see:

      - -{{ screenshot("1999") }} - -

      That’s better. Yay filesystem!

      - -{% end %} diff --git a/doc/virtual-paths/no-cheese.png b/doc/virtual-paths/no-cheese.png deleted file mode 100644 index 8dbd1c386..000000000 Binary files a/doc/virtual-paths/no-cheese.png and /dev/null differ diff --git a/doc/virtual-paths/no-cheese.small.png b/doc/virtual-paths/no-cheese.small.png deleted file mode 100644 index 506e2e2e4..000000000 Binary files a/doc/virtual-paths/no-cheese.small.png and /dev/null differ diff --git a/doc/virtual-paths/oops.png b/doc/virtual-paths/oops.png deleted file mode 100644 index 98a868365..000000000 Binary files a/doc/virtual-paths/oops.png and /dev/null differ diff --git a/doc/virtual-paths/oops.small.png b/doc/virtual-paths/oops.small.png deleted file mode 100644 index bd1113cf7..000000000 Binary files a/doc/virtual-paths/oops.small.png and /dev/null differ diff --git a/doc/virtual-paths/python.png b/doc/virtual-paths/python.png deleted file mode 100644 index 6daf8b45a..000000000 Binary files a/doc/virtual-paths/python.png and /dev/null differ diff --git a/doc/virtual-paths/python.small.png b/doc/virtual-paths/python.small.png deleted file mode 100644 index 4592ac658..000000000 Binary files a/doc/virtual-paths/python.small.png and /dev/null differ