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 (too many pipes!) |
||
Line 3: | Line 3: | ||
| {{{grade|?}}} | | {{{grade|?}}} | ||
| {{#ifexpr: {{{maxingredients|}}} > 2 | | {{#ifexpr: {{{maxingredients|}}} > 2 | ||
|<!--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|}}} | |||
|<!--else fewer--> | |||
{{#if: {{{ingredient2|}}} | |||
|<!--then 2/3 ingredients--> — {{!}}class="ats-table-recipe-ingredients-options"{{!}} {{{ingredient1|Ingredient1}}} {{!}}class="ats-table-recipe-ingredients-options"{{!}} {{{ingredient2|Ingredient2}}} | |||
|<!--else 1/3 ingredients--> — {{!}}{{!}} — {{!}}class="ats-table-recipe-ingredients-options"{{!}} {{{ingredient1|Ingredient1}}} | |||
}} | |||
}} | }} | ||
|<!--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 1/2 ingredients--> — {{!}}class="ats-table-recipe-ingredients-options"{{!}} {{{ingredient1|Ingredient1}}} | |||
}} | |||
|<!--else 1 column--> | |||
{{#if: {{{ingredient1|}}} | |||
|<!--then 1/1 ingredients-->class="ats-table-recipe-ingredients-options"{{!}} {{{ingredient1|Ingredient1}}} | |||
|<!--then 0/1 ingredients--> — | |||
}} | |||
}} | }} | ||
}} | }} | ||
| {{{product|Product}}}</includeonly><noinclude> | | {{{product|Product}}}</includeonly><noinclude> | ||
Line 22: | Line 30: | ||
{{Recipe/view|caption=Recipe|maxingredients=1}} | {{Recipe/view|caption=Recipe|maxingredients=1}} | ||
{{Recipe/view/row | maxingredients=1 | building={{bl| | {{Recipe/view/row |maxingredients=1 | building={{bl|Cannery|medium}} | grade=2 | ingredient1 = 8 {{rl|Herbs|medium}} | product='''4''' {{rl|Biscuits|large}} }} | ||
|}</div> | |}</div> | ||
<!-- | |||
<hr> | <hr> | ||