fr
/
web
forked from kittv/web
1
0
Fork 0

Změna makra pro vypisování aktualit

closes #1
search
Emil Miler 4 years ago
parent 004cb91b22
commit 604af21a04

@ -158,6 +158,9 @@ main {
border-top: 5px solid #5E81AC; border-top: 5px solid #5E81AC;
font-size: .85em; font-size: .85em;
a { font-weight: bold }
a:hover { text-decoration: underline }
&:hover { &:hover {
box-shadow: 0px 1px 9px #00000033; box-shadow: 0px 1px 9px #00000033;
} }

@ -22,7 +22,7 @@
<section> <section>
<div class="websites blocks"> <div class="websites blocks">
{% set section = get_section(path="spratelene-weby/_index.md") %} {% set section = get_section(path="spratelene-weby/_index.md") %}
{{ macro::list_posts(section=section) }} {{ macro::list_external_links(section=section) }}
</div> </div>
</section> </section>
</main> </main>

@ -63,6 +63,24 @@
{% endmacro %} {% endmacro %}
{% macro list_posts(section) %} {% macro list_posts(section) %}
{% for post in section.pages %}
<article>
<div class="title">
<a href="{{ post.permalink }}">{{ post.title }}</a>
</div>
{% if post.summary %}
{{ post.summary | safe }}
{% else %}
{{ post.content | safe }}
{% endif %}
{% if post.date %}
<div class="date">{{ post.date | date(format="%d.%m.%Y")}}</div>
{% endif %}
</article>
{% endfor %}
{% endmacro %}
{% macro list_external_links(section) %}
{% for post in section.pages %} {% for post in section.pages %}
<a href=" <a href="
{% if post.extra.link %} {% if post.extra.link %}
@ -83,14 +101,7 @@
{{ post.title }} {{ post.title }}
{% endif %} {% endif %}
</div> </div>
{% if post.summary %}
{{ post.summary | safe }}
{% else %}
{{ post.content | safe }} {{ post.content | safe }}
{% endif %}
{% if post.date %}
<div class="date">{{ post.date | date(format="%d.%m.%Y")}}</div>
{% endif %}
</article> </article>
</a> </a>
{% endfor %} {% endfor %}

Loading…
Cancel
Save