Шаблон:recipe
| Строка 1: | Строка 1: | ||
<includeonly> | <includeonly> | ||
<div style="display:flex; flex-direction:column | <div style="display:inline-flex; flex-direction:column; background:#222; border-radius:10px; box-shadow:8px 8px 12px rgba(0,0,0,0.4), inset 2px 2px 4px rgba(255,255,255,0.12), inset -2px -2px 4px rgba(0,0,0,0.5); overflow:hidden; color:#fff; font-family:Arial,sans-serif;"> | ||
<!-- НАЗВАНИЕ --> | <!-- НАЗВАНИЕ --> | ||
<div style="background:#1b1b1b; min-height:42px; display:flex; align-items:center; justify-content:center; padding:0 | <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;"> | ||
| Строка 12: | Строка 12: | ||
<!-- ОСНОВНАЯ ЧАСТЬ --> | <!-- ОСНОВНАЯ ЧАСТЬ --> | ||
<div style="display: | <div style="display:inline-flex; align-items:center; justify-content:center; gap:24px; padding:12px 20px; box-sizing:border-box;"> | ||
<!-- ИНГРЕДИЕНТЫ --> | <!-- ИНГРЕДИЕНТЫ --> | ||
<div style="display:flex | <div style="display:flex; align-items:flex-start; justify-content:center; gap:10px; flex-wrap:wrap;"> | ||
<!-- ИНГРЕДИЕНТ 1 --> | <!-- ИНГРЕДИЕНТ 1 --> | ||
{{#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|}}}| [{{{ingredient1_amount}}}]|}} | {{{ingredient1_name}}}{{#if:{{{ingredient1_amount|}}}| [{{{ingredient1_amount}}}]|}} | ||
</div> | </div> | ||
</div> | </div> | ||
|}} | |}} | ||
| Строка 31: | Строка 34: | ||
<!-- ИНГРЕДИЕНТ 2 --> | <!-- ИНГРЕДИЕНТ 2 --> | ||
{{#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|}}}| [{{{ingredient2_amount}}}]|}} | {{{ingredient2_name}}}{{#if:{{{ingredient2_amount|}}}| [{{{ingredient2_amount}}}]|}} | ||
</div> | </div> | ||
</div> | </div> | ||
|}} | |}} | ||
| Строка 43: | Строка 49: | ||
<!-- ИНГРЕДИЕНТ 3 --> | <!-- ИНГРЕДИЕНТ 3 --> | ||
{{#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|}}}| [{{{ingredient3_amount}}}]|}} | {{{ingredient3_name}}}{{#if:{{{ingredient3_amount|}}}| [{{{ingredient3_amount}}}]|}} | ||
</div> | </div> | ||
</div> | </div> | ||
|}} | |}} | ||
| Строка 55: | Строка 64: | ||
<!-- ИНГРЕДИЕНТ 4 --> | <!-- ИНГРЕДИЕНТ 4 --> | ||
{{#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|}}}| [{{{ingredient4_amount}}}]|}} | {{{ingredient4_name}}}{{#if:{{{ingredient4_amount|}}}| [{{{ingredient4_amount}}}]|}} | ||
</div> | </div> | ||
</div> | </div> | ||
|}} | |}} | ||
| Строка 67: | Строка 79: | ||
<!-- ИНГРЕДИЕНТ 5 --> | <!-- ИНГРЕДИЕНТ 5 --> | ||
{{#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|}}}| [{{{ingredient5_amount}}}]|}} | {{{ingredient5_name}}}{{#if:{{{ingredient5_amount|}}}| [{{{ingredient5_amount}}}]|}} | ||
</div> | </div> | ||
</div> | </div> | ||
|}} | |}} | ||
</div> | </div> | ||
<div style=" | |||
<!-- СПОСОБ ПРИГОТОВЛЕНИЯ --> | |||
<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; overflow:hidden;"> | |||
[[File:{{{method_img|Microwave.gif}}}|80px]] | |||
</div> | </div> | ||
<div style="font-size:17px; font-weight:bold; line-height:20px; text-align:center;"> | |||
{{{method_name|Приготовление}}}{{#if:{{{method_time|}}}|<br>{{{method_time}}}|}} | |||
</div> | </div> | ||
</div> | </div> | ||
<!-- | <!-- РЕЗУЛЬТАТ --> | ||
<div style="display:flex; align-items:flex-start; justify-content:center;"> | |||
<div style="display:flex; flex-direction:column; align-items:center; width: | |||
<div style="display:flex; flex-direction:column; align-items:center; width:90px;"> | |||
<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:{{{ | [[File:{{{result_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;"> | ||
{{{ | {{{result_name|Результат}}} | ||
</div> | </div> | ||
</div> | </div> | ||
</div> | </div> | ||
</div> | </div> | ||
</div> | </div> | ||
</ | </includeonly> | ||
< | <noinclude> | ||
__NOTOC__ | |||
== Recipe — шаблон рецепта == | |||
Универсальный шаблон для отображения рецептов. | |||
=== Параметры === | |||
{| class="wikitable" | |||
! Параметр !! Описание !! Обязательный | |||
</ | |- | ||
| <code>title</code> || Название рецепта || Да | |||
|- | |||
| <code>ingredient1_name</code> || Название первого ингредиента || Да | |||
|- | |||
| <code>ingredient1_img</code> || Изображение первого ингредиента || Да | |||
|- | |||
| <code>ingredient1_amount</code> || Количество первого ингредиента || Нет | |||
|- | |||
| <code>ingredient2_name</code> || Название второго ингредиента || Нет | |||
|- | |||
| <code>ingredient2_img</code> || Изображение второго ингредиента || Нет | |||
|- | |||
| <code>ingredient2_amount</code> || Количество второго ингредиента || Нет | |||
|- | |||
| <code>ingredient3_name</code> || Название третьего ингредиента || Нет | |||
|- | |||
| <code>ingredient3_img</code> || Изображение третьего ингредиента || Нет | |||
|- | |||
| <code>ingredient3_amount</code> || Количество третьего ингредиента || Нет | |||
|- | |||
| <code>ingredient4_name</code> || Название четвёртого ингредиента || Нет | |||
|- | |||
| <code>ingredient4_img</code> || Изображение четвёртого ингредиента || Нет | |||
|- | |||
| <code>ingredient4_amount</code> || Количество четвёртого ингредиента || Нет | |||
|- | |||
| <code>ingredient5_name</code> || Название пятого ингредиента || Нет | |||
|- | |||
| <code>ingredient5_img</code> || Изображение пятого ингредиента || Нет | |||
|- | |||
| <code>ingredient5_amount</code> || Количество пятого ингредиента || Нет | |||
|- | |||
| <code>method_name</code> || Способ приготовления || Да | |||
|- | |||
| <code>method_img</code> || Изображение способа приготовления || Нет | |||
|- | |||
| <code>method_time</code> || Время приготовления || Нет | |||
|- | |||
| <code>result_name</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> | ||
=== Пример === | |||
< | <pre> | ||
{{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 | |||
}} | |||
</pre> | |||
[[Категория:Шаблоны]] | |||
</noinclude> | |||
</ | |||