Template:Recipe/view/row: Difference between revisions
From Against the Storm Official Wiki
< Template:Recipe | view
m (adding table cell classes for styling ingredient-options) |
m (Replacing examples with reserved template warning) |
||
(3 intermediate revisions by the same user not shown) | |||
Line 2: | Line 2: | ||
| {{{building|Building}}} | | {{{building|Building}}} | ||
| {{{grade|?}}} | | {{{grade|?}}} | ||
{{#ifexpr: {{{maxingredients|}}} > 2 | |||
|<!--then 3 columns--> {{#if: {{{ingredient3|}}} | |<!--then 3 columns--> | ||
{{#if: {{{ingredient3|}}} | |||
|<!--then 3/3 ingredients--> | |||
{{!}}class="ats-table-recipe-ingredients-options"{{!}} {{{ingredient1|Ingredient1}}} | |||
{{!}}class="ats-table-recipe-ingredients-options"{{!}} {{{ingredient2|Ingredient2}}} | |||
{{!}}class="ats-table-recipe-ingredients-options"{{!}} {{{ingredient3|Ingredient3}}} | |||
|<!--else 0-1-2/3 ingredients--> | |||
{{#if: {{{ingredient2|}}} | |||
|<!--then 2/3 ingredients--> | |||
{{!}} — | |||
{{!}}class="ats-table-recipe-ingredients-options"{{!}} {{{ingredient1|Ingredient1}}} | |||
{{!}}class="ats-table-recipe-ingredients-options"{{!}} {{{ingredient2|Ingredient2}}} | |||
|<!--else 0-1/3 ingredients--> | |||
{{#if: {{{ingredient1|}}} | |||
|<!--then 1/3 ingredients--> | |||
{{!}} — | |||
{{!}} — | |||
{{!}}class="ats-table-recipe-ingredients-options"{{!}} {{{ingredient1|Ingredient1}}} | |||
|<!--else 0/3 ingredients--> | |||
{{!}} — | |||
{{!}} — | |||
{{!}} — | |||
}} | |||
}} | |||
}} | }} | ||
|<!--else fewer--> {{#ifexpr: {{{maxingredients|}}} > 1 | |<!--else fewer than 3 columns--> | ||
{{#ifexpr: {{{maxingredients|}}} > 1 | |||
|<!--then 2 columns--> | |||
{{#if: {{{ingredient2|}}} | |||
}} | |<!--then 2/2 ingredients--> | ||
{{!}}class="ats-table-recipe-ingredients-options"{{!}} {{{ingredient1|Ingredient1}}} | |||
{{!}}class="ats-table-recipe-ingredients-options"{{!}} {{{ingredient2|Ingredient2}}} | |||
|<!--else 0-1/2 ingredients--> | |||
{{#if: {{{ingredient1|}}} | |||
|<!--then 1/2 ingredients--> | |||
{{!}} — | |||
{{!}}class="ats-table-recipe-ingredients-options"{{!}} {{{ingredient1|Ingredient1}}} | |||
|<!--then 0/2 ingredients--> | |||
{{!}} — | |||
{{!}} — | |||
}} | |||
}} | |||
|<!--else 1 column--> | |||
{{#if: {{{ingredient1|}}} | |||
|<!--then 1/1 ingredients--> | |||
{{!}}class="ats-table-recipe-ingredients-options"{{!}} {{{ingredient1|Ingredient1}}} | |||
|<!--else 0/1 ingredients--> | |||
{{!}} — | |||
}} | |||
}} | }} | ||
}} | |||
| {{{product|Product}}}</includeonly><noinclude> | | {{{product|Product}}}</includeonly><noinclude> | ||
{{ | {{Template:Reserved_template_warning}} | ||
[[Category: Reserved templates]] | [[Category: Reserved templates]] | ||
</noinclude> | </noinclude> |
Latest revision as of 17:05, 8 November 2024
Templates in the Reserved templates subcategory are NOT intended to be used directly by article authors.
These templates are reserved for special pages, meta pages, and automated by Lua modules.
Please reach out to the wiki community for alternatives before you use these templates on your pages.