Module:Loops

-- Module for various loops used in various templates on the wiki -- Author: KockaAdmiral, adapted by SandyTree in 2022 -- local p = {};

function template_args return mw.getCurrentFrame:getParent.args end

function p.dots(frame) local args = template_args local ret = '' for i, v in ipairs(args) do       ret = ret .. v .. ' • '   end ret = string.gsub(ret, ' • $', '') return ret end

function p.tags(frame) local args = template_args local ret = '' local style = frame.args['style'] for i, v in ipairs(args) do       ret = ret .. '' .. v .. ' '    end    ret = string.gsub(ret, ' • $', '')    return ret end

function p.pagetabs(frame) local args = template_args local ret = '' local basepagename = mw.title.getCurrentTitle.baseText local basepage = basepagename .. '/' or frame.args['basepage'] for i, v in ipairs(args) do   	local style = 'float:left; font-weight:bold; text-align:center; min-width:5.0em; max-width:15em; padding:.0em 0.5em; border:1.5px solid gray; border-radius:4px 4px 0px 0px; background:#DDD; margin-right:3px; ' ret = ret .. ' ' .. v .. ' ' end ret = string.gsub(ret, ' • $', '') return ret end

return p --