Шаблон:recipe

Вернуться

Строка 1: Строка 1:
<includeonly>
<includeonly>
<div style="display:flex; flex-direction:column; width:100%; height:100%; 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; box-sizing:border-box;">
<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 12px; 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;">
Строка 12: Строка 12:


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


<!-- ИНГРЕДИЕНТЫ -->
<!-- ИНГРЕДИЕНТЫ -->
<div style="display:flex; width:100%; align-items:flex-start; justify-content:center; gap:10px; flex-wrap:wrap;">
<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; flex-shrink:0;">
<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>
|}}
|}}
Строка 31: Строка 34:
<!-- ИНГРЕДИЕНТ 2 -->
<!-- ИНГРЕДИЕНТ 2 -->
{{#if:{{{ingredient2_name|}}}|
{{#if:{{{ingredient2_name|}}}|
<div style="display:flex; flex-direction:column; align-items:center; width:75px; flex-shrink:0;">
<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>
|}}
|}}
Строка 43: Строка 49:
<!-- ИНГРЕДИЕНТ 3 -->
<!-- ИНГРЕДИЕНТ 3 -->
{{#if:{{{ingredient3_name|}}}|
{{#if:{{{ingredient3_name|}}}|
<div style="display:flex; flex-direction:column; align-items:center; width:75px; flex-shrink:0;">
<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>
|}}
|}}
Строка 55: Строка 64:
<!-- ИНГРЕДИЕНТ 4 -->
<!-- ИНГРЕДИЕНТ 4 -->
{{#if:{{{ingredient4_name|}}}|
{{#if:{{{ingredient4_name|}}}|
<div style="display:flex; flex-direction:column; align-items:center; width:75px; flex-shrink:0;">
<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>
|}}
|}}
Строка 67: Строка 79:
<!-- ИНГРЕДИЕНТ 5 -->
<!-- ИНГРЕДИЕНТ 5 -->
{{#if:{{{ingredient5_name|}}}|
{{#if:{{{ingredient5_name|}}}|
<div style="display:flex; flex-direction:column; align-items:center; width:75px; flex-shrink:0;">
<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>
|}}
|}}


<!-- ИНГРЕДИЕНТ 6 -->
{{#if:{{{ingredient6_name|}}}|
<div style="display:flex; flex-direction:column; align-items:center; width:75px; flex-shrink:0;">
<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:{{{ingredient6_img}}}|40px]]
</div>
</div>
<div style="font-size:14px; color:#ddd; text-align:center; margin-top:8px; line-height:18px;">
 
{{{ingredient6_name}}}{{#if:{{{ingredient6_amount|}}}|&nbsp;[{{{ingredient6_amount}}}]|}}
<!-- СПОСОБ ПРИГОТОВЛЕНИЯ -->
<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>
|}}


<!-- ИНГРЕДИЕНТ 7 -->
{{#if:{{{ingredient7_name|}}}|
<div style="display:flex; flex-direction:column; align-items:center; width:75px; flex-shrink:0;">
<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:{{{ingredient7_img}}}|40px]]
</div>
</div>
<div style="font-size:14px; color:#ddd; text-align:center; margin-top:8px; line-height:18px;">
{{{ingredient7_name}}}{{#if:{{{ingredient7_amount|}}}|&nbsp;[{{{ingredient7_amount}}}]|}}
</div>
</div>
|}}


<!-- ИНГРЕДИЕНТ 8 -->
<!-- РЕЗУЛЬТАТ -->
{{#if:{{{ingredient8_name|}}}|
<div style="display:flex; align-items:flex-start; justify-content:center;">
<div style="display:flex; flex-direction:column; align-items:center; width:75px; flex-shrink:0;">
 
<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:{{{ingredient8_img}}}|40px]]
[[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;">
{{{ingredient8_name}}}{{#if:{{{ingredient8_amount|}}}|&nbsp;[{{{ingredient8_amount}}}]|}}
{{{result_name|Результат}}}
</div>
</div>
</div>
</div>
|}}


<!-- ИНГРЕДИЕНТ 9 -->
{{#if:{{{ingredient9_name|}}}|
<div style="display:flex; flex-direction:column; align-items:center; width:75px; flex-shrink:0;">
<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:{{{ingredient9_img}}}|40px]]
</div>
<div style="font-size:14px; color:#ddd; text-align:center; margin-top:8px; line-height:18px;">
{{{ingredient9_name}}}{{#if:{{{ingredient9_amount|}}}|&nbsp;[{{{ingredient9_amount}}}]|}}
</div>
</div>
</div>
|}}


<!-- ИНГРЕДИЕНТ 10 -->
{{#if:{{{ingredient10_name|}}}|
<div style="display:flex; flex-direction:column; align-items:center; width:75px; flex-shrink:0;">
<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:{{{ingredient10_img}}}|40px]]
</div>
</div>
<div style="font-size:14px; color:#ddd; text-align:center; margin-top:8px; line-height:18px;">
{{{ingredient10_name}}}{{#if:{{{ingredient10_amount|}}}|&nbsp;[{{{ingredient10_amount}}}]|}}
</div>
</div>
</div>
</includeonly>
|}}


<!-- ИНГРЕДИЕНТ 11 -->
<noinclude>
{{#if:{{{ingredient11_name|}}}|
__NOTOC__
<div style="display:flex; flex-direction:column; align-items:center; width:75px; flex-shrink:0;">
<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:{{{ingredient11_img}}}|40px]]
</div>
<div style="font-size:14px; color:#ddd; text-align:center; margin-top:8px; line-height:18px;">
{{{ingredient11_name}}}{{#if:{{{ingredient11_amount|}}}|&nbsp;[{{{ingredient11_amount}}}]|}}
</div>
</div>
|}}


<!-- ИНГРЕДИЕНТ 12 -->
== Recipe — шаблон рецепта ==
{{#if:{{{ingredient12_name|}}}|
<div style="display:flex; flex-direction:column; align-items:center; width:75px; flex-shrink:0;">
<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:{{{ingredient12_img}}}|40px]]
</div>
<div style="font-size:14px; color:#ddd; text-align:center; margin-top:8px; line-height:18px;">
{{{ingredient12_name}}}{{#if:{{{ingredient12_amount|}}}|&nbsp;[{{{ingredient12_amount}}}]|}}
</div>
</div>
|}}


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


<!-- СПОСОБ ПРИГОТОВЛЕНИЯ -->
=== Параметры ===
<div style="display:flex; flex-direction:column; align-items:center; justify-content:center; flex-shrink:0; min-width:90px; margin-top:12px;">


<div style="width:60px; height:60px; display:flex; align-items:center; justify-content:center; margin:3px 0; overflow:hidden;">
{| class="wikitable"
[[File:{{{method_img|Microwave.gif}}}|64px]]
! Параметр !! Описание !! Обязательный
</div>
|-
| <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> || Изображение результата || Да
|}


<div style="font-size:17px; font-weight:bold; line-height:20px; text-align:center;">
=== Способ приготовления ===
{{{method_name|Приготовление}}}{{#if:{{{method_time|}}}|<br>{{{method_time}}}|}}
</div>


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


<!-- РЕАГЕНТЫ -->
<code>Microwave.gif</code>
{{#if:{{{reagent1_name|}}}|
<div style="display:flex; flex-wrap:wrap; justify-content:center; gap:8px; margin-top:14px; width:100%;">


{{#if:{{{reagent1_name|}}}|
Например:
<div style="font-size:13px; color:#bbb; text-align:center;">
{{{reagent1_name}}}{{#if:{{{reagent1_amount|}}}|&nbsp;[{{{reagent1_amount}}}]|}}
</div>
|}}


{{#if:{{{reagent2_name|}}}|
<pre>
<div style="font-size:13px; color:#bbb; text-align:center;">
|method_name=Микроволновка
{{{reagent2_name}}}{{#if:{{{reagent2_amount|}}}|&nbsp;[{{{reagent2_amount}}}]|}}
|method_time=10 сек.
</div>
</pre>
|}}


{{#if:{{{reagent3_name|}}}|
Для другого способа:
<div style="font-size:13px; color:#bbb; text-align:center;">
{{{reagent3_name}}}{{#if:{{{reagent3_amount|}}}|&nbsp;[{{{reagent3_amount}}}]|}}
</div>
|}}


{{#if:{{{reagent4_name|}}}|
<pre>
<div style="font-size:13px; color:#bbb; text-align:center;">
|method_name=Нож
{{{reagent4_name}}}{{#if:{{{reagent4_amount|}}}|&nbsp;[{{{reagent4_amount}}}]|}}
|method_img=Knife.png
</div>
</pre>
|}}


{{#if:{{{reagent5_name|}}}|
Или:
<div style="font-size:13px; color:#bbb; text-align:center;">
{{{reagent5_name}}}{{#if:{{{reagent5_amount|}}}|&nbsp;[{{{reagent5_amount}}}]|}}
</div>
|}}


{{#if:{{{reagent6_name|}}}|
<pre>
<div style="font-size:13px; color:#bbb; text-align:center;">
|method_name=Измельчитель
{{{reagent6_name}}}{{#if:{{{reagent6_amount|}}}|&nbsp;[{{{reagent6_amount}}}]|}}
|method_img=Grinder.png
</div>
</pre>
|}}


</div>
=== Пример ===
|}}


<!-- РЕЗУЛЬТАТ -->
<pre>
<div style="display:flex; align-items:flex-start; justify-content:center; margin-top:12px;">
{{Recipe
|title=Рёбрышки барбекю


<div style="display:flex; flex-direction:column; align-items:center; width:90px;">
|ingredient1_name=Мясо
|ingredient1_img=FoodMeat.png
|ingredient1_amount=3


<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);">
|ingredient2_name=Соус барбекю
[[File:{{{result_img}}}|40px]]
|ingredient2_img=FoodSauce.png
</div>
|ingredient2_amount=1


<div style="font-size:14px; color:#ddd; text-align:center; margin-top:8px; line-height:18px;">
|ingredient3_name=Соль
{{{result_name|Результат}}}
|ingredient3_img=FoodSalt.png
</div>
|ingredient3_amount=1


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


</div>
|result_name=Рёбрышки барбекю
|result_img=FoodMealRibs.png
}}
</pre>


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