activate gettingstarted in documentation + fix navigation from the menu.

This commit is contained in:
Mathieu Virbel 2012-08-16 18:23:52 +02:00
parent 081ecf500b
commit 65c9515a37
6 changed files with 34 additions and 22 deletions

View File

@ -33,12 +33,16 @@ function gs_check_hash() {
if ( location.hash.substring(0, 5) == '#doc-' ) {
gs_show_section(location.hash.substring(5), 1);
} else {
console.log($(location.hash).parent('.panelstep'));
var id = $(location.hash).parent('.panelstep').attr('id');
if ( typeof(id) != 'undefined' )
gs_show_section(id, 0);
else
gs_show_section(sections_key[0], 1);
var search = $('div.panelstep' + location.hash);
if ( search && location.hash ) {
gs_show_section(location.hash.substring(1));
} else {
var id = $(location.hash).parent('.panelstep').attr('id');
if ( typeof(id) != 'undefined' )
gs_show_section(id, 0);
else
gs_show_section(sections_key[0], 1);
}
}
setTimeout('gs_check_hash()', 250);
}
@ -55,11 +59,11 @@ function gs_show_section(gsid, changehash) {
$(sections[key][0]).show('slide', {direction: 'right'}, 150);
sections[key][1].attr({'font-weight': 'bold'});
sections[key][2].animate({'stroke-width': '8', 'fill': '#f80'}, 300);
console.log($(sections[key][0]).height());
$('#content').css('min-height', function(){
return $(sections[key][0]).height() + 180;
});
console.log($(sections[key][0]).height());
$('a.current').removeClass('current');
$('a[href="#' + gsid + '"]').addClass('current');
}
else if ( key == prev_gsid )
{
@ -96,7 +100,6 @@ function gs_start(firstsection) {
jQuery(document).bind('keydown', function (evt){
var nid = '';
console.log(prev_gsid);
if ( event.which == 37 ) {
nid = $('div.panelstep[id="' + prev_gsid + '"]').prev().attr('id');
}
@ -246,7 +249,6 @@ $(document).ready(function () {
$(this).html('Hide Descriptions ⇑');
$.cookie('kivy.toggledesc', 'false');
}
console.log($.cookie('kivy.toggledesc'));
});
$('div.body dl dt').click(function() {

View File

@ -63,7 +63,7 @@ release = kivy.__version__
today_fmt = '%B %d, %Y'
# suppress exclusion warnings
exclude_patterns = ['gettingstarted/*', 'guide/layouts.rst', 'api-index.rst',
exclude_patterns = ['guide/layouts.rst', 'api-index.rst',
'api-kivy.lib.osc*']
# The reST default role (used for this markup: `text`) to use for all documents.

View File

@ -10,6 +10,7 @@ stunning applications in short time using the framework.
.. toctree::
:maxdepth: 2
gettingstarted/index
philosophy
installation/installation
guide-index

View File

@ -7,8 +7,7 @@ Events
Kivy is mostly event-based, that's mean the flow of the program is determined
by events.
Clock events
~~~~~~~~~~~~
**Clock events**
.. image:: ../images/gs-events-clock.png
:class: gs-eleft
@ -21,8 +20,7 @@ You can also create Triggered events with
:meth:`~kivy.clock.ClockBase.create_trigger`, multiple call to a trigger will
schedule a function call only once.
Input events
~~~~~~~~~~~~
**Input events**
.. image:: ../images/gs-events-input.png
:class: gs-eleft
@ -37,8 +35,7 @@ All the mouses click, touchs, scroll wheel are part of the
For an in-depth explaination, have a look at :doc:`/api-kivy.input`.
Class events
~~~~~~~~~~~~
**Class events**
.. image:: ../images/gs-events-class.png
:class: gs-eleft
@ -52,9 +49,6 @@ In addition, you have the possibility to create your own event using
:meth:`~kivy.event.EventDispatcher.register_event_type`, as the
`on_press`/`on_release` in :class:`~kivy.uix.button.Button`.
Going further
~~~~~~~~~~~~~
Another thing to note is that if you override an event, you become responsible
for implementing all its behaviour previously handled by the base class. The
easiest way to do this is to call `super()`::

View File

@ -15,3 +15,20 @@ Getting Started
.. include:: packaging.rst
.. include:: examples.rst
.. include:: diving.rst
.. toctree::
:hidden:
intro
installation
first_app
properties
rules
events
framework
layouts
drawing
packaging
examples
diving

View File

@ -35,8 +35,6 @@ Follow this guide to get the tools you need, understand the major concepts and
learn best practices. As this is an introduction, pointers to more information
will be provided at the end of each section.
You may also want to look at the :doc:`/gettingstarted/index` guide.
As you proceed through the guide, you will, using Kivy:
- **Learn**: The basics of programming with the Kivy language.