細
編集の要約なし
template>Waiesu (モジュール:サンドボックス/Waiesu/sandbox oldid=60362600 から一部転記) |
template>Waiesu 細編集の要約なし |
||
9行目: | 9行目: | ||
local args = require('Module:Arguments').getArgs(frame, {parentOnly = true}) | local args = require('Module:Arguments').getArgs(frame, {parentOnly = true}) | ||
local child = (args.child == 'yes') | local child = (args.child == 'yes') | ||
local h = {subheader = {}, image = {}} | local h = {subheader = {{}}, image = {{}}} | ||
local body = {} | local body = {} | ||
local link = args.tnavbar or args.name | local link = args.tnavbar or args.name | ||
51行目: | 51行目: | ||
elseif string.match(k, 'caption%d+') then | elseif string.match(k, 'caption%d+') then | ||
local num = tonumber(string.match(k, '%d*$')) | local num = tonumber(string.match(k, '%d*$')) | ||
h['image'][num] = h['image'][num] or {} | |||
h['image'][num]['caption'] = '<div style="' .. (args.captionstyle or '') .. '">' .. v .. '</div>' | h['image'][num]['caption'] = '<div style="' .. (args.captionstyle or '') .. '">' .. v .. '</div>' | ||
end | end | ||
99行目: | 100行目: | ||
if h.image[1] then | if h.image[1] then | ||
for k, v in ipairs(h.image) do | for k, v in ipairs(h.image) do | ||
result = result .. row(nil, nil, nil, nil, v[1], v.style or h.image.style, h.image.class, v.rowclass, nil, nil, nil, nil, nil, nil, nil) | result = result .. row(nil, nil, nil, nil, v[1] and (v[1] .. (v.caption or '')), v.style or h.image.style, h.image.class, v.rowclass, nil, nil, nil, nil, nil, nil, nil) | ||
end | end | ||
end | end |