Toggle menu
Toggle preferences menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

Join the Playtest on Steam Now: SpiritVale

Module:Definitions: Difference between revisions

From SpiritVale Wiki
No edit summary
No edit summary
Line 131: Line 131:
icon = trim(icon)
icon = trim(icon)


-- v1 default: no icon when blank
if icon == "" then
if icon == "" then
return '<span class="sv-def-icon" aria-hidden="true">i</span>'
return ""
end
end


Line 142: Line 143:
local t = mw.title.new(fileTitle)
local t = mw.title.new(fileTitle)
if not t or not t.exists then
if not t or not t.exists then
return '<span class="sv-def-icon" aria-hidden="true">?</span>'
-- Missing file: show '?' badge (no redlink image)
return '<span class="sv-def-icon sv-def-icon--missing" aria-hidden="true">?</span>'
end
end


return '<span class="sv-def-icon">[[' .. fileTitle .. '|16px|link=]]</span>'
-- Real file icon (no pill/circle wrapping)
return '<span class="sv-def-icon-img">[[' .. fileTitle .. '|16px|link=]]</span>'
end
end