class Juli::Visitor::Slidy

This visits Absyn tree and generates HTML for Slideshow.

Text files under juli-repository must have '.txt' extention.

Almost all are the same as Html VISITOR.

OPTIONS

-t template

specify template

Public Instance Methods

run_bulk() click to toggle source

bulk-mode for slideshow generation doesn't make sense so that it just warns and return quickly.

# File lib/juli/visitor/slidy.rb, line 13
def run_bulk
  STDERR.printf("bulk-mode in Slidy is not supported.\n")
end
visit_chapter(n) click to toggle source

overwrite to:

  • add 'slide' stylesheet-class at level==1

  • include all contents in 'slide' stylesheet-class even title

# File lib/juli/visitor/slidy.rb, line 20
def visit_chapter(n)
  attr = {:id=>n.dom_id}
  if n.level==1
    attr.merge!(:class=>'slide')
  end
  content_tag(:div, attr) do
    header_link(n) +
    n.blocks.accept(self)
  end + "\n"
end

Private Instance Methods