You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

41 lines
1.1 KiB
HTML

{% macro project_list() %}
{% for project in section.pages %}
<a href="{{ project.permalink }}">
{% set_global image = "/static/img/project_placeholder.png" %}
{% for asset in project.assets %}
{% if asset is matching("main\.(jpg|png)$") %}
{% set_global image = asset %}
{% break %}
{% endif %}
{% endfor %}
{% set image = resize_image(path=image, width=300, height=300, op="fill") %}
<div class="image" style="background-image: url('{{ image.url }}')"></div>
<div class="description">
<div class="title">{{ project.title }}</div>
<p>
{% if project.description %}
{{ project.description }}
{% else %}
&hellip;
{% endif %}
</p>
</div>
</a>
{% endfor %}
{% endmacro %}
{% macro toc() %}
<ul>
{% for h1 in page.toc %}
<li><a href="{{ h1.permalink | safe }}">{{ h1.title }}</a></li>
{% if h1.children %}
<ul>
{% for h2 in h1.children %}
<li><a href="{{ h2.permalink | safe }}">{{ h2.title }}</a></li>
{% endfor %}
</ul>
{% endif %}
{% endfor %}
</ul>
{% endmacro %}