[Xfce4-commits] <wiki:master> Use table to center figures.

Nick Schermer noreply at xfce.org
Wed Jan 4 22:16:01 CET 2012


Updating branch refs/heads/master
         to f3d0b2b18f4637f6938238f3fff14ad97ef9f312 (commit)
       from c483753e9ecca6da53ae5b63744abf335516fd33 (commit)

commit f3d0b2b18f4637f6938238f3fff14ad97ef9f312
Author: Nick Schermer <nick at xfce.org>
Date:   Wed Jan 4 22:14:47 2012 +0100

    Use table to center figures.

 lib/plugins/xfcedocs/style.css  |   21 ++++++++++-----------
 lib/plugins/xfcedocs/syntax.php |    8 ++++----
 lib/tpl/docs/design.css         |    2 +-
 3 files changed, 15 insertions(+), 16 deletions(-)

diff --git a/lib/plugins/xfcedocs/style.css b/lib/plugins/xfcedocs/style.css
index 8331c24..c6d841c 100644
--- a/lib/plugins/xfcedocs/style.css
+++ b/lib/plugins/xfcedocs/style.css
@@ -1,18 +1,17 @@
-div.dokuwiki div.figure {
-  background-color: __background__;
+table.figure {
   border: 1px solid __border__;
-  padding: 6px;
+  background-color: __background__;
+  padding: 3px;
+  margin: auto;
+  width: 75%;
 }
-
-div.dokuwiki div.figure-title {
-  text-align: center;
+table.figure th {
   font-weight: bold;
-  padding-bottom: 6px;
-}
-
-div.dokuwiki div.figure-contents {
   text-align: center;
+}
+table.figure td {
   border: 1px solid __border__;
-  padding: 6px;
   background-color: __background_c__;
+  padding: 6px;
+  text-align: center;
 }
diff --git a/lib/plugins/xfcedocs/syntax.php b/lib/plugins/xfcedocs/syntax.php
index 2040035..3009859 100644
--- a/lib/plugins/xfcedocs/syntax.php
+++ b/lib/plugins/xfcedocs/syntax.php
@@ -112,15 +112,15 @@ class syntax_plugin_xfcedocs extends DokuWiki_Syntax_Plugin
             {
                 case DOKU_LEXER_ENTER:
                     if ($type == 'figure')
-                        $renderer->doc .= '<div class="figure"><div class="figure-title">'. 
-                                          $renderer->_xmlEntities($match) .'</div>'.
-                                          '<div class="figure-contents">';
+                        $renderer->doc .= '<table class="figure">'.
+                                          '<tr><th>'. $renderer->_xmlEntities($match) .'</th></tr>'.
+                                          '<tr><td>';
                     else
                         return false;
                     break;
                 
                 case DOKU_LEXER_EXIT :
-                    $renderer->doc .= '</div></div>';
+                    $renderer->doc .= '</td></tr></table>';
                     break;
                 
                 case DOKU_LEXER_UNMATCHED :
diff --git a/lib/tpl/docs/design.css b/lib/tpl/docs/design.css
index 366b729..ca8ca9b 100644
--- a/lib/tpl/docs/design.css
+++ b/lib/tpl/docs/design.css
@@ -90,7 +90,7 @@ div.dokuwiki .section_highlight {
 
 div.dokuwiki p,
 div.dokuwiki blockquote,
-div.dokuwiki table,
+div.dokuwiki table.inline,
 div.dokuwiki pre {
   margin: 0 0 1.0em 0;
 }


More information about the Xfce4-commits mailing list