shining 1.3.7 → 2.0.0

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.
@@ -41,16 +41,11 @@ module Shining
41
41
 
42
42
  def sample_content_for format = 'html'
43
43
  case format
44
- when 'markdown'
44
+ when 'markdown', 'md'
45
45
  <<-CONTENTS
46
46
  # #{name}
47
47
  This is a new slide. It needs some lovin'!
48
48
  CONTENTS
49
- when 'haml'
50
- <<-CONTENTS
51
- %h1.centered #{name}
52
- %p.centered This is a new slide. It needs some lovin'!
53
- CONTENTS
54
49
  when 'html'
55
50
  <<-CONTENTS
56
51
  <h1 class="centered">#{name}</h1>
@@ -32,7 +32,6 @@ class Heroku
32
32
  end
33
33
 
34
34
  def deploy name
35
- copy Shining.root/'lib'/'config.ru', @preso.path
36
35
  change_dir @preso.path
37
36
  Shining.say "Creating Git repository on #{@preso.path}" do `git init` end unless git_repo?
38
37
  Shining.say "Updating presentation's contents" do
@@ -7,7 +7,7 @@ class Preso
7
7
  include FileMethods and extend FileMethods
8
8
  attr_reader :path, :name
9
9
 
10
- SLIDE_FORMATS = %w(haml markdown html)
10
+ SLIDE_FORMATS = %w(markdown html md)
11
11
 
12
12
  def initialize dir, fresh = true
13
13
  @path = expand(dir)
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{shining}
8
- s.version = "1.3.7"
8
+ s.version = "2.0.0"
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-07-13}
12
+ s.date = %q{2010-09-17}
13
13
  s.default_executable = %q{shine}
14
14
  s.description = %q{HTML + CSS + Javascript = awesome presos}
15
15
  s.email = %q{julio.ody@gmail.com}
@@ -28,22 +28,16 @@ Gem::Specification.new do |s|
28
28
  "bin/shine",
29
29
  "css/base.css",
30
30
  "css/effects.css",
31
- "css/iphone.css",
32
- "css/shCore.css",
31
+ "css/shAll.css",
33
32
  "css/shThemeFadeToGrey.css",
34
- "images/help.png",
35
- "images/magnifier.png",
36
- "images/page_white_code.png",
37
- "images/page_white_copy.png",
38
- "images/printer.png",
33
+ "images/default-noise.png",
39
34
  "lib/config.ru",
40
35
  "lib/deps.js",
41
36
  "lib/ext/filemethods.rb",
42
37
  "lib/ext/string.rb",
43
- "lib/jquery-1.4.1.min.js",
38
+ "lib/jquery-1.4.2.min.js",
44
39
  "lib/plugins/iphone.js",
45
40
  "lib/plugins/resize.js",
46
- "lib/plugins/syntaxhighlighter.js",
47
41
  "lib/shining.js",
48
42
  "lib/shining.rb",
49
43
  "lib/shining/errors.rb",
@@ -24,8 +24,8 @@ describe 'shine' do
24
24
  quiet "cd #{PRESO} && #{SHINE} compile"
25
25
  end
26
26
 
27
- def make_haml_template!(name)
28
- File.open(PRESO/'slides'/"#{name}.haml", 'w') { |f| f << "%p LOOK MA" }
27
+ def make_markdown_template!(name)
28
+ File.open(PRESO/'slides'/"#{name}.md", 'w') { |f| f << "# Look ma\n\nNo hands" }
29
29
  end
30
30
 
31
31
  before :all do
@@ -49,18 +49,9 @@ describe 'shine' do
49
49
  File.exists?(PRESO/'slides'/'foo.html').should be_true
50
50
  end
51
51
 
52
- it 'creates a new slide script by default' do
53
- File.exists?(PRESO/'slides'/'foo.js').should be_true
54
- end
55
-
56
- it 'creates a slide stylesheet by default' do
57
- File.exists?(PRESO/'slides'/'foo.css').should be_true
58
- end
59
-
60
- it "creates a new Haml slide named 'test.haml' on 'shine slide test haml'" do
61
- new_slide 'test', 'haml'
62
- File.exists?(PRESO/'slides'/'test.haml').should be_true
63
- File.exists?(PRESO/'slides'/'test.js').should be_true
52
+ it "creates a new Markdown slide named 'test.md' on 'shine slide test md'" do
53
+ new_slide 'test', 'md'
54
+ File.exists?(PRESO/'slides'/'test.md').should be_true
64
55
  end
65
56
  end
66
57
 
@@ -48,9 +48,9 @@ describe Shining::Preso do
48
48
  lambda do @preso.new_slide 'foo.erb' end.should raise_error(ArgumentError)
49
49
  end
50
50
 
51
- it "#new_slide creates a new Markdown/Haml/HTML template and adds it's name to the config file" do
52
- @preso.new_slide 'foo.haml'
53
- JSON.parse(File.read(@preso.path/'config.json'))['slides'].should include('foo.haml')
51
+ it "#new_slide creates a new Markdown/HTML template and adds it's name to the config file" do
52
+ @preso.new_slide 'foo.md'
53
+ JSON.parse(File.read(@preso.path/'config.json'))['slides'].should include('foo.md')
54
54
  end
55
55
 
56
56
  context '#remove_slide' do
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "slides": ["welcome.html"],
3
3
  "title": "Your presentation",
4
- "plugins": ["resize", "syntaxhighlighter", "iphone"],
4
+ "plugins": ["resize", "iphone"],
5
5
  "transitions": "fade"
6
6
  }
@@ -6,17 +6,13 @@
6
6
  <meta name="viewport" content="width=device-width, maximum-scale=1.0, user-scalable=no" />
7
7
  <title>Your presentation</title>
8
8
  <link rel="stylesheet" type="text/css" href="vendor/css/base.css" media="all"/>
9
- <link rel="stylesheet" type="text/css" href="vendor/css/effects.css" media="all"/>
10
- <link rel="stylesheet" type="text/css" href="vendor/css/shCore.css" media="all"/>
11
- <link rel="stylesheet" type="text/css" href="vendor/css/shThemeFadeToGrey.css" media="all"/>
12
- <link rel="stylesheet" type="text/css" href="vendor/themes/default.css" media="all" class="theme"/>
13
- <script type="text/javascript" charset="utf-8" src="vendor/lib/jquery-1.4.1.min.js"></script>
9
+ <link rel="stylesheet" type="text/css" href="vendor/css/shAll.css" media="all"/>
10
+ <script type="text/javascript" charset="utf-8" src="vendor/lib/jquery-1.4.2.min.js"></script>
14
11
  <script type="text/javascript" charset="utf-8" src="vendor/lib/deps.js"></script>
15
12
  <script type="text/javascript" charset="utf-8" src="vendor/lib/shining.js"></script>
16
13
  </head>
17
14
  <body>
18
15
  <div id="stage">
19
- <div class="contents"></div>
20
16
  </div>
21
17
  </body>
22
18
  </html>
@@ -1,4 +1,4 @@
1
1
  <h1 class="centered">Welcome to your preso!</h1>
2
2
  <p class="centered">
3
- Bettlejuice! Bettlejuice! Bettlejuice!
3
+ This is a default slide.
4
4
  </p>
@@ -1,17 +1,14 @@
1
- body {
2
- background-color: #303030;
1
+ body {
2
+ background: #303030 url(/vendor/images/default-noise.png) repeat scroll;
3
+ background: -webkit-gradient(radial, 40% bottom, 500, 70% top, 400, from(rgba(99, 99, 99, 0)), to(rgba(99, 99, 99, 0.2))), #303030 url(/vendor/images/default-noise.png) repeat scroll;
3
4
  }
4
- #stage {
5
- -webkit-box-shadow: 0px 3px 5px rgba(0, 0, 0, 0.6);
6
- -webkit-border-radius: 5px;
7
- -moz-box-shadow: 0px 3px 5px rgba(0, 0, 0, 0.6);
8
- -moz-border-radius: 5px;
9
- box-shadow: 0px 3px 5px rgba(0, 0, 0, 0.6);
10
- border-radius: 5px;
11
- }
12
-
13
5
  h1, h2, h3, p, li { color: #EEEEEE; text-shadow: #000 2px 2px 4px }
14
6
  a { color: #499DFF; text-decoration: none }
15
7
  ul { list-style-type: disc }
16
8
  em { color: #4BFF50 }
17
- strong { color: #FFAB49; font-weight: bold }
9
+ strong { color: #FFAB49; font-weight: bold }
10
+
11
+ @media all and (max-device-width: 480px) {
12
+ body { background: #303030 }
13
+ h1 { line-height: 1em; margin-bottom: 0.2em !important }
14
+ }
@@ -1,5 +1,5 @@
1
1
  body { background-color: #FFFFFF }
2
- #stage { display: block; margin: 0; padding: 0 2em; color: #000000 }
2
+ #stage { display: block !important; margin: 0; padding: 0 2em; color: #000000 }
3
3
 
4
4
  /* override centered */
5
5
  #stage h1, h2, h3 { text-align: left; margin: 0 }
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: shining
3
3
  version: !ruby/object:Gem::Version
4
- hash: 21
4
+ hash: 15
5
5
  prerelease: false
6
6
  segments:
7
- - 1
8
- - 3
9
- - 7
10
- version: 1.3.7
7
+ - 2
8
+ - 0
9
+ - 0
10
+ version: 2.0.0
11
11
  platform: ruby
12
12
  authors:
13
13
  - Julio Cesar Ody
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2010-07-13 00:00:00 +10:00
18
+ date: 2010-09-17 00:00:00 +10:00
19
19
  default_executable: shine
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency
@@ -164,22 +164,16 @@ files:
164
164
  - bin/shine
165
165
  - css/base.css
166
166
  - css/effects.css
167
- - css/iphone.css
168
- - css/shCore.css
167
+ - css/shAll.css
169
168
  - css/shThemeFadeToGrey.css
170
- - images/help.png
171
- - images/magnifier.png
172
- - images/page_white_code.png
173
- - images/page_white_copy.png
174
- - images/printer.png
169
+ - images/default-noise.png
175
170
  - lib/config.ru
176
171
  - lib/deps.js
177
172
  - lib/ext/filemethods.rb
178
173
  - lib/ext/string.rb
179
- - lib/jquery-1.4.1.min.js
174
+ - lib/jquery-1.4.2.min.js
180
175
  - lib/plugins/iphone.js
181
176
  - lib/plugins/resize.js
182
- - lib/plugins/syntaxhighlighter.js
183
177
  - lib/shining.js
184
178
  - lib/shining.rb
185
179
  - lib/shining/errors.rb
@@ -1,14 +0,0 @@
1
- #stage { -webkit-box-shadow: none }
2
- #help { font-size: 200% }
3
-
4
- @media all and (max-width: 320px) {
5
- h1 { font-size: 3em }
6
- h2 { font-size: 2.8em }
7
- h3 { font-size: 2.5em }
8
- p, li { font-size: 1.6em }
9
- p { margin: 0.5em 0 }
10
- }
11
-
12
- @media all and (min-width: 321px) {
13
- #stage { font-size: 90% };
14
- }
@@ -1,330 +0,0 @@
1
- /**
2
- * SyntaxHighlighter
3
- * http://alexgorbatchev.com/
4
- *
5
- * SyntaxHighlighter is donationware. If you are using it, please donate.
6
- * http://alexgorbatchev.com/wiki/SyntaxHighlighter:Donate
7
- *
8
- * @version
9
- * 2.1.364 (October 15 2009)
10
- *
11
- * @copyright
12
- * Copyright (C) 2004-2009 Alex Gorbatchev.
13
- *
14
- * @license
15
- * This file is part of SyntaxHighlighter.
16
- *
17
- * SyntaxHighlighter is free software: you can redistribute it and/or modify
18
- * it under the terms of the GNU Lesser General Public License as published by
19
- * the Free Software Foundation, either version 3 of the License, or
20
- * (at your option) any later version.
21
- *
22
- * SyntaxHighlighter is distributed in the hope that it will be useful,
23
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
24
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
25
- * GNU General Public License for more details.
26
- *
27
- * You should have received a copy of the GNU General Public License
28
- * along with SyntaxHighlighter. If not, see <http://www.gnu.org/copyleft/lesser.html>.
29
- */
30
- .syntaxhighlighter,
31
- .syntaxhighlighter div,
32
- .syntaxhighlighter code,
33
- .syntaxhighlighter table,
34
- .syntaxhighlighter table td,
35
- .syntaxhighlighter table tr,
36
- .syntaxhighlighter table tbody
37
- {
38
- margin: 0 !important;
39
- padding: 0 !important;
40
- border: 0 !important;
41
- outline: 0 !important;
42
- background: none !important;
43
- text-align: left !important;
44
- float: none !important;
45
- vertical-align: baseline !important;
46
- position: static !important;
47
- left: auto !important;
48
- top: auto !important;
49
- right: auto !important;
50
- bottom: auto !important;
51
- height: auto !important;
52
- width: auto !important;
53
- line-height: 1.1em !important;
54
- font-family: "Consolas", "Bitstream Vera Sans Mono", "Courier New", Courier, monospace !important;
55
- font-weight: normal !important;
56
- font-style: normal !important;
57
- font-size: 1em !important;
58
- min-height: inherit !important; /* For IE8, FF & WebKit */
59
- min-height: auto !important; /* For IE7 */
60
- }
61
-
62
- .syntaxhighlighter
63
- {
64
- width: 99% !important; /* 99% fixes IE8 horizontal scrollbar */
65
- margin: 1em 0 1em 0 !important;
66
- padding: 1px !important; /* adds a little border on top and bottom */
67
- position: relative !important;
68
- }
69
-
70
- .syntaxhighlighter .bold
71
- {
72
- font-weight: bold !important;
73
- }
74
-
75
- .syntaxhighlighter .italic
76
- {
77
- font-style: italic !important;
78
- }
79
-
80
- .syntaxhighlighter .line
81
- {
82
- }
83
-
84
- .syntaxhighlighter .no-wrap .line .content
85
- {
86
- white-space: pre !important;
87
- }
88
-
89
- .syntaxhighlighter .line table
90
- {
91
- border-collapse: collapse !important;
92
- }
93
-
94
- .syntaxhighlighter .line td
95
- {
96
- vertical-align: top !important;
97
- }
98
-
99
- .syntaxhighlighter .line .number
100
- {
101
- width: 3em !important;
102
- }
103
-
104
- .syntaxhighlighter .line .number code
105
- {
106
- width: 2.7em !important;
107
- padding-right: .3em !important;
108
- text-align: right !important;
109
- display: block !important;
110
- }
111
-
112
- .syntaxhighlighter .line .content
113
- {
114
- padding-left: .5em !important;
115
- }
116
-
117
- .syntaxhighlighter .line .spaces
118
- {
119
- }
120
-
121
- /* Disable border and margin on the lines when no gutter option is set */
122
- .syntaxhighlighter.nogutter .line .content
123
- {
124
- border-left: none !important;
125
- }
126
-
127
- .syntaxhighlighter .bar
128
- {
129
- display: none !important;
130
- }
131
-
132
- .syntaxhighlighter .bar.show
133
- {
134
- display: block !important;
135
- }
136
-
137
- .syntaxhighlighter.collapsed .bar
138
- {
139
- display: block !important;
140
- }
141
-
142
- /* Adjust some properties when collapsed */
143
-
144
- .syntaxhighlighter.collapsed .lines
145
- {
146
- display: none !important;
147
- }
148
-
149
- .syntaxhighlighter .lines.no-wrap
150
- {
151
- overflow: auto !important;
152
- overflow-y: hidden !important;
153
- }
154
-
155
- /* Styles for the toolbar */
156
-
157
- .syntaxhighlighter .toolbar
158
- {
159
- position: absolute !important;
160
- right: 0px !important;
161
- top: 0px !important;
162
- font-size: 1px !important;
163
- padding: 8px 8px 8px 0 !important; /* in px because images don't scale with ems */
164
- }
165
-
166
- .syntaxhighlighter.collapsed .toolbar
167
- {
168
- font-size: 80% !important;
169
- padding: .2em 0 .5em .5em !important;
170
- position: static !important;
171
- }
172
-
173
- .syntaxhighlighter .toolbar a.item,
174
- .syntaxhighlighter .toolbar .item
175
- {
176
- display: block !important;
177
- float: left !important;
178
- margin-left: 8px !important;
179
- background-repeat: no-repeat !important;
180
- overflow: hidden !important;
181
- text-indent: -5000px !important;
182
- }
183
-
184
- .syntaxhighlighter.collapsed .toolbar .item
185
- {
186
- display: none !important;
187
- }
188
-
189
- .syntaxhighlighter.collapsed .toolbar .item.expandSource
190
- {
191
- background-image: url(magnifier.png) !important;
192
- display: inline !important;
193
- text-indent: 0 !important;
194
- width: auto !important;
195
- float: none !important;
196
- height: 16px !important;
197
- padding-left: 20px !important;
198
- }
199
-
200
- .syntaxhighlighter .toolbar .item.viewSource
201
- {
202
- background-image: url(page_white_code.png) !important;
203
- }
204
-
205
- .syntaxhighlighter .toolbar .item.printSource
206
- {
207
- background-image: url(printer.png) !important;
208
- }
209
-
210
- .syntaxhighlighter .toolbar .item.copyToClipboard
211
- {
212
- text-indent: 0 !important;
213
- background: none !important;
214
- overflow: visible !important;
215
- }
216
-
217
- .syntaxhighlighter .toolbar .item.about
218
- {
219
- background-image: url(help.png) !important;
220
- }
221
-
222
- /**
223
- * Print view.
224
- * Colors are based on the default theme without background.
225
- */
226
-
227
- .syntaxhighlighter.printing,
228
- .syntaxhighlighter.printing .line.alt1 .content,
229
- .syntaxhighlighter.printing .line.alt2 .content,
230
- .syntaxhighlighter.printing .line.highlighted .number,
231
- .syntaxhighlighter.printing .line.highlighted.alt1 .content,
232
- .syntaxhighlighter.printing .line.highlighted.alt2 .content,
233
- {
234
- background: none !important;
235
- }
236
-
237
- /* Gutter line numbers */
238
- .syntaxhighlighter.printing .line .number
239
- {
240
- color: #bbb !important;
241
- }
242
-
243
- /* Add border to the lines */
244
- .syntaxhighlighter.printing .line .content
245
- {
246
- color: #000 !important;
247
- }
248
-
249
- /* Toolbar when visible */
250
- .syntaxhighlighter.printing .toolbar
251
- {
252
- display: none !important;
253
- }
254
-
255
- .syntaxhighlighter.printing a
256
- {
257
- text-decoration: none !important;
258
- }
259
-
260
- .syntaxhighlighter.printing .plain,
261
- .syntaxhighlighter.printing .plain a
262
- {
263
- color: #000 !important;
264
- }
265
-
266
- .syntaxhighlighter.printing .comments,
267
- .syntaxhighlighter.printing .comments a
268
- {
269
- color: #008200 !important;
270
- }
271
-
272
- .syntaxhighlighter.printing .string,
273
- .syntaxhighlighter.printing .string a
274
- {
275
- color: blue !important;
276
- }
277
-
278
- .syntaxhighlighter.printing .keyword
279
- {
280
- color: #069 !important;
281
- font-weight: bold !important;
282
- }
283
-
284
- .syntaxhighlighter.printing .preprocessor
285
- {
286
- color: gray !important;
287
- }
288
-
289
- .syntaxhighlighter.printing .variable
290
- {
291
- color: #a70 !important;
292
- }
293
-
294
- .syntaxhighlighter.printing .value
295
- {
296
- color: #090 !important;
297
- }
298
-
299
- .syntaxhighlighter.printing .functions
300
- {
301
- color: #ff1493 !important;
302
- }
303
-
304
- .syntaxhighlighter.printing .constants
305
- {
306
- color: #0066CC !important;
307
- }
308
-
309
- .syntaxhighlighter.printing .script
310
- {
311
- font-weight: bold !important;
312
- }
313
-
314
- .syntaxhighlighter.printing .color1,
315
- .syntaxhighlighter.printing .color1 a
316
- {
317
- color: #808080 !important;
318
- }
319
-
320
- .syntaxhighlighter.printing .color2,
321
- .syntaxhighlighter.printing .color2 a
322
- {
323
- color: #ff1493 !important;
324
- }
325
-
326
- .syntaxhighlighter.printing .color3,
327
- .syntaxhighlighter.printing .color3 a
328
- {
329
- color: red !important;
330
- }