infobox

Для документации этого модуля может быть создана страница Модуль:Infobox/doc

local p = {};  local yesno = require('Module:Yesno')  local function _renderLine( frame, args, i ) if args[ 'заголовок' .. i ] and args[ 'заголовок' .. i ] == '-' then return '' elseif args[ 'заголовок' .. i ] and args[ 'заголовок' .. i ] ~= '' then local style = ( args[ 'стиль_заголовков' ] or '' ) .. ( args[ 'стиль_заголовка' .. i ] or '' ); local class = ( args[ 'класс' .. i ] or '' ); return '\n\n.. class .. '" style="' .. style .. '">' .. args[ 'заголовок' .. i ] .. '\n'; end  if args[ 'блок' .. i ] and args[ 'блок' .. i ] ~= '' then return args[ 'блок' .. i ]; end  local text = args[ 'текст' .. i ] or ''; if args[ 'викиданные' .. i ] and args[ 'викиданные' .. i ] ~= '' then text = frame:expandTemplate{ title = 'Wikidata', args = { args[ 'викиданные' .. i ], text, from = args[ 'from' ] or '' } }; end      if text ~= '' then local label = args[ 'метка' .. i ] or '';      local class = args[ 'класс' .. i ] or '';     if string.find(class, 'noplainlist') == nil and string.find(class, 'nofirstlevel') == nil then     class = class .. ' plainlist';     end     if class ~= '' then class = ' class="duhoc-mdf ' .. class .. '"';     end      local style = ( args[ 'стиль_текстов' ] or '' ) .. ( args[ 'стиль_текста' ] or '' ) .. ( args[ 'стиль_текста' .. i ] 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 string.find(labelClass, 'noplainlist') == nil and string.find(labelClass, 'nofirstlevel') == nil then     labelClass = labelClass .. ' plainlist'; end     if labelClass ~= '' then     labelClass = ' class="duhoc-mdf ' .. labelClass .. '"'; end      local labelStyle = ( args[ 'стиль_меток' ] or '' ) .. ( args[ 'стиль_метки' .. i ] or '' );     if labelStyle ~= '' then     labelStyle = ' style="' .. labelStyle .. '"'; end  return '\n\n .. labelClass .. labelStyle .. '>' .. label .. '' ..     '\n .. class .. style .. '>\n' .. text .. '\n'; end      return '\n\n .. class .. style .. '>\n' .. text .. '\n'; end          return ''; end  local function maxNumber ( args ) local maxNumber = 0 for argName, _ in pairs(args) do local argNumber = mw.ustring.match(argName, '^[^0-9]+([0-9]+)$') if argNumber and tonumber(argNumber) > maxNumber then maxNumber = tonumber(argNumber) end end return maxNumber end  function p.renderLine( frame ) local args = frame:getParent().args; return _renderLine(frame, args, '') end  function p.renderLines( frame ) local args = frame:getParent().args;  local res = '' local header, text = '', ''  local autoHeaders = yesno(args [ 'автозаголовки' ] or 'false', false)  for i = 1, maxNumber(args) do if args[ 'заголовок' .. i ] and args[ 'заголовок' .. i ] ~= '' then if text ~= '' or not autoHeaders then res = res .. header .. text end header, text = _renderLine(frame, args, i), '' else text = text .. _renderLine(frame, args, i) end end if text ~= '' or not autoHeaders then res = res .. header .. text end  return res end  return p; 

Tags:

🔥 Trending searches on Wiki Мокшень (Mokshanj Kälj):

185620071850Индиянь оцюведьМорсь1990Азербайджан1929Марлю1744КизаДхармаИнформатикасьИсториясь1913ПряошецКатовицеЛитва1822ЯпонмасторАзия19401964НикосияПомидорКитайЁрШяйсь191217171908Буэнос-АйрэсЛисабонКоми Республикась1955ИндонэзияМозамбикУкраина1712Гимнась19671975Адольф ГитлерЛаосМаксим БебанФедерациясьКаракас20221455ЛофцаВаршава1925ТюсПольдязНедерланттГори1950ТяшксАлжирия13851625Шиньмадомаширень Африкась19571938Шееронь карьксЛишме (смусть)1738КовгярькссьЛахти🡆 More