Jump to content

Module:User:Poster Nutbag/SandboxModule

From Wikipedia, the free encyclopedia

This is the current revision of this page, as edited by Poster Nutbag (talk | contribs) at 06:00, 2 December 2023 (Created page with 'local p = {} -- Function to generate spinning line HTML/CSS function p.generateSpinningLine(frame) local frequency = tonumber(frame.args[1]) or 0.25 -- Default frequency if not provided local angle = 360 * frequency local html = mw.html.create('div') :addClass('spinning-line') :css('transform', 'rotate(' .. angle .. 'deg);') :done() return tostring(html) end return p'). The present address (URL) is a permanent link to this version.

(diff) ← Previous revision | Latest revision (diff) | Newer revision → (diff)
local p = {}

-- Function to generate spinning line HTML/CSS
function p.generateSpinningLine(frame)
    local frequency = tonumber(frame.args[1]) or 0.25 -- Default frequency if not provided
    local angle = 360 * frequency
    local html = mw.html.create('div')
        :addClass('spinning-line')
        :css('transform', 'rotate(' .. angle .. 'deg);')
        :done()
    
    return tostring(html)
end

return p