Anonymous avatar Anonymous committed f77c463

Make the sphinxdoc layout work with IE.

Comments (0)

Files changed (6)

Add a comment to this file

doc/.static/sphinx.png

Old
Old image
New
New image

doc/.templates/index.html

 {% 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>
     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

doc/.templates/layout.html

 <img src="{{ pathto("static/sphinx.png", 1) }}">
 </div>
 {% endblock %}
+
+{# put the sidebar before the body #}
+{% block sidebar1 %}{{ sidebar() }}{% endblock %}
+{% block sidebar2 %}{% endblock %}

sphinx/static/sphinxdoc.css

 
 dl {
     margin-bottom: 15px;
-    clear: both;
 }
 
 dd p {
     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;
 }
     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 {

sphinx/templates/layout.html

-{% 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">
   <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> &raquo;</li>
-        {%- endblock %}
-        {%- for parent in parents %}
-          <li><a href="{{ parent.link|e }}" accesskey="U">{{ parent.title }}</a> &raquo;</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' %}
         </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">

sphinx/templates/macros.html

+{%- 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> &raquo;</li>
+        {%- endblock %}
+        {%- for parent in parents %}
+          <li><a href="{{ parent.link|e }}" accesskey="U">{{ parent.title }}</a> &raquo;</li>
+        {%- endfor %}
+        {%- block relbaritems %}{% endblock %}
+      </ul>
+    </div>
+{%- endmacro %}
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.