hyhyhy 0.0.9 → 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +2 -2
- data/README.md +21 -4
- data/bin/hyhyhy +1 -0
- data/hyhyhy.gemspec +2 -2
- data/lib/hyhyhy.rb +5 -0
- data/lib/hyhyhy/config.rb +2 -0
- data/lib/hyhyhy/frames.rb +2 -0
- data/lib/hyhyhy/logger.rb +2 -0
- data/lib/hyhyhy/parser.rb +2 -0
- data/lib/hyhyhy/structure/_assets/javascripts/main.js +49 -2
- data/lib/hyhyhy/structure/_slides/1.introduction.md +12 -5
- data/lib/hyhyhy/structure/_slides/3.usage.md +3 -2
- data/lib/hyhyhy/version.rb +3 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6b6da89a0ac0ab6ae00eafca307792c5c3804a7e
|
4
|
+
data.tar.gz: cfa819feb0ac79c9471fc95a41d84700618d7733
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cebca75fde3103ee21b79f606f33a21091313eb17d36595afc0f1f7e430129c7695e9d0860675c2d2192abce776fec43290c7478a81931f54627c842bf7533f1
|
7
|
+
data.tar.gz: 49fc86d24d668b0141470e5fdd887eea8f8d73b13502d3070510e636cd24dfaf77e6cf2d2a347304f6f4be4c2fa8bc54fc8a3fb7d3e8c838b79b9a19cd1d3890
|
data/.travis.yml
CHANGED
data/README.md
CHANGED
@@ -118,7 +118,7 @@ NOT READY, YET! SEE MAIN PRESENTATION...
|
|
118
118
|
|
119
119
|
## Configuration
|
120
120
|
|
121
|
-
For now, you can change the basic variables in the configuration file.
|
121
|
+
For now, you can change the basic variables in the `.hyhyhy` configuration file.
|
122
122
|
|
123
123
|
```json
|
124
124
|
{
|
@@ -130,15 +130,16 @@ For now, you can change the basic variables in the configuration file.
|
|
130
130
|
|
131
131
|
## Presentation
|
132
132
|
|
133
|
-
- Press `left arrow` and `right arrow` to navigate.
|
133
|
+
- Press (`left arrow` or `k`) and (`right arrow` or `j`) to navigate.
|
134
134
|
- Press `h` to launch fullscreen.
|
135
135
|
- Press `ESC` to exit fullscreen mode.
|
136
|
+
- Press `gg`/`shift + g` to move to top/bottom.
|
136
137
|
- Browser zooming is supported.
|
137
138
|
- Touch events are supported.
|
138
139
|
|
139
140
|
## Dependencies
|
140
141
|
|
141
|
-
- Ruby (>=
|
142
|
+
- Ruby (>= 1.9.3)
|
142
143
|
* commander
|
143
144
|
* kramdown
|
144
145
|
* launchy
|
@@ -150,6 +151,8 @@ For now, you can change the basic variables in the configuration file.
|
|
150
151
|
* prism.js
|
151
152
|
* MetricsGraphics.js
|
152
153
|
* katex.js
|
154
|
+
- Others
|
155
|
+
* bower (optional)
|
153
156
|
|
154
157
|
## Quickstart
|
155
158
|
|
@@ -175,6 +178,8 @@ Sample presentation is already in the project. But if you want you can see it li
|
|
175
178
|
## Conceptions
|
176
179
|
|
177
180
|
- [ ] speaker notes
|
181
|
+
- [ ] travis tests
|
182
|
+
- [ ] compression
|
178
183
|
|
179
184
|
## Contributing
|
180
185
|
|
@@ -184,6 +189,18 @@ Please feel free to contribute to this project! Pull requests and feature reques
|
|
184
189
|
|
185
190
|
See LICENSE file in this repository.
|
186
191
|
|
192
|
+
## Credits
|
193
|
+
|
194
|
+
<div align="center">
|
195
|
+
<img src="http://bower.io/img/bower-logo.png" width="200px" />
|
196
|
+
<img src="http://www.stockholmruby.com/logo.png" width="200px" />
|
197
|
+
<img src="https://khan.github.io/KaTeX/katex-logo.svg" width="300px" />
|
198
|
+
<img src="http://upload.wikimedia.org/wikipedia/commons/4/4b/O_Reilly_Media_logo.svg" width="200px" />
|
199
|
+
<img src="http://metricsgraphicsjs.org/images/logo.svg" width="300px" />
|
200
|
+
<img src="http://upload.wikimedia.org/wikipedia/commons/a/aa/Logo_Google_2013_Official.svg" width="200px" />
|
201
|
+
</div>
|
202
|
+
|
187
203
|
## Thanks
|
188
204
|
|
189
|
-
* Kim Thoenen ([@Chive](https://github.com/Chive))
|
205
|
+
* Kim Thoenen ([@Chive](https://github.com/Chive))
|
206
|
+
* Anderson de Oliveira ([@andersonba](https://github.com/andersonba))
|
data/bin/hyhyhy
CHANGED
data/hyhyhy.gemspec
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
#
|
1
|
+
# encoding: utf-8
|
2
2
|
lib = File.expand_path('../lib', __FILE__)
|
3
3
|
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
4
|
require 'hyhyhy/version'
|
@@ -10,7 +10,7 @@ Gem::Specification.new do |spec|
|
|
10
10
|
spec.email = ["maciejanthonyczyzewski@gmail.com"]
|
11
11
|
spec.summary = Hyhyhy::SUMMARY
|
12
12
|
spec.description = Hyhyhy::DESCRIPTION
|
13
|
-
spec.homepage = "https://github.com/
|
13
|
+
spec.homepage = "https://github.com/maciejczyzewski/hyhyhy"
|
14
14
|
spec.license = "MIT"
|
15
15
|
|
16
16
|
spec.files = `git ls-files -z`.split("\x0")
|
data/lib/hyhyhy.rb
CHANGED
@@ -1,9 +1,14 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
|
1
3
|
require 'listen'
|
2
4
|
require 'erubis'
|
3
5
|
require 'launchy'
|
4
6
|
require 'webrick'
|
5
7
|
require 'kramdown'
|
6
8
|
|
9
|
+
Encoding.default_internal = Encoding::UTF_8
|
10
|
+
Encoding.default_external = Encoding::UTF_8
|
11
|
+
|
7
12
|
module Hyhyhy
|
8
13
|
autoload :Version, "hyhyhy/version"
|
9
14
|
|
data/lib/hyhyhy/config.rb
CHANGED
data/lib/hyhyhy/frames.rb
CHANGED
data/lib/hyhyhy/logger.rb
CHANGED
data/lib/hyhyhy/parser.rb
CHANGED
@@ -82,6 +82,8 @@
|
|
82
82
|
slide: slide,
|
83
83
|
next: step.bind(null, 1),
|
84
84
|
prev: step.bind(null, -1),
|
85
|
+
first: slide.bind(null, 0),
|
86
|
+
last: slide.bind(null, slides.length - 1),
|
85
87
|
parent: parent,
|
86
88
|
slides: slides
|
87
89
|
};
|
@@ -134,6 +136,8 @@
|
|
134
136
|
slide: callOnAllDecks('slide'),
|
135
137
|
next: callOnAllDecks('next'),
|
136
138
|
prev: callOnAllDecks('prev'),
|
139
|
+
first: callOnAllDecks('first'),
|
140
|
+
last: callOnAllDecks('last'),
|
137
141
|
plugins: plugins
|
138
142
|
};
|
139
143
|
|
@@ -244,20 +248,44 @@ hyhyhy.plugins.hash = function(deck) {
|
|
244
248
|
};
|
245
249
|
|
246
250
|
hyhyhy.plugins.keys = function(deck, options) {
|
247
|
-
var isHorizontal = options === true || options == 'horizontal'
|
251
|
+
var isHorizontal = options === true || options == 'horizontal',
|
252
|
+
keyList = [];
|
253
|
+
|
254
|
+
var pushToQueue = function(list, limit, v) {
|
255
|
+
if (list.length === limit) {
|
256
|
+
list.splice(-2, 1);
|
257
|
+
}
|
258
|
+
list.push(v);
|
259
|
+
return list;
|
260
|
+
};
|
261
|
+
|
262
|
+
var isEqual = function(arr1, arr2) {
|
263
|
+
return JSON.stringify(arr1) === JSON.stringify(arr2);
|
264
|
+
};
|
248
265
|
|
249
266
|
document.addEventListener('keydown', function(e) {
|
267
|
+
var withMod = e.shiftKey || e.altKey || e.ctrlKey || e.metaKey;
|
268
|
+
|
250
269
|
(
|
251
270
|
e.which == 34 || // PAGE DOWN
|
252
271
|
e.which == 32 || // SPACE
|
272
|
+
e.which == 74 || // j
|
253
273
|
isHorizontal && e.which == 39 || // RIGHT
|
254
274
|
!isHorizontal && e.which == 40 // DOWN
|
255
275
|
) && deck.next();
|
256
276
|
(
|
257
277
|
e.which == 33 || // PAGE UP
|
278
|
+
e.which == 75 || // k
|
258
279
|
isHorizontal && e.which == 37 || // LEFT
|
259
280
|
!isHorizontal && e.which == 38 // UP
|
260
281
|
) && deck.prev();
|
282
|
+
(
|
283
|
+
// GG
|
284
|
+
isEqual([71, 71], pushToQueue(keyList, 2, !withMod ? e.which : null))
|
285
|
+
) && deck.first();
|
286
|
+
(
|
287
|
+
e.which == 71 && e.shiftKey // SHIFT + G
|
288
|
+
) && deck.last();
|
261
289
|
});
|
262
290
|
};
|
263
291
|
|
@@ -392,4 +420,23 @@ hyhyhy.plugins.touch = function(deck, options) {
|
|
392
420
|
deck.parent.addEventListener('touchend', function() {
|
393
421
|
Math.abs(delta) > 50 && (delta > 0 ? deck.prev() : deck.next());
|
394
422
|
});
|
395
|
-
|
423
|
+
|
424
|
+
// Experiment - WP8 support (@aiboy)
|
425
|
+
deck.parent.addEventListener('MSPointerDown', function(e) {
|
426
|
+
if (e.touches.length == 1) {
|
427
|
+
startPosition = e.touches[0]['page' + axis];
|
428
|
+
delta = 0;
|
429
|
+
}
|
430
|
+
});
|
431
|
+
|
432
|
+
deck.parent.addEventListener('MSPointerMove', function(e) {
|
433
|
+
if (e.touches.length == 1) {
|
434
|
+
e.preventDefault();
|
435
|
+
delta = e.touches[0]['page' + axis] - startPosition;
|
436
|
+
}
|
437
|
+
});
|
438
|
+
|
439
|
+
deck.parent.addEventListener('MSPointerUp', function() {
|
440
|
+
Math.abs(delta) > 50 && (delta > 0 ? deck.prev() : deck.next());
|
441
|
+
});
|
442
|
+
};
|
@@ -2,17 +2,24 @@
|
|
2
2
|
Pure & Professional presentations
|
3
3
|
|
4
4
|
<!-- Github -->
|
5
|
-
<a href="https://github.com/
|
5
|
+
<a href="https://github.com/maciejczyzewski/hyhyhy"><img style="position: fixed; top: 0; right: 0; border: 0; width: 149px; height: 149px;" src="http://aral.github.com/fork-me-on-github-retina-ribbons/right-graphite@2x.png" alt="Fork me on GitHub"></a>
|
6
6
|
|
7
7
|
<!-- Twitter -->
|
8
|
-
<style
|
8
|
+
<style>iframe {
|
9
|
+
border: none !important;
|
10
|
+
float: left !important;
|
11
|
+
height: 50% !important;
|
12
|
+
width: 20% !important;
|
13
|
+
} #twitter-widget-0 { height: 20% !important;
|
14
|
+
width: 10% !important;
|
15
|
+
min-width: 100px !important;
|
16
|
+
max-width: 200px !important; }</style>
|
9
17
|
<div style="position: fixed; top: 25px; left: 25px; border: 0;"><a href="https://twitter.com/share" class="twitter-share-button" data-url="http://maciejczyzewski.me/hyhyhy/" data-text="Pure & Professional presentations
|
10
|
-
" data-via="_czyzewski">Tweet</a>
|
11
|
-
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+'://platform.twitter.com/widgets.js';fjs.parentNode.insertBefore(js,fjs);}}(document, 'script', 'twitter-wjs');</script></div>
|
18
|
+
" data-via="_czyzewski">Tweet</a><script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+'://platform.twitter.com/widgets.js';fjs.parentNode.insertBefore(js,fjs);}}(document, 'script', 'twitter-wjs');</script><iframe src="http://ghbtns.com/github-btn.html?user=MaciejCzyzewski&repo=hyhyhy&type=watch&count=true" height="20" width="100" frameborder="0" scrolling="0" allowtransparency="true" style="min-width: 300px !important;"></iframe></div>
|
12
19
|
|
13
20
|
<!-- Help -->
|
14
21
|
<style>.help{-webkit-animation-duration:2s;-webkit-animation-name:help;-webkit-animation-direction:alternate;-webkit-animation-iteration-count:infinite;-moz-animation-duration:2s;-moz-animation-name:help;-moz-animation-direction:alternate;-moz-animation-iteration-count:infinite;-o-animation-duration:2s;-o-animation-name:help;-o-animation-direction:alternate;-o-animation-iteration-count:infinite;animation-duration:2s;animation-name:help;animation-direction:alternate;animation-iteration-count:infinite;opacity:0}@-webkit-keyframes help{0%{opacity:0}100%{opacity:1}}@-moz-keyframes help{0%{opacity:0}100%{opacity:1}}@-o-keyframes help{0%{opacity:0}100%{opacity:1}}@keyframes help{0%{opacity:0}100%{opacity:1}}</style>
|
15
|
-
<div class="help" style="position: fixed; bottom: 25px; right: 25px; border: 0; font-size: 10px;">PRESS
|
22
|
+
<div class="help" style="position: fixed; bottom: 25px; right: 25px; border: 0; font-size: 10px;">PRESS SPACEBAR OR ARROW KEYS</div>
|
16
23
|
|
17
24
|
---
|
18
25
|
|
@@ -285,9 +285,10 @@ data-hyhyhy-state: slides
|
|
285
285
|
# <b>Keyboard</b>
|
286
286
|
|
287
287
|
<ol>
|
288
|
-
<li>Press <b>left arrow</b> and <b>right arrow</b> to navigate.</li>
|
288
|
+
<li>Press (<b>left arrow</b> or <b>k</b>) and (<b>right arrow</b> or <b>j</b>) to navigate.</li>
|
289
289
|
<li>Press <b>h</b> to launch fullscreen.</li>
|
290
290
|
<li>Press <b>ESC</b> to exit fullscreen mode.</li>
|
291
|
+
<li>Press <b>gg</b>/<b>shift + g</b> to move to top/bottom.</li>
|
291
292
|
<li>Browser zooming is supported.</li>
|
292
293
|
<li>Touch events are supported.</li>
|
293
294
|
</ol>
|
@@ -308,4 +309,4 @@ data-hyhyhy-state: slides
|
|
308
309
|
|
309
310
|
# <b>So...</b>
|
310
311
|
|
311
|
-
Ready to <a href="https://github.com/
|
312
|
+
Ready to <a href="https://github.com/maciejczyzewski/hyhyhy">contribute</a>?
|
data/lib/hyhyhy/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: hyhyhy
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0
|
4
|
+
version: 1.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Maciej A. Czyzewski
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2015-01-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: commander
|
@@ -816,7 +816,7 @@ files:
|
|
816
816
|
- lib/hyhyhy/structure/_slides/2.packages.md
|
817
817
|
- lib/hyhyhy/structure/_slides/3.usage.md
|
818
818
|
- lib/hyhyhy/version.rb
|
819
|
-
homepage: https://github.com/
|
819
|
+
homepage: https://github.com/maciejczyzewski/hyhyhy
|
820
820
|
licenses:
|
821
821
|
- MIT
|
822
822
|
metadata: {}
|