Module:Workspace intro explained

local p =

function p.build(frame) local title = local intro = local image = local navigation = local color = '#6af' -- default value local displaymode = 'normal' -- default value for key, value in pairs(frame:getParent.args) do -- iterate through arguments, pick out values if key

'title' then title = value elseif key

'intro' then intro = value elseif key

'image' then image = value elseif key

'navigation' then navigation = value elseif key

'color' then color = value end end local current = mw.title.getCurrentTitle local current_ns = current.namespace local current_page = current.text

-- Rendering table of contents and body local body = ""

-- Adding header local header = "

" -- top container header = header .. "

" -- intro -- Adding project icon header = header .. "

" header = header .. image .. "

" -- Adding project title header = header .. "

" -- header header = header .. "

" .. title .. "

" -- Adding intro blurb header = header .. "

" header = header .. intro .. "

" -- Adding navigation header if navigation ~= then if mw.title.makeTitle('Template', navigation).exists

true then header = header .. frame:expandTemplate end end header = header .. "

" -- Adding member box if mw.title.makeTitle(current_ns, current_page .. '/Members').exists

true or mw.title.makeTitle(current_ns, current_page .. '/Participants').exists

true then header = header .. "

" header = header .. frame:expandTemplate header = header .. "

" end -- Closing off header header = header .. "

"

-- Return header return headerend

return p