模組:Infobox road
閱讀設定
模組解[開]
你可能想去為呢個Scribunto module開一個解版。 編者可以響呢個模組嘅沙盤 (開 | 鏡)同埋試例 (開)版度試驗佢。 請加個類到個/doc嘅細版度。 呢個模組嘅細版。 |
local p = {}
local getArgs = require('Module:Arguments').getArgs
function p.headerStyle(frame)
local args = getArgs(frame)
local deleted = args.decommissioned or args.deleted
if deleted then
return "background:#AAA;"
end
local colors = require"Module:Infobox road/color"
return colors.color(frame)
end
local function browse(args)
local previousRoute = args.previous_route
local nextRoute = args.next_route
local extended = args.browse
local box = mw.html.create('table'):cssText("width:100%; background:none; border-collapse:collapse")
if previousRoute or nextRoute then
local boxModule = require "Module:Road data/browse"
local primary = boxModule._browse(args)
box:wikitext(primary)
end
if extended then
box:wikitext(extended)
end
return tostring(box)
end
function p.browse(frame)
local args = getArgs(frame)
return browse(args)
end
return p