From 3ab0303ac89fd3c9dd61400c533b4ad3aebeb2d6 Mon Sep 17 00:00:00 2001 From: Robin Dunn Date: Sun, 2 Feb 2014 06:22:36 +0000 Subject: [PATCH] Restructure the page headers and how they are tweaked so we don't have the weird wrapping problems, unless the user has a weirdly sized browser. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxPython/Phoenix/trunk@75774 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- docs/sphinx/_static/css/phoenix.css | 60 ++++++++++++++++++------ docs/sphinx/_templates/layout.html | 71 +++++++++++++++++++---------- sphinxtools/postprocess.py | 10 +--- 3 files changed, 93 insertions(+), 48 deletions(-) diff --git a/docs/sphinx/_static/css/phoenix.css b/docs/sphinx/_static/css/phoenix.css index f4229543..ee382f0b 100644 --- a/docs/sphinx/_static/css/phoenix.css +++ b/docs/sphinx/_static/css/phoenix.css @@ -90,13 +90,21 @@ div.body h4 { body { background-color: rgb(230,230,230); } + +div.headerimage { + text-align: center; +} + +div.headerimage-noshow { + display:none; +} div.document { background-color: rgb(230,230,230); position: relative; margin-left: 240px; z-index: 0; - top: 30px; + top: 50px; } div.sphinxsidebar { @@ -110,48 +118,66 @@ div.sphinxsidebar { height: auto; z-index: 1; left: 0; - top: 33px; + top: 50px; bottom: 0; } div.related { + background-image: url('../images/sphinxdocs/navigation.png'); + border-top: 1px solid #ddd; + border-bottom: 1px solid #ddd; font-size: 1em; position: fixed; - line-height: 30px; + line-height: normal; position: fixed; - height: 30px; + height: auto; z-index: 1; left: 0; right: 0; - top: 0; + top: 0; } div.related ul { - background-image: url('../images/sphinxdocs/navigation.png'); - height: 2em; - border-top: 1px solid #ddd; - border-bottom: 1px solid #ddd; color: rgb(100, 100, 100); } +div.related ul.row1 { + height: 30px; +} + +div.related ul.row2 { + height: 20px; +} + div.related ul li { - margin: 0; + margin: 0; + margin-top: 7px; padding: 0; - height: 2em; float: left; } div.related ul li.right { + font-size: small; float: right; - margin-right: 5px; + margin-right: 5px; + margin-top: 0; } +div.related ul li#searchbox.right { + float: right; + margin-right: 5px; + margin-top: 7px; +} div.related ul li a { margin: 0; padding: 0 5px 0 5px; - line-height: 1.75em; + line-height: normal; color: #EE9816; } + +div.related ul li.reltitle { + padding: 0 5px 0 5px; +} div.related ul li a:hover { color: #3CA8E7; @@ -181,6 +207,12 @@ div.sphinxsidebar ul.want-points { list-style: disc; } +div.footer { + padding: 80px 0 9px 0; + text-align: center; + font-size: 75%; +} + .field-list th { color: rgb(0,102,204); } @@ -661,4 +693,4 @@ tt { .codeexpander p {border-bottom:1px solid #ccc; padding-bottom:4px;} .codeexpander p a {text-decoration:none;} .codeexpander p.myactive {background-position: 0 5px;} -.myactive {background-color: rgb(230, 230, 230); background-position: 0 5px;} \ No newline at end of file +.myactive {background-color: rgb(230, 230, 230); background-position: 0 5px;} diff --git a/docs/sphinx/_templates/layout.html b/docs/sphinx/_templates/layout.html index 42a00391..99f7aeb8 100644 --- a/docs/sphinx/_templates/layout.html +++ b/docs/sphinx/_templates/layout.html @@ -1,9 +1,5 @@ {% extends "!layout.html" %} -{%- block relbaritems %} -
  • {{ title }}
  • -{% endblock %} - {%- set render_sidebar = (not embedded) and (not theme_nosidebar|tobool) and (sidebars != []) and (pagename != 'index') %} @@ -24,32 +20,62 @@ {% block sidebar1 %}{{ phoenixsidebar() }}{% endblock %} {% block sidebar2 %}{% endblock %} +{% block relbar1 %}{{ myrelbar() }}{% endblock %} {% block relbar2 %}{% endblock %} -{% block rootrellink %} -
  • + +{%- macro myrelbar() %} + +{%- endmacro %} + + + {% block document %}
    +
    + Phoenix Logo +
    + {% block body %} {% endblock %} {%- if theme_disqus_comments|tobool %}
    @@ -60,11 +86,6 @@
    {%- endblock %} -{% block header %} -
    -Phoenix Logo -
    -{% endblock %} set script_files = script_files + ['_static/sidebar.js'] set script_files = script_files + ['_static/header.js'] diff --git a/sphinxtools/postprocess.py b/sphinxtools/postprocess.py index c998ccd6..724b4f05 100644 --- a/sphinxtools/postprocess.py +++ b/sphinxtools/postprocess.py @@ -622,11 +622,6 @@ def PostProcess(folder): fileNames = glob.glob(folder + "/*.html") - phoenix_image = '
    \n' \ - 'Phoenix Logo\n' \ - '
    ' - - enum_files = glob.glob(folder + '/*.enumeration.html') enum_base = [os.path.split(os.path.splitext(enum)[0])[1] for enum in enum_files] @@ -657,9 +652,8 @@ def PostProcess(folder): if split in ['index.html', 'main.html']: text = ChangeSVNRevision(text) else: - text = text.replace(phoenix_image, '') + text = text.replace('class="headerimage"', 'class="headerimage-noshow"') -## text = AddPrettyTable(text) text = text.replace('–

    ', '– ') text = text.replace('

    overload

    overloadOverloaded Implementations', 'Overloaded Implementations') @@ -678,8 +672,6 @@ def PostProcess(folder): if '

    ' -## line = ClassToFile(line) - if index < len_split - 1: if line.strip() == '

    ' or line.strip() == '


    ':