Редактирование: Модуль:Infobox
Перейти к навигации
Перейти к поиску
Примечание. Ваши правки будут показаны в статье только после их проверки участником с соответствующими правами.
Правка может быть отменена. Проверьте сравнение версий ниже и нажмите «Записать страницу».
Если отменяемые вами изменения не вандализм, пожалуйста, допишите причину в описании правки.
Текущая версия | Ваш текст | ||
Строка 11: | Строка 11: | ||
if yn(itt, true) then | if yn(itt, true) then | ||
text = text..' itemscope itemtype="https://schema.org/'..itt..'" class="infobox">' | text = text..' itemscope itemtype="https://schema.org/'..itt..'" class="infobox">' | ||
else | else | ||
text = text..' class="infobox">' | text = text..' class="infobox">' | ||
Строка 34: | Строка 34: | ||
if yn(args["подзаголовок"], true) then | if yn(args["подзаголовок"], true) then | ||
text = text..'<div class="infobox-subtitle">' | text = text..'<div class="infobox-subtitle">' | ||
if yn(args.itemprop2, true) then | if yn(args.itemprop2, true) then | ||
text = text..frame:expandTemplate{ title = 'lang-'..args["язык"], args = {'< | if yn(args["язык"], true) then | ||
text = text..frame:expandTemplate{ title = 'lang-'..args["язык"], args = {'<span itemprop="'..args.itemprop2..'">'..args["подзаголовок"]..'</span>' } } | |||
else | |||
text = text..'<span itemprop="'..args.itemprop2..'"><i>'..args["подзаголовок"]..'</i></span>' | |||
end | |||
else | else | ||
text = text..frame:expandTemplate{ title = 'lang-'..args["язык"], args = {'< | if yn(args["язык"], true) then | ||
text = text..frame:expandTemplate{ title = 'lang-'..args["язык"], args = { args["подзаголовок"] } } | |||
else | |||
text = text..'<span><i>'..args["подзаголовок"]..'</i></span>' | |||
end | |||
end | end | ||
text = text..'</div>' | text = text..'</div>' | ||
Строка 96: | Строка 103: | ||
end | end | ||
-- Generates | -- Generates a single row | ||
function p.rows(frame) | function p.rows(frame) | ||
local args = frame:getParent().args | local args = frame:getParent().args | ||
if args["условия"] == '' then return '' end | if args["условия"] == '' then return '' end | ||
local text = | local text = '<div class="infobox-data">' | ||
text = text..'<div class="infobox-data-value">\n\n'..(args["значение1"] or '')..'</div>' | |||
text = text..'<div class="infobox-data-value">\n\n'..(args["значение2"] or '')..'</div>' | |||
text = text..'<div class="infobox-data- | |||
text = text..'<div class="infobox-data- | |||
text = text..'</div>' | text = text..'</div>' | ||