Sha256: ae412f2e0dee37f4fe9f20f9c75bc439b6ef85eb337aefa27be84ea758e462d5

Contents?: true

Size: 901 Bytes

Versions: 25

Compression:

Stored size: 901 Bytes

Contents

require 'tilt'

module RevealCK
  module Render
    # An IndexHtml is made by composed head, body, and script.
    module IndexHtmlMaker
      def head
        head_html_erb =
          RevealCK.template_path('index.html',
                                 'head.html.erb')
        template = Tilt.new(head_html_erb)
        template.render(self)
      end

      def body(slides_html)
        body_html_erb =
          RevealCK.template_path('index.html',
                                 'body.html.erb')
        template = Tilt.new(body_html_erb)
        locals = {
          slides_html: slides_html
        }
        template.render(self, locals)
      end

      def script
        script_js_erb =
          RevealCK.template_path('index.html',
                                 'script.js.erb')
        template = Tilt.new(script_js_erb)
        template.render(self)
      end
    end
  end
end

Version data entries

25 entries across 25 versions & 1 rubygems

Version Path
reveal-ck-4.0.0 lib/reveal-ck/render/index_html_maker.rb
reveal-ck-3.9.2 lib/reveal-ck/render/index_html_maker.rb
reveal-ck-3.9.1 lib/reveal-ck/render/index_html_maker.rb
reveal-ck-3.9.0 lib/reveal-ck/render/index_html_maker.rb
reveal-ck-3.8.1 lib/reveal-ck/render/index_html_maker.rb
reveal-ck-3.8.0 lib/reveal-ck/render/index_html_maker.rb
reveal-ck-3.7.0 lib/reveal-ck/render/index_html_maker.rb
reveal-ck-3.6.0 lib/reveal-ck/render/index_html_maker.rb
reveal-ck-3.5.1 lib/reveal-ck/render/index_html_maker.rb
reveal-ck-3.5.0 lib/reveal-ck/render/index_html_maker.rb
reveal-ck-3.4.0 lib/reveal-ck/render/index_html_maker.rb
reveal-ck-3.3.1 lib/reveal-ck/render/index_html_maker.rb
reveal-ck-3.3.0 lib/reveal-ck/render/index_html_maker.rb
reveal-ck-3.2.0 lib/reveal-ck/render/index_html_maker.rb
reveal-ck-3.1.0 lib/reveal-ck/render/index_html_maker.rb
reveal-ck-3.0.1 lib/reveal-ck/render/index_html_maker.rb
reveal-ck-3.0.0 lib/reveal-ck/render/index_html_maker.rb
reveal-ck-0.6.2 lib/reveal-ck/render/index_html_maker.rb
reveal-ck-0.6.1 lib/reveal-ck/render/index_html_maker.rb
reveal-ck-0.6.0 lib/reveal-ck/render/index_html_maker.rb