Module:Sandbox: Difference between revisionsGive feedback
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
| Line 31: | Line 31: | ||
local item_name = frame.args[1] | local item_name = frame.args[1] | ||
if not item_name or item_name == '' then | if not item_name or item_name == '' then | ||
return "<span class='error'>No item name specified</span>" | return frame:preprocess("<span class='error'>No item name specified</span>") | ||
end | end | ||
local item = get_json_item(item_name) | local item = get_json_item(item_name) | ||
if not item then | if not item then | ||
return "<span class='error'>Item not found: " .. item_name .. "</span>" | return frame:preprocess("<span class='error'>Item not found: " .. item_name .. "</span>") | ||
end | end | ||
| Line 123: | Line 123: | ||
local infobox = string.format([=[ | local infobox = string.format([=[ | ||
<div class="infobox_item" style="float:right; display:inline-block; vertical-align:top;"> | <div class="infobox_item" style="float:right; display:inline-block; vertical-align:top;"> | ||
{| style="text-align:left; border-collapse:collapse; width:312px; max-width:100%% | {| class="wikitable" style="text-align:left; border-collapse:collapse; width:312px; max-width:100%%; color: #FFEFD7; padding:12px; font-family:'Retail Demo Regular',serif; %s" | ||
! colspan="4" | ! colspan="4" style="width:280px; padding:5px 12px; text-align:center; font-size:24px; font-family:'Retail Demo Bold',serif; %s">%s | ||
|- | |- | ||
| colspan=4 class="infobox-image" style="padding:5px; text-align:center;">[[File:%s.png|144px]] | | colspan=4 class="infobox-image" style="padding:5px; text-align:center;">[[File:%s.png|144px]] | ||
| Line 199: | Line 199: | ||
) | ) | ||
return infobox | -- Process the wikitext through the parser before returning | ||
return frame:preprocess(infobox) | |||
end | end | ||
return p | return p | ||