Používání maker v šablonách
This commit is contained in:
@ -7,44 +7,17 @@
|
||||
|
||||
<h2>{{ page.title | upper }}</h2>
|
||||
<hr>
|
||||
{% for asset in page.assets %}
|
||||
{% if asset is matching("[img.](jpg|png)$") %}
|
||||
<a href="/{{ asset }}"><img src="{{ resize_image(path=asset, width=900, height=400, op="fill") }}" alt="Náhled"></a>
|
||||
{% break %}
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
{{ macro::recipe_image() }}
|
||||
|
||||
{% if page.extra.image %}<img src="{{ page.extra.image }}" alt="Náhled">{% endif %}
|
||||
<div class="meta">
|
||||
{% 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>
|
||||
{{ macro::recipe_meta() }}
|
||||
</div>
|
||||
|
||||
{{ page.content | safe }}
|
||||
|
||||
<hr>
|
||||
|
||||
{% if page.taxonomies.kategorie %}
|
||||
{% set categories = page.taxonomies.kategorie %}
|
||||
<div class="taglist">
|
||||
Kategorie –
|
||||
{% for term in categories %}
|
||||
<span class="tag"><a href="{{ get_taxonomy_url(kind="kategorie", name=term) | safe }}">{{ term | capitalize() }}</a></span>
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{% if page.taxonomies.tagy %}
|
||||
{% set tags = page.taxonomies.tagy %}
|
||||
<div class="taglist">
|
||||
Tagy –
|
||||
{% for term in tags %}
|
||||
<span class="tag"><a href="{{ get_taxonomy_url(kind="tagy", name=term) | safe }}">{{ term | capitalize() }}</a></span>
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% endif %}
|
||||
{{ macro::recipe_taxonomies() }}
|
||||
|
||||
</main>
|
||||
{% endblock content %}
|
||||
|
Reference in New Issue
Block a user