Module:Recipe: Difference between revisions
Fixed ingredient amount rendering inside card-body instead of card-container. Adjusted card-text -> card-label to match Module:Card |
maybe fix quality mis-displaying |
||
| Line 396: | Line 396: | ||
local function renderCookingSplitTypeCard(category, body, ingredient) | local function renderCookingSplitTypeCard(category, body, ingredient) | ||
local qualityClass = getQualityClass(ingredient.quality) | |||
local container = body:tag('span') | local container = body:tag('span') | ||
:addClass('card-container') | :addClass('card-container') | ||
:addClass('recipe-type-split-card') | :addClass('recipe-type-split-card') | ||
local wrapper = container:tag('span') | local wrapper = container:tag('span') | ||
| Line 427: | Line 423: | ||
:wikitext(makeTypeIcon(ingredient.types[2])) | :wikitext(makeTypeIcon(ingredient.types[2])) | ||
:done() | :done() | ||
if qualityClass then | |||
imageContainer:addClass(qualityClass) | |||
end | |||
if tostring(ingredient.amount or '') ~= '' then | if tostring(ingredient.amount or '') ~= '' then | ||