Module:QuestDetails: Difference between revisions
Jump to navigation
Jump to search
Content added Content deleted
No edit summary |
No edit summary |
||
Line 2: | Line 2: | ||
function p.details(frame) |
function p.details(frame) |
||
local args = frame |
local args = frame.args |
||
local params = {} |
local params = {} |
||
Line 9: | Line 9: | ||
mw.smw.set(params) |
mw.smw.set(params) |
||
local requirements; |
|||
⚫ | |||
requirements = args[2] |
|||
else |
|||
requirements = 'None' |
|||
⚫ | |||
local |
local table = mw.html.create( 'table' ) |
||
table |
|||
⚫ | |||
:attr( 'class', 'wikitable plainlinks' ) |
|||
if (args[1]) then |
|||
:attr( 'cellspacing', '3' ) |
|||
⚫ | |||
:tag( 'tr' ) |
|||
⚫ | |||
:tag( 'td' ) |
|||
⚫ | |||
:tag( 'b' ) |
|||
⚫ | |||
:wikitext('Start Point') |
|||
end |
|||
:done() |
|||
:attr('style', 'vertical-align:top; width:15%; padding: 0 1em;') |
|||
return div |
|||
:done() |
|||
:tag( 'td' ) |
|||
:tag('p') |
|||
⚫ | |||
:done() |
|||
:attr('style', 'max-width:85%; width:auto; padding-left: 1em; padding-right: 2em;') |
|||
:done() |
|||
:done() |
|||
:tag( 'tr' ) |
|||
:tag( 'td' ) |
|||
:tag( 'b' ) |
|||
:wikitext('Requirements') |
|||
:done() |
|||
:attr('style', 'vertical-align:top; width:15%; padding: 0 1em;') |
|||
:done() |
|||
:tag( 'td' ) |
|||
:tag('p') |
|||
:wikitext( requirements ) |
|||
:done() |
|||
:attr('style', 'max-width:85%; width:auto; padding-left: 1em; padding-right: 2em;') |
|||
:done() |
|||
:done() |
|||
⚫ | |||
table |
|||
:tag( 'tr' ) |
|||
:tag( 'td' ) |
|||
:tag( 'b' ) |
|||
:wikitext('Recommended') |
|||
:done() |
|||
:attr('style', 'vertical-align:top; width:15%; padding: 0 1em;') |
|||
:done() |
|||
:tag( 'td' ) |
|||
:tag('p') |
|||
⚫ | |||
:done() |
|||
:attr('style', 'max-width:85%; width:auto; padding-left: 1em; padding-right: 2em;') |
|||
:done() |
|||
:done() |
|||
end |
|||
if (args[4]) then |
|||
table |
|||
:tag( 'tr' ) |
|||
:tag( 'td' ) |
|||
:tag( 'b' ) |
|||
:wikitext('Enemies') |
|||
:done() |
|||
:attr('style', 'vertical-align:top; width:15%; padding: 0 1em;') |
|||
:done() |
|||
:tag( 'td' ) |
|||
:tag('p') |
|||
⚫ | |||
:done() |
|||
:attr('style', 'max-width:85%; width:auto; padding-left: 1em; padding-right: 2em;') |
|||
:done() |
|||
:done() |
|||
end |
|||
table:done() |
|||
return tostring( table ) |
|||
end |
end |
||