Module:Quote

local p = {} local u = require('Module:Util')

function p.quote(frame) local position = { left = 'va-quotation-left', right = 'va-quotation-right', default = 'va-quotation-body' }

cssPos = frame.args['position'] cssPos = position[cssPos] if u.exists(cssPos) then cssPos = string.lower(cssPos) if cssPos == nil then cssPos = position['default'] end else cssPos = '' end

style = frame.args['style'] if u.exists(style) then styleSet = style else styleSet = '' end text = frame.args['text'] source = frame.args['source'] origin = frame.args['origin'] sourceOrigin = '' if u.exists(source) then sourceOrigin = source if u.exists(origin) then sourceOrigin = sourceOrigin .. ', ' .. origin end end -- \

sound = frame.args['sound'] if u.exists(sound) then soundFrame = mw.html.create('div') soundFrame:css('margin-top', '10px') :wikitext('') end --	result = mw.html.create('div') result:attr('role', 'figure') :addClass('va-quotation') :addClass(cssPos) :tag('span') :addClass('va-quotation-body') :tag('span') :addClass('va-quotation-quote') :tag('span') :addClass('va-quotation-quot-L') :wikitext('&ldquo;') :done :tag('span') :addClass('va-quotation-text') :cssText(styleSet) :wikitext(text) :done :tag('span') :addClass('va-quotation-quot-r') :wikitext('&rdquo;') :done :done :tag('span') :addClass('va-quotation-source') :wikitext('&mdash; ' .. sourceOrigin) :done :done :node(soundFrame) :done return result end

return p