- Welcome to the Kancolle Wiki!
- If you have any questions regarding site content, account registration, etc., please visit the KanColle Wiki Discord
Difference between revisions of "Module:ShipPageTests"
Jump to navigation
Jump to search
(Created page with "local ShipPage = require('Module:ShipPage') function Gallery(ship) return ShipPage.Gallery(nil, { explicit = { ship = ship }, implicit = {} }) end function GalleryTabber...") |
m (4 revisions imported) |
||
(3 intermediate revisions by one other user not shown) | |||
Line 6: | Line 6: | ||
function GalleryTabber(ship) | function GalleryTabber(ship) | ||
− | return ShipPage.GalleryTabber( | + | return ShipPage.GalleryTabber({ explicit = { ship = ship }, implicit = {} }) |
end | end | ||
Line 32: | Line 32: | ||
return frame:preprocess(table.concat(result, '\n')) | return frame:preprocess(table.concat(result, '\n')) | ||
end | end | ||
+ | |||
+ | return Tests |
Latest revision as of 12:47, 12 May 2021
Documentation for this module may be created at Module:ShipPageTests/doc
local ShipPage = require('Module:ShipPage')
function Gallery(ship)
return ShipPage.Gallery(nil, { explicit = { ship = ship }, implicit = {} })
end
function GalleryTabber(ship)
return ShipPage.GalleryTabber({ explicit = { ship = ship }, implicit = {} })
end
local Tests = {}
function Tests.GalleryAll(frame)
local ShipIterator = require('Module:ShipIterator')
local result = {}
for _, ship in ShipIterator.base() do
table.insert(result, '=[[' .. ship .. '/Gallery|' .. ship .. ']]=')
table.insert(result, Gallery(ship))
end
return frame:preprocess(table.concat(result, '\n'))
end
function Tests.GalleryTabberAll(frame)
local ShipIterator = require('Module:ShipIterator')
local result = {}
for _, ship in ShipIterator.base() do
table.insert(result, '===[[' .. ship .. '/Gallery|' .. ship .. ']]===')
table.insert(result, '<div class="ship-page-gallery" data-name="' .. ship .. '">')
table.insert(result, GalleryTabber(ship))
table.insert(result, '</div>')
end
return frame:preprocess(table.concat(result, '\n'))
end
return Tests