ungleich-staticcms/templates/macros/comic.html
2020-02-05 13:44:56 +01:00

36 lines
780 B
HTML

{% macro render_comic(comic) %}
{% set image = comic.attachments.images.first() %}
<div class="container">
<div class="row mb-5">
<div class="col-md-3">
<!-- unused for centering -->
</div>
<div class="col-md-6">
<h2>{{ comic.subtitle }}</h2>
<img src="{{ image|url }}" alt="{{ comic.subtitle }}"
class="img-fluid"/>
</div>
<div class="col-md-3">
<!-- unused for centering -->
</div>
</div>
</div>
{% if comic.body %}
<div class="container">
<div class="row mb-3">
<div class="col-md-3">
<!-- unused for centering -->
</div>
<div class="col-md-6">
{{ comic.body }}
</div>
<div class="col-md-3">
<!-- unused for centering -->
</div>
</div>
</div>
{% endif %}
{% endmacro %}