Externí odkazy na zdroje receptu

This commit is contained in:
Emil Miler 2023-11-08 10:18:24 +01:00
parent 2138316523
commit 7c070de4a5
3 changed files with 13 additions and 3 deletions

View File

@ -11,7 +11,8 @@ tagy = ["alkohol"]
[extra]
portions = "1 lahev"
time = "30"
source = "https://www.facebook.com/zufanek/posts/pfbid034o7uw1trRsf7GdvDWmG4EswkbG5Vcp5DrbZVvo52qnt6nBmVZky5fv4T7ESQiLPzl"
source = "Martin Žufánek"
source_url = "https://www.facebook.com/zufanek/posts/pfbid034o7uw1trRsf7GdvDWmG4EswkbG5Vcp5DrbZVvo52qnt6nBmVZky5fv4T7ESQiLPzl"
+++
Ingredience ||

View File

@ -11,7 +11,8 @@ tagy = ["alkohol"]
[extra]
portions = "1 lahev"
time = "30"
source = "https://recepty.cuketka.cz/vajecny-liker-konak-eggnog/"
source = "Cuketka.cz"
source_url = "https://recepty.cuketka.cz/vajecny-liker-konak-eggnog/"
+++
Ingredience ||

View File

@ -80,7 +80,15 @@
{% macro recipe_meta() %}
{% if page.extra.portions %}<span class="item" title="Porce"><span class="icon icon-spoon-knife"></span>{{ page.extra.portions }}</span>{% endif %}
{% if page.extra.time %}<span class="item" title="Doba přípravy"><span class="icon icon-clock"></span>{{ page.extra.time }} min</span>{% endif %}
{% if page.extra.source %}<span class="item" title="Zdroj"><span class="icon icon-book"></span>{{ page.extra.source }}</span>{% endif %}
{% if page.extra.source %}
<span class="item" title="Zdroj"><span class="icon icon-book"></span>
{% if page.extra.source_url %}
<a href="{{ page.extra.source_url }}" target="_blank" rel="noreferrer" rel="nofollow" rel="noopener">{{ page.extra.source }}</a>
{% else %}
{{ page.extra.source }}
{% endif %}
</span>
{% endif %}
<a href="{{ config.extra.git }}/_edit/master/content/{{ page.relative_path }}" class="edit" title="Upravit"><span class="icon-pencil"></span></a>
{% endmacro recipe_meta %}