Class: Jekyll::RenderSideNoteTag
- Inherits:
-
Liquid::Tag
- Object
- Liquid::Tag
- Jekyll::RenderSideNoteTag
- Defined in:
- lib/sidenote.rb
Instance Method Summary collapse
-
#initialize(tag_name, text, tokens) ⇒ RenderSideNoteTag
constructor
A new instance of RenderSideNoteTag.
- #render(context) ⇒ Object
Constructor Details
#initialize(tag_name, text, tokens) ⇒ RenderSideNoteTag
Returns a new instance of RenderSideNoteTag.
4 5 6 7 |
# File 'lib/sidenote.rb', line 4 def initialize(tag_name, text, tokens) super @text = text.shellsplit end |
Instance Method Details
#render(context) ⇒ Object
8 9 10 |
# File 'lib/sidenote.rb', line 8 def render(context) "<sup><label for='#{@text[0]}' class='margin-toggle sidenote-number'></label></sup><input type='checkbox' id='#{@text[0]}' class='margin-toggle'/><span class='sidenote'>#{@text[1]} </span>" end |