mNo edit summary |
mNo edit summary |
||
Line 28: | Line 28: | ||
local x = math.cos(math.rad(i*10)) * 150 | local x = math.cos(math.rad(i*10)) * 150 | ||
local y = math.sin(math.rad(i*10)) * 150 | local y = math.sin(math.rad(i*10)) * 150 | ||
output = output .. [[<span style="position:absolute; margin-top:-50%; margin-left:50%; left:calc(]] .. x .. [[px); top:calc(]] .. y .. [[px);">]].. " | output = output .. [[<span style="position:absolute; margin-top:-50%; margin-left:50%; left:calc(]] .. x .. [[px - 30px); top:calc(]] .. y .. [[px - 30px);">]].. "[[Image:Pip.png|60px]]" .. [[</span>]] | ||
end | end | ||
return output .. "</div>" | return output .. "</div>" |
Revision as of 00:15, 18 November 2022
Documentation for this module may be created at Module:Tattoo/doc
local p = {} local cargo = mw.ext.cargo local commendations = { } function p.Main( frame ) local t = {} local tables = 'Commendations' local fields = 'Commendation, COUNT(*)' local args = { groupBy = 'Commendation', where = 'Recipient = "' .. frame.args[1] .. '" AND Approved = true' } local results = cargo.query( tables, fields, args ) local groups = {} for r = 1, #results do local r = results[r] groups[r.Commendation] = r["COUNT(*)"] end local output = "[[Image:Tattoo.png]]" .. [[<div style="position:relative;">]] for i=1, 36 do local x = math.cos(math.rad(i*10)) * 150 local y = math.sin(math.rad(i*10)) * 150 output = output .. [[<span style="position:absolute; margin-top:-50%; margin-left:50%; left:calc(]] .. x .. [[px - 30px); top:calc(]] .. y .. [[px - 30px);">]].. "[[Image:Pip.png|60px]]" .. [[</span>]] end return output .. "</div>" end return p
Categories:
No categories