Sha256: 2e5e91cbeda4e9cf395014c8f3bae44487a70088709837bd08946df30dab10e1

Contents?: true

Size: 887 Bytes

Versions: 4

Compression:

Stored size: 887 Bytes

Contents

description  'XSLT filter which transforms a html page to a S5 presentation'
dependencies 'filters/xslt', 'utils/assets'
export_assets 'ui/**/*', 'ui/default/*'

Page.attributes do
  group :s5 do
    string :presdate
    string :author
    string :company
    string :theme
    string :transitions
    integer :fadeDuration
    integer :incrDuration
  end
end

class S5 < XSLT
  def configure(options)
    super(options.merge(:stylesheet => 's5/s5.xsl'))
  end

  def params(context)
    themes = Dir.glob(File.join(File.dirname(__FILE__), 'ui', '*')).map {|name| File.basename(name) }
    themes.delete('common')
    themes.delete('default')
    themes.unshift(context.page.attributes['theme'] || 'default')
    super.merge(context.page.attributes['s5'] || {}).
      merge('themes' => themes.join(' '), 's5_path' => build_path('_/assets/filter/s5'))
  end
end

Filter.register :s5, S5

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
olelo-0.9.3 plugins/filters/s5/main.rb
olelo-0.9.2 plugins/filters/s5/main.rb
olelo-0.9.1 plugins/filters/s5/main.rb
olelo-0.9.0 plugins/filters/s5/main.rb