diff --git a/doc/sources/.static/disclosure_down.png b/doc/sources/.static/disclosure_down.png new file mode 100644 index 000000000..6a0a8eea9 Binary files /dev/null and b/doc/sources/.static/disclosure_down.png differ diff --git a/doc/sources/.static/disclosure_up.png b/doc/sources/.static/disclosure_up.png new file mode 100644 index 000000000..ddd4ec932 Binary files /dev/null and b/doc/sources/.static/disclosure_up.png differ diff --git a/doc/sources/.static/fresh.css b/doc/sources/.static/fresh.css new file mode 100644 index 000000000..4e3324b77 --- /dev/null +++ b/doc/sources/.static/fresh.css @@ -0,0 +1,304 @@ +@font-face { + font-family: 'Nobile'; + font-style: normal; + font-weight: normal; + src: local('Nobile'), url('nobile.ttf') format('truetype'); +} + +body { + color: #797979; + font-family: 'Open Sans', Arial, sans-serif; + font-family: 'Nobile', 'OpenSans', Verdara, sans-serif; + font-weight: 200; + font-size: 14px; + line-height: 1.6em; + padding: 0px; + margin: 0px; +} + +h1, h2, h3, h4, h5 { + color: #515151; + font-weight: normal; +} + +a, a:link, a:visited { + color: #2a7cdf; + text-decoration: none; +} + +a.headerlink { + display: none; +} + +h1:hover a.headerlink, +h2:hover a.headerlink, +h3:hover a.headerlink, +h4:hover a.headerlink, +h5:hover a.headerlink { + display: inline; + color: #d0d0d0; + margin-left: 10px; +} + +a:hover { + border-bottom: 1px solid rgba(42, 124, 223, 0.5); +} + +#topbar { + background-color: #202530; + margin: 0px; + padding: 15px 15px 10px 15px; + height: 60px; +} + +#topbar img { + padding-left: 5px; +} + +#topbar ul, +#topbar li { + margin: 0px; + padding: 0px; + list-style-type: none; +} + +#topbar ul { + float: right; + margin-right: 20px; + margin-top: -80px; +} + +#topmenu ul.navigation li { + float: left; + list-style-type: none; +} + +#topmenu ul.navigation li a { + float: left; + margin-left: 30px; + line-height: 55px; + list-style-type: none; + color: #bbb; + margin-top: 30px; + font-family: 'Nobile', 'OpenSans', Verdara, sans-serif; + text-decoration: none; + background-color: #404040; + padding: 0 20px; +} + +#topmenu ul.navigation li a:hover { + background-color: #e0e0e0; +} + +div.sphinxsidebar { + width: 230px; + float: left; +} + +div.sphinxsidebar a.mainlevel, +div.sphinxsidebar h3 { + background-color: #e0e0e0; + font-weight: normal; + font-size: 1em; + padding: 0.5em 1em; + margin: 1px 0px; +} + +div.sphinxsidebar a.togglable { + padding-right: 34px; + background: #e0e0e0 url('disclosure_up.png') top right no-repeat; +} +div.sphinxsidebar ul.toggleopen a.togglable { + background-image: url('disclosure_down.png') +} + +div.sphinxsidebar ul, +div.sphinxsidebar li { + margin: 0px; + padding: 0px; + list-style-type: none; +} + +div.sphinxsidebar ul li ul { + display: none; +} + +div.sphinxsidebar li a { + background-color: #f0f0f0; + display: block; + font-weight: normal; + font-size: 1em; + padding: 0.5em 1em; + color: #515151; + border-left: 2px solid transparent; +} + +div.sphinxsidebar ul ul li.current > a, +div.sphinxsidebar li a:hover { + background-color: #e0f0f0; + border: none; + color: #202530; + border-left: 2px solid #2a7cdf; +} + +/* Footer */ + +.footerlinks table { + background-color: #f0f0f0; + width: 100%; +} + +.footerlinks td { + padding: 10px 15px; + width: 50%; +} + +.footerlinks td.rightlink { + text-align: right; +} + +#contentall { + padding: 20px; +} + +#content { + margin-left: 250px; + margin-top: -8px; +} + +#content pre { + background-color: #f0f0f0; + padding: 10px 15px; +} + +#content h2 { + border-bottom: 1px solid #e0e0e0; + padding-bottom: 5px; +} + +/* Content: Admonition (warning, important, notice) */ +#content div.admonition { + padding-left: 10px; + margin: 8px 0px; +} + +#content div.admonition p { + margin: 0px; +} + +#content div.warning { + border-left: 3px solid #E88080; +} + +#content div.warning p.first { + color: #E88080; +} + +#content div.note { + border-left: 3px solid #80C880; +} + +#content div.note p.first { + color: #80C880; +} + + +/* API only: versionadded */ +p.versionchanged, +p.versionadded { + font-style: italic; + color: #a0a0a0; +} + +/* API only: Module: kivy -- Jump to API */ +.bodyshortcut { + background-color: #f0f0f0; + padding: 10px 15px; +} + +.bodyshortcut .left { + float: left; +} + +.bodyshortcut .right { + float: right; +} + +/* API only: Link collapse-all / hide description */ +#api-toggle-desc, +#api-toggle-all { + float: right; + font-size: 14px; + margin-left: 10px; + cursor: pointer; +} + +/* API only: classes / methods / ... */ + +dl.api-level dt { + cursor: pointer; + background-color: #e0e0e0; + font-weight: normal; + font-size: 1em; + padding: 10px 15px; + margin: 1px 0px; +} + +dl.api-level dl.attribute dt { + background-color: #f0f0f0; +} + +dl.api-level dd { + margin-left: 20px; +} + +dl.api-level { + margin-top: 20px; +} + +tt.descclassname { + display: none; +} + +tt.descname { + color: #515151; + font-size: 1.2em; +} + +em { + font-style: normal; +} + +em.property { + color: #df712d; +} + +big { + font-size: 14px; + font-weight: normal; +} + +table.field-list { + display: none; +} + +/* Form search */ +form.search input { + line-height: 2em; + border: 1px solid #d0d0d0; + width: 211px; + display: block; + font-size: 1.1em; + padding: 5px 8px; +} + +form.search { + position: relative; + top: -0.8em; +} + +/* From HTML */ +.align-right { + float: right; + margin: 5px 0 5px 5px; +} diff --git a/doc/sources/.static/kivy.js b/doc/sources/.static/kivy.js index 622c8eb66..6efe4d7fb 100644 --- a/doc/sources/.static/kivy.js +++ b/doc/sources/.static/kivy.js @@ -296,14 +296,36 @@ $(document).ready(function () { // Image reflexions //---------------------------------------------------------------------------- - $('div.body img').reflect({'opacity': .35, 'height': 40}); + //$('div.body img').reflect({'opacity': .35, 'height': 40}); //---------------------------------------------------------------------------- // Page to change with panel navigation //---------------------------------------------------------------------------- - var firstsection = $('div.section').attr('id'); - if ( firstsection == 'getting-started' || firstsection == 'pong-game-tutorial' ) - gs_start(firstsection); + //var firstsection = $('div.section').attr('id'); + //if ( firstsection == 'getting-started' || firstsection == 'pong-game-tutorial' ) + // gs_start(firstsection); + + //---------------------------------------------------------------------------- + // Menu navigation + //---------------------------------------------------------------------------- + $('div.sphinxsidebarwrapper > ul > li > a').attr('href', '#').addClass('mainlevel'); + $('div.sphinxsidebarwrapper > ul > li > a').each(function(index, item) { + $(item).bind('mousedown', function() { + $('div.sphinxsidebar ul li ul').filter(function (index, child) { + if (child != $(item).parent().children('ul').get(0)) return child; + }).slideUp(); + $(item).parent().children('ul').slideToggle(); + }); + }) + + $('div.sphinxsidebarwrapper li.current').parent().show(); + + $('div.sphinxsidebarwrapper ul li').each(function(index, item) { + if ($(item).children('ul').length > 0) { + console.log(index, item); + $(item).children('a').addClass('togglable'); + } + }); }); diff --git a/doc/sources/.static/logo_kivy_white.png b/doc/sources/.static/logo-kivy.png similarity index 100% rename from doc/sources/.static/logo_kivy_white.png rename to doc/sources/.static/logo-kivy.png diff --git a/doc/sources/.templates/layout.html b/doc/sources/.templates/layout.html index 03b3f189f..a813ef533 100644 --- a/doc/sources/.templates/layout.html +++ b/doc/sources/.templates/layout.html @@ -54,12 +54,15 @@ {%- block sidebartoc %} + + {{ toctree(collapse=False) }} {%- endblock %} {%- block sidebarrel %} + {%- endblock %} @@ -150,8 +154,7 @@
diff --git a/doc/sources/conf.py b/doc/sources/conf.py index aaf1a7327..0904dbbb7 100644 --- a/doc/sources/conf.py +++ b/doc/sources/conf.py @@ -63,8 +63,7 @@ release = kivy.__version__ today_fmt = '%B %d, %Y' # suppress exclusion warnings -exclude_patterns = ['guide/layouts.rst', 'api-index.rst', - 'api-kivy.lib.osc*'] +exclude_patterns = ['guide/layouts.rst', 'api-kivy.lib.osc*'] # The reST default role (used for this markup: `text`) to use for all documents. #default_role = None @@ -90,7 +89,7 @@ pygments_style = 'kivy_pygments_theme.KivyStyle' # The style sheet to use for HTML and HTML Help pages. A file of that name # must exist either in Sphinx' static/ path, or in one of the custom paths # given in html_static_path. -html_style = 'default.css' +html_style = 'fresh.css' # The name for this set of Sphinx documents. If None, it defaults to # " v documentation". diff --git a/doc/sources/contents.rst.inc b/doc/sources/contents.rst.inc index 3dab93db5..b586e22e4 100644 --- a/doc/sources/contents.rst.inc +++ b/doc/sources/contents.rst.inc @@ -1,28 +1,10 @@ -User's Guide ------------- - -This part of the documentation explains the basic ideas behind Kivy's design -and why you'd want to use it. -It goes on with a discussion of the architecture and shows you how to create -stunning applications in a short time using the framework. - -.. ifconfig:: format == 'html' - - .. toctree:: - :maxdepth: 1 - - gettingstarted/index .. toctree:: :maxdepth: 2 - philosophy - installation/installation + gettingstarted/index + user-guide guide-index tutorials-index - contribute - faq - contact + api-index - -.. include:: api-index.rst diff --git a/doc/sources/gettingstarted/index.rst b/doc/sources/gettingstarted/index.rst index d120f18be..304b621b1 100644 --- a/doc/sources/gettingstarted/index.rst +++ b/doc/sources/gettingstarted/index.rst @@ -1,23 +1,8 @@ -:orphan: - Getting Started =============== -.. include:: intro.rst -.. include:: installation.rst -.. include:: first_app.rst -.. include:: properties.rst -.. include:: rules.rst -.. include:: events.rst -.. include:: framework.rst -.. include:: layouts.rst -.. include:: drawing.rst -.. include:: packaging.rst -.. include:: examples.rst -.. include:: diving.rst - .. toctree:: - :hidden: + :maxdepth: 1 intro installation diff --git a/doc/sources/index.rst b/doc/sources/index.rst index a4c869c51..c49a5cb5d 100644 --- a/doc/sources/index.rst +++ b/doc/sources/index.rst @@ -46,5 +46,5 @@ For a list of authors, please see the file AUTHORS that accompanies the Kivy source code distribution (next to COPYING). -Kivy -- Copyright 2011, The Kivy Authors. All rights reserved. +Kivy -- Copyright 2011-2013, The Kivy Authors. All rights reserved. diff --git a/doc/sources/user-guide.rst b/doc/sources/user-guide.rst new file mode 100644 index 000000000..b1568731d --- /dev/null +++ b/doc/sources/user-guide.rst @@ -0,0 +1,16 @@ +User's Guide +------------ + +This part of the documentation explains the basic ideas behind Kivy's design +and why you'd want to use it. +It goes on with a discussion of the architecture and shows you how to create +stunning applications in a short time using the framework. + +.. toctree:: + :maxdepth: 2 + + installation/installation + philosophy + contribute + faq + contact