Nahrání lokálních souborů
This commit is contained in:
71
templates/index.html
Normal file
71
templates/index.html
Normal file
@ -0,0 +1,71 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>{% block title %}{{ config.title }}{% endblock title %}</title>
|
||||
<link rel="stylesheet" href="/style.css" type="text/css">
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<nav>
|
||||
<div class="mainnav">
|
||||
<h1><a href="/">Recepty na cesty</a></h1>
|
||||
<ul>
|
||||
<li><a href="/kategorie/">Kategorie</a></li>
|
||||
<li><a href="/tagy/">Tagy</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="subnav">
|
||||
<ul>
|
||||
<li><a href="/kategorie/polevky/">Polévky</a></li>
|
||||
<li><a href="/kategorie/hlavni-chod/">Hlavní chod</a></li>
|
||||
<li><a href="/kategorie/prilohy/">Přílohy</a></li>
|
||||
<li><a href="/kategorie/dezerty/">Dezerty</a></li>
|
||||
<li><a href="/kategorie/napoje/">Nápoje</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
{% block content %}
|
||||
<main>
|
||||
<h2>Nejnovější recepty</h2>
|
||||
<hr>
|
||||
<section class="list">
|
||||
|
||||
{% for page in paginator.pages %}
|
||||
<article>
|
||||
|
||||
<a href="{{ page.permalink }}">
|
||||
{% set_global image_found = 0 %}
|
||||
{% for asset in page.assets %}
|
||||
{% if asset is matching("[img.](jpg|png)$") %}
|
||||
<img src="{{ resize_image(path=asset, width=300, height=300, op="fill") }}" alt="Náhled">
|
||||
{% set_global image_found = 1 %}
|
||||
{% break %}
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
{% if image_found == 0 %}
|
||||
<img src="/temp.jpg" alt="Náhradní obrázek">
|
||||
{% endif %}
|
||||
{% set_global image_found = 0 %}
|
||||
</a>
|
||||
|
||||
{% if page.title %}<a href="{{ page.permalink }}"><h3>{{ page.title }}</h3></a>{% endif %}
|
||||
{% if page.date %}<span class="date">{{ page.date | date(format="%d.%m.%Y") }}</span>{% endif %}
|
||||
|
||||
</article>
|
||||
{% endfor %}
|
||||
|
||||
</section>
|
||||
|
||||
<div class="pagination">
|
||||
{% if paginator.previous %}<a href="{{ paginator.previous }}">« Předchozí stránka</a> |{% endif %}
|
||||
<span>{{ paginator.current_index }} / {{ paginator.number_pagers }}</span>
|
||||
{% if paginator.next %}| <a href="{{ paginator.next }}">Další stránka »</a>{% endif %}
|
||||
</div>
|
||||
|
||||
</main>
|
||||
{% endblock content %}
|
||||
|
||||
</body>
|
||||
</html>
|
15
templates/kategorie/list.html
Normal file
15
templates/kategorie/list.html
Normal file
@ -0,0 +1,15 @@
|
||||
{% extends "index.html" %}
|
||||
|
||||
{% block content %}
|
||||
<main>
|
||||
<h2>Kategorie</h2>
|
||||
<hr>
|
||||
{% if terms %}
|
||||
<ul>
|
||||
{% for term in terms %}
|
||||
<li><a href="{{ term.permalink }}">{{ term.name | capitalize() }}</a> ({{ term.pages | length }})</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% endif %}
|
||||
</main>
|
||||
{% endblock content %}
|
33
templates/kategorie/single.html
Normal file
33
templates/kategorie/single.html
Normal file
@ -0,0 +1,33 @@
|
||||
{% extends "index.html" %}
|
||||
|
||||
{% block content %}
|
||||
<main>
|
||||
<h2>{{ term.name | capitalize() }}</h2>
|
||||
<hr>
|
||||
<section class="list">
|
||||
{% for page in term.pages %}
|
||||
<article>
|
||||
|
||||
<a href="{{ page.permalink }}">
|
||||
{% set_global image_found = 0 %}
|
||||
{% for asset in page.assets %}
|
||||
{% if asset is matching("[img.](jpg|png)$") %}
|
||||
<img src="{{ resize_image(path=asset, width=300, height=300, op="fill") }}" alt="Náhled">
|
||||
{% set_global image_found = 1 %}
|
||||
{% break %}
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
{% if image_found == 0 %}
|
||||
<img src="/temp.jpg" alt="Náhradní obrázek">
|
||||
{% endif %}
|
||||
{% set_global image_found = 0 %}
|
||||
</a>
|
||||
|
||||
{% if page.title %}<a href="{{ page.permalink }}"><h3>{{ page.title }}</h3></a>{% endif %}
|
||||
{% if page.date %}<span class="date">{{ page.date | date(format="%d.%m.%Y") }}</span>{% endif %}
|
||||
|
||||
</article>
|
||||
{% endfor %}
|
||||
</section>
|
||||
</main>
|
||||
{% endblock content %}
|
48
templates/page.html
Normal file
48
templates/page.html
Normal file
@ -0,0 +1,48 @@
|
||||
{% 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)$") %}
|
||||
<img src="{{ resize_image(path=asset, width=900, height=400, op="fill") }}" alt="Náhled">
|
||||
{% break %}
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
|
||||
{% if page.extra.image %}<img src="{{ page.extra.image }}" alt="Náhled">{% endif %}
|
||||
<div class="meta">
|
||||
{% if page.extra.portions %}<span class="tag">Porce: {{ page.extra.portions }}</span>{% endif %}
|
||||
{% if page.extra.time %}<span class="tag">Doba přípravy: {{ page.extra.time }} min</span>{% endif %}
|
||||
</div>
|
||||
|
||||
{{ page.content | safe }}
|
||||
|
||||
<hr>
|
||||
|
||||
{% if page.taxonomies.kategorie %}
|
||||
{% set categories = page.taxonomies.kategorie %}
|
||||
<div>
|
||||
Kategorie –
|
||||
{% for term in categories %}
|
||||
<span class="tag"><a href="">{{ term | capitalize() }}</a></span>
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{% if page.taxonomies.tagy %}
|
||||
{% set tags = page.taxonomies.tagy %}
|
||||
<div>
|
||||
Tagy –
|
||||
{% for term in tags %}
|
||||
<span class="tag"><a href="">{{ term | capitalize() }}</a></span>
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
</main>
|
||||
{% endblock content %}
|
15
templates/tagy/list.html
Normal file
15
templates/tagy/list.html
Normal file
@ -0,0 +1,15 @@
|
||||
{% extends "index.html" %}
|
||||
|
||||
{% block content %}
|
||||
<main>
|
||||
<h2>Tagy</h2>
|
||||
<hr>
|
||||
{% if terms %}
|
||||
<ul>
|
||||
{% for term in terms %}
|
||||
<li><a href="{{ term.permalink }}">{{ term.name | capitalize() }}</a> ({{ term.pages | length }})</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% endif %}
|
||||
</main>
|
||||
{% endblock content %}
|
33
templates/tagy/single.html
Normal file
33
templates/tagy/single.html
Normal file
@ -0,0 +1,33 @@
|
||||
{% extends "index.html" %}
|
||||
|
||||
{% block content %}
|
||||
<main>
|
||||
<h2>{{ term.name | capitalize() }}</h2>
|
||||
<hr>
|
||||
<section class="list">
|
||||
{% for page in term.pages %}
|
||||
<article>
|
||||
|
||||
<a href="{{ page.permalink }}">
|
||||
{% set_global image_found = 0 %}
|
||||
{% for asset in page.assets %}
|
||||
{% if asset is matching("[img.](jpg|png)$") %}
|
||||
<img src="{{ resize_image(path=asset, width=300, height=300, op="fill") }}" alt="Náhled">
|
||||
{% set_global image_found = 1 %}
|
||||
{% break %}
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
{% if image_found == 0 %}
|
||||
<img src="/temp.jpg" alt="Náhradní obrázek">
|
||||
{% endif %}
|
||||
{% set_global image_found = 0 %}
|
||||
</a>
|
||||
|
||||
{% if page.title %}<a href="{{ page.permalink }}"><h3>{{ page.title }}</h3></a>{% endif %}
|
||||
{% if page.date %}<span class="date">{{ page.date | date(format="%d.%m.%Y") }}</span>{% endif %}
|
||||
|
||||
</article>
|
||||
{% endfor %}
|
||||
</section>
|
||||
</main>
|
||||
{% endblock content %}
|
Reference in New Issue
Block a user