lalala 4.1.0.dev.391 → 4.1.0.dev.392
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/lalala/markdown/handlers/soundcloud.rb +36 -0
- data/lib/lalala/markdown/handlers/vimeo.rb +1 -1
- data/lib/lalala/markdown/handlers/youtube.rb +1 -1
- data/lib/lalala/markdown/html_renderer.rb +1 -1
- data/lib/lalala/markdown.rb +1 -0
- data/lib/lalala/version.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c8ae10bdc67874f70c0687fbe4926d7d9dd8ebbd
|
4
|
+
data.tar.gz: ea81493d10fa15086fbabe0d4e6723e8adbf4c63
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6999bb8621a27992ff2ea0950d3c0fb166aa4e77dd400ed17f3c25ef347390a20e5d37fe1c4fd52c686999f6d9d445782436d7c1e8ed6dfbb5902293f2382ad6
|
7
|
+
data.tar.gz: 70bb0d68a1bf1ea9eeea277811a1aa8a1a23c4a4e62ea2138bf6a70245cd8d0f07afdadd0e3c52413fb50f79cd4127643ca3fc5e58bbbc8ba99008f1f64035b3
|
@@ -0,0 +1,36 @@
|
|
1
|
+
class Lalala::Markdown::Handlers::Soundcloud < Lalala::Markdown::Handlers::Base
|
2
|
+
|
3
|
+
def initialize(options={})
|
4
|
+
options.assert_valid_keys(:width, :height)
|
5
|
+
|
6
|
+
options = {
|
7
|
+
width: 560,
|
8
|
+
height: 166
|
9
|
+
}.merge(options)
|
10
|
+
|
11
|
+
@options = options
|
12
|
+
end
|
13
|
+
|
14
|
+
def image(url, alt=nil, title=nil)
|
15
|
+
unless %r|^soundcloud[:]//(.+)$| === url
|
16
|
+
return ""
|
17
|
+
end
|
18
|
+
|
19
|
+
id = $1
|
20
|
+
|
21
|
+
helpers.content_tag :span, class: "embed-container is-soundcloud" do
|
22
|
+
helpers.content_tag(
|
23
|
+
:iframe,
|
24
|
+
"",
|
25
|
+
class: "soundcloud-embed js-soundcloud-embed",
|
26
|
+
width: @options[:width],
|
27
|
+
height: @options[:height],
|
28
|
+
src: "//w.soundcloud.com/player/?auto_play=false&hide_related=true&show_comments=false&show_user=false&show_reposts=false&visual=false",
|
29
|
+
:"data-url" => "https://soundcloud.com/oembed?format=json&url=https://soundcloud.com/#{id}",
|
30
|
+
frameborder: 0,
|
31
|
+
allowfullscreen: true
|
32
|
+
)
|
33
|
+
end
|
34
|
+
end
|
35
|
+
|
36
|
+
end
|
@@ -18,7 +18,7 @@ class Lalala::Markdown::Handlers::YouTube < Lalala::Markdown::Handlers::Base
|
|
18
18
|
|
19
19
|
id = $1
|
20
20
|
|
21
|
-
helpers.content_tag :span, class: "embed-container" do
|
21
|
+
helpers.content_tag :span, class: "embed-container is-youtube" do
|
22
22
|
helpers.content_tag(
|
23
23
|
:iframe,
|
24
24
|
"",
|
data/lib/lalala/markdown.rb
CHANGED
data/lib/lalala/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: lalala
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 4.1.0.dev.
|
4
|
+
version: 4.1.0.dev.392
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Simon Menke
|
@@ -13,7 +13,7 @@ authors:
|
|
13
13
|
autorequire:
|
14
14
|
bindir: bin
|
15
15
|
cert_chain: []
|
16
|
-
date: 2015-
|
16
|
+
date: 2015-06-09 00:00:00.000000000 Z
|
17
17
|
dependencies:
|
18
18
|
- !ruby/object:Gem::Dependency
|
19
19
|
name: activeadmin
|
@@ -1460,6 +1460,7 @@ files:
|
|
1460
1460
|
- lib/lalala/markdown/handlers/asset.rb
|
1461
1461
|
- lib/lalala/markdown/handlers/base.rb
|
1462
1462
|
- lib/lalala/markdown/handlers/lazy_asset.rb
|
1463
|
+
- lib/lalala/markdown/handlers/soundcloud.rb
|
1463
1464
|
- lib/lalala/markdown/handlers/vimeo.rb
|
1464
1465
|
- lib/lalala/markdown/handlers/youtube.rb
|
1465
1466
|
- lib/lalala/markdown/html_renderer.rb
|