summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcel Hellkamp <marc@gsites.de>2011-11-24 20:29:47 +0100
committerMarcel Hellkamp <marc@gsites.de>2011-11-24 20:29:47 +0100
commitc764abc7e20464fb2962961cebba45ffafd4dd27 (patch)
tree0a7531d7e51b5897af72967dfb101a8d1bba04af
parent74e71f3407b37c324e2ae9c9e158e253ad4a5981 (diff)
downloadbottle-c764abc7e20464fb2962961cebba45ffafd4dd27.tar.gz
docs: Merging 0.11 docs layout changes.
-rwxr-xr-xdocs/_static/bottle.css_t60
-rw-r--r--docs/_templates/donation.html2
-rwxr-xr-xdocs/_templates/layout.html2
-rw-r--r--docs/_templates/page.html9
-rw-r--r--docs/_templates/sidebar-intro.html14
-rw-r--r--docs/conf.py7
6 files changed, 77 insertions, 17 deletions
diff --git a/docs/_static/bottle.css_t b/docs/_static/bottle.css_t
index da8f58c..3dc0c9c 100755
--- a/docs/_static/bottle.css_t
+++ b/docs/_static/bottle.css_t
@@ -63,6 +63,27 @@ div.body {
line-height: 1.4em;
}
+div.body h2 {
+ background-color: {{ color_border }};
+ color: {{ textcolor_border }};
+ margin: 2em -15px 1em -30px;
+ padding: 7px 15px 5px 15px;
+ border-top-left-radius: 15px;
+ -moz-border-radius-topleft: 15px;
+ -webkit-border-top-left-radius: 15px;
+ border-bottom-left-radius: 15px;
+ -moz-border-radius-bottomleft: 15px;
+ -webkit-border-bottom-left-radius: 15px;
+}
+
+div.body h3 {
+ margin: 2em 0 1em 0;
+}
+
+div.body h2 a {
+ color: {{ linkcolor_border }};
+}
+
a {
color: {{ linkcolor_document }};
text-decoration: none;
@@ -75,12 +96,10 @@ a:hover {
/* Notes and Codes */
-pre, div.admonition {
- background: #fafafa;
- margin: 20px -15px;
- padding: 10px 30px;
- border-top: 1px solid #ccc;
- border-bottom: 1px solid #ccc;
+pre {
+ background-color: {{ color_body }};
+ margin: 1em 2em;
+ padding: 0.5em;
}
dd pre, dd div.admonition {
@@ -93,6 +112,18 @@ div.admonition p.last {
margin-bottom: 0;
}
+div.admonition {
+ border: 1px solid {{ color_border }};
+ margin: 1em 2em;
+ padding: 0.5em;
+ font-size: 0.9em;
+ line-height: 1.3em;
+}
+
+div.admonition p.admonition-title {
+ margin: 0;
+}
+
div.admonition p.admonition-title:after {
content:":";
}
@@ -102,7 +133,7 @@ div.warning {
}
div.note {
- background-color: #ffd;
+ background-color: #ffc;
}
div.highlight {
@@ -115,9 +146,8 @@ pre {
}
code, tt.docutils {
- border: 1px dotted #ddd;
- background-color: #eee;
- font-size: 85%;
+ font-size: 0.9em;
+ padding: 0 0.2em;
}
tt.xref {
@@ -140,10 +170,18 @@ div.body {
div.sphinxsidebar ul {
margin: 15px 0;
- padding: 0;
+ padding: 0 0 0.5em 0;
color: #000;
}
+div.sphinxsidebar li {
+ line-height: 1.3em;
+}
+
+div.sphinxsidebar ul ul ul {
+ font-size: 0.9em;
+}
+
div.sphinxsidebar h3 {
background-color: {{ color_border }};
color: {{ textcolor_border }};
diff --git a/docs/_templates/donation.html b/docs/_templates/donation.html
index 26e6659..4ff746b 100644
--- a/docs/_templates/donation.html
+++ b/docs/_templates/donation.html
@@ -3,7 +3,7 @@
<li>
<form action="https://www.paypal.com/cgi-bin/webscr" method="post">
<a href="http://flattr.com/thing/21888/Bottle-A-Python-Web-Framework" target="_blank">
- <img src="http://api.flattr.com/button/button-compact-static-100x17.png" alt="Flattr this" title="Flattr this" border="0" />
+ <img src="http://api.flattr.com/button/flattr-badge-large.png" alt="Flattr this" title="Flattr this" border="0" />
</a>
<input type="hidden" name="cmd" value="_s-xclick">
<input type="hidden" name="hosted_button_id" value="10013866">
diff --git a/docs/_templates/layout.html b/docs/_templates/layout.html
index 4f88cb4..b0cd363 100755
--- a/docs/_templates/layout.html
+++ b/docs/_templates/layout.html
@@ -5,7 +5,7 @@
<link rel="image_src" type="image/png" href="{{ pathto('_static/logo_reddit.png', 1) }}" />
<script type="application/javascript" src="{{ pathto('_static/default.js', 1) }}"></script>
{% if pagename == 'index' -%}
- <meta name="description" content="Bottle is a fast, simple and lightweight WSGI micro web-framework for Python." />
+ <meta name="description" content="Bottle is a fast, simple and lightweight WSGI micro web-framework for Python." />
{% endif %}
{{ super() }}
{% endblock %}
diff --git a/docs/_templates/page.html b/docs/_templates/page.html
new file mode 100644
index 0000000..8cb116c
--- /dev/null
+++ b/docs/_templates/page.html
@@ -0,0 +1,9 @@
+{% extends "!page.html" %}
+
+{% block body %}
+ {% if 'dev' in release or 'rc' in release %}
+ <p style='font-size: 0.75em; color: darkred'><b>Warning:</b> This is a preview for <b>Bottle-{{release}}</b>, which is
+ not released yet. Switch to the latest <a href="http://bottlepy.org/docs/stable/"><b>stable release</b></a>?</p>
+ {% endif %}
+ {{ super() }}
+{% endblock %} \ No newline at end of file
diff --git a/docs/_templates/sidebar-intro.html b/docs/_templates/sidebar-intro.html
index eac97dd..1175b6d 100644
--- a/docs/_templates/sidebar-intro.html
+++ b/docs/_templates/sidebar-intro.html
@@ -1,5 +1,5 @@
<p>
- This is the documentation of Bottle, a fast, simple and lightweight WSGI micro web-framework for Python.
+ Bottle is a fast, simple and lightweight WSGI micro web-framework for Python.
</p>
<h3>Some Links</h3>
<ul>
@@ -7,7 +7,9 @@
<li><a target="_blank" href="http://pypi.python.org/pypi/bottle">Bottle @ PyPI</a></li>
<li><a target="_blank" href="https://github.com/defnull/bottle">Bottle @ GitHub</a></li>
<li><a target="_blank" href="http://groups.google.de/group/bottlepy">Bottle @ Google Groups</a></li>
+ <li><a target="_blank" href="https://plus.google.com/b/104025895326575643538/104025895326575643538/posts">Bottle @ Google plus</a></li>
<li><a target="_blank" href="http://twitter.com/bottlepy">Bottle @ Twitter</a></li>
+ <li><a target="_blank" href="http://webchat.freenode.net/?channels=bottlepy">Bottle @ Freenode (Chat)</a></li>
</ul>
<h3>Installation</h3>
<p>Install Bottle with <code>pip&nbsp;install&nbsp;bottle</code> or download the source package at <a href="http://pypi.python.org/pypi/bottle">PyPI</a>.</p>
@@ -19,9 +21,13 @@
<p>Browse the sources at <a href="https://github.com/defnull/bottle">GitHub</a>.</p>
<h3>Other Releases</h3>
<ul>
- <li><a href="http://bottlepy.org/docs/dev/">Bottle dev (development)</a></li>
- <li><a href="http://bottlepy.org/docs/0.9/">Bottle 0.9 (stable)</a></li>
- <li><a href="http://bottlepy.org/docs/0.8/">Bottle 0.8 (oldstable)</a></li>
+ {% for v, name in releases %}
+ {% if v == version %}
+ <li><b>Bottle {{v}}</b> ({{name}})</li>
+ {% else %}
+ <li><a href="http://bottlepy.org/docs/{{v}}/">Bottle {{v}}</a> ({{name}})</li>
+ {% endif %}
+ {% endfor %}
</ul>
diff --git a/docs/conf.py b/docs/conf.py
index e944454..20bf41d 100644
--- a/docs/conf.py
+++ b/docs/conf.py
@@ -141,6 +141,13 @@ html_sidebars = {
'**': ['localtoc.html', 'relations.html', 'sourcelink.html', 'donation.html', 'searchbox.html']
}
+html_context = {
+ 'releases': [('dev', 'development'),
+ ('0.9', 'stable'),
+ ('0.8', 'old stable')
+ ]
+}
+
# Additional templates that should be rendered to pages, maps page names to
# template names.
#html_additional_pages = {}