Commit 18070cfe authored by Jacek Lebioda's avatar Jacek Lebioda
Browse files

Added new components that should be shared

parent 0e37ef70
require 'jekyll/tags/alert'
require 'jekyll/tags/alert_header'
require 'jekyll/tags/rblock'
require 'jekyll/tags/rgridblock'
require 'jekyll/tags/rtitle'
module Jekyll
module Tags
class AlertTag < Liquid::Block
def initialize(tag_name, block_options, liquid_options)
super
@class = block_options.strip
end
def render(context)
context.stack do
context["class"] = @class
@content = super
end
output = <<~EOS
<div class="alert #{@class}">
#{@content}
</div>
EOS
end
end
end
end
Liquid::Template.register_tag('alert', Jekyll::Tags::AlertTag)
module Jekyll
module Tags
class AlertHeaderTag < Liquid::Block
def initialize(tag_name, block_options, liquid_options)
super
end
def render(context)
context.stack do
@content = super
end
output = "<h3>#{@content}</h3>"
end
end
end
end
Liquid::Template.register_tag('alert_header', Jekyll::Tags::AlertHeaderTag)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment