diff options
Diffstat (limited to 'plugins/notes.lua')
-rw-r--r-- | plugins/notes.lua | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/plugins/notes.lua b/plugins/notes.lua new file mode 100644 index 0000000..bfaa3e2 --- /dev/null +++ b/plugins/notes.lua @@ -0,0 +1,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
\ No newline at end of file |