Модуль:Infobox

Материал из ultracity
Перейти к навигации Перейти к поиску

local p = {};

function p.renderLine( frame ) local args = frame:getParent().args;

if args[ 'заголовок' ] and args[ 'заголовок' ] ~= then local style = ( args[ 'стиль_заголовков' ] or ) .. ( args[ 'стиль_заголовка' ] or ); local class = ( args[ 'класс' ] or ); if class ~= then class = ' class="' .. class .. '"'; end

return '\n\n' ..

args[ 'заголовок' ] ..

'\n'; end local text = args[ 'текст' ] or ; if args[ 'викиданные' ] and args[ 'викиданные' ] ~= then text = frame:expandTemplate{ title = 'Wikidata', args = { args[ 'викиданные' ], text, from = args[ 'from' ] or } }; end if text ~= then local label = args[ 'метка' ] or ; local class = args[ 'класс' ] or ; if class ~= 'noplainlist' then class = class .. ' plainlist'; end if class ~= then class = ' class="' .. class .. '"'; end local style = ( args[ 'стиль_текстов' ] or ) .. ( args[ 'стиль_текста' ] or ); if label == then style = 'text-align:center;' .. style; end if style ~= then style = ' style="' .. style .. '"'; end if label ~= then local labelClass = args[ 'класс_меток' ] or ; if labelClass ~= 'noplainlist' then labelClass = labelClass .. ' plainlist'; end if labelClass ~= then labelClass = ' class="' .. labelClass .. '"'; end local labelStyle = ( args[ 'стиль_меток' ] or ) .. ( args[ 'стиль_метки' ] or ); if labelStyle ~= then labelStyle = ' style="' .. labelStyle .. '"'; end return '\n\n<th' .. labelClass .. labelStyle .. '>' .. label .. '' .. '\n<td' .. class .. style .. '>\n' .. text .. '\n'; end return '\n\n\n' .. text .. '\n';

end

return ; end

return p;