Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- module Jekyll
- class Terminal < Liquid::Block
- def initialize(tag_name, text, tokens)
- super
- @text = text
- end
- def render(context)
- text = super.gsub("\n", "<br/>")
- <<-HTML
- <div id="terminal-window">
- <div id="terminal-toolbar">
- <div class="terminal-top">
- <div id="terminal-title">
- Terminal
- </div>
- </div>
- </div>
- <div id="terminal-body">
- #{text}
- </div>
- HTML
- end#end render method
- end#End Class Terminal
- end#end module Jekyll
- Liquid::Template.register_tag('terminal', Jekyll::Terminal)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement