Line 1: |
Line 1: |
− | local format = require('Module:StringInterpolation').format
| |
− | local getArgs = require('Module:GetArgs')
| |
| local Formatting = require('Module:Formatting') | | local Formatting = require('Module:Formatting') |
| local EnemyShipInfoKai = require('Module:EnemyShipInfoKai') | | local EnemyShipInfoKai = require('Module:EnemyShipInfoKai') |
− | local ShipBattleCardKai = require('Module:ShipBattleCardKai')
| |
| | | |
| local EnemyShipInfoMini = EnemyShipInfoKai{ | | local EnemyShipInfoMini = EnemyShipInfoKai{ |
Line 74: |
Line 71: |
| end | | end |
| | | |
− | local collapsible_template = [[<div style="display:inline-block;">
| + | -- EnemyShipInfoMini.test = EnemyShipInfoMini:Infobox({"Destroyer I-Class"}) |
− | <div class="mw-customtoggle-${toggle_id}">
| |
− | {|class="wikitable" style="cursor: pointer; margin: auto; border: 1px solid darkgray;"
| |
− | | ${card_image}
| |
− | |}
| |
− | </div>
| |
− | <div class="mw-collapsible mw-collapsed" id="mw-customcollapsible-${toggle_id}">
| |
− | ${table}
| |
− | </div>
| |
− | </div>]]
| |
− | | |
− | function EnemyShipInfoMini.EnemyInfoboxMini(frame, args)
| |
− | local args = args or getArgs{frame = frame:getParent()}
| |
− | if args.id then
| |
− | args.link = "nil"
| |
− | return format{
| |
− | collapsible_template,
| |
− | toggle_id = args.id,
| |
− | card_image = ShipBattleCardKai:Asset(args),
| |
− | table = EnemyShipInfoMini:Infobox(args),
| |
− | }
| |
− | else
| |
− | return EnemyShipInfoMini:Infobox(args)
| |
− | end
| |
− | end
| |
− | | |
− | -- EnemyShipInfoMini.test = EnemyShipInfoMini.EnemyInfoboxMini(nil, {"Destroyer I-Class"})
| |
| | | |
| return EnemyShipInfoMini | | return EnemyShipInfoMini |