You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@logging.apache.org by ih...@apache.org on 2013/02/23 11:20:42 UTC

[3/3] git commit: New docs theme based on sphinxdoc

Updated Branches:
  refs/heads/docs 42a6c306a -> 4172d1fca


New docs theme based on sphinxdoc

Signed-off-by: Ivan Habunek <ih...@apache.org>


Project: http://git-wip-us.apache.org/repos/asf/logging-log4php/repo
Commit: http://git-wip-us.apache.org/repos/asf/logging-log4php/commit/4172d1fc
Tree: http://git-wip-us.apache.org/repos/asf/logging-log4php/tree/4172d1fc
Diff: http://git-wip-us.apache.org/repos/asf/logging-log4php/diff/4172d1fc

Branch: refs/heads/docs
Commit: 4172d1fcad1d9a8f91af7e577583f5f263c2d5de
Parents: 99a7d85
Author: Ivan Habunek <ih...@apache.org>
Authored: Sat Feb 23 11:19:56 2013 +0100
Committer: Ivan Habunek <ih...@apache.org>
Committed: Sat Feb 23 11:19:56 2013 +0100

----------------------------------------------------------------------
 docs/_theme/log4php-sd/layout.html            |    6 +
 docs/_theme/log4php-sd/static/contents.png    |  Bin 0 -> 202 bytes
 docs/_theme/log4php-sd/static/log4php.css_t   |   14 +
 docs/_theme/log4php-sd/static/log4php.js      |   55 ++++
 docs/_theme/log4php-sd/static/navigation.png  |  Bin 0 -> 218 bytes
 docs/_theme/log4php-sd/static/sphinxdoc.css_t |  339 ++++++++++++++++++++
 docs/_theme/log4php-sd/theme.conf             |    4 +
 docs/conf.py                                  |    9 +-
 8 files changed, 423 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/logging-log4php/blob/4172d1fc/docs/_theme/log4php-sd/layout.html
----------------------------------------------------------------------
diff --git a/docs/_theme/log4php-sd/layout.html b/docs/_theme/log4php-sd/layout.html
new file mode 100644
index 0000000..5c880d9
--- /dev/null
+++ b/docs/_theme/log4php-sd/layout.html
@@ -0,0 +1,6 @@
+{% extends "basic/layout.html" %}
+{% set script_files = script_files + ['_static/log4php.js'] %}
+
+{% block sidebar1 %}{{ sidebar() }}{% endblock %}
+{% block sidebar2 %}{% endblock %}
+

http://git-wip-us.apache.org/repos/asf/logging-log4php/blob/4172d1fc/docs/_theme/log4php-sd/static/contents.png
----------------------------------------------------------------------
diff --git a/docs/_theme/log4php-sd/static/contents.png b/docs/_theme/log4php-sd/static/contents.png
new file mode 100644
index 0000000..7fb8215
Binary files /dev/null and b/docs/_theme/log4php-sd/static/contents.png differ

http://git-wip-us.apache.org/repos/asf/logging-log4php/blob/4172d1fc/docs/_theme/log4php-sd/static/log4php.css_t
----------------------------------------------------------------------
diff --git a/docs/_theme/log4php-sd/static/log4php.css_t b/docs/_theme/log4php-sd/static/log4php.css_t
new file mode 100644
index 0000000..fe30fc3
--- /dev/null
+++ b/docs/_theme/log4php-sd/static/log4php.css_t
@@ -0,0 +1,14 @@
+@import url("sphinxdoc.css");
+
+/* -- tabs ------------------------------------------------------------------ */
+
+.container.tabs { margin: inherit; width: inherit }
+.container.tabs ul { list-style: none; padding: 0; margin: 10px 0 0 0; }
+.container.tabs li { display:inline; margin-left: 8px; padding: 5px 15px 3px 15px; border: 1px solid #CCC; border-bottom: none; margin-bottom: -1px; }
+.container.tabs li.active { border-bottom: none; background-color: lemonchiffon }
+.container.tabs li a { text-decoration: none }
+.container.tabs pre { margin-top: 0px }
+
+.highlighttable { width: 100%; }
+.highlighttable td.linenos { width: 22px; text-align: right; padding-right: 5px } 
+.highlighttable td.linenos pre { padding: 5px 0px; border: 0; background-color: transparent; color: #aaa }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/logging-log4php/blob/4172d1fc/docs/_theme/log4php-sd/static/log4php.js
----------------------------------------------------------------------
diff --git a/docs/_theme/log4php-sd/static/log4php.js b/docs/_theme/log4php-sd/static/log4php.js
new file mode 100644
index 0000000..4f9b92c
--- /dev/null
+++ b/docs/_theme/log4php-sd/static/log4php.js
@@ -0,0 +1,55 @@
+$(function() {
+    reformatTabs();
+    activateTabs();
+});
+
+function reformatTabs()
+{
+    $('.container.tabs').each(function(tabs_id, container) {
+        var i, count, title, tabID;
+        var $menu, $tabs, $tab, $titles;
+
+        $tabs = $(container).children('div');
+        $titles = $(container).children('p.rubric');
+
+        if ($tabs.size() < 1) {
+            console.warn("Tab init failed. Not enough <div>s. Required at least 1.");
+        }
+
+        if ($tabs.size() !== $titles.size()) {
+            console.warn("Tab init failed. Number of <div>s does not match number of <p.rubric>s.");
+            return;
+        }
+
+        count = $tabs.size();
+        $menu = $('<ul>');
+
+        for (i = 0; i < count; i++) {
+            $tab = $($tabs[i]);
+            title = $titles[i].innerHTML;
+            tabID = 'tab-' + tabs_id + '-' + i;
+
+            $($titles[i]).remove();
+            $menu.append('<li><a href="#' + tabID + '">' +  title + '</a></li>');
+            $tab.attr('id', tabID);
+        }
+
+        $(container).prepend($menu);
+    })
+}
+
+function activateTabs()
+{
+    $('.container.tabs > div').hide();
+    $('.container.tabs > div:first').show();
+    $('.container.tabs ul li:first').addClass('active');
+
+    $('.container.tabs ul li a').click(function(){
+        $('.container.tabs ul li').removeClass('active');
+        $(this).parent().addClass('active');
+        var currentTab = $(this).attr('href');
+        $('.container.tabs > div').hide();
+        $(currentTab).show();
+        return false;
+    });
+}

http://git-wip-us.apache.org/repos/asf/logging-log4php/blob/4172d1fc/docs/_theme/log4php-sd/static/navigation.png
----------------------------------------------------------------------
diff --git a/docs/_theme/log4php-sd/static/navigation.png b/docs/_theme/log4php-sd/static/navigation.png
new file mode 100644
index 0000000..1081dc1
Binary files /dev/null and b/docs/_theme/log4php-sd/static/navigation.png differ

http://git-wip-us.apache.org/repos/asf/logging-log4php/blob/4172d1fc/docs/_theme/log4php-sd/static/sphinxdoc.css_t
----------------------------------------------------------------------
diff --git a/docs/_theme/log4php-sd/static/sphinxdoc.css_t b/docs/_theme/log4php-sd/static/sphinxdoc.css_t
new file mode 100644
index 0000000..f535696
--- /dev/null
+++ b/docs/_theme/log4php-sd/static/sphinxdoc.css_t
@@ -0,0 +1,339 @@
+/*
+ * sphinxdoc.css_t
+ * ~~~~~~~~~~~~~~~
+ *
+ * Sphinx stylesheet -- sphinxdoc theme.  Originally created by
+ * Armin Ronacher for Werkzeug.
+ *
+ * :copyright: Copyright 2007-2011 by the Sphinx team, see AUTHORS.
+ * :license: BSD, see LICENSE for details.
+ *
+ */
+
+@import url("basic.css");
+
+/* -- page layout ----------------------------------------------------------- */
+
+body {
+    font-family: 'Lucida Grande', 'Lucida Sans Unicode', 'Geneva',
+                 'Verdana', sans-serif;
+    font-size: 14px;
+    letter-spacing: -0.01em;
+    line-height: 150%;
+    text-align: center;
+    background-color: #BFD1D4;
+    color: black;
+    padding: 0;
+    border: 1px solid #aaa;
+
+    margin: 0px 80px 0px 80px;
+    min-width: 740px;
+}
+
+div.document {
+    background-color: white;
+    text-align: left;
+    background-image: url(contents.png);
+    background-repeat: repeat-x;
+}
+
+div.bodywrapper {
+    margin: 0 {{ theme_sidebarwidth|toint + 10 }}px 0 0;
+    border-right: 1px solid #ccc;
+}
+
+div.body {
+    margin: 0;
+    padding: 0.5em 20px 20px 20px;
+}
+
+div.related {
+    font-size: 1em;
+}
+
+div.related ul {
+    background-image: url(navigation.png);
+    height: 2em;
+    border-top: 1px solid #ddd;
+    border-bottom: 1px solid #ddd;
+}
+
+div.related ul li {
+    margin: 0;
+    padding: 0;
+    height: 2em;
+    float: left;
+}
+
+div.related ul li.right {
+    float: right;
+    margin-right: 5px;
+}
+
+div.related ul li a {
+    margin: 0;
+    padding: 0 5px 0 5px;
+    line-height: 1.75em;
+    color: #EE9816;
+}
+
+div.related ul li a:hover {
+    color: #3CA8E7;
+}
+
+div.sphinxsidebarwrapper {
+    padding: 0;
+}
+
+div.sphinxsidebar {
+    margin: 0;
+    padding: 0.5em 15px 15px 0;
+    width: {{ theme_sidebarwidth|toint - 20 }}px;
+    float: right;
+    font-size: 1em;
+    text-align: left;
+}
+
+div.sphinxsidebar h3, div.sphinxsidebar h4 {
+    margin: 1em 0 0.5em 0;
+    font-size: 1em;
+    padding: 0.1em 0 0.1em 0.5em;
+    color: white;
+    border: 1px solid #86989B;
+    background-color: #AFC1C4;
+}
+
+div.sphinxsidebar h3 a {
+    color: white;
+}
+
+div.sphinxsidebar ul {
+    padding-left: 1.5em;
+    margin-top: 7px;
+    padding: 0;
+    line-height: 130%;
+}
+
+div.sphinxsidebar ul ul {
+    margin-left: 20px;
+}
+
+div.footer {
+    background-color: #E3EFF1;
+    color: #86989B;
+    padding: 3px 8px 3px 0;
+    clear: both;
+    font-size: 0.8em;
+    text-align: right;
+}
+
+div.footer a {
+    color: #86989B;
+    text-decoration: underline;
+}
+
+/* -- body styles ----------------------------------------------------------- */
+
+p {    
+    margin: 0.8em 0 0.5em 0;
+}
+
+a {
+    color: #CA7900;
+    text-decoration: none;
+}
+
+a:hover {
+    color: #2491CF;
+}
+
+div.body a {
+    text-decoration: underline;
+}
+
+h1 {
+    margin: 0;
+    padding: 0.7em 0 0.3em 0;
+    font-size: 1.5em;
+    color: #11557C;
+}
+
+h2 {
+    margin: 1.3em 0 0.2em 0;
+    font-size: 1.35em;
+    padding: 0;
+}
+
+h3 {
+    margin: 1em 0 -0.3em 0;
+    font-size: 1.2em;
+}
+
+div.body h1 a, div.body h2 a, div.body h3 a, div.body h4 a, div.body h5 a, div.body h6 a {
+    color: black!important;
+}
+
+h1 a.anchor, h2 a.anchor, h3 a.anchor, h4 a.anchor, h5 a.anchor, h6 a.anchor {
+    display: none;
+    margin: 0 0 0 0.3em;
+    padding: 0 0.2em 0 0.2em;
+    color: #aaa!important;
+}
+
+h1:hover a.anchor, h2:hover a.anchor, h3:hover a.anchor, h4:hover a.anchor,
+h5:hover a.anchor, h6:hover a.anchor {
+    display: inline;
+}
+
+h1 a.anchor:hover, h2 a.anchor:hover, h3 a.anchor:hover, h4 a.anchor:hover,
+h5 a.anchor:hover, h6 a.anchor:hover {
+    color: #777;
+    background-color: #eee;
+}
+
+a.headerlink {
+    color: #c60f0f!important;
+    font-size: 1em;
+    margin-left: 6px;
+    padding: 0 4px 0 4px;
+    text-decoration: none!important;
+}
+
+a.headerlink:hover {
+    background-color: #ccc;
+    color: white!important;
+}
+
+cite, code, tt {
+    font-family: 'Consolas', 'Deja Vu Sans Mono',
+                 'Bitstream Vera Sans Mono', monospace;
+    font-size: 0.95em;
+    letter-spacing: 0.01em;
+}
+
+tt {
+    background-color: #f2f2f2;
+    border-bottom: 1px solid #ddd;
+    color: #333;
+}
+
+tt.descname, tt.descclassname, tt.xref {
+    border: 0;
+}
+
+hr {
+    border: 1px solid #abc;
+    margin: 2em;
+}
+
+a tt {
+    border: 0;
+    color: #CA7900;
+}
+
+a tt:hover {
+    color: #2491CF;
+}
+
+pre {
+    font-family: 'Consolas', 'Deja Vu Sans Mono',
+                 'Bitstream Vera Sans Mono', monospace;
+    font-size: 0.95em;
+    letter-spacing: 0.015em;
+    line-height: 120%;
+    padding: 0.5em;
+    border: 1px solid #ccc;
+    background-color: #f8f8f8;
+}
+
+pre a {
+    color: inherit;
+    text-decoration: underline;
+}
+
+td.linenos pre {
+    padding: 0.5em 0;
+}
+
+div.quotebar {
+    background-color: #f8f8f8;
+    max-width: 250px;
+    float: right;
+    padding: 2px 7px;
+    border: 1px solid #ccc;
+}
+
+div.topic {
+    background-color: #f8f8f8;
+}
+
+table {
+    border-collapse: collapse;
+    margin: 0 -0.5em 0 -0.5em;
+}
+
+table td, table th {
+    padding: 0.2em 0.5em 0.2em 0.5em;
+}
+
+div.admonition, div.warning {
+    font-size: 0.9em;
+    margin: 1em 0 1em 0;
+    border: 1px solid #86989B;
+    background-color: #f7f7f7;
+    padding: 0;
+}
+
+div.admonition p, div.warning p {
+    margin: 0.5em 1em 0.5em 1em;
+    padding: 0;
+}
+
+div.admonition pre, div.warning pre {
+    margin: 0.4em 1em 0.4em 1em;
+}
+
+div.admonition p.admonition-title,
+div.warning p.admonition-title {
+    margin: 0;
+    padding: 0.1em 0 0.1em 0.5em;
+    color: white;
+    border-bottom: 1px solid #86989B;
+    font-weight: bold;
+    background-color: #AFC1C4;
+}
+
+div.warning {
+    border: 1px solid #940000;
+}
+
+div.warning p.admonition-title {
+    background-color: #CF0000;
+    border-bottom-color: #940000;
+}
+
+div.admonition ul, div.admonition ol,
+div.warning ul, div.warning ol {
+    margin: 0.1em 0.5em 0.5em 3em;
+    padding: 0;
+}
+
+div.versioninfo {
+    margin: 1em 0 0 0;
+    border: 1px solid #ccc;
+    background-color: #DDEAF0;
+    padding: 8px;
+    line-height: 1.3em;
+    font-size: 0.9em;
+}
+
+.viewcode-back {
+    font-family: 'Lucida Grande', 'Lucida Sans Unicode', 'Geneva',
+                 'Verdana', sans-serif;
+}
+
+div.viewcode-block:target {
+    background-color: #f4debf;
+    border-top: 1px solid #ac9;
+    border-bottom: 1px solid #ac9;
+}

http://git-wip-us.apache.org/repos/asf/logging-log4php/blob/4172d1fc/docs/_theme/log4php-sd/theme.conf
----------------------------------------------------------------------
diff --git a/docs/_theme/log4php-sd/theme.conf b/docs/_theme/log4php-sd/theme.conf
new file mode 100644
index 0000000..69f0db3
--- /dev/null
+++ b/docs/_theme/log4php-sd/theme.conf
@@ -0,0 +1,4 @@
+[theme]
+inherit = basic
+stylesheet = log4php.css
+pygments_style = friendly

http://git-wip-us.apache.org/repos/asf/logging-log4php/blob/4172d1fc/docs/conf.py
----------------------------------------------------------------------
diff --git a/docs/conf.py b/docs/conf.py
index fc6fbd7..b3e20ea 100644
--- a/docs/conf.py
+++ b/docs/conf.py
@@ -92,7 +92,7 @@ pygments_style = 'default'
 
 # The theme to use for HTML and HTML Help pages.  See the documentation for
 # a list of builtin themes.
-html_theme = 'log4php'
+html_theme = 'log4php-sd'
 
 # Theme options are theme-specific and customize the look and feel of a theme
 # further.  For a list of options available for each theme, see the
@@ -116,7 +116,7 @@ html_theme_path = ["_theme"]
 # The name of an image file (within the static path) to use as favicon of the
 # docs.  This file should be a Windows icon file (.ico) being 16x16 or 32x32
 # pixels large.
-html_favicon = "favicon.ico"
+# html_favicon = "favicon.ico"
 
 # Add any paths that contain custom static files (such as style sheets) here,
 # relative to this directory. They are copied after the builtin static files,
@@ -131,8 +131,9 @@ html_favicon = "favicon.ico"
 # typographically correct entities.
 #html_use_smartypants = True
 
-# HTML translator class for the builder
-html_translator_class = "log4phpdocs.Log4phpHTMLTranslator"
+# HTML translator class for the builder (required only for the bootstrap theme)
+if html_theme == 'log4php':
+    html_translator_class = "log4phpdocs.Log4phpHTMLTranslator"
 
 # Content template for the index page.
 #html_index = ''