Module:Tabs

local p = {} local m = require("Module:Main")

function p.cell(link, pagename, min_width, width) local s = '' local class = ''

if not m.empty(link) then if pagename == m.break_link({link, 1}) then class = 'main_background2' else class = 'main_background4' end link = ""..link.."" s = ''..link..' ' end return s end

function p.lua_tabs(links, pagename, min_width, width, height, font_size) local s = '' if not m.empty(links) then for i = 1,#links do               if links[i] ~= nil and links[i] ~= '' then s = s..p.cell(links[i], pagename, min_width, width) end end s = ' ' end return s end

function p.tabs(frame) local links = { frame.args[1], frame.args[2], frame.args[3], frame.args[4], frame.args[5], frame.args[6], frame.args[7], frame.args[8], frame.args[9] } local pagename = frame.args["pagename"] local min_width = frame.args["min_width"] or '72px' local width = frame.args["width"] or 'auto' local height = frame.args["height"] or '2.5em' local font_size = frame.args["font_size"] or '100%' return p.lua_tabs(links, pagename, min_width, width, height, font_size) end

return p