blob: bfaa3e2b10524222c95d82f79f01fb5ca6b24625 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
notes = HTML.select_all_of(page, {".marginnote", ".sidenote"})
local index = 1
while notes[index] do
local note = notes[index]
HTML.add_class(note, "note")
index = index + 1
end
notes = HTML.select(page, ".note")
index = 1
while notes[index] do
local note = notes[index]
if index % 2 == 0 then
HTML.add_class(note, "note-right")
else
HTML.add_class(note, "note-left")
end
index = index + 1
end
|