Module:Sandbox/User:Alsang: Difference between revisions
Jump to navigation
Jump to search
Content added Content deleted
No edit summary |
No edit summary |
||
Line 79: | Line 79: | ||
end |
end |
||
function p.main3() |
|||
local query = '[[Category:Guardian Equipment]] AND [[Variant type::~*]]|?#-=name|limit=500' |
|||
local results = mw.smw.ask(query) |
|||
local out = mw.html.create('table') |
|||
:addClass('wikitable sortable') |
|||
for _,page in ipairs(results) do |
|||
out:tag('tr') |
|||
:tag('th') |
|||
:wikitext('[[' .. page.name .. ']]') |
|||
:done() |
|||
:tag('td') |
|||
:wikitext('[[File:' .. page.name .. ' (basic) dye.png]]') |
|||
:done() |
|||
:tag('td') |
|||
:wikitext('[[File:' .. page.name .. ' (moderate) dye.png]]') |
|||
:done() |
|||
:tag('td') |
|||
:wikitext('[[File:' .. page.name .. ' (fine) dye.png]]') |
|||
:done() |
|||
:tag('td') |
|||
:wikitext('[[File:' .. page.name .. ' (strong) dye.png]]') |
|||
:done() |
|||
:tag('td') |
|||
:wikitext('[[File:' .. page.name .. ' (superior) dye.png]]') |
|||
:done() |
|||
:tag('td') |
|||
:wikitext('[[File:' .. page.name .. ' (perfect) dye.png]]') |
|||
:done() |
|||
:done() |
|||
end |
|||
return out |
|||
end |
|||
return p |
return p |