Modül:InfoboxQuest
Bu modül için bir Modül:InfoboxQuest/belge belgelendirmesi oluşturabilirsiniz
-- Modül:InfoboxQuest — WikiKod (RuneScape tarzı görev kutusu)
local p = {}
local function row(label, value)
if not value or value == '' then return '' end
return string.format('<tr><th>%s</th><td>%s</td></tr>', label, value)
end
function p.kutu(frame)
local args = frame:getParent().args
local html = {}
table.insert(html, '<table class="infobox questbox">')
table.insert(html, '<caption>' .. (args['isim'] or args['başlık'] or 'Görev') .. '</caption>')
-- Resim (isteğe bağlı)
if args['resim'] then
table.insert(html, '<tr><td colspan="2" style="text-align:center;">[[Dosya:' .. args['resim'] .. '|250px]]</td></tr>')
end
table.insert(html, row('Zorluk', args['zorluk']))
table.insert(html, row('Uzunluk', args['uzunluk']))
table.insert(html, row('Başlatan', args['başlatan']))
table.insert(html, row('Yer', args['yer']))
table.insert(html, row('Gereksinimler', args['gereksinimler']))
table.insert(html, row('Ödüller', args['ödüller']))
table.insert(html, row('Devam Görevi', args['devam']))
table.insert(html, row('Durum', args['durum'] or 'Tamamlanabilir'))
table.insert(html, row('Notlar', args['not']))
table.insert(html, '</table>')
return table.concat(html)
end
return p