Editing Module:Recipe
Appearance
The edit can be undone.
Please check the comparison below to verify that this is what you want to do, and then publish the changes below to finish undoing the edit.
| Latest revision | Your text | ||
| Line 136: | Line 136: | ||
local function renderHeader(args, output, category) | local function renderHeader(args, output, category) | ||
local header = output:tag('div'):addClass(' | local header = output:tag('div'):addClass('recipe_header') | ||
local sType = args[param.sTypeArg] | local sType = args[param.sTypeArg] | ||
header:tag('span'):addClass(' | header:tag('span'):addClass('recipe_header_main') | ||
:tag('span'):addClass(' | :tag('span'):addClass('recipe_header_text'):wikitext('[[' .. sType .. ']]'):done() | ||
category:wikitext('[[Category:' .. sType .. ']]') | category:wikitext('[[Category:' .. sType .. ']]') | ||
| Line 224: | Line 224: | ||
end | end | ||
header:tag('span'):addClass(' | header:tag('span'):addClass('recipe_header_sub') | ||
:tag('span'):wikitext(' for '):done() | :tag('span'):wikitext(' for '):done() | ||
:tag('span'):addClass(' | :tag('span'):addClass('recipe_header_text'):wikitext(sTime):done() | ||
end | end | ||
| Line 236: | Line 236: | ||
local sCharName = args[param.sCharArg] | local sCharName = args[param.sCharArg] | ||
header:tag('span'):addClass(' | header:tag('span'):addClass('recipe_header_sub') | ||
:tag('span'):wikitext('[[File:' .. sCharName .. ' Icon.png|24x24px|link=' .. sCharName .. ']]'):done() | :tag('span'):wikitext('[[File:' .. sCharName .. ' Icon.png|24x24px|link=' .. sCharName .. ']]'):done() | ||
:tag('span'):addClass(' | :tag('span'):addClass('recipe_header_text'):wikitext('[[' .. sCharName .. ']]'):done() | ||
end | end | ||
| Line 248: | Line 248: | ||
local sKitchName = args[param.sKitchArg] | local sKitchName = args[param.sKitchArg] | ||
header:tag('span'):addClass(' | header:tag('span'):addClass('recipe_header_sub') | ||
:tag('span'):wikitext('[[File:' .. sKitchName .. ' Icon.png|24x24px|link=' .. sKitchName .. ']]'):done() | :tag('span'):wikitext('[[File:' .. sKitchName .. ' Icon.png|24x24px|link=' .. sKitchName .. ']]'):done() | ||
:tag('span'):addClass(' | :tag('span'):addClass('recipe_header_text'):wikitext('[[' .. sKitchName .. ']]'):done() | ||
end | end | ||
| Line 278: | Line 278: | ||
body | body | ||
:tag('div'):addClass(' | :tag('div'):addClass('recipe_body_icon') | ||
:wikitext('➜'):done() | :wikitext('➜'):done() | ||
:tag('div'):addClass(' | :tag('div'):addClass('recipe_body_yield') | ||
:node(yieldCard) | :node(yieldCard) | ||
end | end | ||
| Line 292: | Line 292: | ||
renderCharacter(args, header) | renderCharacter(args, header) | ||
local body = output:tag('div'):addClass(' | local body = output:tag('div'):addClass('recipe_body') | ||
local sSortDelim = param.sSortDelim | local sSortDelim = param.sSortDelim | ||
| Line 464: | Line 464: | ||
local function renderCookingTypeFallback(category, body, ingredient) | local function renderCookingTypeFallback(category, body, ingredient) | ||
local wrapper = body:tag('div') | local wrapper = body:tag('div') | ||
:addClass(' | :addClass('recipe_body_cooking_ingredient') | ||
:addClass(' | :addClass('recipe_body_cooking_type_cards') | ||
for _, typeName in ipairs(ingredient.types) do | for _, typeName in ipairs(ingredient.types) do | ||
| Line 487: | Line 487: | ||
local function renderCookingOptionCards(category, body, ingredient) | local function renderCookingOptionCards(category, body, ingredient) | ||
local wrapper = body:tag('div') | local wrapper = body:tag('div') | ||
:addClass(' | :addClass('recipe_body_cooking_ingredient') | ||
:addClass(' | :addClass('recipe_body_cooking_option_cards') | ||
for _, itemName in ipairs(ingredient.options) do | for _, itemName in ipairs(ingredient.options) do | ||
| Line 528: | Line 528: | ||
body | body | ||
:tag('div'):addClass(' | :tag('div'):addClass('recipe_body_icon') | ||
:wikitext('➜'):done() | :wikitext('➜'):done() | ||
:tag('div'):addClass(' | :tag('div'):addClass('recipe_body_yield') | ||
:node(yieldCard) | :node(yieldCard) | ||
end | end | ||
| Line 542: | Line 542: | ||
local body = output:tag('div') | local body = output:tag('div') | ||
:addClass(' | :addClass('recipe_body') | ||
:addClass(' | :addClass('recipe_body_cooking') | ||
local foundIngredient = false | local foundIngredient = false | ||
| Line 583: | Line 583: | ||
function p._main(args, frame) | function p._main(args, frame) | ||
local output = mw.html.create('div') | local output = mw.html.create('div') | ||
:addClass(' | :addClass('recipe_container') | ||
local category = mw.html.create() | local category = mw.html.create() | ||