slideoff 0.1

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.
Files changed (214) hide show
  1. checksums.yaml +7 -0
  2. data/Gemfile +3 -0
  3. data/MIT-LICENSE +20 -0
  4. data/README.md +218 -0
  5. data/bin/slideoff +127 -0
  6. data/lib/slideoff/config_builder.rb +60 -0
  7. data/lib/slideoff/flickr_api.rb +50 -0
  8. data/lib/slideoff/flickr_image.rb +92 -0
  9. data/lib/slideoff/markdown.rb +145 -0
  10. data/lib/slideoff/presentation.rb +90 -0
  11. data/lib/slideoff/remote_api.rb +53 -0
  12. data/lib/slideoff/routes.rb +20 -0
  13. data/lib/slideoff/server.rb +50 -0
  14. data/lib/slideoff/slides_api.rb +59 -0
  15. data/lib/slideoff/utils.rb +453 -0
  16. data/lib/slideoff.rb +15 -0
  17. data/themes/3d_slideshow/README +2 -0
  18. data/themes/3d_slideshow/css/main.css +232 -0
  19. data/themes/3d_slideshow/css/reset.css +57 -0
  20. data/themes/3d_slideshow/index.erb +31 -0
  21. data/themes/3d_slideshow/js/slideshow.js +288 -0
  22. data/themes/CSSS/README +2 -0
  23. data/themes/CSSS/css/slideshow.css +304 -0
  24. data/themes/CSSS/css/theme.css +250 -0
  25. data/themes/CSSS/images/rainbow-wood.jpg +0 -0
  26. data/themes/CSSS/index.erb +36 -0
  27. data/themes/CSSS/js/classList.js +116 -0
  28. data/themes/CSSS/js/prefixfree.min.js +5 -0
  29. data/themes/CSSS/js/slideshow.js +621 -0
  30. data/themes/common/css/pygments/colorful.css +62 -0
  31. data/themes/common/css/pygments/manni.css +61 -0
  32. data/themes/common/css/pygments/native.css +70 -0
  33. data/themes/common/css/pygments/solarized.css +66 -0
  34. data/themes/common/fonts/DroidSansMono.svg +626 -0
  35. data/themes/common/fonts/DroidSansMono.ttf +0 -0
  36. data/themes/common/fonts/Lato-BoldItalic.woff +0 -0
  37. data/themes/common/fonts/Lato-Italic.woff +0 -0
  38. data/themes/common/fonts/Lato-bold.woff +0 -0
  39. data/themes/common/fonts/Lato.woff +0 -0
  40. data/themes/common/fonts/OpenSans-Bold.woff +0 -0
  41. data/themes/common/fonts/OpenSans-BoldItalic.woff +0 -0
  42. data/themes/common/fonts/OpenSans-Italic.woff +0 -0
  43. data/themes/common/fonts/OpenSans.woff +0 -0
  44. data/themes/common/fonts/PTMono.woff +0 -0
  45. data/themes/common/fonts/PTSans.Bold.Italic.woff +0 -0
  46. data/themes/common/fonts/PTSans.Bold.woff +0 -0
  47. data/themes/common/fonts/PTSans.Italic.woff +0 -0
  48. data/themes/common/fonts/PTSans.Narrow.Bold.woff +0 -0
  49. data/themes/common/fonts/PTSans.Narrow.woff +0 -0
  50. data/themes/common/fonts/PTSans.woff +0 -0
  51. data/themes/common/fonts/TargetBlank.otf +0 -0
  52. data/themes/common/fonts/TargetBlank.svg +14 -0
  53. data/themes/common/fonts/YanoneKaffeesatz-Bold.woff +0 -0
  54. data/themes/common/fonts/YanoneKaffeesatz-Regular.woff +0 -0
  55. data/themes/common/fonts/crimson_text.ttf +0 -0
  56. data/themes/common/fonts/crimson_text_bold.ttf +0 -0
  57. data/themes/common/fonts/crimson_text_semibold.ttf +0 -0
  58. data/themes/common/fonts/league_gothic-webfont.ttf +0 -0
  59. data/themes/html5rocks/README +2 -0
  60. data/themes/html5rocks/css/default.css +501 -0
  61. data/themes/html5rocks/css/moon.css +543 -0
  62. data/themes/html5rocks/css/sand.css +508 -0
  63. data/themes/html5rocks/css/sea_wave.css +492 -0
  64. data/themes/html5rocks/index.erb +64 -0
  65. data/themes/html5rocks/js/slides.js +464 -0
  66. data/themes/io2012/README +2 -0
  67. data/themes/io2012/css/default.css +1481 -0
  68. data/themes/io2012/css/fonts.css +24 -0
  69. data/themes/io2012/css/phone.css +27 -0
  70. data/themes/io2012/images/google_developers_icon_128.png +0 -0
  71. data/themes/io2012/images/io2012_logo.png +0 -0
  72. data/themes/io2012/index.erb +73 -0
  73. data/themes/io2012/js/hammer.js +586 -0
  74. data/themes/io2012/js/modernizr.custom.45394.js +4 -0
  75. data/themes/io2012/js/order.js +8 -0
  76. data/themes/io2012/js/polyfills/classList.min.js +2 -0
  77. data/themes/io2012/js/polyfills/dataset.min.js +2 -0
  78. data/themes/io2012/js/polyfills/history.min.js +1 -0
  79. data/themes/io2012/js/prettify/lang-apollo.js +2 -0
  80. data/themes/io2012/js/prettify/lang-clj.js +18 -0
  81. data/themes/io2012/js/prettify/lang-css.js +2 -0
  82. data/themes/io2012/js/prettify/lang-go.js +1 -0
  83. data/themes/io2012/js/prettify/lang-hs.js +2 -0
  84. data/themes/io2012/js/prettify/lang-lisp.js +3 -0
  85. data/themes/io2012/js/prettify/lang-lua.js +2 -0
  86. data/themes/io2012/js/prettify/lang-ml.js +2 -0
  87. data/themes/io2012/js/prettify/lang-n.js +4 -0
  88. data/themes/io2012/js/prettify/lang-proto.js +1 -0
  89. data/themes/io2012/js/prettify/lang-scala.js +2 -0
  90. data/themes/io2012/js/prettify/lang-sql.js +2 -0
  91. data/themes/io2012/js/prettify/lang-tex.js +1 -0
  92. data/themes/io2012/js/prettify/lang-vb.js +2 -0
  93. data/themes/io2012/js/prettify/lang-vhdl.js +3 -0
  94. data/themes/io2012/js/prettify/lang-wiki.js +2 -0
  95. data/themes/io2012/js/prettify/lang-xq.js +3 -0
  96. data/themes/io2012/js/prettify/lang-yaml.js +2 -0
  97. data/themes/io2012/js/prettify/prettify.css +1 -0
  98. data/themes/io2012/js/prettify/prettify.js +28 -0
  99. data/themes/io2012/js/require-1.0.8.min.js +33 -0
  100. data/themes/io2012/js/slide-controller.js +109 -0
  101. data/themes/io2012/js/slide-deck.js +768 -0
  102. data/themes/io2012/js/slides.js +5 -0
  103. data/themes/memories/README +5 -0
  104. data/themes/memories/css/fonts.css +25 -0
  105. data/themes/memories/css/slideshow.css +286 -0
  106. data/themes/memories/css/theme.css +183 -0
  107. data/themes/memories/index.erb +37 -0
  108. data/themes/memories/js/prefixfree.min.js +13 -0
  109. data/themes/memories/js/slideshow.js +577 -0
  110. data/themes/modern/LICENSE +20 -0
  111. data/themes/modern/README.md +52 -0
  112. data/themes/modern/css/GENERATED_CONTENT +0 -0
  113. data/themes/modern/css/defaults.css +0 -0
  114. data/themes/modern/css/fonts.css +166 -0
  115. data/themes/modern/css/pygments/colorful.css +215 -0
  116. data/themes/modern/css/pygments/github.css +208 -0
  117. data/themes/modern/css/pygments/solarized-dark.css +213 -0
  118. data/themes/modern/css/pygments/solarized-light.css +213 -0
  119. data/themes/modern/css/reset.css +41 -0
  120. data/themes/modern/css/screen.css +1183 -0
  121. data/themes/modern/fonts/Collegiate.woff +0 -0
  122. data/themes/modern/fonts/GoudyBookletter.1911.woff +0 -0
  123. data/themes/modern/fonts/Inconsolata.Bold.woff +0 -0
  124. data/themes/modern/fonts/Inconsolata.woff +0 -0
  125. data/themes/modern/fonts/Junction.woff +0 -0
  126. data/themes/modern/fonts/LiberationMono.Bold.woff +0 -0
  127. data/themes/modern/fonts/LiberationMono.BoldItalic.woff +0 -0
  128. data/themes/modern/fonts/LiberationMono.Italic.woff +0 -0
  129. data/themes/modern/fonts/LiberationMono.Regular.woff +0 -0
  130. data/themes/modern/fonts/OpenSans.Bold.woff +0 -0
  131. data/themes/modern/fonts/OpenSans.BoldItalic.woff +0 -0
  132. data/themes/modern/fonts/OpenSans.ExtraBold.woff +0 -0
  133. data/themes/modern/fonts/OpenSans.ExtraBoldItalic.woff +0 -0
  134. data/themes/modern/fonts/OpenSans.Italic.woff +0 -0
  135. data/themes/modern/fonts/OpenSans.Light.woff +0 -0
  136. data/themes/modern/fonts/OpenSans.LightItalic.woff +0 -0
  137. data/themes/modern/fonts/OpenSans.Regular.woff +0 -0
  138. data/themes/modern/fonts/OpenSans.Semibold.woff +0 -0
  139. data/themes/modern/fonts/OpenSans.SemiboldItalic.woff +0 -0
  140. data/themes/modern/fonts/PTMono.woff +0 -0
  141. data/themes/modern/fonts/PTSans.Bold.Italic.woff +0 -0
  142. data/themes/modern/fonts/PTSans.Bold.woff +0 -0
  143. data/themes/modern/fonts/PTSans.Italic.woff +0 -0
  144. data/themes/modern/fonts/PTSans.Narrow.Bold.woff +0 -0
  145. data/themes/modern/fonts/PTSans.woff +0 -0
  146. data/themes/modern/fonts/Raleway.Thin.woff +0 -0
  147. data/themes/modern/fonts/STIXGeneral.Bold.woff +0 -0
  148. data/themes/modern/fonts/STIXGeneral.BoldItalic.woff +0 -0
  149. data/themes/modern/fonts/STIXGeneral.Italic.woff +0 -0
  150. data/themes/modern/fonts/STIXGeneral.Regular.woff +0 -0
  151. data/themes/modern/fonts/YanoneKaffeesatz.Bold.woff +0 -0
  152. data/themes/modern/fonts/YanoneKaffeesatz.ExtraLight.woff +0 -0
  153. data/themes/modern/fonts/YanoneKaffeesatz.Light.woff +0 -0
  154. data/themes/modern/fonts/YanoneKaffeesatz.Regular.woff +0 -0
  155. data/themes/modern/images/cc/by.svg +29 -0
  156. data/themes/modern/images/cc/cc-white.svg +23 -0
  157. data/themes/modern/images/cc/cc.svg +23 -0
  158. data/themes/modern/images/cc/nc-eu.svg +21 -0
  159. data/themes/modern/images/cc/nc-jp.svg +18 -0
  160. data/themes/modern/images/cc/nc.svg +23 -0
  161. data/themes/modern/images/cc/nd.svg +20 -0
  162. data/themes/modern/images/cc/pd.svg +24 -0
  163. data/themes/modern/images/cc/remix.svg +20 -0
  164. data/themes/modern/images/cc/sa.svg +22 -0
  165. data/themes/modern/images/cc/sampling.plus.svg +33 -0
  166. data/themes/modern/images/cc/sampling.svg +36 -0
  167. data/themes/modern/images/cc/share.svg +22 -0
  168. data/themes/modern/images/cc/zero.svg +24 -0
  169. data/themes/modern/images/flickr.svg +65 -0
  170. data/themes/modern/images/mesh.png +0 -0
  171. data/themes/modern/images/mesh@2x.png +0 -0
  172. data/themes/modern/images/progress-grayDark.svg +55 -0
  173. data/themes/modern/images/progress.svg +3 -0
  174. data/themes/modern/index.erb +76 -0
  175. data/themes/modern/js/highcharts.js +294 -0
  176. data/themes/modern/js/jquery-2.1.0.min.js +4 -0
  177. data/themes/modern/js/script.coffee +480 -0
  178. data/themes/modern/js/script.js +678 -0
  179. data/themes/modern/styles/_box.scss +89 -0
  180. data/themes/modern/styles/_figure.scss +81 -0
  181. data/themes/modern/styles/_full.scss +74 -0
  182. data/themes/modern/styles/_increment.scss +38 -0
  183. data/themes/modern/styles/_list.scss +129 -0
  184. data/themes/modern/styles/_progress.scss +19 -0
  185. data/themes/modern/styles/defaults.scss +46 -0
  186. data/themes/modern/styles/fonts.scss +197 -0
  187. data/themes/modern/styles/pygments/_solarized.scss +82 -0
  188. data/themes/modern/styles/pygments/colorful.scss +67 -0
  189. data/themes/modern/styles/pygments/github.scss +67 -0
  190. data/themes/modern/styles/pygments/solarized-dark.scss +15 -0
  191. data/themes/modern/styles/pygments/solarized-light.scss +15 -0
  192. data/themes/modern/styles/reset.scss +46 -0
  193. data/themes/modern/styles/screen.scss +841 -0
  194. data/themes/reveal/README +2 -0
  195. data/themes/reveal/css/main.css +1029 -0
  196. data/themes/reveal/css/reset.css +57 -0
  197. data/themes/reveal/index.erb +102 -0
  198. data/themes/reveal/js/classList.js +2 -0
  199. data/themes/reveal/js/head.min.js +8 -0
  200. data/themes/reveal/js/reveal.js +951 -0
  201. data/themes/shower/README +2 -0
  202. data/themes/shower/css/fonts.css +50 -0
  203. data/themes/shower/css/reset.css +42 -0
  204. data/themes/shower/css/style.css +418 -0
  205. data/themes/shower/images/grid.png +0 -0
  206. data/themes/shower/images/linen.png +0 -0
  207. data/themes/shower/images/ribbon.svg +4 -0
  208. data/themes/shower/index.erb +35 -0
  209. data/themes/shower/js/script.js +325 -0
  210. data/themes/template/README +5 -0
  211. data/themes/template/css/reset.css +42 -0
  212. data/themes/template/index.erb +35 -0
  213. data/themes/template/js/prefixfree.min.js +13 -0
  214. metadata +343 -0
@@ -0,0 +1,453 @@
1
+ require "fileutils"
2
+
3
+ module Slideoff
4
+ module Utils
5
+ module_function
6
+
7
+ def init_directory(name)
8
+ raise "Directory '#{name}' does already exist. Use another one." if Dir.exist? name
9
+ FileUtils.mkdir_p name
10
+ Dir.chdir(name) do |dir|
11
+ FileUtils.mkdir_p 'main'
12
+ File.open('main/index.md', 'w') do |file|
13
+ file.write <<-EOF
14
+ !SLIDE title cover h
15
+ #Title
16
+ ##Subtitle
17
+ ![Image](https://farm4.staticflickr.com/3254/3034540524_2412428602_b.jpg)
18
+
19
+ !SLIDE cover w
20
+ ![Image](https://farm4.staticflickr.com/3254/3034540524_2412428602_b.jpg)
21
+
22
+ !SLIDE cover h
23
+ ![Image](https://farm4.staticflickr.com/3254/3034540524_2412428602_b.jpg)
24
+
25
+ !SLIDE cover w h
26
+ ![Image](https://farm4.staticflickr.com/3254/3034540524_2412428602_b.jpg)
27
+
28
+ !SLIDE
29
+ # Normal list
30
+
31
+ * Keep
32
+ * It
33
+ * Super
34
+ * Simple
35
+
36
+ !SLIDE chapter h
37
+ # Chapter
38
+ ![Image](https://farm4.staticflickr.com/3254/3034540524_2412428602_b.jpg)
39
+
40
+ !SLIDE section h
41
+ # Section
42
+ ![Image](https://farm4.staticflickr.com/3254/3034540524_2412428602_b.jpg)
43
+
44
+ !SLIDE shout up
45
+ # Shout up!
46
+
47
+ !SLIDE shout left
48
+ # Shout left!
49
+
50
+ !SLIDE shout right
51
+ # Shout right!
52
+
53
+ !SLIDE shout down
54
+ # Shout down!
55
+
56
+ !SLIDE
57
+ # Bullet list
58
+
59
+ * Keep
60
+ * It
61
+ * Super
62
+ * Simple
63
+
64
+ !SLIDE
65
+ # Numbered list
66
+
67
+ 1. Keep
68
+ 1. It
69
+ 1. Super
70
+ 1. Simple
71
+
72
+ !SLIDE small
73
+ # Small slide with full of text
74
+
75
+ Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
76
+ Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut.
77
+
78
+ !SLIDE
79
+ # Description list
80
+
81
+ Ruby
82
+ : Loving scripting language
83
+ HTTP
84
+ : Hyper Text Transfer Protocol
85
+ CSS
86
+ : Cascading Style Sheet
87
+ REST
88
+ : Representational state transfer
89
+
90
+ !SLIDE
91
+ # Link
92
+
93
+ 1. Click on [DSIW/slideoff](http://github.com/DSIW/slideoff).
94
+
95
+ !SLIDE
96
+ # Code
97
+
98
+ ```sh
99
+ $ gem install slideoff
100
+ ```
101
+
102
+ ```ruby
103
+ class World
104
+ def hello
105
+ puts "Hello \#{self.class.name}!"
106
+ end
107
+ end
108
+
109
+ World.new.hello #=> "Hello World!"
110
+ ```
111
+
112
+ Note: Code `self.class.name` will be evaluated.
113
+
114
+ !SLIDE
115
+ # Table
116
+
117
+ |Left column|Centered column| Right column
118
+ |-----------|:-------------:|------------:
119
+ |Dataset 1 |Dataset 1 | Dataset 2
120
+ |Dataset 1 |Dataset 2 | Dataset 2
121
+ |Dataset 1 |Dataset 3 | Dataset 2
122
+ |Dataset 1 |Dataset 4 | Dataset 2
123
+
124
+ !SLIDE
125
+ # Colors
126
+
127
+ 1. <span class="text-green">abc</span>
128
+ 1. <span class="text-red">abc</span>
129
+ 1. <span class="text-purple">abc</span>
130
+ 1. <span class="text-orange">abc</span>
131
+ 1. <span class="text-blue">abc</span>
132
+ 1. <span class="text-bluegreen">abc</span>
133
+
134
+ !SLIDE
135
+ # Highlighting
136
+
137
+ 1. <mark class="green">abc</mark>
138
+ 1. <mark class="red">abc</mark>
139
+ 1. <mark class="purple">abc</mark>
140
+ 1. <mark class="orange">abc</mark>
141
+ 1. <mark class="blue">abc</mark>
142
+ 1. <mark class="bluegreen">abc</mark>
143
+
144
+ !SLIDE
145
+ # Colorize with custom markdown
146
+
147
+ This is ==orange==some== __orange__super__ and _underlined_ text.
148
+
149
+ !SLIDE incr-list
150
+ # Incremental list
151
+
152
+ * First item
153
+ * Second item
154
+ * Third item
155
+
156
+ !SLIDE incr-code
157
+ # Incremental Code
158
+
159
+ ```ruby
160
+ 1.class #=> Fixnum
161
+ 1.1.class #=> Float
162
+ "abc".clas #=> String
163
+ :abc.clas #=> Symbol
164
+ ```
165
+
166
+ !SLIDE typewriter
167
+ # Incremental Code
168
+
169
+ ```sh
170
+ bundle install
171
+ ```
172
+
173
+ !SLIDE incr-table
174
+ # Incremental table
175
+
176
+ |Left column|Centered column| Right column
177
+ |-----------|:-------------:|------------:
178
+ |Dataset 1 |Dataset 1 | Dataset 2
179
+ |Dataset 1 |Dataset 2 | Dataset 2
180
+ |Dataset 1 |Dataset 3 | Dataset 2
181
+ |Dataset 1 |Dataset 4 | Dataset 2
182
+
183
+ !SLIDE incremental
184
+ # Content with pauses
185
+
186
+ This is the first text.
187
+
188
+ !PAUSE
189
+
190
+ More text <span class="inactive">with hidden info</span>!
191
+
192
+ !SLIDE disabled
193
+ # Hidden slide
194
+
195
+ !SLIDE
196
+ # Blockquote
197
+
198
+ >Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut.
199
+ >
200
+ >Athor Name
201
+
202
+ !SLIDE
203
+ # Box
204
+
205
+ +++
206
+ +++ Box without shadow
207
+ +++ Content
208
+
209
+ +++ shadow
210
+ +++ Box with shadow
211
+ +++ Content
212
+
213
+ !SLIDE
214
+ # Arranged Box
215
+
216
+ <div class="col2">
217
+ <div class="box box-alert">
218
+ <div>Errors</div>
219
+ <div>aren't good</div>
220
+ </div>
221
+
222
+ <div class="inactive">
223
+ <div class="box box-success">
224
+ <div>No errors</div>
225
+ <div>are better</div>
226
+ </div>
227
+ </div>
228
+ </div>
229
+
230
+ !SLIDE
231
+ # Box with different colors (1)
232
+
233
+ +++ box-blue
234
+ +++ Header
235
+ +++ Content
236
+
237
+ +++ box-bluegreen
238
+ +++ Header
239
+ +++ Content
240
+
241
+ +++ box-green
242
+ +++ Header
243
+ +++ Content
244
+
245
+ !SLIDE
246
+ # Box with different colors (2)
247
+
248
+ +++ box-red
249
+ +++ Header
250
+ +++ Content
251
+
252
+ +++ box-purple
253
+ +++ Header
254
+ +++ Content
255
+
256
+ +++ box-orange
257
+ +++ Header
258
+ +++ Content
259
+
260
+ !SLIDE
261
+ # Image
262
+
263
+ ![Markdown](http://upload.wikimedia.org/wikipedia/commons/4/48/Markdown-mark.svg)
264
+
265
+ !SLIDE img-place-middle
266
+ # Centered Image
267
+
268
+ ![Markdown](http://upload.wikimedia.org/wikipedia/commons/4/48/Markdown-mark.svg)
269
+
270
+ !SLIDE section cover w
271
+ # Image via Flickr API
272
+
273
+ !F[22565509]
274
+
275
+ !SLIDE
276
+ # Placement with "place t r b l"
277
+
278
+ <span class="bg-red place">center</span>
279
+ <span class="bg-red place t">top</span>
280
+ <span class="bg-red place t l">top-left</span>
281
+ <span class="bg-red place t r">top-right</span>
282
+ <span class="bg-red place l">left</span>
283
+ <span class="bg-red place r">right</span>
284
+ <span class="bg-red place b">bottom</span>
285
+ <span class="bg-red place b l">bottom-left</span>
286
+ <span class="bg-red place b r">bottom-right</span>
287
+
288
+ !SLIDE
289
+ # Diagram with Highcharts
290
+
291
+ <div id="diagram-pie" style="width: 850px; height: 565px;"></div>
292
+ <script type="text/javascript">
293
+ $(function () {
294
+ $('#diagram-pie').highcharts({
295
+ credits: { enabled: false },
296
+ plotOptions: {
297
+ pie: {
298
+ cursor: 'pointer',
299
+ dataLabels: {
300
+ enabled: true,
301
+ distance: 40,
302
+ style: {
303
+ fontSize: '23px',
304
+ color: 'black'
305
+ },
306
+ formatter: function() {
307
+ return '<b>'+ this.point.name +'</b> ('+this.point.year+'): '+ Math.round(this.percentage*10)/10.0 +'%';
308
+ }
309
+ }
310
+ }
311
+ },
312
+ series: [{
313
+ type: 'pie',
314
+ innerSize: '45%',
315
+ data: [
316
+ { name: 'Dataset 1', year: '1980', y: 1.3, },
317
+ { name: 'Dataset 2', year: '1990', y: 0.3, },
318
+ { name: 'Dataset 3', year: '2000', y: 10.0, },
319
+ { name: 'Dataset 4', year: '2010', y: 88.3, },
320
+ { name: 'Dataset 5', year: '2020', y: 0.1 }
321
+ ]
322
+ }]
323
+ });
324
+ });
325
+ </script>
326
+
327
+
328
+ !SLIDE noheader cover h
329
+
330
+ <div class="left-33">
331
+ <p style="font: 500 46px/1 'Open Sans'" class="text-center">Header</p>
332
+ <p style="font-size: 28px;" class="text-center">Subheader</p>
333
+
334
+ <ul class="border-separated">
335
+ <li>list item</li>
336
+ <li>list item</li>
337
+ <li>list item</li>
338
+ <li>list item</li>
339
+ </ul>
340
+ </div>
341
+
342
+ ![Image](https://farm4.staticflickr.com/3254/3034540524_2412428602_b.jpg)
343
+
344
+ !SLIDE
345
+ # Clickbindings
346
+
347
+ Click | Action
348
+ ------------------------------- | -------------------------
349
+ Left click | Goto next slide
350
+ Right click | Goto previous slide
351
+
352
+ !SLIDE
353
+ # Keybindings (1)
354
+
355
+ Key | Action
356
+ ------------------------------- | -------------------------
357
+ F5 / Enter | Goto slide mode
358
+ Esc | Goto list mode
359
+ Home | Goto first slide
360
+ End | Goto last slide
361
+
362
+ !SLIDE
363
+ # Keybindings (1)
364
+
365
+ Key | Action
366
+ ------------------------------- | -------------------------
367
+ Tab / Space | Goto next slide
368
+ ... with Shift | Goto previous slide
369
+ PageUp / Up / Left / h / k | Goto previous slide
370
+ ... with Shift | Goto previous chapter
371
+ PageDown / Down / right / l / j | Goto next slide
372
+ ... with Shift | Goto next chapter
373
+ EOF
374
+ end
375
+ File.open('presentation.json', 'w') do |file|
376
+ file.write <<-EOF
377
+ {
378
+ "title": "#{name}",
379
+ "author": "Me",
380
+ "theme": "modern",
381
+ "pygments_style": "github",
382
+ //"duration": 20,
383
+ //"flickr_api_key": "...",
384
+ //"remote_host": "...",
385
+ //"remote_path": "...",
386
+ "sections": {
387
+ "main": {"title": "Modern theme", "show_chapter": false, "show_toc": false}
388
+ }
389
+ }
390
+ EOF
391
+ end
392
+ puts `git init`
393
+ end
394
+ end
395
+
396
+ def install_theme(git_repository_url)
397
+ slideoff_home = File.join(ENV['HOME'], '.slideoff')
398
+ FileUtils.mkdir_p slideoff_home
399
+
400
+ theme_name = git_repository_url.split('/').last
401
+ theme_path = File.join(slideoff_home, theme_name)
402
+ `git clone #{git_repository_url} #{theme_path}`
403
+ puts "Cloned under #{theme_path}"
404
+
405
+ puts "Please make sure that '#{theme_name}' is set in your presentation.json"
406
+ end
407
+
408
+ def upload(options = {})
409
+ generate_static(options)
410
+ path = CONFIG.remote_path
411
+ mkdir_commands = parents(path).map { |path| "mkdir -vp -m 755 #{path}" }
412
+ remote_cmd mkdir_commands
413
+ `scp -r #{File.join(static_dir, "*")} #{CONFIG.remote_host}:#{path}`
414
+ remote_cmd "chmod -vR o+r #{path}"
415
+ end
416
+
417
+ def generate_static(options = {})
418
+ pid = Process.fork { Slideoff::Server.new(options).start }
419
+
420
+ sleep 2
421
+
422
+ begin
423
+ FileUtils.mkdir_p(static_dir)
424
+ Dir.chdir(static_dir) do |dir|
425
+ `wget -E -H -k -nH -p http://lh:#{options[:port]}/`
426
+ File.write('robots.txt', "User-agent: *\nDisallow: /\n")
427
+ end
428
+ ensure
429
+ Process.kill "QUIT", pid
430
+ Process.wait pid
431
+ end
432
+ end
433
+
434
+ def serve_static(port, options = {})
435
+ puts "Listening python server on http://0.0.0.0:#{port}" if options[:verbose]
436
+ `python3 -m http.server #{port}`
437
+ end
438
+
439
+
440
+ def parents(dir)
441
+ splitted = dir.split(File::SEPARATOR)
442
+ splitted.length.times.reduce([]) { |_parents, i| _parents << splitted[0..i].join(File::SEPARATOR) }
443
+ end
444
+
445
+ def remote_cmd(cmds)
446
+ `ssh #{CONFIG.remote_host} "#{Array(cmds).join(';')}"`
447
+ end
448
+
449
+ def static_dir
450
+ "../static_#{File.basename(Dir.pwd)}"
451
+ end
452
+ end
453
+ end
data/lib/slideoff.rb ADDED
@@ -0,0 +1,15 @@
1
+ module Slideoff
2
+ autoload :Markdown, "slideoff/markdown"
3
+ autoload :Presentation, "slideoff/presentation"
4
+ autoload :SlidesAPI, "slideoff/slides_api"
5
+ autoload :RemoteAPI, "slideoff/remote_api"
6
+ autoload :Routes, "slideoff/routes"
7
+ autoload :Server, "slideoff/server"
8
+ autoload :ConfigBuilder, File.expand_path("slideoff/config_builder", File.dirname(__FILE__))
9
+ autoload :Utils, "slideoff/utils"
10
+ autoload :FlickrImage, "slideoff/flickr_image"
11
+ autoload :FlickrAPI, "slideoff/flickr_api"
12
+
13
+ CONFIG = ConfigBuilder.new(Dir.pwd)
14
+ VERSION = "0.1"
15
+ end
@@ -0,0 +1,2 @@
1
+ This theme was created by Hakim El Hattab:
2
+ http://hakim.se/experiments/css3-3d-slideshow
@@ -0,0 +1,232 @@
1
+ /**
2
+ * @author Hakim El Hattab
3
+ */
4
+
5
+
6
+ /*********************************************
7
+ * FONT-FACE DEFINITIONS
8
+ *********************************************/
9
+
10
+ @font-face {
11
+ font-family: 'League Gothic';
12
+ src: url('../fonts/league_gothic-webfont.ttf') format('truetype');
13
+ font-weight: normal;
14
+ font-style: normal;
15
+ }
16
+
17
+ @font-face {
18
+ font-family: 'Crimson Text';
19
+ font-style: normal;
20
+ font-weight: 600;
21
+ src: local('Crimson Text Semibold'), local('CrimsonText-Semibold'), url('../fonts/crimson_text_semibold.ttf') format('truetype');
22
+ }
23
+ @font-face {
24
+ font-family: 'Crimson Text';
25
+ font-style: normal;
26
+ font-weight: normal;
27
+ src: local('Crimson Text'), local('CrimsonText-Roman'), url('../fonts/crimson_text.ttf') format('truetype');
28
+ }
29
+ @font-face {
30
+ font-family: 'Crimson Text';
31
+ font-style: normal;
32
+ font-weight: 700;
33
+ src: local('Crimson Text Bold'), local('CrimsonText-Bold'), url('../fonts/crimson_text_bold.ttf') format('truetype');
34
+ }
35
+
36
+ /*********************************************
37
+ * GLOBAL STYLES
38
+ *********************************************/
39
+
40
+ html, body {
41
+ padding: 0;
42
+ margin: 0;
43
+ overflow: hidden;
44
+
45
+ font-family: 'Crimson Text', Times, 'Times New Roman', serif;
46
+ font-size: 36px;
47
+
48
+ background: #fff;
49
+ color: #222;
50
+
51
+ width: 100%;
52
+ height: 100%;
53
+
54
+ background-image: -webkit-gradient(
55
+ radial,
56
+ 50% 50%, 0,
57
+ 50% 50%, 1000,
58
+ from(rgba(245,245,245,1.0)),
59
+ to(rgba(100,100,100,1.0))
60
+ );
61
+
62
+ background-image: -moz-radial-gradient(
63
+ 50% 50% 90deg,
64
+ rgba(245,245,245,1.0) 0%,
65
+ rgba(100,100,100,1.0) 100%
66
+ );
67
+
68
+ }
69
+
70
+
71
+ /*********************************************
72
+ * HEADERS
73
+ *********************************************/
74
+ h1, h2, h3, h4 {
75
+ margin: 0 0 20px 0;
76
+ font-family: 'League Gothic', Arial, Helvetica, sans-serif;
77
+ line-height: 0.9em;
78
+ letter-spacing: 0.02em;
79
+ text-transform: uppercase;
80
+ color: #222;
81
+ text-shadow: 0px 0px 2px #fff, 0px 0px 4px #bbb;
82
+ }
83
+
84
+ h1 { font-size: 136px; }
85
+ h2 { font-size: 76px; }
86
+ h3 { font-size: 56px; }
87
+ h4 { font-size: 36px; }
88
+
89
+ h1.inverted,
90
+ h2.inverted,
91
+ h3.inverted,
92
+ h4.inverted {
93
+ color: #fff;
94
+ text-shadow: 0px 0px 2px #fff, 0px 0px 2px #888;
95
+ }
96
+
97
+
98
+ /*********************************************
99
+ * SLIDES
100
+ *********************************************/
101
+ #main {
102
+ position: absolute;
103
+ width: 1024px;
104
+ height: 768px;
105
+
106
+ left: 50%;
107
+ top: 50%;
108
+ margin-left: -512px;
109
+ margin-top: -320px;
110
+
111
+ text-align: center;
112
+
113
+ -webkit-perspective: 600px;
114
+ -webkit-perspective-origin: 50% 25%;
115
+ }
116
+
117
+ #main>section,
118
+ #main>section>section {
119
+ display: none;
120
+
121
+ position: absolute;
122
+ width: 100%;
123
+ min-height: 600px;
124
+
125
+ -webkit-transform-style: preserve-3d;
126
+
127
+ -webkit-transition: all 800ms cubic-bezier(0.260, 0.860, 0.440, 0.985);
128
+ -moz-transition: all 800ms cubic-bezier(0.260, 0.860, 0.440, 0.985);
129
+ -o-transition: all 800ms cubic-bezier(0.260, 0.860, 0.440, 0.985);
130
+ transition: all 800ms cubic-bezier(0.260, 0.860, 0.440, 0.985);
131
+ }
132
+
133
+ #main section.past {
134
+ display: block;
135
+ opacity: 0;
136
+
137
+ -webkit-transform: translate3d(-100%, 0, 0)
138
+ rotateY(-90deg)
139
+ translate3d(-100%, 0, 0);
140
+ }
141
+
142
+ #main section.present {
143
+ display: block;
144
+ }
145
+
146
+ #main section.future {
147
+ display: block;
148
+ opacity: 0;
149
+
150
+ -webkit-transform: translate3d(100%, 0, 0)
151
+ rotateY(90deg)
152
+ translate3d(100%, 0, 0);
153
+ }
154
+
155
+ #main section>section.past {
156
+ display: block;
157
+ opacity: 0;
158
+
159
+ -webkit-transform: translate3d(0, -50%, 0)
160
+ rotateX(70deg)
161
+ translate3d(0, -50%, 0);
162
+ }
163
+ #main section>section.future {
164
+ display: block;
165
+ opacity: 0;
166
+
167
+ -webkit-transform: translate3d(0, 50%, 0)
168
+ rotateX(-70deg)
169
+ translate3d(0, 50%, 0);
170
+ }
171
+
172
+
173
+ /*********************************************
174
+ * DEFAULT ELEMENT STYLES
175
+ *********************************************/
176
+
177
+ #main>section {
178
+ line-height: 1.2em;
179
+ text-shadow: 0px 0px 2px #fff, 0px 0px 4px #bbb;
180
+ font-weight: 600;
181
+ }
182
+
183
+ ol {
184
+ list-style: decimal;
185
+ list-style-position: inside;
186
+ }
187
+
188
+ li, p {
189
+ margin-bottom: 10px;
190
+ }
191
+
192
+ a:not(.image) {
193
+ color: #1b6263;
194
+ text-decoration: none;
195
+ border-bottom: 1px dashed rgba(0,0,0,0.3);
196
+ padding: 1px 3px;
197
+ }
198
+
199
+ a:not(.image):hover {
200
+ color: #fff;
201
+ background: #2fa794;
202
+ text-shadow: none;
203
+ border: none;
204
+ }
205
+
206
+ img {
207
+ margin: 30px 0 0 0;
208
+ background: rgba(255,255,255,0.12);
209
+ border: 4px solid #eee;
210
+
211
+ -webkit-box-shadow: 0 0 10px rgba(0, 0, 0, 0.15);
212
+ -moz-box-shadow: 0 0 10px rgba(0, 0, 0, 0.15);
213
+ box-shadow: 0 0 10px rgba(0, 0, 0, 0.15);
214
+
215
+ -webkit-transition: all .11s linear;
216
+ -moz-transition: all .11s linear;
217
+ -o-transition: all .11s linear;
218
+ transition: all .11s linear;
219
+ }
220
+
221
+ a.image:hover img {
222
+ background: rgba(255,255,255,0.2);
223
+
224
+ -webkit-box-shadow: 0 0 20px rgba(0, 0, 0, 0.25);
225
+ -moz-box-shadow: 0 0 20px rgba(0, 0, 0, 0.25);
226
+ box-shadow: 0 0 20px rgba(0, 0, 0, 0.25);
227
+ }
228
+
229
+ pre {
230
+ font-family: monospace;
231
+ text-align: left;
232
+ }