Python-EFL: much better EFL dark sphinx theme based on the new sphinx13 one

This commit is contained in:
Davide Andreoli 2013-04-04 23:09:46 +02:00
parent 224cfb92c4
commit a74d0b06cf
11 changed files with 255 additions and 119 deletions

80
doc/themes/efldoc/layout.html vendored Normal file
View File

@ -0,0 +1,80 @@
{#
sphinxdoc/layout.html
~~~~~~~~~~~~~~~~~~~~~
Sphinx layout template for the sphinxdoc theme.
:copyright: Copyright 2007-2013 by the Sphinx team, see AUTHORS.
:license: BSD, see LICENSE for details.
#}
{%- extends "basic/layout.html" %}
{# put the sidebar before the body #}
{% block sidebar1 %}{{ sidebar() }}{% endblock %}
{% block sidebar2 %}{% endblock %}
{% block extrahead %}
<link href='http://fonts.googleapis.com/css?family=Open+Sans:300,400,700'
rel='stylesheet' type='text/css'>
{{ super() }}
{%- if not embedded %}
<style type="text/css">
table.right { float: right; margin-left: 20px; }
table.right td { border: 1px solid #ccc; }
{% if pagename == 'index' %}
.related { display: none; }
{% endif %}
</style>
<script type="text/javascript">
// intelligent scrolling of the sidebar content
$(window).scroll(function() {
var sb = $('.sphinxsidebarwrapper');
var win = $(window);
var sbh = sb.height();
var offset = $('.sphinxsidebar').position()['top'];
var wintop = win.scrollTop();
var winbot = wintop + win.innerHeight();
var curtop = sb.position()['top'];
var curbot = curtop + sbh;
// does sidebar fit in window?
if (sbh < win.innerHeight()) {
// yes: easy case -- always keep at the top
sb.css('top', $u.min([$u.max([0, wintop - offset - 10]),
$(document).height() - sbh - 200]));
} else {
// no: only scroll if top/bottom edge of sidebar is at
// top/bottom edge of window
if (curtop > wintop && curbot > winbot) {
sb.css('top', $u.max([wintop - offset - 10, 0]));
} else if (curtop < wintop && curbot < winbot) {
sb.css('top', $u.min([winbot - sbh - offset - 20,
$(document).height() - sbh - 200]));
}
}
});
</script>
{%- endif %}
{% endblock %}
{% block rootrellink %}
<li><a href="{{ pathto('index') }}">Home</a>&nbsp;|</li>
<!-- <li><a href="{{ pathto('contents') }}">Documentation</a> &raquo;</li>-->
{% endblock %}
{% block header %}
<div class="pageheader">
<ul>
<li><a href="{{ pathto('index') }}">Home</a></li>
<li><a href="{{ pathto('install') }}">Get it</a></li>
<li><a href="{{ pathto('contents') }}">Docs</a></li>
<li><a href="{{ pathto('develop') }}">Extend/Develop</a></li>
</ul>
<div>
<a href="{{ pathto('index') }}">
<img src="{{ pathto('_static/sphinxheader.png', 1) }}" alt="SPHINX" />
</a>
</div>
</div>
{% endblock %}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 580 B

View File

@ -1,16 +1,13 @@
/*
* efl.css
* ~~~~~~~~~~~~~~~
* ~~~~~~~~~~~~
*
* EFL stylesheet
* EFL dark theme stylesheet
*
* base on:
*
* Sphinx stylesheet -- sphinxdoc theme. Originally created by
* Armin Ronacher for Werkzeug.
* Originally based on sphinx13 theme.
*
* :copyright: Copyright 2007-2011 by the Sphinx team, see AUTHORS.
* :license: BSD, see LICENSE for details.
* :copyright: Copyright 2013 by the Python-EFL team, see AUTHORS.
* :license: LGPL, see COPYING for details.
*
*/
@ -19,31 +16,63 @@
/* -- page layout ----------------------------------------------------------- */
body {
font-family: 'Lucida Grande', 'Lucida Sans Unicode', 'Geneva',
font-family: 'Open Sans', 'Lucida Grande', 'Lucida Sans Unicode', 'Geneva',
'Verdana', sans-serif;
font-size: 14px;
letter-spacing: -0.01em;
line-height: 150%;
text-align: center;
background-color: rgb(64,64,64); /* #BFD1D4 */
color: white; /* black */
/* background-image: url(bodybg.png); */
background-color: rgb(64,64,64); /* */
color: white; /*black*/
padding: 0;
border: 1px solid rgb(111,111,111); /* #aaa */
border-right: 1px solid rgb(111,111,111); /*#0a507a*/
border-left: 1px solid rgb(111,111,111); /*#0a507a*/
margin: 0px 80px 0px 80px;
min-width: 740px;
margin: 0 auto;
min-width: 780px;
max-width: 1080px;
}
.pageheader {
background-image: url(headerbg.png);
text-align: left;
padding: 10px 15px;
}
.pageheader ul {
float: right;
color: white;
list-style-type: none;
padding-left: 0;
margin-top: 30px;
margin-right: 10px;
}
.pageheader li {
float: left;
margin: 0 0 0 10px;
}
.pageheader li a {
border-radius: 1px;
padding: 8px 12px;
color: #f9f9f0;
text-shadow: 0 0 5px rgba(0, 0, 0, 0.5);
}
.pageheader li a:hover {
background-color: #f9f9f0;
color: #0a507a;
text-shadow: none;
}
div.document {
/* background-color: white; */
/* background-color: white; */
text-align: left;
/* background-image: url(contents.png);
background-repeat: repeat-x; */
}
div.bodywrapper {
margin: 0 240px 0 0;
border-right: 1px solid rgb(111,111,111); /* #ccc */
border-right: 1px solid rgb(111,111,111); /*#0a507a*/
}
div.body {
@ -53,20 +82,19 @@ div.body {
div.related {
font-size: 1em;
color: white;
}
div.related ul {
background-image: url(related_background.png); /* url(navigation.png) */
height: 2em;
/* border-top: 1px solid #ddd;
border-bottom: 1px solid #ddd; */
background-image: url(rel_background.png); /*url(relbg.png)*/
height: 1.9em;
border-top: 1px solid rgb(32,32,32); /*#002e50*/
border-bottom: 1px solid rgb(32,32,32); /*#002e50*/
}
div.related ul li {
margin: 0;
margin: 0 5px 0 0;
padding: 0;
height: 2em;
float: left;
}
@ -79,46 +107,85 @@ div.related ul li a {
margin: 0;
padding: 0 5px 0 5px;
line-height: 1.75em;
/* color: #EE9816; */
color: #f9f9f0;
text-shadow: 0px 0px 1px rgba(0, 0, 0, 0.5);
}
div.related ul li a:hover {
/* color: #3CA8E7; */
color: white;
/*text-decoration: underline;*/
text-shadow: 0px 0px 1px rgba(255, 255, 255, 0.5);
}
div.sphinxsidebarwrapper {
/* Avoid the buggy moving sidebar
position: relative;
top: 0px;
*/
padding: 0;
}
div.sphinxsidebar {
margin: 0;
padding: 0.5em 15px 15px 0;
padding: 0 15px 15px 0;
width: 210px;
float: right;
font-size: 1em;
text-align: left;
}
div.sphinxsidebar h3, div.sphinxsidebar h4 {
margin: 1em 0 0.5em 0;
div.sphinxsidebar .logo {
font-size: 1.8em;
color: #0A507A;
font-weight: 300;
text-align: center;
}
div.sphinxsidebar .logo img {
vertical-align: middle;
}
div.sphinxsidebar input {
border: 1px solid #aaa;
font-family: 'Open Sans', 'Lucida Grande', 'Lucida Sans Unicode', 'Geneva',
'Verdana', sans-serif;
font-size: 1em;
padding: 0.1em 0 0.1em 0.5em;
color: white;
/* border: 1px solid #86989B;
background-color: #AFC1C4; */
border-bottom: 1px solid rgb(32, 32, 32);
border-right: 1px solid rgb(50, 50, 50);
border-left: 1px solid rgb(50, 50, 50);
border-top: 1px solid rgb(128, 128, 128);
background-image: url("b5.png");
}
div.sphinxsidebar h3 {
font-size: 1.5em;
border-top: 1px solid rgb(111,111,111); /*#0a507a;*/
margin-top: 1em;
margin-bottom: 0.5em;
padding-top: 0.5em;
}
div.sphinxsidebar h4 {
font-size: 1.2em;
margin-bottom: 0;
}
div.sphinxsidebar h3, div.sphinxsidebar h4 {
margin-right: -15px;
margin-left: -15px;
padding-right: 14px;
padding-left: 14px;
color: rgb(51, 153, 255); /*#333*/
font-weight: 300;
/*text-shadow: 0px 0px 0.5px rgba(0, 0, 0, 0.4);*/
}
div.sphinxsidebarwrapper > h3:first-child {
margin-top: 0.5em;
border: none;
}
div.sphinxsidebar h3 a {
color: white;
color: rgb(51, 153, 255); /*#333*/
}
div.sphinxsidebar ul {
padding-left: 1.5em;
color: #444;
margin-top: 7px;
padding: 0;
line-height: 130%;
@ -126,21 +193,25 @@ div.sphinxsidebar ul {
div.sphinxsidebar ul ul {
margin-left: 20px;
list-style-image: url(listitem.png);
}
div.footer {
background-color: transparent; /* #E3EFF1; */
background-image: url("footer_background.png"); /* */
color: white; /* #86989B */
background-image: url(footer_background.png); /*url(footerbg.png)*/
color: #ccc;
text-shadow: 0 0 .2px rgba(255, 255, 255, 0.8);
padding: 3px 8px 3px 0;
clear: both;
font-size: 0.8em;
text-align: center; /* right */
text-align: center; /*right*/
/*
height: 3em; /* */
*/
}
/* no need to make a visible link to Sphinx on the Sphinx page */
div.footer a {
color: #86989B;
text-decoration: underline;
color: #ccc;
}
/* -- body styles ----------------------------------------------------------- */
@ -150,12 +221,12 @@ p {
}
a {
color: rgb(51, 153, 255); /* #CA7900 */
color: #A2881D;
text-decoration: none;
}
a:hover {
/* color: #2491CF; */
color: #E1C13F;
text-shadow: rgb(51, 153, 255) 0px 0px 10px; /* */
}
@ -164,54 +235,43 @@ div.body a {
}
h1 {
margin: 0;
padding: 0.7em 0 0.3em 0;
font-size: 1.5em;
color: rgb(51, 153, 255); /* #11557C */
text-shadow: rgb(51, 153, 255) 0px 0px 10px; /* */
margin: 10px 0 0 0;
font-size: 2.4em;
color: rgb(51, 153, 255); /*#0A507A*/
font-weight: 300;
}
h2 {
margin: 1.3em 0 0.2em 0;
font-size: 1.35em;
color: rgb(51, 153, 255); /* */
text-shadow: rgb(51, 153, 255) 0px 0px 10px; /* */
margin: 1.em 0 0.2em 0;
font-size: 1.5em;
font-weight: 300;
padding: 0;
color: rgb(51, 153, 255); /*#174967*/
text-shadow: rgb(51, 153, 255) 0px 0px 10px; /* */
}
h3 {
margin: 1em 0 -0.3em 0;
font-size: 1.2em;
font-size: 1.3em;
font-weight: 300;
}
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; */
text-decoration: none;
}
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;
div.body h1 a tt, div.body h2 a tt, div.body h3 a tt, div.body h4 a tt, div.body h5 a tt, div.body h6 a tt {
color: rgb(51, 153, 255) !important; /*#0A507A*/
font-size: inherit !important;
}
a.headerlink {
color: #c60f0f!important;
font-size: 1em;
color: #0A507A !important;
font-size: 12px;
margin-left: 6px;
padding: 0 4px 0 4px;
text-decoration: none!important;
text-decoration: none !important;
float: right;
}
a.headerlink:hover {
@ -220,16 +280,18 @@ a.headerlink:hover {
}
cite, code, tt {
font-family: 'Consolas', 'Deja Vu Sans Mono',
font-family: 'Consolas', 'DejaVu Sans Mono',
'Bitstream Vera Sans Mono', monospace;
font-size: 0.95em;
letter-spacing: 0.01em;
font-size: 14px;
letter-spacing: -0.02em;
}
tt {
background-color: #f2f2f2;
border-bottom: 1px solid #ddd;
/* color: #333; */
background-color: rgb(51,51,51); /*#f2f2f2*/
border: 1px solid rgb(32,32,32); /*#ddd*/
border-radius: 2px;
color: white; /*#333*/
padding: 1px;
}
tt.descname, tt.descclassname, tt.xref {
@ -243,22 +305,23 @@ hr {
a tt {
border: 0;
/* color: #CA7900; */
color: #a2881d;
}
a tt:hover {
color: #2491CF;
color: #e1c13f;
}
pre {
font-family: 'Consolas', 'Deja Vu Sans Mono',
font-family: 'Consolas', 'DejaVu Sans Mono',
'Bitstream Vera Sans Mono', monospace;
font-size: 0.95em;
font-size: 13px;
letter-spacing: 0.015em;
line-height: 120%;
padding: 0.5em;
border: 1px solid #ccc;
background-color: #f8f8f8;
border-radius: 4px; /*2px*/
background-color: rgb(51,51,51); /*#f8f8f8*/
border: 1px solid rgb(32,32,32); /*#ccc*/
}
pre a {
@ -274,8 +337,9 @@ div.quotebar {
background-color: #f8f8f8;
max-width: 250px;
float: right;
padding: 2px 7px;
padding: 0px 7px;
border: 1px solid #ccc;
margin-left: 1em;
}
div.topic {
@ -294,8 +358,9 @@ table td, table th {
div.admonition, div.warning {
font-size: 0.9em;
margin: 1em 0 1em 0;
border: 1px solid #86989B;
background-color: #f7f7f7;
border: 1px solid rgb(32,32,32); /*#86989B*/
border-radius: 2px;
background-color: rgb(51,51,51); /*#f7f7f7*/
padding: 0;
}
@ -310,21 +375,17 @@ div.admonition pre, div.warning pre {
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;
margin-top: 1em;
padding-top: 0.5em;
font-weight: bold;
background-color: #AFC1C4;
}
div.warning {
border: 1px solid #940000;
border: 1px solid rgb(101,16,16); /*#940000*/
background-color: rgb(101,51,51); /*#FFCCCF*/
}
div.warning p.admonition-title {
background-color: #CF0000;
border-bottom-color: #940000;
}
div.admonition ul, div.admonition ol,
@ -333,17 +394,8 @@ div.warning ul, div.warning ol {
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',
font-family: 'Open Sans', 'Lucida Grande', 'Lucida Sans Unicode', 'Geneva',
'Verdana', sans-serif;
}
@ -352,3 +404,10 @@ div.viewcode-block:target {
border-top: 1px solid #ac9;
border-bottom: 1px solid #ac9;
}
dt:target, .highlighted { /* */
background-color: #fbe54e;
background-image: url(hilight_background.png);
border-top: 1px solid rgb(32,32,32);
border-bottom: 1px solid rgb(32,32,32);
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.2 KiB

After

Width:  |  Height:  |  Size: 1.6 KiB

BIN
doc/themes/efldoc/static/headerbg.png vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 344 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

BIN
doc/themes/efldoc/static/listitem.png vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 207 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

View File

@ -1,7 +1,4 @@
[theme]
inherit = sphinxdoc
inherit = basic
stylesheet = efl.css
pygments_style = sphinx
# [options]
# variable = default value
pygments_style = trac