2019-10-30 11:58:46 +01:00
|
|
|
{% extends "index.html" %}
|
|
|
|
|
|
|
|
{% block title %}{{ config.title }} — {{ page.title }}{% endblock title %}
|
|
|
|
|
|
|
|
{% block content %}
|
|
|
|
<main class="recipe">
|
|
|
|
|
|
|
|
<h2>{{ page.title | upper }}</h2>
|
|
|
|
<hr>
|
|
|
|
{% for asset in page.assets %}
|
|
|
|
{% if asset is matching("[img.](jpg|png)$") %}
|
2020-01-12 18:03:22 +01:00
|
|
|
<a href="/{{ asset }}"><img src="{{ resize_image(path=asset, width=900, height=400, op="fill") }}" alt="Náhled"></a>
|
2019-10-30 11:58:46 +01:00
|
|
|
{% break %}
|
|
|
|
{% endif %}
|
|
|
|
{% endfor %}
|
|
|
|
|
|
|
|
{% if page.extra.image %}<img src="{{ page.extra.image }}" alt="Náhled">{% endif %}
|
|
|
|
<div class="meta">
|
2021-03-11 17:14:08 +01:00
|
|
|
{% if page.extra.portions %}<span class="tag">Porce: <strong>{{ page.extra.portions }}</strong></span>{% endif %}
|
|
|
|
{% if page.extra.time %}<span class="tag">Doba přípravy: <strong>{{ page.extra.time }} min</strong></span>{% endif %}
|
|
|
|
{% if page.extra.source %}<span class="tag">Zdroj: <strong>{{ page.extra.source }}</strong></span>{% endif %}
|
|
|
|
<a href="{{ config.extra.git }}/_edit/master/content/{{ page.relative_path }}" class="edit" title="Upravit"><span class="icon-pencil"></span></a>
|
2019-10-30 11:58:46 +01:00
|
|
|
</div>
|
|
|
|
|
|
|
|
{{ page.content | safe }}
|
|
|
|
|
|
|
|
<hr>
|
|
|
|
|
|
|
|
{% if page.taxonomies.kategorie %}
|
|
|
|
{% set categories = page.taxonomies.kategorie %}
|
2021-03-11 17:14:08 +01:00
|
|
|
<div class="taglist">
|
|
|
|
Kategorie –
|
2019-10-30 11:58:46 +01:00
|
|
|
{% for term in categories %}
|
2020-01-15 11:03:13 +01:00
|
|
|
<span class="tag"><a href="{{ get_taxonomy_url(kind="kategorie", name=term) | safe }}">{{ term | capitalize() }}</a></span>
|
2019-10-30 11:58:46 +01:00
|
|
|
{% endfor %}
|
|
|
|
</div>
|
|
|
|
{% endif %}
|
|
|
|
|
|
|
|
{% if page.taxonomies.tagy %}
|
|
|
|
{% set tags = page.taxonomies.tagy %}
|
2021-03-11 17:14:08 +01:00
|
|
|
<div class="taglist">
|
|
|
|
Tagy –
|
2019-10-30 11:58:46 +01:00
|
|
|
{% for term in tags %}
|
2020-01-15 11:03:13 +01:00
|
|
|
<span class="tag"><a href="{{ get_taxonomy_url(kind="tagy", name=term) | safe }}">{{ term | capitalize() }}</a></span>
|
2019-10-30 11:58:46 +01:00
|
|
|
{% endfor %}
|
|
|
|
</div>
|
|
|
|
{% endif %}
|
|
|
|
|
|
|
|
</main>
|
|
|
|
{% endblock content %}
|
2021-01-23 15:32:22 +01:00
|
|
|
|
|
|
|
{% block script %}
|
|
|
|
<script>
|
|
|
|
let list_items = document.querySelectorAll('ol li');
|
|
|
|
for(let i=0; i<list_items.length; i++){
|
|
|
|
list_items[i].addEventListener('click', function(){ this.classList.toggle("completed"); }, false);
|
|
|
|
}
|
|
|
|
</script>
|
|
|
|
{% endblock script %}
|