Module:SiteList: Difference between revisions

42 bytes removed ,  22 July 2023
no edit summary
No edit summary
No edit summary
 
local alias = args.alias or mw.title.getCurrentTitle().text
local notes = args.notes and '<div style="font-size: 0.875em;">' .. args.notes .. '</div>' or '<div style="font-size: 0.875em;">N/A</div>'
local categoryLink = site.network and site.network ~= '' and string.format(' <small>([[:Category:%s|%s]])</small>', site.network, site.network) or ''
end
 
local result = string.format(
'|-\n| style="%s" | <span>%s</span>\n| style="text-align:center;vertical-align:middle;" | <span>%s</span>%s\n| style="text-align:center;vertical-align:middle;" | <span>%s</span>\n| style="text-align:center;vertical-align:middle;" | %s\n| style="width: 0px; padding: 0px; border: none;" |\n',
style,
args[1] == 'Studio' and 'Studio' or 'Website',
string.format('[%s %s] <small>([[:Category:%s|%s]])</small>', url, site.label, site.network, site.network),
categoryLink,
alias,
notes
)
)
 
local ns = mw.title.getCurrentTitle().namespace