卡厄思
梦
境
菜单
首页
回到首页
WIKI工具
全站样式
全站JS
修改导航栏
测试
沙盒
可视化管理器
战斗员管理器
卡牌管理器
伙伴管理器
装备管理器
词典管理器
图鉴
战斗员
伙伴
装备
怪物卡牌
中立卡牌
词典
小工具
配队模拟器
节奏榜生成器
搜索
链入页面
相关更改
特殊页面
页面信息
最近更改
登录
模块
查看“︁装备”︁的源代码
←
模块:装备
因为以下原因,您没有权限编辑该页面:
您请求的操作仅限属于该用户组的用户执行:
用户
您可以查看和复制此页面的源代码。
local equipment = {} local data = mw.loadData('Module:装备/data') function equipment.show(frame) local args = frame.args local name = args[1] or args.name local star = tonumber(args[2] or args.star or 1) if not name then return '<span style="color:red">未指定装备名</span>' end local eq = data[name] if not eq then return '<span style="color:red">装备「' .. name .. '」不存在</span>' end local base = eq.base local level = eq[tostring(star)] or eq["1"] if not level then star = 1; level = eq["1"] end local art = base.art or "relic_placeholder.png" local rarity = base.rarity or "蓝" local type_icon = "icon_equip_" .. (base.type or "武器") .. "_" .. rarity .. ".png" local value_type = base.value_type or "属性" local value = level.value or 0 local desc = level.desc_global or "" -- 星级图片 local star_img = "icon_star_rating_" .. star .. ".png" -- >>> 主卡片HTML + 弹窗HTML 一起输出 <<< local html = [=[ <div class="equipment-wrapper" style="display: inline-block; position: relative;"> <!-- 小卡片 --> <div class="equipment-card" style="position: relative; width:150px; height:230px; cursor: pointer;" onclick="openEquipPopup(this)"> <div style="position: absolute; top: 0px; left: 0px;">[[File:bg_equipment_rarity_]=] .. rarity .. [=[.png|150px|link=]]</div> <div style="position: absolute; top: 43px; left: 13px;">[[File:]=] .. art .. [=[|124px|link=]]</div> <div style="position: absolute; bottom: 5px; left: 5px; width: 140px; height: 35px; background-color: rgba(0,0,0,0.5); border-radius: 0px 0px 8px 8px"></div> <div style="position: absolute; bottom: 10px; left: 20px;">[[File:]=] .. star_img .. [=[|link=]]</div> <div style="position: absolute; top: 0px; left: 0px;">[[File:equipment_顶层蒙版.png|150px|link=]]</div> </div> <!-- 弹窗(默认隐藏) --> <div class="equipment-popup" style="display:none; position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%); z-index: 9999; width:368px; height:335px; background-color:#343434; border-radius:9px; padding:0; box-shadow:0 0 20px rgba(0,0,0,0.8);"> <div style="position: absolute; top: 8px; right: 12px; color:white; font-size:20px; font-weight:bold; cursor:pointer;" onclick="closeEquipPopup(this)">×</div> <div style="position: absolute; top: 0px; left: 0px;">[[File:bg_collection_rarity_]=] .. rarity .. [=[.png|link=]]</div> <div style="position: absolute; top: 40px; left: 128px;">[[File:]=] .. art .. [=[|124px|link=]]</div> <div style="position: absolute; top: 167px; left: 0px; width: 368px; height: 35px; background-color: rgba(0,0,0,0.5); border-radius: 0px 0px 8px 8px"></div> <div style="position: absolute; top: 173px; left: 128px;">[[File:]=] .. star_img .. [=[|link=]]</div> <div style="position: absolute; top: 205px; left: 5px; color: white;">[[File:]=] .. type_icon .. [=[|25px|link=]]</div> <div style="position: absolute; top: 209px; left: 33px; color: white; font-weight:bold;">]=] .. name .. [=[</div> <div style="position: absolute; top: 235px; left: 9px; width: 350px; height: 35px; background-color: rgba(255,255,255,0.3); border-radius: 2px"></div> <div style="position: absolute; top: 242px; left: 14px; color: white; font-size:14px;">]=] .. value_type .. [=[</div> <div style="position: absolute; top: 242px; right: 14px; color: white; font-size:14px; font-weight:bold;">]=] .. value .. [=[</div> <div style="position: absolute; top: 277px; left: 10px; width: 348px; color: white; font-size:13px; line-height:1.4; word-wrap:break-word;">]=] .. desc .. [=[</div> </div> <!-- 遮罩层 --> <div class="equipment-overlay" style="display:none; position:fixed; top:0; left:0; width:100%; height:100%; background:rgba(0,0,0,0.7); z-index:9998;" onclick="closeEquipPopup(this)"></div> </div> ]=] return html end equipment.main = equipment.show return equipment
该页面使用的模板:
模块:装备/doc
(
查看源代码
)
返回
模块:装备
。