shining 1.1.2 → 1.1.3
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.markdown +2 -101
- data/VERSION +1 -1
- data/lib/jquery.shining.js +8 -5
- data/shining.gemspec +2 -2
- data/spec/javascripts/unit/spec.helper.js +0 -1
- data/spec/javascripts/unit/spec.js +3 -2
- metadata +2 -2
data/README.markdown
CHANGED
@@ -1,107 +1,8 @@
|
|
1
1
|
# Shining
|
2
2
|
|
3
|
-
A
|
3
|
+
A framework for creating in-browser presentations.
|
4
4
|
|
5
|
-
|
6
|
-
|
7
|
-
$ sudo gem install shining
|
8
|
-
|
9
|
-
# How to use
|
10
|
-
|
11
|
-
Create a new presentation by
|
12
|
-
|
13
|
-
$ shine mypreso
|
14
|
-
|
15
|
-
Where "mypreso" is the directory name you'll use for it. A base presentation has the
|
16
|
-
following base structure.
|
17
|
-
|
18
|
-
* ROOT
|
19
|
-
* config.json
|
20
|
-
* slides
|
21
|
-
* index.html
|
22
|
-
|
23
|
-
Which leads us to...
|
24
|
-
|
25
|
-
# Configuration
|
26
|
-
|
27
|
-
Presentation-wide configuration happens through the **config.json** file. Existing
|
28
|
-
parameters are:
|
29
|
-
|
30
|
-
* slides: an array containing the name of the presentation's slides. If you're using
|
31
|
-
the generator to add slides, don't worry about editing it.
|
32
|
-
* transitions: See next section.
|
33
|
-
|
34
|
-
# Transitions
|
35
|
-
|
36
|
-
Transitions take effect when you navigate back or forward your slides. Valid options are:
|
37
|
-
|
38
|
-
* "fade": Fades slides out/in.
|
39
|
-
* "slide": Slides them horizontally.
|
40
|
-
* "slice": Cool horizontal slicing effect.
|
41
|
-
* false: Setting to false disables transitions altogether.
|
42
|
-
|
43
|
-
For anything not false, make sure you're passing a proper string.
|
44
|
-
|
45
|
-
# Slides
|
46
|
-
|
47
|
-
Easy way first. Change the directory to the presentation's directory first. Then
|
48
|
-
|
49
|
-
$ shine slide mynewslide
|
50
|
-
|
51
|
-
Where "mynewslide" is the name of the slide. This will create a slide in
|
52
|
-
**ROOT/slides/mynewslide.html**, and a slide script in **ROOT/slides/mynewslide.js**.
|
53
|
-
It will also automagically edit the **config.json** file for you, adding the new slide.
|
54
|
-
|
55
|
-
You can also create slides manually by adding an HTML file to **ROOT/slides**, and then
|
56
|
-
adding the file name (minus the extension) to **config.json**. Though really, just use
|
57
|
-
the generator.
|
58
|
-
|
59
|
-
# Slide templates
|
60
|
-
|
61
|
-
Shining supports Haml and ERb templates. For now, you can use it by manually dropping
|
62
|
-
a template file or either of those formats in **ROOT/slides**, and then running (from
|
63
|
-
inside the presentation's directory)
|
64
|
-
|
65
|
-
$ shine compile
|
66
|
-
|
67
|
-
Say you have a slide template named **ROOT/slides/test.haml**. Running the aforementioned
|
68
|
-
command will generate a new **test.html** from it. Note that this will _overwrite_ an
|
69
|
-
existing **test.html** slide if one exists.
|
70
|
-
|
71
|
-
# Slide scripts
|
72
|
-
|
73
|
-
Slides can have an associated script which you can use to trigger certain actions
|
74
|
-
(e.g.: effects) at a predetermined time. If you used the generator to create a slide,
|
75
|
-
you'll notice a .js file got created along with it. That's the script we're talking
|
76
|
-
about. So for instance, say you have 2 hidden paragraphs in your slide, and you intent
|
77
|
-
to show one after another. Open that .js file and do
|
78
|
-
|
79
|
-
1, $('p:first').effect('fades-in')
|
80
|
-
3, $('p:eq(1)').effect('fades-in')
|
81
|
-
|
82
|
-
The above translates to: 1 second into this slide, fade in the first
|
83
|
-
paragraph. 3 seconds in, fade in the second paragraph.
|
84
|
-
|
85
|
-
This is handy if you want to schedule things you'd like to see happening at certain
|
86
|
-
stages during a presentation.
|
87
|
-
|
88
|
-
# Steps to winning
|
89
|
-
|
90
|
-
Quickly outline of things I'm going to do with this project:
|
91
|
-
|
92
|
-
* More effects, because there's no such thing as visually appealing enough. Some
|
93
|
-
fine tuning of the existing ones is in order as well.
|
94
|
-
* More themes.
|
95
|
-
* Add a CSS parser, so I can build jQuery queues with the effects and order them
|
96
|
-
without the end-user needing to make sure things happen when they expect.
|
97
|
-
* Better generators. For now the requirements are simple enough so they can stay
|
98
|
-
as a single file, but I'm confident that will change.
|
99
|
-
* Better DSL for slide scripts. I know it's awesome already, but there's always
|
100
|
-
room for improvement.
|
101
|
-
* Macros, or configurable shortcuts for adding things like audio and video
|
102
|
-
without having to know how to use the tags.
|
103
|
-
* Did I say I wanna add macros, so you'll need to know next to zero HTML in order
|
104
|
-
to create *really* awesome presentations?
|
5
|
+
Please refer to the project webpage (http://shining.heroku.com) for docs.
|
105
6
|
|
106
7
|
# License
|
107
8
|
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.1.
|
1
|
+
1.1.3
|
data/lib/jquery.shining.js
CHANGED
@@ -123,7 +123,7 @@
|
|
123
123
|
$(window).resize(function() { $('#stage').centralize() });
|
124
124
|
loadConfig(function() {
|
125
125
|
var startAt = document.location.hash.replace('#', '');
|
126
|
-
loadSlide(startAt ? startAt : $.shining.slides.current());
|
126
|
+
loadSlide(startAt ? startAt : $.shining.slides.current(), true);
|
127
127
|
setTitle($.shining.config.title);
|
128
128
|
setTheme($.shining.config.theme);
|
129
129
|
parseEffects();
|
@@ -143,7 +143,9 @@
|
|
143
143
|
if (!name) return false;
|
144
144
|
applyTransition(
|
145
145
|
function() { loadSlide(name) },
|
146
|
-
function() {
|
146
|
+
function() {
|
147
|
+
$.shining.scripts.run($.shining.currentScript)
|
148
|
+
}
|
147
149
|
)
|
148
150
|
}
|
149
151
|
|
@@ -167,7 +169,7 @@
|
|
167
169
|
return $('script:first').attr('src').match(/^vendor/);
|
168
170
|
}
|
169
171
|
|
170
|
-
function loadSlide(name) {
|
172
|
+
function loadSlide(name, runScript) {
|
171
173
|
$('#stage .contents').load(
|
172
174
|
slide(name).markup(),
|
173
175
|
function(data) {
|
@@ -178,16 +180,17 @@
|
|
178
180
|
$.shining.scripts.reap();
|
179
181
|
updateControlAnchors();
|
180
182
|
if (data) {
|
181
|
-
loadSlideScript(name);
|
183
|
+
loadSlideScript(name, runScript);
|
182
184
|
loadSlideStyle(name);
|
183
185
|
}
|
184
186
|
}
|
185
187
|
);
|
186
188
|
}
|
187
189
|
|
188
|
-
function loadSlideScript(name) {
|
190
|
+
function loadSlideScript(name, run) {
|
189
191
|
$.get(slide(name).script(), function(script) {
|
190
192
|
$.shining.currentScript = script;
|
193
|
+
if (run) $.shining.scripts.run($.shining.currentScript);
|
191
194
|
})
|
192
195
|
}
|
193
196
|
|
data/shining.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{shining}
|
8
|
-
s.version = "1.1.
|
8
|
+
s.version = "1.1.3"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Julio Cesar Ody"]
|
12
|
-
s.date = %q{2010-04-
|
12
|
+
s.date = %q{2010-04-12}
|
13
13
|
s.description = %q{Webkit + CSS + Javascript = awesome presos}
|
14
14
|
s.email = %q{julio.ody@gmail.com}
|
15
15
|
s.executables = ["console", "shine"]
|
@@ -1,7 +1,8 @@
|
|
1
1
|
describe 'Shining'
|
2
2
|
before_each
|
3
3
|
window.$ = jQuery;
|
4
|
-
$.fn.offset = function() { return 0 }
|
4
|
+
$.fn.offset = function() { return 0 }
|
5
|
+
$.fn.centralize = function() { return false }
|
5
6
|
if (!$('#hidden').length) {
|
6
7
|
var hidden = $('<div id="hidden"></div>').css({height: 0, width: 0, opacity: 0, marginLeft: -10000}).appendTo('body');
|
7
8
|
var stage = $($(fixture('index.html')).get(0)),
|
@@ -53,6 +54,6 @@ describe 'Shining'
|
|
53
54
|
mockRequest().and_return('<h1>Slide2</h1>');
|
54
55
|
$.shining.nextSlide();
|
55
56
|
$('#stage .contents h1').text().should.be 'Slide2'
|
56
|
-
end
|
57
|
+
end
|
57
58
|
end
|
58
59
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: shining
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.
|
4
|
+
version: 1.1.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Julio Cesar Ody
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2010-04-
|
12
|
+
date: 2010-04-12 00:00:00 +10:00
|
13
13
|
default_executable:
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|