Module:Characters: Difference between revisions

Jump to navigation Jump to search
no edit summary
No edit summary
No edit summary
Line 7: Line 7:
orderBy = 'Characters.name_en ASC',
orderBy = 'Characters.name_en ASC',
}
}
if frame.args[1] == 'horsegirls' then
query.where = 'Characters.type="horsegirl"'
elseif frame.args[1] == 'other' then
query.where = 'NOT Characters.type="horsegirl"'
end
local fields = {'_pageName','name_en','icon','color_main','color_sub'}
local fields = {'_pageName','name_en','icon','color_main','color_sub'}
local characters = cargo.query('Characters',
local characters = cargo.query('Characters',
Line 13: Line 18:
local root = mw.html.create('div'):cssText('display:flex; flex-flow:row wrap; gap: 10px;')
local root = mw.html.create('div'):cssText('display:flex; flex-flow:row wrap; gap: 10px;')
for _, ch in ipairs(characters) do
for _, ch in ipairs(characters) do
if (ch.icon) then
if ch.icon then
local template = frame:expandTemplate{
local template = frame:expandTemplate{
title='Character Icon',
title='Character Icon',

Navigation menu