mdc/lib/rendering/renderer_html_presentation.rb
##
# Small TOC menu for presentation slides for quick navigation
Small TOC menu for presentation slides for quick navigation
Small TOC menu for presentation slides for quick navigation
def toc_menu
      result = ''
      result << '<ul>' << nl
      @toc.entries.each do |e|
        result << "  <li><a href='##{e.id}'>#{e.name}</a>" << nl
        unless e.entries.empty?
          result << '    <ul>' << nl
          e.entries.each do |se|
            unless se.name == @last_toc_name
              result << "      <li><a href='##{se.id}'>#{se.name}</a>" << nl
              @last_toc_name = se.name
            end
          end
        end
        result << '    </ul>' << nl
      end
      result << '    </ul>' << nl
      result
    end
def toc_menu result = '' result << '<ul>' << nl @toc . entries . each do | e | result << "  <li><a href='##{e.id}'>#{e.name}</a>" << nl unless e . entries . empty? result << '    <ul>' << nl e . entries . each do | se | unless se . name == @last_toc_name result << "      <li><a href='##{se.id}'>#{se.name}</a>" << nl @last_toc_name = se . name end end end result << '    </ul>' << nl end result << '    </ul>' << nl result end
Small TOC menu for presentation slides for quick navigation
Small TOC menu for presentation slides for quick navigation