Шаблон:Recipe: различия между версиями

Материал из МК14 | Space Station 14 Wiki
Нет описания правки
Нет описания правки
Строка 4: Строка 4:
<!-- НАЗВАНИЕ -->
<!-- НАЗВАНИЕ -->
<div style="background:#1b1b1b; min-height:42px; display:flex; align-items:center; justify-content:center; padding:0 20px; box-sizing:border-box; box-shadow:inset 0 1px 2px rgba(255,255,255,0.06), inset 0 -2px 3px rgba(0,0,0,0.45); border-bottom:1px solid rgba(255,255,255,0.04);">
<div style="background:#1b1b1b; min-height:42px; display:flex; align-items:center; justify-content:center; padding:0 20px; box-sizing:border-box; box-shadow:inset 0 1px 2px rgba(255,255,255,0.06), inset 0 -2px 3px rgba(0,0,0,0.45); border-bottom:1px solid rgba(255,255,255,0.04);">
<div style="font-size:18px; font-weight:bold; color:#eee; text-align:center; line-height:22px;">
<div style="font-size:18px; font-weight:bold; color:#eee; text-align:center; line-height:22px;">
{{{title|Рецепт}}}
{{{title|Рецепт}}}
</div>
</div>
</div>
</div>


<!-- ОСНОВНАЯ ЧАСТЬ -->
<!-- ОСНОВНАЯ ЧАСТЬ -->
<div style="display:inline-flex; align-items:center; justify-content:center; gap:24px; padding:12px 20px; box-sizing:border-box; flex-wrap:wrap;">
<div style="display:inline-flex; align-items:center; justify-content:center; gap:24px; padding:12px 20px; box-sizing:border-box;">


<!-- ИНГРЕДИЕНТЫ -->
<!-- ИНГРЕДИЕНТЫ -->
Строка 18: Строка 20:
{{#if:{{{ingredient1_name|}}}|
{{#if:{{{ingredient1_name|}}}|
<div style="display:flex; flex-direction:column; align-items:center; width:75px;">
<div style="display:flex; flex-direction:column; align-items:center; width:75px;">
<div style="width:63px; height:63px; background:#555; border-radius:8px; display:flex; align-items:center; justify-content:center; overflow:hidden; box-shadow:inset 2px 2px 3px rgba(255,255,255,0.08), inset -2px -2px 3px rgba(0,0,0,0.35);">
<div style="width:63px; height:63px; background:#555; border-radius:8px; display:flex; align-items:center; justify-content:center; overflow:hidden; box-shadow:inset 2px 2px 3px rgba(255,255,255,0.08), inset -2px -2px 3px rgba(0,0,0,0.35);">
[[File:{{{ingredient1_img}}}|40px]]
[[File:{{{ingredient1_img}}}|40px]]
</div>
</div>
<div style="font-size:14px; color:#ddd; text-align:center; margin-top:8px; line-height:18px;">
<div style="font-size:14px; color:#ddd; text-align:center; margin-top:8px; line-height:18px;">
{{{ingredient1_name}}}{{#if:{{{ingredient1_amount|}}}|&nbsp;[{{{ingredient1_amount}}}]|}}
{{{ingredient1_name}}}{{#if:{{{ingredient1_amount|}}}|&nbsp;[{{{ingredient1_amount}}}]|}}
</div>
</div>
</div>
</div>
|}}
|}}
Строка 30: Строка 35:
{{#if:{{{ingredient2_name|}}}|
{{#if:{{{ingredient2_name|}}}|
<div style="display:flex; flex-direction:column; align-items:center; width:75px;">
<div style="display:flex; flex-direction:column; align-items:center; width:75px;">
<div style="width:63px; height:63px; background:#555; border-radius:8px; display:flex; align-items:center; justify-content:center; overflow:hidden; box-shadow:inset 2px 2px 3px rgba(255,255,255,0.08), inset -2px -2px 3px rgba(0,0,0,0.35);">
<div style="width:63px; height:63px; background:#555; border-radius:8px; display:flex; align-items:center; justify-content:center; overflow:hidden; box-shadow:inset 2px 2px 3px rgba(255,255,255,0.08), inset -2px -2px 3px rgba(0,0,0,0.35);">
[[File:{{{ingredient2_img}}}|40px]]
[[File:{{{ingredient2_img}}}|40px]]
</div>
</div>
<div style="font-size:14px; color:#ddd; text-align:center; margin-top:8px; line-height:18px;">
<div style="font-size:14px; color:#ddd; text-align:center; margin-top:8px; line-height:18px;">
{{{ingredient2_name}}}{{#if:{{{ingredient2_amount|}}}|&nbsp;[{{{ingredient2_amount}}}]|}}
{{{ingredient2_name}}}{{#if:{{{ingredient2_amount|}}}|&nbsp;[{{{ingredient2_amount}}}]|}}
</div>
</div>
</div>
</div>
|}}
|}}
Строка 42: Строка 50:
{{#if:{{{ingredient3_name|}}}|
{{#if:{{{ingredient3_name|}}}|
<div style="display:flex; flex-direction:column; align-items:center; width:75px;">
<div style="display:flex; flex-direction:column; align-items:center; width:75px;">
<div style="width:63px; height:63px; background:#555; border-radius:8px; display:flex; align-items:center; justify-content:center; overflow:hidden; box-shadow:inset 2px 2px 3px rgba(255,255,255,0.08), inset -2px -2px 3px rgba(0,0,0,0.35);">
<div style="width:63px; height:63px; background:#555; border-radius:8px; display:flex; align-items:center; justify-content:center; overflow:hidden; box-shadow:inset 2px 2px 3px rgba(255,255,255,0.08), inset -2px -2px 3px rgba(0,0,0,0.35);">
[[File:{{{ingredient3_img}}}|40px]]
[[File:{{{ingredient3_img}}}|40px]]
</div>
</div>
<div style="font-size:14px; color:#ddd; text-align:center; margin-top:8px; line-height:18px;">
<div style="font-size:14px; color:#ddd; text-align:center; margin-top:8px; line-height:18px;">
{{{ingredient3_name}}}{{#if:{{{ingredient3_amount|}}}|&nbsp;[{{{ingredient3_amount}}}]|}}
{{{ingredient3_name}}}{{#if:{{{ingredient3_amount|}}}|&nbsp;[{{{ingredient3_amount}}}]|}}
</div>
</div>
</div>
</div>
|}}
|}}
Строка 54: Строка 65:
{{#if:{{{ingredient4_name|}}}|
{{#if:{{{ingredient4_name|}}}|
<div style="display:flex; flex-direction:column; align-items:center; width:75px;">
<div style="display:flex; flex-direction:column; align-items:center; width:75px;">
<div style="width:63px; height:63px; background:#555; border-radius:8px; display:flex; align-items:center; justify-content:center; overflow:hidden; box-shadow:inset 2px 2px 3px rgba(255,255,255,0.08), inset -2px -2px 3px rgba(0,0,0,0.35);">
<div style="width:63px; height:63px; background:#555; border-radius:8px; display:flex; align-items:center; justify-content:center; overflow:hidden; box-shadow:inset 2px 2px 3px rgba(255,255,255,0.08), inset -2px -2px 3px rgba(0,0,0,0.35);">
[[File:{{{ingredient4_img}}}|40px]]
[[File:{{{ingredient4_img}}}|40px]]
</div>
</div>
<div style="font-size:14px; color:#ddd; text-align:center; margin-top:8px; line-height:18px;">
<div style="font-size:14px; color:#ddd; text-align:center; margin-top:8px; line-height:18px;">
{{{ingredient4_name}}}{{#if:{{{ingredient4_amount|}}}|&nbsp;[{{{ingredient4_amount}}}]|}}
{{{ingredient4_name}}}{{#if:{{{ingredient4_amount|}}}|&nbsp;[{{{ingredient4_amount}}}]|}}
</div>
</div>
</div>
</div>
|}}
|}}
Строка 66: Строка 80:
{{#if:{{{ingredient5_name|}}}|
{{#if:{{{ingredient5_name|}}}|
<div style="display:flex; flex-direction:column; align-items:center; width:75px;">
<div style="display:flex; flex-direction:column; align-items:center; width:75px;">
<div style="width:63px; height:63px; background:#555; border-radius:8px; display:flex; align-items:center; justify-content:center; overflow:hidden; box-shadow:inset 2px 2px 3px rgba(255,255,255,0.08), inset -2px -2px 3px rgba(0,0,0,0.35);">
<div style="width:63px; height:63px; background:#555; border-radius:8px; display:flex; align-items:center; justify-content:center; overflow:hidden; box-shadow:inset 2px 2px 3px rgba(255,255,255,0.08), inset -2px -2px 3px rgba(0,0,0,0.35);">
[[File:{{{ingredient5_img}}}|40px]]
[[File:{{{ingredient5_img}}}|40px]]
</div>
</div>
<div style="font-size:14px; color:#ddd; text-align:center; margin-top:8px; line-height:18px;">
<div style="font-size:14px; color:#ddd; text-align:center; margin-top:8px; line-height:18px;">
{{{ingredient5_name}}}{{#if:{{{ingredient5_amount|}}}|&nbsp;[{{{ingredient5_amount}}}]|}}
{{{ingredient5_name}}}{{#if:{{{ingredient5_amount|}}}|&nbsp;[{{{ingredient5_amount}}}]|}}
</div>
</div>
</div>
</div>
|}}
|}}
Строка 80: Строка 97:
<div style="display:flex; flex-direction:column; align-items:center; justify-content:center; flex-shrink:0; min-width:90px;">
<div style="display:flex; flex-direction:column; align-items:center; justify-content:center; flex-shrink:0; min-width:90px;">


<div style="width:60px; height:60px; display:flex; align-items:center; justify-content:center; margin:3px 0;">
<div style="width:60px; height:60px; display:flex; align-items:center; justify-content:center; margin:3px 0; overflow:hidden;">
[[File:{{{method_img|Microwave.gif}}|56px]]
 
[[File:{{{method_img|Microwave.gif}}}|56px]]
 
</div>
</div>


Строка 165: Строка 184:
| <code>result_img</code> || Изображение результата || Да
| <code>result_img</code> || Изображение результата || Да
|}
|}
=== Способ приготовления ===
Если <code>method_img</code> не указан, автоматически используется:
<code>Microwave.gif</code>
Например:
<pre>
|method_name=Микроволновка
|method_time=10 сек.
</pre>
Для другого способа:
<pre>
|method_name=Нож
|method_img=Knife.png
</pre>
Или:
<pre>
|method_name=Измельчитель
|method_img=Grinder.png
</pre>


=== Пример ===
=== Пример ===
Строка 185: Строка 231:


|method_name=Микроволновка
|method_name=Микроволновка
|method_img=Микроволновка.png
|method_time=10 сек.
|method_time=10 сек.


Строка 192: Строка 237:
}}
}}
</pre>
</pre>
Количество теперь отображается с неразрывным пробелом:
<code>Мясо [3]</code>
<code>Соус барбекю [1]</code>
<code>Соль [1]</code>
Если количество не указано, отображается только название ингредиента.


[[Категория:Шаблоны]]
[[Категория:Шаблоны]]
</noinclude>
</noinclude>

Версия от 19:19, 13 августа 2026



Recipe — шаблон рецепта

Универсальный шаблон для отображения рецептов.

Параметры

Параметр Описание Обязательный
title Название рецепта Да
ingredient1_name Название первого ингредиента Да
ingredient1_img Изображение первого ингредиента Да
ingredient1_amount Количество первого ингредиента Нет
ingredient2_name Название второго ингредиента Нет
ingredient2_img Изображение второго ингредиента Нет
ingredient2_amount Количество второго ингредиента Нет
ingredient3_name Название третьего ингредиента Нет
ingredient3_img Изображение третьего ингредиента Нет
ingredient3_amount Количество третьего ингредиента Нет
ingredient4_name Название четвёртого ингредиента Нет
ingredient4_img Изображение четвёртого ингредиента Нет
ingredient4_amount Количество четвёртого ингредиента Нет
ingredient5_name Название пятого ингредиента Нет
ingredient5_img Изображение пятого ингредиента Нет
ingredient5_amount Количество пятого ингредиента Нет
method_name Способ приготовления Да
method_img Изображение способа приготовления Нет
method_time Время приготовления Нет
result_name Название результата Да
result_img Изображение результата Да

Способ приготовления

Если method_img не указан, автоматически используется:

Microwave.gif

Например:

|method_name=Микроволновка
|method_time=10 сек.

Для другого способа:

|method_name=Нож
|method_img=Knife.png

Или:

|method_name=Измельчитель
|method_img=Grinder.png

Пример

{{Recipe
|title=Рёбрышки барбекю

|ingredient1_name=Мясо
|ingredient1_img=FoodMeat.png
|ingredient1_amount=3

|ingredient2_name=Соус барбекю
|ingredient2_img=FoodSauce.png
|ingredient2_amount=1

|ingredient3_name=Соль
|ingredient3_img=FoodSalt.png
|ingredient3_amount=1

|method_name=Микроволновка
|method_time=10 сек.

|result_name=Рёбрышки барбекю
|result_img=FoodMealRibs.png
}}