Edge Rewrite
// HTMLRewriter · presentation

This page was redesigned at the edge.

Cloudflare fetched the original article and streamed it through HTMLRewriter to apply an entirely new visual system without rebuilding the source page.

Jump to content

Module:Autocryptidbox

From Wikipedia, the free encyclopedia
local p = {}

function p.main(frame)
    local args = frame:getParent().args
    local taxon = args["taxon"] or "Unknown cryptid"
    local image = args["image"] or ""
    local caption = args["image_caption"] or ""
    local parent = args["parent"] or "Cryptids"
    local first_sighting = args["first_sighting"] or "Unknown"
    local subdivisions = args["subdivisions"] or ""
    local country = args['country'] or ''


local output = '{| class="infobox" style="background-color:#FFCCCC;"\n'
 output = output .. "|-\n| colspan=\"2\" style=\"text-align:center;\" | '''" .. taxon .. "'''\n"
    if image ~= "" then
        output = output .. '|-\n| colspan="2" style="text-align:center;" | [[File:' .. image .. '|250px]]\n'
        output = output .. '|-\n| colspan="2" style="text-align:center;" | ' .. caption .. '\n'
        output = output .. "|-\n| colspan=\"2\" style=\"text-align:center; background-color:#FFCCCC;\" | '''" .. taxon .. "'''\n"
local output = '{| class="infobox" style="background-color:#FFCCCC;"\n'
country = country
    end
    output = output .. '|-\n| Parent || ' .. parent .. '\n'
    output = output .. '|-\n| First sighting || ' .. first_sighting .. '\n'
    if subdivisions ~= "" then
        output = output .. '|-\n| Subdivisions || ' .. subdivisions .. '\n'
    end
    output = output .. '|}'
output = output 
    return output
end


return p