ungleich-staticcms/templates/macros/comic.html

37 lines
780 B
HTML
Raw Permalink Normal View History

2020-02-05 12:44:56 +00:00
{% 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 %}