模块:沙盒/Kurgenera/IA

维基百科,自由的百科全书
跳转到导航 跳转到搜索
local p = {}

function p.render(frame)
    local html_parts = {}

    local container_style = table.concat({
        "position: relative;",
        "background: radial-gradient(circle at 50% 50%, #080916 0%, #010103 100%);",
        "color: #f1f5f9;",
        "border: 1px solid #111827;",
        "border-radius: 16px;",
        "padding: 160px 20px;",
        "text-align: center;",
        "box-shadow: inset 0 0 60px rgba(0, 0, 0, 1), 0 10px 40px rgba(0, 0, 0, 0.8);",
        "margin: 20px 0;",
        "overflow: hidden;",
        "font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;"
    }, " ")

    table.insert(html_parts, string.format('<div style="%s">', container_style))

    local star_templates = {
        { core = "#ffffff", glow = "rgba(255, 255, 255, 0.4)" },
        { core = "#e0f2fe", glow = "rgba(56, 189, 248, 0.35)" },
        { core = "#fef08a", glow = "rgba(234, 179, 8, 0.3)" },
        { core = "#fed7aa", glow = "rgba(249, 115, 22, 0.25)" }
    }

    for i = 1, 80 do
        local x = math.random(1, 99)
        local y = math.random(1, 98)
        local size = math.random(2, 4) 
        local opacity = math.random(3, 9) / 10
        local template = star_templates[math.random(1, #star_templates)]
        local star_bg = string.format("background: radial-gradient(circle, %s 0%%, %s 40%%, transparent 100%%);", template.core, template.glow)
        local star_style = string.format("position: absolute; left: %d%%; top: %d%%; width: %dpx; height: %dpx; %s border-radius: 50%%; opacity: %.1f; z-index: 1;", x, y, size, size, star_bg, opacity)
        table.insert(html_parts, string.format('<div style="%s"></div>', star_style))
    end

    local earth_image = "[[File:Earth in True Color from Himawari 9.png|450px|center|link=]]"
    local earth_style = table.concat({
        "position: absolute;",
        "bottom: -180px;",
        "left: -180px;",
        "width: 450px;",
        "height: 450px;",
        "z-index: 2;",
        "opacity: 0.65;",
        "pointer-events: none;"
    }, " ")
    table.insert(html_parts, string.format('<div style="%s">%s</div>', earth_style, earth_image))

    local mask_style = table.concat({
        "position: absolute;",
        "bottom: -200px;",
        "left: -200px;",
        "width: 500px;",
        "height: 500px;",
        "z-index: 3;",
        "background: radial-gradient(circle at 40% 40%, transparent 40%, rgba(8, 9, 22, 0.5) 55%, #010103 75%);",
        "filter: blur(20px);",
        "pointer-events: none;"
    }, " ")
    table.insert(html_parts, string.format('<div style="%s"></div>', mask_style))

    local angel_container_style = table.concat({
        "position: absolute;",
        "top: 25%;",
        "right: 20%;",
        "width: 1px;",
        "height: 1px;",
        "z-index: 20;",
        "display: flex;",
        "align-items: center;",
        "justify-content: center;",
        "overflow: visible;"
    }, " ")

    table.insert(html_parts, string.format('<div style="%s">', angel_container_style))
    table.insert(html_parts, "[[User:Kurgenera|")

    local angel_core_style = table.concat({
        "display: block;",
        "position: absolute;",
        "top: 50%;",
        "left: 50%;",
        "width: 70px;",
        "height: 70px;",
        "margin-top: -35px;",
        "margin-left: -35px;",
        "background: radial-gradient(circle, rgba(245, 169, 184, 1) 0%, rgba(245, 169, 184, 0.9) 20%, rgba(255, 255, 255, 0.95) 45%, rgba(91, 206, 250, 0.5) 70%, rgba(91, 206, 250, 0.2) 85%, rgba(91, 206, 250, 0.4) 90%, rgba(255, 255, 255, 0.95) 95%, transparent 100%);",
        "border-radius: 50%;",
        "z-index: 23;"
    }, " ")
    table.insert(html_parts, string.format('<span style="%s"></span>', angel_core_style))

    local white_halo_style = table.concat({
        "display: block;",
        "position: absolute;",
        "top: 50%;",
        "left: 50%;",
        "width: 180px;",
        "height: 180px;",
        "margin-top: -90px;",
        "margin-left: -90px;",
        "background: radial-gradient(circle, rgba(255, 255, 255, 0.25) 0%, rgba(255, 255, 255, 0.1) 35%, rgba(255, 255, 255, 0.03) 60%, transparent 85%);",
        "border-radius: 50%;",
        "z-index: 21;",
        "pointer-events: none;"
    }, " ")
    table.insert(html_parts, string.format('<span style="%s"></span>', white_halo_style))

    local outer_flare_style = table.concat({
        "display: block;",
        "position: absolute;",
        "top: 50%;",
        "left: 50%;",
        "width: 260px;",
        "height: 260px;",
        "margin-top: -130px;",
        "margin-left: -130px;",
        "background: radial-gradient(circle, rgba(255, 255, 255, 0.99) 0%, rgba(255, 255, 255, 0.22) 10%, rgba(255, 255, 255, 0.12) 50%, transparent 80%);",
        "border-radius: 50%;",
        "z-index: 22;",
        "pointer-events: none;"
    }, " ")
    table.insert(html_parts, string.format('<span style="%s"></span>', outer_flare_style))

    table.insert(html_parts, "]]")
    table.insert(html_parts, "</div>")

    local text_style = table.concat({
        "position: relative;",
        "z-index: 10;",
        "font-size: 1.6rem;",
        "font-weight: 200;",
        "letter-spacing: 6px;",
        "margin: 0;",
        "color: #ffffff;",
        "text-shadow: 0 0 12px rgba(255, 255, 255, 0.7), 0 0 25px rgba(129, 140, 248, 0.5);",
        "padding: 0 60px;"
    }, " ")
    
    local text_link = string.format(
        '[[主播女孩重度依赖|<span style="%s">THE INTERNET ANGEL Be INVOKED</span>]]',
        text_style
    )
    table.insert(html_parts, string.format('<p style="margin: 0;">%s</p>', text_link))

    table.insert(html_parts, "</div>")

    return table.concat(html_parts, "")
end

return p