Sha256: 8b6bb09a12be4f61facf129f3025dd99b3a31a7b81a704aae52e93a5315ba564
Contents?: true
Size: 1.31 KB
Versions: 1
Compression:
Stored size: 1.31 KB
Contents
# stdlib require 'rubygems' require 'fileutils' require 'erb' # ralbum require 'ralbum/options' require 'ralbum/skin' require 'ralbum/resource' class KwartzSkinEngine < SkinEngine def initialize( skin ) super( skin ) compile end def compile require 'gf_utilities/kwartzhelper' ralbum_verbose(1, "compile kwartz skin #{skin.skin_name}") skin_template_dir = File.join( skin.skin_dirname, "template" ) skin_template_include = File.join( skin.skin_dirname, "inc" ) skin_template_out = File.join( skin.skin_dirname, "out" ) if not File.directory?(skin_template_include) skin_template_include = nil end if not File.directory?(skin_template_out) FileUtils.mkpath( skin_template_out ) end kwartz_compile( skin_template_dir, skin_template_include, skin_template_out ) end def render_album_page(albumNode) require "ralbum/skins/#{skin.skin_name}/out/album_page" args = { :resource => Resource.new, :album => albumNode, } View.expand_album_page( args ) end def render_image_page(image_pool_node) require "ralbum/skins/#{skin.skin_name}/out/image_page" args = { :image => image_pool_node.image("default"), } View.expand_image_page( args ) end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
gf-ralbum-0.0.5 | lib/ralbum/skin_engines/kwartz_skin_engine.rb |