class SoundCloudEmbed
Public Class Methods
new(tag_name, markup, tokens)
click to toggle source
Calls superclass method
# File lib/jekyll-embeds.rb, line 96 def initialize(tag_name, markup, tokens) super params = Shellwords.shellwords markup @items = { :id => params[0], :color => params[1] || "ff7700", :aplay => params[2] || false } end
Public Instance Methods
render(context)
click to toggle source
# File lib/jekyll-embeds.rb, line 102 def render(context) %Q{<div class="embed-container"><iframe width="100%" height="166" scrolling="no" frameborder="no" src="//w.soundcloud.com/player/?url=//api.soundcloud.com/tracks/#{@items[:id]}&color=%23#{@items[:color]}&auto_play=#{@items[:aplay]}&hide_related=true&show_comments=false&show_reposts=false&show_teaser=false"></iframe></div>} end