showoff 0.9.10.8 → 0.9.10.9

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: aa9913643afd1e04bc645f8855a6c9d30b124022
4
- data.tar.gz: 0dd88f99c1ee300cc99787a1f3a9227eff2ec94d
3
+ metadata.gz: 51005d05cd3c87b9f312400986ef7c2dd1c0e087
4
+ data.tar.gz: 59838b6f752ebc8b29d7dab7c483833c79edcb2c
5
5
  SHA512:
6
- metadata.gz: db5c3699b395ca027340a785a5974bf8b427448c4df0cdf1841f30911fe08312f60dbfc6fd64a5e68e1c53c54ed6a1eec0c5a572289d6b690267974a8fd1a6b4
7
- data.tar.gz: 85ac7713f88326f337ffdb147480daa753049c33e8c214090afafbab9530d60ca89a0b186581701145937bd865f9a9724847ebba86242a29caa8588e134a4df7
6
+ metadata.gz: 4e83b17fffc8911bb3665ff2b47bd1bda2734961d626c9a31cd1595d620635e372fe7372b7cf23775ebac047fbb4b41ba0a8d68a60c772adeb5c9ecdd6a5038b
7
+ data.tar.gz: 7238c58739ebe0dd630a66db1cde2d5907b7b5b4b8a69944c3900280d9e83d57fc69671aa3a093233d489b49bf6fb52cb765ed0d818d768020c628a937c13a77
data/Rakefile CHANGED
@@ -1,3 +1,5 @@
1
+ task default: :test
2
+
1
3
  desc "Build HTML documentation"
2
4
  task :doc do
3
5
  system("rdoc --main README.rdoc README.rdoc documentation/*.rdoc")
data/lib/showoff.rb CHANGED
@@ -288,6 +288,14 @@ class ShowOff < Sinatra::Application
288
288
  content += "<div class=\"content #{classes}\" ref=\"#{name}\">\n"
289
289
  end
290
290
 
291
+ # reset subsection each time we encounter a new subsection slide. Do this in a regex, because it's much
292
+ # easier to just get the first of any header than it is after rendering to html.
293
+ if content_classes.include? 'subsection'
294
+ @section_title = slide.text.match(/#+ *(.*?)#*$/)[1] rescue settings.showoff_config['name']
295
+ end
296
+ # include a header that's hidden by CSS so that pdf renderers like wkhtmltopdf can use it for a section title
297
+ content += "<h1 class=\"section_title\">#{@section_title}</h1>\n"
298
+
291
299
  # Apply the template to the slide and replace the key to generate the content of the slide
292
300
  sl = process_content_for_replacements(template.gsub(/~~~CONTENT~~~/, slide.text))
293
301
  sl = Tilt[:markdown].new(nil, nil, engine_options) { sl }.render
@@ -392,7 +400,7 @@ class ShowOff < Sinatra::Application
392
400
  toc['id'] = 'toc'
393
401
  frag.add_child(toc)
394
402
 
395
- Nokogiri::HTML(content).css('div.subsection > h1').each do |section|
403
+ Nokogiri::HTML(content).css('div.subsection > h1:not(.section_title)').each do |section|
396
404
  entry = Nokogiri::XML::Node.new('div', frag)
397
405
  entry['class'] = 'tocentry'
398
406
  toc.add_child(entry)
@@ -711,6 +719,7 @@ class ShowOff < Sinatra::Application
711
719
  @slide_count = 0
712
720
  @section_major = 0
713
721
  @section_minor = 0
722
+ @section_title = settings.showoff_config['name']
714
723
 
715
724
  sections = ShowOffUtils.showoff_sections(settings.pres_dir, @logger)
716
725
  files = []
@@ -1,4 +1,4 @@
1
1
  # No namespace here since ShowOff is a class and I'd have to inherit from
2
2
  # Sinatra::Application (which we don't want to load here)
3
- SHOWOFF_VERSION = '0.9.10.8'
3
+ SHOWOFF_VERSION = '0.9.10.9'
4
4
 
Binary file
Binary file
Binary file
Binary file
Binary file
@@ -57,6 +57,20 @@ div.zoomed {
57
57
  background-color: #003d96;
58
58
  }
59
59
 
60
+ #topbar #links a.popdown {
61
+ background-image: url(popdown.png);
62
+ background-position: center right;
63
+ background-repeat: no-repeat;
64
+ padding-right: 16px;
65
+ }
66
+
67
+ #topbar #links a.popout {
68
+ background-image: url(popout.png);
69
+ background-position: top 1px right 1px;
70
+ background-repeat: no-repeat;
71
+ padding-right: 18px;
72
+ }
73
+
60
74
  #topbar #links .mobile {
61
75
  display: none;
62
76
  }
@@ -1,4 +1,9 @@
1
1
  @media screen {
2
+ /* explicitly size parent elements so the screen blanker works */
3
+ html, body{
4
+ height:100%;
5
+ }
6
+
2
7
  body {
3
8
  font-size: 100%;
4
9
  font-family: "Gill Sans", Helvetica, Arial, sans-serif;
@@ -185,7 +190,7 @@
185
190
  .subsection h1 {
186
191
  background: #008;
187
192
  color: #fff;
188
- padding: .25em;
193
+ padding: .25em;
189
194
  }
190
195
 
191
196
  .small {
@@ -201,6 +206,15 @@ h1 { font-size: 5em; }
201
206
  h2 { font-size: 3em; }
202
207
  h3 { font-size: 2em; }
203
208
 
209
+ /* make this invisible as possible, while still rendering so that wkhtmltopdf doesn't ignore it */
210
+ .content h1.section_title {
211
+ color: transparent !important;
212
+ opacity: 0 !important;
213
+ font-size: 0 !important;
214
+ margin: 0 !important;
215
+ padding: 0 !important;
216
+ }
217
+
204
218
  pre { margin: 1em 40px; padding: .25em; }
205
219
 
206
220
  #navigation.hidden,
data/views/presenter.erb CHANGED
@@ -47,12 +47,12 @@
47
47
  <a id="report" href="javascript:reportIssue();" title="Report an issue with the current slide.">Report Issue With Slide</a>
48
48
  <% end %>
49
49
  <span class="spacer"> </span>
50
- <a id="stats" href="/stats" target="_showoffchild">Viewing Statistics</a>
51
- <a id="downloads" href="/download" target="_showoffchild">Downloads</a>
50
+ <a id="stats" href="/stats" target="_showoffchild" class="popdown">Viewing Statistics</a>
51
+ <a id="downloads" href="/download" target="_showoffchild" class="popdown">Downloads</a>
52
52
  <span class="spacer"> </span>
53
- <a id="slaveWindow" href="javascript:toggleSlave();" title="Enable the slave window.">Slave Window</a>
54
- <a id="nextWindow" href="javascript:toggleNext();" title="Enable the next window view.">Next Window</a>
55
- <a id="notesWindow" href="javascript:toggleNotes();" title="Enable the popout notes window.">Notes Window</a>
53
+ <a id="slaveWindow" href="javascript:toggleSlave();" title="Enable the slave window." class="popout">Slave Window</a>
54
+ <a id="nextWindow" href="javascript:toggleNext();" title="Enable the next window view." class="popout">Next Window</a>
55
+ <a id="notesWindow" href="javascript:toggleNotes();" title="Enable the popout notes window." class="popout">Notes Window</a>
56
56
  <span class="spacer"> </span>
57
57
  <a id="generatePDF" href="/pdf" title="Call out to wkhtmltopdf to generate a PDF.">Generate PDF</a>
58
58
  <a id="onePage" href="/onepage" title="Load the single page view. Useful for printing.">Single Page</a>
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: showoff
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.10.8
4
+ version: 0.9.10.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Scott Chacon
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-03-23 00:00:00.000000000 Z
11
+ date: 2015-05-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: sinatra
@@ -190,9 +190,14 @@ files:
190
190
  - public/css/grippy-close.png
191
191
  - public/css/grippy.png
192
192
  - public/css/menu.png
193
+ - public/css/new_window-a.png
194
+ - public/css/new_window-b.png
195
+ - public/css/new_window-c.png
193
196
  - public/css/onepage.css
194
197
  - public/css/pace.png
195
198
  - public/css/paceMarker.png
199
+ - public/css/popdown.png
200
+ - public/css/popout.png
196
201
  - public/css/presenter.css
197
202
  - public/css/reset.css
198
203
  - public/css/sh_style.css
@@ -301,7 +306,7 @@ files:
301
306
  - public/js/sh_main.min.js
302
307
  - public/js/showoff.js
303
308
  - public/js/showoffcore.js
304
- homepage: http://github.com/schacon/showoff
309
+ homepage: http://github.com/puppetlabs/showoff
305
310
  licenses: []
306
311
  metadata: {}
307
312
  post_install_message: |2+