[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [29069] trunk/blender/source/blender/ python/doc: == Sphinx theme ==

Alex Sytnik the.smerch at gmail.com
Sat May 29 23:52:32 CEST 2010


Revision: 29069
          http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=29069
Author:   smerch
Date:     2010-05-29 23:52:32 +0200 (Sat, 29 May 2010)

Log Message:
-----------
== Sphinx theme ==

default.css

1. Valiables list aligned with parameters list
2. Added 'Description:' to function, method and attribute descriptions
3. Fixed wrong/odd color combinations
4. New improved indentation
5. Fixed TOC sidebar appearance

layout.html

1. Added 'PyAPI' item into top navbar

sphinx_html_compact.diff

- new version of patch

Modified Paths:
--------------
    trunk/blender/source/blender/python/doc/blender-org/layout.html
    trunk/blender/source/blender/python/doc/blender-org/static/default.css_t
    trunk/blender/source/blender/python/doc/sphinx_html_compact.diff

Modified: trunk/blender/source/blender/python/doc/blender-org/layout.html
===================================================================
--- trunk/blender/source/blender/python/doc/blender-org/layout.html	2010-05-29 21:31:57 UTC (rev 29068)
+++ trunk/blender/source/blender/python/doc/blender-org/layout.html	2010-05-29 21:52:32 UTC (rev 29069)
@@ -8,7 +8,7 @@
 
 {%- macro relbar() %}
     <div class="subnav boxheader">
-    <ul class="noprint"><li><a href="http://www.blender.org/development/coding-guides/">Coding Guides</a></li><li>•</li><li><a href="http://www.blender.org/development/report-a-bug/">Report a Bug</a></li><li>•</li><li><a href="http://www.blender.org/development/submit-a-patch/">Submit a Patch</a></li><li>•</li><li><a href="http://www.blender.org/development/release-logs/">Release Logs</a></li><li>•</li><li><a href="http://www.blender.org/development/current-projects/">Current Projects</a></li><li>•</li><li><a href="http://www.blender.org/development/architecture/">Architecture</a></li><li>•</li><li><a href="http://www.blender.org/development/building-blender/">Building Blender</a></li><li>•</li><li><a href="http://wiki.blender.org/index.php/Dev:Contents">Wiki</a></li>
+	<ul class="noprint"><li><a href="http://www.blender.org/development/coding-guides/">Coding Guides</a></li><li>•</li><li><a href="http://www.blender.org/development/report-a-bug/">Report a Bug</a></li><li>•</li><li><a href="http://www.blender.org/development/submit-a-patch/">Submit a Patch</a></li><li>•</li><li><a href="http://www.blender.org/development/release-logs/">Release Logs</a></li><li>•</li><li><a href="http://www.blender.org/development/current-projects/">Current Projects</a></li><li>•</li><li><a href="http://www.blender.org/development/architecture/">Architecture</a></li><li>•</li><li><a href="http://www.blender.org/development/building-blender/">Building Blender</a></li><li>•</li><li class="subnav-active"><a href="http://www.blender.org/documentation/250PythonDoc/contents.html">PyAPI</a></li><li>•</li><li><a href="http://wiki.blender.org/Dev:Contents">Wiki</a></li></ul>
     </div>
     <div class="related subnav">
       <h3>{{ _('Navigation') }}</h3>

Modified: trunk/blender/source/blender/python/doc/blender-org/static/default.css_t
===================================================================
--- trunk/blender/source/blender/python/doc/blender-org/static/default.css_t	2010-05-29 21:31:57 UTC (rev 29068)
+++ trunk/blender/source/blender/python/doc/blender-org/static/default.css_t	2010-05-29 21:52:32 UTC (rev 29069)
@@ -134,7 +134,7 @@
 .subnav {
     height:auto !important;
     min-height:15px;
-    padding:9px 37px;
+    padding:9px 0px 9px 37px;
     position:relative;
 }
 
@@ -174,6 +174,10 @@
     color: #fff;
 }
 
+.subnav li.subnav-active a {
+	color:#F39410;
+}
+
 div.related a {
     color: {{ theme_relbarlinkcolor }};
 }
@@ -278,11 +282,17 @@
 }
 
 div.sphinxsidebar ul {
-    margin: 10px;
+    background-color: #292929;
+    margin: 0;
     padding: 0;
     color: {{ theme_sidebartextcolor }};
 }
 
+div.sphinxsidebar > div > ul {
+    margin-bottom: 25px;
+    padding:10px;
+}
+
 div.sphinxsidebar a {
     color: {{ theme_sidebarlinkcolor }};
 }
@@ -304,11 +314,6 @@
     text-decoration: underline;
 }
 
-div.body p, div.body dd, div.body li {
-    text-align: justify;
-    line-height: 130%;
-}
-
 /*div.body h1,*/
 div.body h2,
 div.body h3,
@@ -325,15 +330,15 @@
 }
 
 div.body h1 { margin-top: 0; font-size: 200%; 
-color:#FFFAE0;
-font-family:"Helvetica","Arial",sans-serif;
-font-size:34px;
-font-weight:normal;
-left:32px;
-line-height:26px;
-margin-top:0;
-position:absolute;
-top:36px;
+    color:#FFFAE0;
+    font-family:"Helvetica","Arial",sans-serif;
+    font-size:34px;
+    font-weight:normal;
+    left:32px;
+    line-height:26px;
+    margin-top:0;
+    position:absolute;
+    top:36px;
 }
 div.body h2 { font-size: 160%; }
 div.body h3 { font-size: 140%; }
@@ -358,6 +363,10 @@
     line-height: 130%;
 }
 
+div.note, div.seealso, div.topic, div.warning {
+    color:white;
+}
+
 div.admonition p.admonition-title + p {
     display: inline;
 }
@@ -397,38 +406,53 @@
     border: 0 solid white;
 }
 
-dl.function>dt {
-    text-indent:-130px;
-    padding-left: 130px;
+dl.function>dt, dl.method>dt {
+    text-indent:-142px;
+    padding-left: 142px;
 }
 
-dl.function>dt em {
+dl.function>dt em, dl.method>dt em {
     color: #999;
 }
 
-dl.function>dt em:before {
+dl.function>dt em:before, dl.method>dt em:before {
     content: " ";
     display: block;
 }
 
-dl.function > dd > p:before {
-    content:"Description: ";
+dl.function>dd>p,dl.method>dd>p,dl.attribute>dd>p,dl.class>dd>p:first-child {
+    color: #999;
+}
+
+dl.function>dd>p, dl.method>dd>p, dl.attribute>dd>p {
+    margin-left: 112px;
+}
+
+dl.function>dd>p:first-child, dl.method>dd>p:first-child, dl.attribute>dd>p:first-child {
+    text-indent: -112px;
+}
+
+dl.function>dd>p:first-child:before, dl.method>dd>p:first-child:before, dl.attribute>dd>p:first-child:before {
+    content:"Description:";
+    color:white;
     font-weight:bold;
-    margin-right:15px;
+    width:112px;
+    display:inline-block;
+    float:left;
 }
 
 dt:target, .highlight {
-    color:#444;
+    color: #444;
 }
 
 tt {
-    background-color: #ecf0f3;
+    background-color: #444;
     padding: 0 1px 0 1px;
     font-size: 0.95em;
 }
 
 .warning tt {
-    background: #efc2c2;
+    background: #cc6262;
 }
 
 .note tt {
@@ -439,10 +463,21 @@
     background-color: transparent;
 }
 
-col.field-name {
+col.field-name  {
     width:100px;
 }
 
-td.field-body ul.first {
-    color: #999;
+table.field-list th {
+    color:white;
 }
+
+table.field-list td.field-body {
+    color:#999999;
+    padding-left:12px;
+}
+
+table.field-list td.field-body ul.first {
+    padding-left:0;
+    list-style:none;
+}
+

Modified: trunk/blender/source/blender/python/doc/sphinx_html_compact.diff
===================================================================
--- trunk/blender/source/blender/python/doc/sphinx_html_compact.diff	2010-05-29 21:31:57 UTC (rev 29068)
+++ trunk/blender/source/blender/python/doc/sphinx_html_compact.diff	2010-05-29 21:52:32 UTC (rev 29069)
@@ -8,51 +8,18 @@
  from sphinx.locale import admonitionlabels, versionlabels
  from sphinx.util.smartypants import sphinx_smarty_pants
  
-@@ -271,6 +272,47 @@
+@@ -284,6 +285,14 @@ class HTMLTranslator(BaseTranslator):
      def depart_centered(self, node):
          self.body.append('</strong></p>')
  
++    # overwritten
 +    def should_be_compact_paragraph(self, node):
-+        """
-+        Determine if the <p> tags around paragraph ``node`` can be omitted.
-+        """
-+        if (isinstance(node.parent, nodes.document) or
-+            isinstance(node.parent, nodes.compound) or
-+            isinstance(node.parent, addnodes.desc_content)):
-+            # Never compact paragraphs in document or compound.
-+            # or desc_content items either.
-+            return 0
-+        for key, value in node.attlist():
-+            if (node.is_not_default(key) and
-+                not (key == 'classes' and value in
-+                     ([], ['first'], ['last'], ['first', 'last']))):
-+                # Attribute which needs to survive.
-+                return 0
-+        first = isinstance(node.parent[0], nodes.label) # skip label
-+        for child in node.parent.children[first:]:
-+            # only first paragraph can be compact
-+            if isinstance(child, nodes.Invisible):
-+                continue
-+            if child is node:
-+                break
-+            return 0
-+        parent_length = len([n for n in node.parent if not isinstance(
-+            n, (nodes.Invisible, nodes.label))])
-+        if ( self.compact_simple
-+             or self.compact_field_list
-+             or self.compact_p and parent_length == 1):
-+            return 1
-+        return 0
++        """Determine if the <p> tags around paragraph can be omitted."""
++        if isinstance(node.parent, addnodes.desc_content):
++            # Never compact desc_content items.
++            return False
++        return BaseTranslator.should_be_compact_paragraph(self, node)
 +
-+    def visit_paragraph(self, node):
-+        if self.should_be_compact_paragraph(node):
-+            self.context.append('')
-+        else:
-+            self.body.append(self.starttag(node, 'p', ''))
-+            self.context.append('</p>\n')
-+    def depart_paragraph(self, node):
-+        self.body.append(self.context.pop())
-+
      def visit_compact_paragraph(self, node):
          pass
      def depart_compact_paragraph(self, node):





More information about the Bf-blender-cvs mailing list