Moduli:MP-Places
Appearance
-- Function to create an HTML element
function createItem(colorModifier, iconModifier, link, pageTitle)
return '<div class="mp-places-buttons -color-' .. colorModifier .. ' -icon-' .. iconModifier .. '">[[' .. link .. '|<div class="mp-places-buttons__title">' .. pageTitle .. '</div></div>]]'
end
-- Data for the MP places buttons
local data = {
createItem('blue', 'faq', 'Ndihmë:Pyetje_e_Përgjigje', 'Pyetje e Përgjigje'),
createItem('red', 'village-pump', 'Wikipedia:Kuvendi', 'Kuvendi'),
createItem('green', 'sandbox', 'Wikipedia:Livadhi', 'Livadhi'),
createItem('yellow', 'complains-office', 'Wikipedia:Vërejtje_e_Ankesa', 'Zyra e Ankesave')
}
-- Main function to generate the HTML for MP places buttons
function main(frame)
local result = '<div class="mp-grid">'
for i = 1, 4 do
result = result .. data[i]
end
result = result .. '</div>'
return result
end
-- Export the main function
return { main = main }