- Welcome to the Kancolle Wiki!
- If you have any questions regarding site content, account registration, etc., please visit the KanColle Wiki Discord
Difference between revisions of "Module:NihongoKai"
Jump to navigation
Jump to search
(Created page with "local getArgs = require('Module:GetArgs') local format = require('Module:StringInterpolation').format local NihongoKai = { _template = [[<span style="${style}" title="${t...") |
m (6 revisions imported) |
||
(5 intermediate revisions by 3 users not shown) | |||
Line 1: | Line 1: | ||
local getArgs = require('Module:GetArgs') | local getArgs = require('Module:GetArgs') | ||
− | local format = require('Module: | + | local format = require('Module:Core').format |
local NihongoKai = { | local NihongoKai = { | ||
Line 7: | Line 7: | ||
function NihongoKai:Main(args) | function NihongoKai:Main(args) | ||
− | return format{self._template, content = args[1], title = | + | local title = args[2] |
+ | if args[3] then title = title .. "
" .. args[3] end | ||
+ | return format{self._template, content = args[1], title = title, style = args["style"] or ""} | ||
end | end | ||
− | function NihongoKai.Begin( | + | function NihongoKai.Begin(frame) |
local args = getArgs{frame = frame:getParent()} | local args = getArgs{frame = frame:getParent()} | ||
return NihongoKai:Main(args) | return NihongoKai:Main(args) | ||
end | end | ||
+ | |||
+ | return NihongoKai |
Latest revision as of 12:32, 12 May 2021
Documentation for this module may be created at Module:NihongoKai/doc
local getArgs = require('Module:GetArgs')
local format = require('Module:Core').format
local NihongoKai = {
_template = [[<span style="${style}" title="${title}">${content}</span>]],
}
function NihongoKai:Main(args)
local title = args[2]
if args[3] then title = title .. "
" .. args[3] end
return format{self._template, content = args[1], title = title, style = args["style"] or ""}
end
function NihongoKai.Begin(frame)
local args = getArgs{frame = frame:getParent()}
return NihongoKai:Main(args)
end
return NihongoKai