Module:CustomStyling: Difference between revisions

From Idle Clans wiki
(Created page with "local p = {} function p.button(frame) -- Get parameters passed from the wiki page local args = frame.args local link = args[1] or "https://example.com" -- Default URL local text = args[2] or "Click Me" -- Default button text local color = args[3] or "#4CAF50" -- Default button color -- Return the HTML for a button return string.format('<a href="%s" style="display:inline-block;background-color:%s;color:white;padding:10px 20px;text-alig...")
 
(Blanked the page)
Tag: Blanking
 
Line 1: Line 1:
local p = {}


function p.button(frame)
    -- Get parameters passed from the wiki page
    local args = frame.args
    local link = args[1] or "https://example.com"  -- Default URL
    local text = args[2] or "Click Me"  -- Default button text
    local color = args[3] or "#4CAF50"  -- Default button color
   
    -- Return the HTML for a button
    return string.format('<a href="%s" style="display:inline-block;background-color:%s;color:white;padding:10px 20px;text-align:center;text-decoration:none;border-radius:5px;">%s</a>', link, color, text)
end
return p

Latest revision as of 14:34, 8 October 2024

Documentation for this module may be created at Module:CustomStyling/doc