Class: Jekyll::RenderSideNoteTag

Inherits:
Liquid::Tag
  • Object
show all
Defined in:
lib/sidenote.rb

Instance Method Summary collapse

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