Module:SiteList: Difference between revisions

Jump to navigation Jump to search
349 bytes added ,  21 July 2023
no edit summary
No edit summary
No edit summary
local notes = args.notes or 'N/A'
 
-- Выбираем CSS стиль в зависимости от типа сайта
local result = string.format(
local style
'|-\n| style="text-align:center;vertical-align:middle;" | %s\n| style="text-align:center;vertical-align:middle;" | <span style="font-size:smaller;">[%s %s] ([[:Category:%s|%s]])</span>\n| style="text-align:center;vertical-align:middle;" | %s\n| style="text-align:center;vertical-align:middle;" | %s\n',
if args[1] == 'Studio' and 'Studio' or 'Website',then
style = 'background-color:#DADADA;text-align:center;color:black'
url, args.site, site.category, site.category,
alias, else
style = 'background-color:#E7E7E7;text-align:center;color:black'
notes
end
)
 
local result = string.format(
'|-\n| style="text-align:center;vertical-align:middle;%s" | %s\n| style="text-align:center;vertical-align:middle;" | <span style="font-size:smaller;">[%s %s] ([[:Category:%s|%s]])</span>\n| style="text-align:center;vertical-align:middle;" | %s\n| style="text-align:center;vertical-align:middle;" | %s\n',
style,
args[1] == 'Studio' and 'Studio' or 'Website',
string.format('[%s %s] <small>([[:Category:%s|%s]])</small>', url, args.site, site.category, site.category),
alias,
notes
)
 
-- Добавление в категории в зависимости от пространства имен

Navigation menu