Module:Recipe: Difference between revisions
No edit summary |
No edit summary |
||
| Line 451: | Line 451: | ||
end | end | ||
end | end | ||
--[[ | |||
local function renderKitchenwareSlot(category, body, args) | local function renderKitchenwareSlot(category, body, args) | ||
local kitchenware = getKitchenware(args) | local kitchenware = getKitchenware(args) | ||
| Line 474: | Line 474: | ||
nil | nil | ||
)) | )) | ||
end | |||
end | |||
--]] | |||
local function renderKitchenwareSlot(category, body, args) | |||
local kitchenware = getKitchenware(args) | |||
if #kitchenware == 0 then | |||
body:tag('div') | |||
:addClass('recipe_body_icon') | |||
:wikitext('➜') | |||
return | |||
end | |||
local slot = body:tag('div') | |||
:addClass('recipe_body_icon') | |||
:addClass('recipe_header_sub') | |||
for i, kitchenwareName in ipairs(kitchenware) do | |||
if i > 1 then | |||
slot:tag('span') | |||
:addClass('recipe_header_text') | |||
:wikitext(' / ') | |||
:done() | |||
end | |||
slot | |||
:tag('span'):addClass('mobileHide') | |||
:wikitext('[[File:Icon_' .. kitchenwareName .. '.png|35x35px|link=' .. kitchenwareName .. ']]'):done() | |||
:tag('span'):addClass('hidden') | |||
:wikitext('[[File:Icon_' .. kitchenwareName .. '.png|35x35px|link=' .. kitchenwareName .. ']]'):done() | |||
:tag('span'):addClass('recipe_header_text') | |||
:wikitext('[[' .. kitchenwareName .. ']]'):done() | |||
addUseCategory(category, kitchenwareName) | |||
end | end | ||
end | end | ||