Module: Tufte::Helpers

Defined in:
lib/tufte/helpers.rb

Class Method Summary collapse

Class Method Details

.marginnote(id, note) ⇒ Object



13
14
15
16
17
18
19
20
21
# File 'lib/tufte/helpers.rb', line 13

def self.marginnote(id, note)
  "<label for=\"\#{id}\" class=\"margin-toggle\">&#8853;</label>\n<input type=\"checkbox\" id=\"\#{id}\" class=\"margin-toggle\"/>\n<span class=\"marginnote\">\n\#{note}\n</span>\n  HTML\nend\n".chomp

.sidenote(id, note) ⇒ Object



3
4
5
6
7
8
9
10
11
# File 'lib/tufte/helpers.rb', line 3

def self.sidenote(id, note)
    "<label for=\"\#{id}\" class=\"margin-toggle sidenote-number\"></label>\n<input type=\"checkbox\" id=\"\#{id}\" class=\"margin-toggle\"/>\n<span class=\"sidenote\">\n\#{note}\n</span>\n    HTML\nend\n".chomp