scarlet 0.1.1 → 0.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/README.textile +13 -2
- data/lib/scarlet/templates/html/javascripts/slides.js +30 -3
- metadata +3 -3
data/README.textile
CHANGED
@@ -62,10 +62,21 @@ In the previously created folder:
|
|
62
62
|
|
63
63
|
<pre>scarlet slideshow.textile > slideshow.html</pre>
|
64
64
|
|
65
|
+
h3. Step 5 - Start the Show!
|
66
|
+
|
67
|
+
Open the converted html file in your browser of choice and bedazzle your audience with your über presentation skills.
|
68
|
+
|
69
|
+
h4. Keyboard Navigation:
|
70
|
+
|
71
|
+
* Right/Enter/Space Bar - Forward slide
|
72
|
+
* Left - Backward slide
|
73
|
+
* # g - Jump to slide # (EG: 5g - jump to slide 5)
|
74
|
+
* Esc - Go to the first slide
|
75
|
+
|
65
76
|
h2. Contributors
|
66
77
|
|
67
78
|
* *Matias Korhonen*: PDF and LaTeX generation
|
68
|
-
* *Blake Smith*: Slide titles and bug fixes
|
79
|
+
* *Blake Smith*: Slide titles, awesome navigation, and bug fixes
|
69
80
|
|
70
81
|
h2. Special Thanks
|
71
82
|
|
@@ -80,7 +91,7 @@ Copyright (c) 2009 João Carlos Cardoso, excluding the following files:
|
|
80
91
|
** *jquery.easing.js*: George McGinley Smith
|
81
92
|
** *jquery.hash-changed.js*: Pat Nakajima
|
82
93
|
** *jquery.min.js*: John Resig and the jQuery Team
|
83
|
-
** *slides.js*: Pat Nakajima. Edited by João Carlos Cardoso.
|
94
|
+
** *slides.js*: Pat Nakajima. Edited by Blake Smith and João Carlos Cardoso.
|
84
95
|
|
85
96
|
* Files under *lib/scarlet/html/templates/stylesheets/*:
|
86
97
|
** *slides.css*: Based on the stylesheet for "slidedown":http://github.com/nakajima/slidedown created by Pat Nakajima
|
@@ -73,7 +73,26 @@
|
|
73
73
|
|
74
74
|
formatGist();
|
75
75
|
}
|
76
|
-
|
76
|
+
|
77
|
+
var isNumber = function(key) {
|
78
|
+
return key >= 48 && key <= 57;
|
79
|
+
}
|
80
|
+
|
81
|
+
var numberBuffer = new String();
|
82
|
+
|
83
|
+
var addToNumberBuffer = function(num) {
|
84
|
+
numberBuffer = numberBuffer + (num - 48);
|
85
|
+
}
|
86
|
+
|
87
|
+
var jumpToSlide = function(event) {
|
88
|
+
if (numberBuffer.length > 0) {
|
89
|
+
event.preventDefault();
|
90
|
+
event.stopPropagation();
|
91
|
+
setIndex(numberBuffer);
|
92
|
+
}
|
93
|
+
numberBuffer = new String();
|
94
|
+
}
|
95
|
+
|
77
96
|
var move = function(event) {
|
78
97
|
var DIRECTIONS = {
|
79
98
|
37: -1, // ARROW LEFT
|
@@ -81,12 +100,20 @@
|
|
81
100
|
32: 1, // SPACE BAR
|
82
101
|
13: 1, // RETURN
|
83
102
|
27: 'home', // ESCAPE
|
103
|
+
71: 'jump', // g
|
84
104
|
left: -1,
|
85
105
|
right: 1
|
86
106
|
}
|
87
107
|
|
88
|
-
if (
|
89
|
-
|
108
|
+
if (isNumber(event.which)) {
|
109
|
+
addToNumberBuffer(event.which);
|
110
|
+
}
|
111
|
+
|
112
|
+
else if (dir = DIRECTIONS[event.which || event]) {
|
113
|
+
if (dir == 'jump') {
|
114
|
+
jumpToSlide(event);
|
115
|
+
}
|
116
|
+
else if (dir == 'home') {
|
90
117
|
event.preventDefault();
|
91
118
|
event.stopPropagation();
|
92
119
|
location.href = '#0';
|
metadata
CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
|
|
5
5
|
segments:
|
6
6
|
- 0
|
7
7
|
- 1
|
8
|
-
-
|
9
|
-
version: 0.1.
|
8
|
+
- 2
|
9
|
+
version: 0.1.2
|
10
10
|
platform: ruby
|
11
11
|
authors:
|
12
12
|
- Joao Carlos Cardoso
|
@@ -14,7 +14,7 @@ autorequire:
|
|
14
14
|
bindir: bin
|
15
15
|
cert_chain: []
|
16
16
|
|
17
|
-
date: 2010-
|
17
|
+
date: 2010-07-04 00:00:00 +03:00
|
18
18
|
default_executable: scarlet
|
19
19
|
dependencies:
|
20
20
|
- !ruby/object:Gem::Dependency
|