showoff 0.10.0 → 0.10.1

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: b86b769faaf0f2bf83c369521ebe23d39dcff438
4
- data.tar.gz: 721f97d05ded288194ae3d7bedb0d0dfe5fc900d
3
+ metadata.gz: ff41081de933e7c675ec03921ae60ed432217d78
4
+ data.tar.gz: 331ab67bf789e75e1762da0e08840f44c7fb3ee7
5
5
  SHA512:
6
- metadata.gz: 547eca4f0044dd9a209884011b932d79d223e5b9bb14771cf0ac2f5e0b794d000010868922ac3d7bbb0705228b6995cd13448bc0d95b13a5f1b020172fb471e4
7
- data.tar.gz: 5c8b9f6d938a534a3dd2d711c44284a9ee678709153db6406c2bec10dc70ff885c7ff8b1d9127fb9c79cf8b4e99ee01503fa62fdb9cf085a4d493e4f4825ab0c
6
+ metadata.gz: 4345dc62502a029aedd9e8de79c50ca8fb613ca8d9cfc88dcdadeede041670b24b546d91a833ebe10decef246161266209c393be1f7ab76f8cb352b324cf8c32
7
+ data.tar.gz: ddf83f75b1ea9097ba2edf3b6bdb2ae08d1a9f78fe5d47846851bc47fc4540aec44cc83d5ce7b0a983f68476e39b17cbb5da98dad2a28cf84b1a35e2a3214e1d
data/lib/showoff.rb CHANGED
@@ -434,13 +434,15 @@ class ShowOff < Sinatra::Application
434
434
  result.gsub!(/(<p>)?~~~SECTION:([^~]*)~~~/, '<div class="\2">\1')
435
435
  result.gsub!(/~~~ENDSECTION~~~(<\/p>)?/, '\1</div>')
436
436
 
437
+ # Turn this into a document for munging
438
+ doc = Nokogiri::HTML::DocumentFragment.parse(result)
439
+
437
440
  filename = File.join(settings.pres_dir, '_notes', "#{name}.md")
438
441
  @logger.debug "personal notes filename: #{filename}"
439
442
  if File.file? filename
440
443
  # TODO: shouldn't have to reparse config all the time
441
444
  engine_options = ShowOffUtils.showoff_renderer_options(settings.pres_dir)
442
445
 
443
- doc = Nokogiri::HTML::DocumentFragment.parse(result)
444
446
  # Make sure we've got a notes div to hang personal notes from
445
447
  doc.add_child '<div class="notes"></div>' if doc.css('div.notes').empty?
446
448
  doc.css('div.notes').each do |section|
@@ -454,9 +456,14 @@ class ShowOff < Sinatra::Application
454
456
  section.add_child(note)
455
457
  end
456
458
  end
457
- result = doc.to_html
458
459
  end
459
- result
460
+
461
+ # Now add a target so we open all links from notes in a new window
462
+ doc.css('a').each do |link|
463
+ link.set_attribute('target', '_blank')
464
+ end
465
+
466
+ doc.to_html
460
467
  end
461
468
 
462
469
  def process_content_for_all_slides(content, num_slides, opts={})
@@ -1,3 +1,3 @@
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.10.0'
3
+ SHOWOFF_VERSION = '0.10.1'
@@ -80,15 +80,15 @@
80
80
  z-index: 2147483647; /* max, see http://www.puidokas.com/max-z-index/ */
81
81
  text-align: center;
82
82
  }
83
- }
84
-
85
- .content {
86
- position: relative;
87
- /* for some reason, setting top to 50% is pushing the content too far down, no idea why */
88
- top: 42%;
89
- -webkit-transform: translateY(-50%);
90
- -ms-transform: translateY(-50%);
91
- transform: translateY(-50%);
83
+ .content {
84
+ position: relative;
85
+ /* for some reason, setting top to 50% is pushing the content too far down, no idea why */
86
+ top: 42%;
87
+ -webkit-transform: translateY(-50%);
88
+ -ms-transform: translateY(-50%);
89
+ transform: translateY(-50%);
90
+ }
91
+
92
92
  }
93
93
 
94
94
  .slide .center {
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.10.0
4
+ version: 0.10.1
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-07-01 00:00:00.000000000 Z
11
+ date: 2015-07-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: sinatra