prez 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,53 @@
1
+ var changeSlideTo = function(nextValue) {
2
+ var $next = $(".slide[data-slide='" + nextValue + "']");
3
+
4
+ if ($next.size() == 0) {
5
+ return false;
6
+ }
7
+
8
+ $(".slide").hide();
9
+ $next.show();
10
+ return true;
11
+ };
12
+
13
+ $(document).on("click", ".next-slide, .prev-slide", function() {
14
+ var current = parseInt($(".slide:visible").data("slide"), 10);
15
+ var nextValue = current;
16
+
17
+ if ($(this).is(".next-slide")) {
18
+ nextValue += 1;
19
+ } else {
20
+ nextValue -= 1;
21
+ }
22
+
23
+ if (changeSlideTo(nextValue)) {
24
+ document.location.hash = nextValue;
25
+ }
26
+
27
+ return false;
28
+ });
29
+
30
+ var changeToHashSlide = function() {
31
+ var hash = document.location.hash.replace(/^#/, "");
32
+
33
+ if (/^\d+$/.test(hash) && $(".slide[data-slide='" + hash + "']").length > 0) {
34
+ changeSlideTo(hash);
35
+ return true;
36
+ }
37
+
38
+ return false;
39
+ };
40
+
41
+ $(function() {
42
+ $(".slide").each(function(i) {
43
+ $(this).attr("data-slide", "" + (i + 1));
44
+ });
45
+
46
+ if (!changeToHashSlide()) {
47
+ changeSlideTo(1);
48
+ }
49
+
50
+ $(window).on("hashchange", function() {
51
+ changeToHashSlide();
52
+ });
53
+ });
@@ -0,0 +1,46 @@
1
+ body {
2
+ padding: 40px;
3
+ }
4
+
5
+ .header {
6
+ font-size: 32px;
7
+ }
8
+
9
+ .contact {
10
+ font-size: 25px;
11
+ }
12
+
13
+ .url {
14
+ color: blue;
15
+ }
16
+
17
+ .gem {
18
+ color: #bb0000;
19
+ font-weight: bold;
20
+ }
21
+
22
+ .slide, .slide input {
23
+ font-size: 50;
24
+ }
25
+
26
+ .slide {
27
+ display: none;
28
+ min-height: 750px;
29
+ text-align: center;
30
+ }
31
+
32
+ .slide.left-aligned {
33
+ text-align: left;
34
+ }
35
+
36
+ .smaller {
37
+ font-size: 0.7em;
38
+ }
39
+
40
+ dt {
41
+ font-weight: bold;
42
+ }
43
+
44
+ dd {
45
+ margin-bottom: 42px;
46
+ }
metadata ADDED
@@ -0,0 +1,140 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: prez
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.1
5
+ platform: ruby
6
+ authors:
7
+ - Mike Virata-Stone
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2015-02-14 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: sass
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: '3.4'
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: '3.4'
27
+ - !ruby/object:Gem::Dependency
28
+ name: therubyracer
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - "~>"
32
+ - !ruby/object:Gem::Version
33
+ version: '0.12'
34
+ type: :runtime
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
39
+ - !ruby/object:Gem::Version
40
+ version: '0.12'
41
+ - !ruby/object:Gem::Dependency
42
+ name: thor
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - "~>"
46
+ - !ruby/object:Gem::Version
47
+ version: '0.19'
48
+ type: :runtime
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - "~>"
53
+ - !ruby/object:Gem::Version
54
+ version: '0.19'
55
+ - !ruby/object:Gem::Dependency
56
+ name: uglifier
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - "~>"
60
+ - !ruby/object:Gem::Version
61
+ version: '2.7'
62
+ type: :runtime
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - "~>"
67
+ - !ruby/object:Gem::Version
68
+ version: '2.7'
69
+ - !ruby/object:Gem::Dependency
70
+ name: bundler
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - "~>"
74
+ - !ruby/object:Gem::Version
75
+ version: '1.7'
76
+ type: :development
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - "~>"
81
+ - !ruby/object:Gem::Version
82
+ version: '1.7'
83
+ - !ruby/object:Gem::Dependency
84
+ name: rake
85
+ requirement: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - "~>"
88
+ - !ruby/object:Gem::Version
89
+ version: '10.0'
90
+ type: :development
91
+ prerelease: false
92
+ version_requirements: !ruby/object:Gem::Requirement
93
+ requirements:
94
+ - - "~>"
95
+ - !ruby/object:Gem::Version
96
+ version: '10.0'
97
+ description: Gem to aid in the creation of single file HTML presentations.
98
+ email:
99
+ - mike@virata-stone.com
100
+ executables:
101
+ - prez
102
+ extensions: []
103
+ extra_rdoc_files: []
104
+ files:
105
+ - bin/prez
106
+ - lib/prez.rb
107
+ - lib/prez/assets.rb
108
+ - lib/prez/build.rb
109
+ - lib/prez/cli.rb
110
+ - lib/prez/files.rb
111
+ - lib/prez/version.rb
112
+ - templates/new.prez.tt
113
+ - vendor/javascripts/jquery.js
114
+ - vendor/javascripts/prez.js
115
+ - vendor/stylesheets/prez.css
116
+ homepage: https://github.com/mikestone/prez
117
+ licenses:
118
+ - MIT
119
+ metadata: {}
120
+ post_install_message:
121
+ rdoc_options: []
122
+ require_paths:
123
+ - lib
124
+ required_ruby_version: !ruby/object:Gem::Requirement
125
+ requirements:
126
+ - - ">="
127
+ - !ruby/object:Gem::Version
128
+ version: '0'
129
+ required_rubygems_version: !ruby/object:Gem::Requirement
130
+ requirements:
131
+ - - ">="
132
+ - !ruby/object:Gem::Version
133
+ version: '0'
134
+ requirements: []
135
+ rubyforge_project:
136
+ rubygems_version: 2.4.4
137
+ signing_key:
138
+ specification_version: 4
139
+ summary: Create simple single file presentations
140
+ test_files: []