54 lines
2.0 KiB
HTML
54 lines
2.0 KiB
HTML
|
{% macro create_card(link, img, title, abstract, tags, date) %}
|
||
|
<div class="column is-one-third">
|
||
|
<div class="card has-equal-height">
|
||
|
<a href="{{ link | safe }}">
|
||
|
<div class="card-image" >
|
||
|
<figure class="image is-3by2">
|
||
|
{% if img is not starting_with("/") %}
|
||
|
<img src={{ link }}{{ img }} alt="Placeholder image">
|
||
|
{% endif %}
|
||
|
{% if img isstarting_with("/") %}
|
||
|
<img src="{{ get_url(path=img, trailing_slash=false) }}" alt="Placeholder image">
|
||
|
{% endif %}
|
||
|
</figure>
|
||
|
</div>
|
||
|
<div class="card-content">
|
||
|
<div class="title is-3 has-text-centered">{{ title }}</div>
|
||
|
<div class="media">
|
||
|
<div class="content">
|
||
|
<hr/>
|
||
|
{{ abstract | markdown | safe }}
|
||
|
</div>
|
||
|
</div>
|
||
|
</div>
|
||
|
</a>
|
||
|
<footer class="card-footer">
|
||
|
<div class="card-footer-item">
|
||
|
{% for tag in tags %}
|
||
|
<a class="button is-small is-info is-light is-rounded" href="{{ get_url(path="tags/") }}/{{ tag }}"> {{ tag }}</a>
|
||
|
{% endfor %}
|
||
|
</div>
|
||
|
<div class="card-footer-item">
|
||
|
{{ date }}
|
||
|
</div>
|
||
|
</footer>
|
||
|
</div>
|
||
|
</div>
|
||
|
|
||
|
|
||
|
{% endmacro %}
|
||
|
|
||
|
{% macro create_card_tag(link, title) %}
|
||
|
<div class="column is-one-third">
|
||
|
<div class="card">
|
||
|
<a class="card-content" href={{ link }}{{ title }}>
|
||
|
<div class="media">
|
||
|
<div class="title is-3 has-text-centered">{{ title }}</div>
|
||
|
</div>
|
||
|
</a>
|
||
|
</div>
|
||
|
</div>
|
||
|
|
||
|
|
||
|
{% endmacro %}
|