Skip to content
Snippets Groups Projects
Commit a5a1670e authored by Jacek Lebioda's avatar Jacek Lebioda
Browse files

Merge branch '4-include-the-plugin-into-template-s-rubygems-file' into 'master'

Added new components that should be shared

Closes #4

See merge request core-services/jekyll-theme-lcsb-frozen-components!5
parents 0e37ef70 18070cfe
No related branches found
No related tags found
1 merge request!5Added new components that should be shared
require 'jekyll/tags/alert'
require 'jekyll/tags/alert_header'
require 'jekyll/tags/rblock' require 'jekyll/tags/rblock'
require 'jekyll/tags/rgridblock' require 'jekyll/tags/rgridblock'
require 'jekyll/tags/rtitle' 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)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment