class Psd2html::PsConvertor::Block
Public Instance Methods
css_skeleton()
click to toggle source
# File lib/psd2html/psconvertor/block.rb, line 5 def css_skeleton cssRenderData = { "classname" => "block-#{guid}", "styles" => { "position"=> "absolute", "display" => "inline-block", "width" => "#{@psNode.width}px", "height" => "#{@psNode.height}px", "left" => curleft, "top" => curtop, "z-index" => "#{@psNode.depth}#{@parentConvertor.childrenConvertors.length - @index.to_i}" } } cssRenderData = CSS_HASH_BASE.merge(cssRenderData) end
get_html_tpl()
click to toggle source
# File lib/psd2html/psconvertor/block.rb, line 21 def get_html_tpl "<{{tag}} {{#attributes}} {{key}}=\"{{value}}\" {{/attributes}}><div style=\"position:relative;\">{{{content}}}</div></{{tag}}>" end
html_skeleton()
click to toggle source
# File lib/psd2html/psconvertor/block.rb, line 24 def html_skeleton htmlRenderData = { "attributes" => { "class" => "block-#{guid}" }, "tag" => "div" } htmlRenderData = HTML_HASH_BASE.merge(htmlRenderData) end