恪別𡧲版𢯢𢷮𧵑「模庉:Navbox」
Keepout2010 (討論 | 㨂𢵰) 造張㵋貝內容「-- -- Mô đun này hỗ trợ {{Navbox}} -- local p = {} local navbar = require('Module:Navbar')._navbar local getArgs -- lazily initialized local args local tableRowAdded = false local border local listnums = {} local function trim(s) return (mw.ustring.gsub(s, "^%s*(.-)%s*$", "%1")) end local function addNewline(s) if mw.ustring.match(s, '^[*:;#]') or mw.ustring.match(s, '^{|') then return '\n' .. s ..'\n' else return s end end…」 |
Keepout2010 (討論 | 㨂𢵰) n 𠊝替文本-「Thể loại:」成「體類:」 𥮋:𢯢𢷮移動 Mobile web edit |
||
| (空顯示2番版於𡧲𧵑共𠊛用) | |||
| 𣳔5: | 𣳔5: | ||
local p = {} | local p = {} | ||
local navbar = require(' | local navbar = require('模庉:Navbar')._navbar | ||
local getArgs -- lazily initialized | local getArgs -- lazily initialized | ||
| 𣳔49: | 𣳔49: | ||
-- also no show/hide link, then we need a spacer on the right to achieve the left shift. | -- also no show/hide link, then we need a spacer on the right to achieve the left shift. | ||
if args.state == 'plain' then spacerSide = 'right' end | if args.state == 'plain' then spacerSide = 'right' end | ||
elseif args.navbar == 'plain' or (not args.name and mw.getCurrentFrame():getParent():getTitle():gsub('/sandbox$', '') == ' | elseif args.navbar == 'plain' or (not args.name and mw.getCurrentFrame():getParent():getTitle():gsub('/sandbox$', '') == '板㑄:Hộp điều hướng') then | ||
-- No navbar. Need a spacer on the left to balance out the width of the show/hide link. | -- No navbar. Need a spacer on the left to balance out the width of the show/hide link. | ||
if args.state ~= 'plain' then spacerSide = 'left' end | if args.state ~= 'plain' then spacerSide = 'left' end | ||
| 𣳔290: | 𣳔290: | ||
for i, cat in ipairs(getTrackingCategories()) do | for i, cat in ipairs(getTrackingCategories()) do | ||
builder:wikitext('[[ | builder:wikitext('[[體類:' .. cat .. ']]') | ||
end | end | ||
end | end | ||
| 𣳔378: | 𣳔378: | ||
function p.navbox(frame) | function p.navbox(frame) | ||
if not getArgs then | if not getArgs then | ||
getArgs = require(' | getArgs = require('模庉:Arguments').getArgs | ||
end | end | ||
args = getArgs(frame, {wrappers = ' | args = getArgs(frame, {wrappers = '板㑄:Hộp điều hướng'}) | ||
-- Read the arguments in the order they'll be output in, to make references number in the right order. | -- Read the arguments in the order they'll be output in, to make references number in the right order. | ||