Content added Content deleted
mNo edit summary |
mNo edit summary |
||
Line 5: | Line 5: | ||
function p.main(frame) |
function p.main(frame) |
||
local args = getArgs(frame) |
|||
local root = mw.html.create() |
local root = mw.html.create() |
||
Line 21: | Line 22: | ||
:css({ |
:css({ |
||
['display'] = 'flex', |
['display'] = 'flex', |
||
['flex-wrap'] = 'wrap' |
['flex-wrap'] = 'wrap', |
||
['gap'] = '20px' |
|||
}) |
}) |
||
:tag('div') |
:tag('div') |
||
:css({ |
|||
:wikitext('[[File:Stella2020 logo.png|280px]]') |
|||
['align-self'] = 'center' |
|||
}) |
|||
:wikitext(string.format( |
|||
'[[File:%s|280px]]', |
|||
args['image'] |
|||
)) |
|||
:done() |
:done() |
||
:tag('div') |
:tag('div') |
||
Line 38: | Line 46: | ||
['color'] = '#424362' |
['color'] = '#424362' |
||
}) |
}) |
||
:wikitext(string.format( |
|||
:wikitext("'''{{{Chapter}}}: <br />{{{English Title}}}<br />{{{Japanese Title}}}'''") |
|||
"'''%s:'''<br />'''%s'''<br />'''%s'''", |
|||
args['chapter'], |
|||
args['english'], |
|||
args['japanese'] |
|||
)) |
|||
:done() |
:done() |
||
:tag('div') |
:tag('div') |
Revision as of 02:38, 28 October 2021
Documentation for this module may be created at Module:Story info/doc
local getArgs = require('Module:Arguments').getArgs
local icons = require('Module:Icons')._main
local p = {}
function p.main(frame)
local args = getArgs(frame)
local root = mw.html.create()
local box_css = {
['color'] = '#424362',
['margin'] = '3px',
['margin-left'] = '0px',
['border'] = '2px solid #00cdba',
['border-radius'] = '10px',
['box-shadow'] = '2px 3px #00cdba',
['padding'] = '15px'
}
local top = root:tag('div')
:css(box_css)
:css({
['display'] = 'flex',
['flex-wrap'] = 'wrap',
['gap'] = '20px'
})
:tag('div')
:css({
['align-self'] = 'center'
})
:wikitext(string.format(
'[[File:%s|280px]]',
args['image']
))
:done()
:tag('div')
:css({
['flex-grow'] = 1,
['text-align'] = 'center',
})
:tag('div')
:css({
['border-bottom'] = '1px solid #00cdba',
['padding'] = '15px',
['border-top-right-radius'] = '6px',
['color'] = '#424362'
})
:wikitext(string.format(
"'''%s:'''<br />'''%s'''<br />'''%s'''",
args['chapter'],
args['english'],
args['japanese']
))
:done()
:tag('div')
:css({
['color'] = '#424362',
['padding'] = '10px',
['line-height'] = '2'
})
:wikitext("'''Characters that appear:'''<br/> {{{Charas}}}")
:done()
:done()
local bottom = root:tag('div')
:css(box_css)
:tag('div')
:wikitext("'''Translator:'''")
:wikitext("'''{{{Translator}}}'''")
:done()
:tag('div')
:wikitext("'''Source:'''")
:wikitext("'''{{{Source}}}'''")
:done()
return tostring(root)
end
return p