[Python-checkins] r61422 - in doctools/trunk: doc/.static/sphinx.png doc/.templates/index.html doc/.templates/layout.html sphinx/static/sphinxdoc.css sphinx/templates/layout.html sphinx/templates/macros.html
georg.brandl
python-checkins at python.org
Sun Mar 16 13:00:01 CET 2008
Author: georg.brandl
Date: Sun Mar 16 13:00:01 2008
New Revision: 61422
Added:
doctools/trunk/sphinx/templates/macros.html
Modified:
doctools/trunk/doc/.static/sphinx.png
doctools/trunk/doc/.templates/index.html
doctools/trunk/doc/.templates/layout.html
doctools/trunk/sphinx/static/sphinxdoc.css
doctools/trunk/sphinx/templates/layout.html
Log:
Make the sphinxdoc layout work with IE.
Modified: doctools/trunk/doc/.static/sphinx.png
==============================================================================
Binary files. No diff available.
Modified: doctools/trunk/doc/.templates/index.html
==============================================================================
--- doctools/trunk/doc/.templates/index.html (original)
+++ doctools/trunk/doc/.templates/index.html Sun Mar 16 13:00:01 2008
@@ -1,6 +1,11 @@
{% extends "layout.html" %}
{% set title = 'Overview' %}
{% block body %}
+ <p style="background-color: #fcc; font-size: large; border: 1px solid #f00; padding: 10px;">
+ <b>Attention:</b> this is a preview. Sphinx is not released yet on PyPI,
+ and the contents of this documentation are subject to change.
+ </p>
+
<h1>Welcome</h1>
<p>
@@ -10,6 +15,7 @@
new Python documentation</a>, but has now been cleaned up in the hope that
it will be useful to many other projects. (Of course, this site is also
created from reStructuredText sources using Sphinx!)
+
</p>
<p>
Although it is still under constant development, the following features are
Modified: doctools/trunk/doc/.templates/layout.html
==============================================================================
--- doctools/trunk/doc/.templates/layout.html (original)
+++ doctools/trunk/doc/.templates/layout.html Sun Mar 16 13:00:01 2008
@@ -10,3 +10,7 @@
<img src="{{ pathto("static/sphinx.png", 1) }}">
</div>
{% endblock %}
+
+{# put the sidebar before the body #}
+{% block sidebar1 %}{{ sidebar() }}{% endblock %}
+{% block sidebar2 %}{% endblock %}
\ No newline at end of file
Modified: doctools/trunk/sphinx/static/sphinxdoc.css
==============================================================================
--- doctools/trunk/sphinx/static/sphinxdoc.css (original)
+++ doctools/trunk/sphinx/static/sphinxdoc.css Sun Mar 16 13:00:01 2008
@@ -101,7 +101,6 @@
dl {
margin-bottom: 15px;
- clear: both;
}
dd p {
@@ -148,51 +147,16 @@
background-repeat: repeat-x;
}
+/*
div.documentwrapper {
- float: left;
width: 100%;
}
+*/
div.clearer {
clear: both;
}
-div.header {
- background-image: url(header.png);
- height: 100px;
-}
-
-div.header h1 {
- float: right;
- position: absolute;
- margin: -30px 0 0 585px;
- height: 180px;
- width: 180px;
-}
-
-div.header h1 a {
- display: block;
- background-image: url(werkzeug.png);
- background-repeat: no-repeat;
- height: 180px;
- width: 180px;
- text-decoration: none;
- color: white!important;
-}
-
-div.header span {
- display: none;
-}
-
-div.header p {
- background-image: url(header_invert.png);
- margin: 0;
- padding: 10px;
- height: 80px;
- color: white;
- display: none;
-}
-
div.related h3 {
display: none;
}
@@ -250,7 +214,8 @@
padding: 0.5em 15px 15px 0;
width: 210px;
float: right;
- margin-left: -100%;
+ text-align: left;
+/* margin-left: -100%; */
}
div.sidebar h4, div.sidebar h3 {
Modified: doctools/trunk/sphinx/templates/layout.html
==============================================================================
--- doctools/trunk/sphinx/templates/layout.html (original)
+++ doctools/trunk/sphinx/templates/layout.html Sun Mar 16 13:00:01 2008
@@ -1,7 +1,8 @@
-{% block doctype -%}
+{%- include "macros.html" %}
+{%- block doctype -%}
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
-{% endblock -%}
+{%- endblock %}
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
@@ -56,36 +57,14 @@
<body>
{%- block beforerelbar %}{% endblock %}
-{%- filter capture('relbar') %}
-{%- block relbar %}
- <div class="related">
- <h3>Navigation</h3>
- <ul>
- <li class="right" style="margin-right: 10px"><a href="{{ pathto('genindex') }}" title="General Index" accesskey="I">index</a></li>
- <li class="right"><a href="{{ pathto('modindex') }}" title="Global Module Index" accesskey="M">modules</a> |</li>
- {%- if next %}
- <li class="right"><a href="{{ next.link|e }}" title="{{ next.title|striptags }}" accesskey="N">next</a> |</li>
- {%- endif %}
- {%- if prev %}
- <li class="right"><a href="{{ prev.link|e }}" title="{{ prev.title|striptags }}" accesskey="P">previous</a> |</li>
- {%- endif %}
- {%- if builder == 'web' %}
- <li class="right"><a href="{{ pathto('settings') }}"
- title="Customize your viewing settings" accesskey="S">settings</a> |</li>
- {%- endif %}
- {%- block rootrellink %}
- <li><a href="{{ pathto('index') }}">{{ project }} v{{ release }} documentation</a> »</li>
- {%- endblock %}
- {%- for parent in parents %}
- <li><a href="{{ parent.link|e }}" accesskey="U">{{ parent.title }}</a> »</li>
- {%- endfor %}
- {%- block relbaritems %}{% endblock %}
- </ul>
- </div>
-{%- endblock %}
-{%- endfilter %}
+{%- block relbar1 %}{{ relbar() }}{% endblock %}
{%- block afterrelbar %}{% endblock %}
+{%- block beforesidebar1 %}{% endblock %}
+{%- block sidebar1 %}{# possible location for sidebar #}{% endblock %}
+{%- block aftersidebar1 %}{% endblock %}
+
+{%- block beforedocument %}{% endblock %}
<div class="document">
<div class="documentwrapper">
{%- if builder != 'htmlhelp' %}
@@ -98,61 +77,16 @@
</div>
{%- endif %}
</div>
+{%- block afterdocument %}{% endblock %}
-{%- block beforesidebar %}{% endblock %}
-{%- block sidebar %}
- {%- if builder != 'htmlhelp' %}
- <div class="sidebar">
- <div class="sidebarwrapper">
- {% if display_toc %}
- <h3>Table Of Contents</h3>
- {{ toc }}
- {% endif %}
- {%- if prev %}
- <h4>Previous topic</h4>
- <p class="topless"><a href="{{ prev.link|e }}" title="previous chapter">{{ prev.title }}</a></p>
- {%- endif %}
- {%- if next %}
- <h4>Next topic</h4>
- <p class="topless"><a href="{{ next.link|e }}" title="next chapter">{{ next.title }}</a></p>
- {%- endif %}
- {% if sourcename %}
- <h3>This Page</h3>
- <ul class="this-page-menu">
- {% if builder == 'web' %}
- <li><a href="#comments">Comments ({{ comments|length }} so far)</a></li>
- <li><a href="{{ pathto('@edit/' + sourcename)|e }}">Suggest Change</a></li>
- <li><a href="{{ pathto('@source/' + sourcename)|e }}">Show Source</a></li>
- {% elif builder == 'html' %}
- <li><a href="{{ pathto('_sources/' + sourcename, true)|e }}">Show Source</a></li>
- {% endif %}
- </ul>
- {% endif %}
- {% if customsidebar %}
- {{ rendertemplate(customsidebar) }}
- {% endif %}
- {% if current_page_name != "search" and builder == 'web' %}
- {# HTML builder search is disabled for now #}
- <h3>{{ builder == 'web' and 'Keyword' or 'Quick' }} search</h3>
- <form class="search" action="{{ pathto('search') }}" method="get">
- <input type="text" name="q" size="18"> <input type="submit" value="Go">
- <input type="hidden" name="check_keywords" value="yes">
- <input type="hidden" name="area" value="default">
- </form>
- {% if builder == 'web' %}
- <p style="font-size: 90%">Enter a module, class or function name.</p>
- {% endif %}
- {% endif %}
- </div>
- </div>
- {%- endif %}
-{%- endblock %}
-{%- block aftersidebar %}{% endblock %}
+{%- block beforesidebar2 %}{% endblock %}
+{%- block sidebar2 %}{{ sidebar() }}{% endblock %}
+{%- block aftersidebar2 %}{% endblock %}
<div class="clearer"></div>
</div>
-{%- block bottomrelbar %}
-{{ relbar }}
-{%- endblock %}
+
+{%- block relbar2 %}{{ relbar() }}{% endblock %}
+
{%- block beforefooter %}{% endblock %}
{%- block footer %}
<div class="footer">
Added: doctools/trunk/sphinx/templates/macros.html
==============================================================================
--- (empty file)
+++ doctools/trunk/sphinx/templates/macros.html Sun Mar 16 13:00:01 2008
@@ -0,0 +1,73 @@
+{%- macro sidebar %}
+ {%- if builder != 'htmlhelp' %}
+ <div class="sidebar">
+ <div class="sidebarwrapper">
+ {% if display_toc %}
+ <h3>Table Of Contents</h3>
+ {{ toc }}
+ {% endif %}
+ {%- if prev %}
+ <h4>Previous topic</h4>
+ <p class="topless"><a href="{{ prev.link|e }}" title="previous chapter">{{ prev.title }}</a></p>
+ {%- endif %}
+ {%- if next %}
+ <h4>Next topic</h4>
+ <p class="topless"><a href="{{ next.link|e }}" title="next chapter">{{ next.title }}</a></p>
+ {%- endif %}
+ {% if sourcename %}
+ <h3>This Page</h3>
+ <ul class="this-page-menu">
+ {% if builder == 'web' %}
+ <li><a href="#comments">Comments ({{ comments|length }} so far)</a></li>
+ <li><a href="{{ pathto('@edit/' + sourcename)|e }}">Suggest Change</a></li>
+ <li><a href="{{ pathto('@source/' + sourcename)|e }}">Show Source</a></li>
+ {% elif builder == 'html' %}
+ <li><a href="{{ pathto('_sources/' + sourcename, true)|e }}">Show Source</a></li>
+ {% endif %}
+ </ul>
+ {% endif %}
+ {% if customsidebar %}
+ {{ rendertemplate(customsidebar) }}
+ {% endif %}
+ {% if current_page_name != "search" and builder == 'web' %}
+ {# HTML builder search is disabled for now #}
+ <h3>{{ builder == 'web' and 'Keyword' or 'Quick' }} search</h3>
+ <form class="search" action="{{ pathto('search') }}" method="get">
+ <input type="text" name="q" size="18"> <input type="submit" value="Go">
+ <input type="hidden" name="check_keywords" value="yes">
+ <input type="hidden" name="area" value="default">
+ </form>
+ {% if builder == 'web' %}
+ <p style="font-size: 90%">Enter a module, class or function name.</p>
+ {% endif %}
+ {% endif %}
+ </div>
+ </div>
+ {%- endif %}
+{%- endmacro %}
+{%- macro relbar %}
+ <div class="related">
+ <h3>Navigation</h3>
+ <ul>
+ <li class="right" style="margin-right: 10px"><a href="{{ pathto('genindex') }}" title="General Index" accesskey="I">index</a></li>
+ <li class="right"><a href="{{ pathto('modindex') }}" title="Global Module Index" accesskey="M">modules</a> |</li>
+ {%- if next %}
+ <li class="right"><a href="{{ next.link|e }}" title="{{ next.title|striptags }}" accesskey="N">next</a> |</li>
+ {%- endif %}
+ {%- if prev %}
+ <li class="right"><a href="{{ prev.link|e }}" title="{{ prev.title|striptags }}" accesskey="P">previous</a> |</li>
+ {%- endif %}
+ {%- if builder == 'web' %}
+ <li class="right"><a href="{{ pathto('settings') }}"
+ title="Customize your viewing settings" accesskey="S">settings</a> |</li>
+ {%- endif %}
+ {%- block rootrellink %}
+ <li><a href="{{ pathto('index') }}">{{ project }} v{{ release }} documentation</a> »</li>
+ {%- endblock %}
+ {%- for parent in parents %}
+ <li><a href="{{ parent.link|e }}" accesskey="U">{{ parent.title }}</a> »</li>
+ {%- endfor %}
+ {%- block relbaritems %}{% endblock %}
+ </ul>
+ </div>
+{%- endmacro %}
More information about the Python-checkins
mailing list