diff options
| author | Tom Christie | 2012-09-09 16:56:04 +0100 | 
|---|---|---|
| committer | Tom Christie | 2012-09-09 16:56:04 +0100 | 
| commit | d4f8b4cf0683923fe85652f8fd572d2931eb3074 (patch) | |
| tree | 0bdf405a6c67d2f62f6670e749b72bf9be0fafe6 | |
| parent | baa6e2c18b94345e8f00f28a34817abdbdb437dc (diff) | |
| download | django-rest-framework-d4f8b4cf0683923fe85652f8fd572d2931eb3074.tar.bz2 | |
Collapsing menu, travis and github badges, horizontal scrolling code on overflow
| -rw-r--r-- | README.md | 4 | ||||
| -rw-r--r-- | docs/index.md | 4 | ||||
| -rw-r--r-- | docs/static/css/drf-styles.css | 29 | ||||
| -rw-r--r-- | docs/template.html | 2 | ||||
| -rwxr-xr-x | mkdocs.py | 1 | 
5 files changed, 38 insertions, 2 deletions
| @@ -4,6 +4,8 @@  **Author:** Tom Christie.  [Follow me on Twitter][twitter] +[][travis] +  # Overview  This branch is the redesign of Django REST framework.  It is a work in progress. @@ -79,7 +81,7 @@ CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,  OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE   OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - +[travis]: http://travis-ci.org/tomchristie/django-rest-framework?branch=restframework2  [twitter]: https://twitter.com/_tomchristie  [docs]: http://tomchristie.github.com/django-rest-framework/  [urlobject]: https://github.com/zacharyvoase/urlobject diff --git a/docs/index.md b/docs/index.md index 72e247ee..46c5cf19 100644 --- a/docs/index.md +++ b/docs/index.md @@ -1,3 +1,6 @@ +<iframe src="http://ghbtns.com/github-btn.html?user=tomchristie&repo=django-rest-framework&type=watch&count=true" allowtransparency="true" frameborder="0" scrolling="0" width="110px" height="20px"></iframe> +[][travis] +  # Django REST framework  **A toolkit for building well-connected, self-describing Web APIs.** @@ -131,6 +134,7 @@ CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,  OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE   OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +[travis]: http://travis-ci.org/tomchristie/django-rest-framework?branch=restframework2  [urlobject]: https://github.com/zacharyvoase/urlobject  [markdown]: http://pypi.python.org/pypi/Markdown/  [yaml]: http://pypi.python.org/pypi/PyYAML diff --git a/docs/static/css/drf-styles.css b/docs/static/css/drf-styles.css index 49740aab..bb31b07c 100644 --- a/docs/static/css/drf-styles.css +++ b/docs/static/css/drf-styles.css @@ -23,10 +23,39 @@ a.github:hover {    text-decoration: none;  } +.dropdown .dropdown-menu { +    display: none; +} + +.dropdown.open .dropdown-menu { +    display: block; +} + +body.index #main-content iframe { +    float: right; +} + +body.index #main-content iframe { +    float: right; +    margin-right: -15px; +} + +body.index #main-content p:first-of-type { +    float: right; +    margin-right: 8px; +    margin-top: -1px; +} +  #table-of-contents {      overflow: hidden;  } +pre { +  overflow: auto; +  word-wrap: normal; +  white-space: pre; +} +  /* Preserve the spacing of the navbar across different screen sizes. */  .navbar-inner {    padding: 5px 0;  diff --git a/docs/template.html b/docs/template.html index a4b4d4b4..c8cfbbab 100644 --- a/docs/template.html +++ b/docs/template.html @@ -16,7 +16,7 @@      <!--[if lt IE 9]>        <script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>      <![endif]--> -  <body onload="prettyPrint()"> +  <body onload="prettyPrint()" class="{{ page_id }}">      <div class="navbar navbar-inverse navbar-fixed-top">        <div class="navbar-inner"> @@ -66,6 +66,7 @@ for (dirpath, dirnames, filenames) in os.walk(docs_dir):          if not os.path.exists(build_dir):              os.makedirs(build_dir)          output = page.replace('{{ content }}', content).replace('{{ toc }}', toc).replace('{{ base_url }}', base_url).replace('{{ suffix }}', suffix).replace('{{ index }}', index) +        output = output.replace('{{ page_id }}', filename[:-3])          output = re.sub(r'a href="([^"]*)\.md"', r'a href="\1%s"' % suffix, output)          output = re.sub(r'<pre><code>:::bash', r'<pre class="prettyprint lang-bsh">', output)          output = re.sub(r'<pre>', r'<pre class="prettyprint lang-py">', output) | 
