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 +4 -4
- data/lib/showoff.rb +10 -3
- data/lib/showoff/version.rb +1 -1
- data/public/css/showoff.css +9 -9
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ff41081de933e7c675ec03921ae60ed432217d78
|
4
|
+
data.tar.gz: 331ab67bf789e75e1762da0e08840f44c7fb3ee7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
-
|
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={})
|
data/lib/showoff/version.rb
CHANGED
data/public/css/showoff.css
CHANGED
@@ -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
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
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.
|
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-
|
11
|
+
date: 2015-07-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: sinatra
|