Module:SiteList: Difference between revisions

115 bytes removed ,  22 July 2023
no edit summary
No edit summary
Tag: Reverted
No edit summary
Tag: Manual revert
 
if site then
local url = site.url
if args.sceneid then
url = site.updatesUrl .. args.sceneid .. '.html'
elseif args.id then
url = site.modelsUrl .. args.id .. '.html'
end
 
local alias = args.alias or mw.title.getCurrentTitle().text
local notes = args.notes and '<small><spandiv style="font-size: 0.875em;">' .. args.notes .. '</span></smalldiv>' or '<small><span>N/A</span></small><!-- comment -->'
local categoryLink = site.network and site.network ~= '' and string.format(' <small>([[:Category:%s|%s]])</small>', site.network, site.network) or '<small><span>N/A</span></small>'
 
local style
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<div style="display: none;">Hidden content</div>\n',
style,
args[1] == 'Studio' and 'Studio' or 'Website',
string.format('[%s %s] <small>([[:Category:%s|%s]])</small>', url, site.label, site.category, site.category),
categoryLink,
alias,
notes
)
)
 
local ns = mw.title.getCurrentTitle().namespace