Module:Qud look: Difference between revisions

Jump to navigation Jump to search
447 bytes added ,  20:57, 10 August 2019
can now parse notxml
(Created page with "local p = {} local colorparse = require'Module:ColorParse' function p.qudlook(frame) local bordercolor local padding local bottomtext --[Determine border color]-- local bor...")
 
(can now parse notxml)
Line 7: Line 7:
local padding
local padding
local bottomtext
local bottomtext
--[determine notxml]--
local notxml = false
local notxmlin = frame.args.notxml
if notxmlin ~= nil then
  if notxmlin == 'yes' then
    notxml = true
  end
end


--[Determine border color]--
--[Determine border color]--
Line 22: Line 31:
--[Determine Title Color]--
--[Determine Title Color]--
local titlein= frame.args.title
local titlein= frame.args.title
local title = colorparse.moduleparse('&y'.. titlein)


--[Determine qud text]--
--[Determine qud text]--
local text = frame.args['text']
local text = frame.args['text']
local qudtext = frame:extensionTag{ name='poem', content=colorparse.moduleparse('&y' .. text) }


--[Determine body padding]--
--[Determine body padding]--
Line 45: Line 52:
   bottomtext= bottomin
   bottomtext= bottomin
end
end
local a = {}
 
local parsedbottomtext=colorparse.moduleparse('&Y'..bottomtext)
--[parse color]--
local title
local textcontent
local parsedbottomtext
if notxml == true then
  title = colorparse.modulenonxmlparse('&y'..titlein)
  textcontent=colorparse.modulenonxmlparse('&y' .. text)
  parsedbottomtext=colorparse.modulenonxmlparse('&Y'..bottomtext)
else
  title = colorparse.moduleparse('&y'.. titlein)
  textcontent=colorparse.moduleparse('&y' .. text)
  parsedbottomtext=colorparse.moduleparse('&Y'..bottomtext)
end
 
local qudtext = frame:extensionTag{ name='poem', content=textcontent }


--[Return html]--
--[Return html]--

Navigation menu