Nie podano opisu zmian |
Nie podano opisu zmian |
||
Linia 73: | Linia 73: | ||
:done() |
:done() |
||
:tag('default') |
:tag('default') |
||
− | :wikitext( |
+ | :wikitext(card.frakcja) |
:done() |
:done() |
||
:done() |
:done() |
||
:tag('data') |
:tag('data') |
||
:tag('label') |
:tag('label') |
||
− | :wikitext(' |
+ | :wikitext('Kolor') |
:done() |
:done() |
||
:tag('default') |
:tag('default') |
||
− | :wikitext( |
+ | :wikitext(card.kolor) |
:done() |
:done() |
||
:done() |
:done() |
||
:tag('data') |
:tag('data') |
||
:tag('label') |
:tag('label') |
||
− | :wikitext(' |
+ | :wikitext('Rzadkość') |
:done() |
:done() |
||
:tag('default') |
:tag('default') |
||
− | :wikitext( |
+ | :wikitext(card.rzadkosc) |
:done() |
:done() |
||
:done() |
:done() |
||
:tag('data') |
:tag('data') |
||
:tag('label') |
:tag('label') |
||
− | :wikitext(' |
+ | :wikitext('Rodzaj') |
:done() |
:done() |
||
:tag('default') |
:tag('default') |
||
− | :wikitext( |
+ | :wikitext(card.rodzaj) |
:done() |
:done() |
||
:done() |
:done() |
||
:tag('data') |
:tag('data') |
||
:tag('label') |
:tag('label') |
||
− | :wikitext(' |
+ | :wikitext('Siła') |
:done() |
:done() |
||
:tag('default') |
:tag('default') |
||
− | :wikitext( |
+ | :wikitext(card.sila) |
:done() |
:done() |
||
:done() |
:done() |
||
:tag('data') |
:tag('data') |
||
:tag('label') |
:tag('label') |
||
− | :wikitext(' |
+ | :wikitext('Werbunek') |
:done() |
:done() |
||
:tag('default') |
:tag('default') |
||
− | :wikitext( |
+ | :wikitext(card.werbunek) |
:done() |
:done() |
||
:done() |
:done() |
||
:tag('data') |
:tag('data') |
||
:tag('label') |
:tag('label') |
||
− | :wikitext(' |
+ | :wikitext('Zestaw Kart') |
:done() |
:done() |
||
:tag('default') |
:tag('default') |
||
− | :wikitext( |
+ | :wikitext(card.zestaw) |
:done() |
:done() |
||
:done() |
:done() |
||
:tag('data') |
:tag('data') |
||
:tag('label') |
:tag('label') |
||
− | :wikitext(' |
+ | :wikitext('Kategorie') |
:done() |
:done() |
||
:tag('default') |
:tag('default') |
||
− | :wikitext( |
+ | :wikitext(card.kategorie) |
:done() |
:done() |
||
:done() |
:done() |
||
:tag('data') |
:tag('data') |
||
:tag('label') |
:tag('label') |
||
− | :wikitext(' |
+ | :wikitext('Powiązane') |
:done() |
:done() |
||
:tag('default') |
:tag('default') |
||
− | :wikitext( |
+ | :wikitext(card.powiazane) |
:done() |
:done() |
||
:done() |
:done() |
||
:tag('data') |
:tag('data') |
||
:tag('label') |
:tag('label') |
||
− | :wikitext(' |
+ | :wikitext('Artysta') |
:done() |
:done() |
||
:tag('default') |
:tag('default') |
||
− | :wikitext( |
+ | :wikitext(card.artysta) |
:done() |
:done() |
||
:done() |
:done() |
Wersja z 12:11, 16 lut 2019
Dokumentacja dla tego modułu może zostać utworzona pod nazwą Moduł:Karta/opis
local p = {}
local data = mw.loadData('Module:Karty')
function p.main(frame)
local title = frame.args[1] or mw.title.getCurrentTitle().text
local card = data[title]
if not card then
return 'Nie znaleziono karty "'..title..'".'
end
local image = title:gsub(':', ''):gsub(' ', '_') .. '.png'
local art = title:gsub(':', ''):gsub(' ', '_') .. '_Art.jpg'
local premium = title:gsub(':', ''):gsub(' ', '_') .. '_Premium.gif'
local infobox = mw.html.create('infobox'):attr('type', 'card')
infobox
:tag('title')
:tag('default')
:wikitext(title)
:done()
:done()
:tag('group')
:attr('name', 'content')
:tag('group')
:attr('name', 'image')
:tag('panel')
:tag('section')
:tag('label')
:wikitext('Karta')
:done()
:tag('image')
:tag('default')
:wikitext(image)
:done()
:done()
:done()
:tag('section')
:tag('label')
:wikitext('Obraz')
:done()
:tag('image')
:tag('default')
:wikitext(art)
:done()
:done()
:done()
:tag('section')
:tag('label')
:wikitext('Premium')
:done()
:tag('image')
:tag('default')
:wikitext(premium)
:done()
:done()
:done()
:done()
:done()
:tag('group')
:attr('name', 'data')
:tag('panel')
:tag('section')
:tag('label')
:wikitext('Informacje')
:done()
:tag('group')
:tag('data')
:tag('label')
:wikitext('Frakcja')
:done()
:tag('default')
:wikitext(card.frakcja)
:done()
:done()
:tag('data')
:tag('label')
:wikitext('Kolor')
:done()
:tag('default')
:wikitext(card.kolor)
:done()
:done()
:tag('data')
:tag('label')
:wikitext('Rzadkość')
:done()
:tag('default')
:wikitext(card.rzadkosc)
:done()
:done()
:tag('data')
:tag('label')
:wikitext('Rodzaj')
:done()
:tag('default')
:wikitext(card.rodzaj)
:done()
:done()
:tag('data')
:tag('label')
:wikitext('Siła')
:done()
:tag('default')
:wikitext(card.sila)
:done()
:done()
:tag('data')
:tag('label')
:wikitext('Werbunek')
:done()
:tag('default')
:wikitext(card.werbunek)
:done()
:done()
:tag('data')
:tag('label')
:wikitext('Zestaw Kart')
:done()
:tag('default')
:wikitext(card.zestaw)
:done()
:done()
:tag('data')
:tag('label')
:wikitext('Kategorie')
:done()
:tag('default')
:wikitext(card.kategorie)
:done()
:done()
:tag('data')
:tag('label')
:wikitext('Powiązane')
:done()
:tag('default')
:wikitext(card.powiazane)
:done()
:done()
:tag('data')
:tag('label')
:wikitext('Artysta')
:done()
:tag('default')
:wikitext(card.artysta)
:done()
:done()
:done()
:done()
:done()
:done()
:done()
local markup = tostring(infobox)
return mw.getCurrentFrame():preprocess(markup)
end
return p