Content added Content deleted
No edit summary |
No edit summary |
||
Line 17: | Line 17: | ||
{ name = 'romaji' }, |
{ name = 'romaji' }, |
||
{ name = 'english' }, |
{ name = 'english' }, |
||
{ name = ' |
{ name = 'duration' }, |
||
{ name = 'date' }, |
{ name = 'date' }, |
||
{ name = 'feat' } |
{ name = 'feat' } |
||
Line 50: | Line 50: | ||
:addRow( |
:addRow( |
||
{ |
{ |
||
⚫ | |||
{ |
|||
{ tag = 'argtd', content = 'duration', } |
|||
content = 'Length' |
|||
}, |
|||
{ |
|||
tag = 'argtd', |
|||
⚫ | |||
fn = DisplayFns.minutesAndSeconds |
|||
} |
|||
} |
} |
||
) |
) |
Revision as of 19:08, 18 May 2024
Documentation for this module may be created at Module:Infobox after talk/doc
local getArgs = require('Module:Arguments').getArgs
local InfoboxBuilder = require('Module:InfoboxBuilder')
local DisplayFns = require('Module:DisplayFunctions')
local ProcessingFns = require('Module:ProcessingFunctions')
local p = {}
function p.main(frame)
local args = frame:getParent().args
local infobox = InfoboxBuilder.new()
infobox:setName('Infobox after talk')
:setParams {
{ name = 'title', default = mw.title.getCurrentTitle().text },
{ name = 'image' },
{ name = 'japanese' },
{ name = 'romaji' },
{ name = 'english' },
{ name = 'duration' },
{ name = 'date' },
{ name = 'feat' }
}
:setArgs(args)
:processArgs()
infobox
:addHeader({ tag = 'argth', content = 'title' })
:addImage({
{ tag = 'argtd', content = 'image', fn = DisplayFns.image('220px') },
})
:addRow(
{
{ tag = 'th', content = 'Japanese' },
{ tag = 'argtd', content = 'japanese' }
}
)
:addRow(
{
{ tag = 'th', content = 'Romaji' },
{ tag = 'argtd', content = 'romaji' }
}
)
:addRow(
{
{ tag = 'th', content = 'English' },
{ tag = 'argtd', content = 'english' }
},
{ hideIfEmpty = { 'english' } }
)
:addHeader({ tag = 'th', content = 'Stream Information' }, { subheader = true })
:addRow(
{
{ tag = 'th', content = 'Duration' },
{ tag = 'argtd', content = 'duration', }
}
)
:addRow(
{
{ tag = 'th', content = 'Release date' },
{ tag = 'argtd', content = 'date' }
}
)
:addRow(
{
{ tag = 'th', content = 'Featuring' },
{ tag = 'argtd', content = 'feat' }
}
)
return infobox:tostring()
end
return p