1
0
Fork 0
yinghong-massage.de/templates/macros/offers.html
2023-05-31 02:27:56 +02:00

41 lines
1.4 KiB
HTML

{% macro offer(image_filename, name, description) %}
<div class="pt-3 pb-5 row">
<div class="flex-wrap col d-flex align-content-center"
style="min-width: 300px">
{% set dir = page.path | trim_start_matches(pat="/") %}
{% set image_path = dir ~ image_filename %}
{% set image = resize_image(path=image_path, width=400, height=400, op="fill") %}
<img src="{{ image.url }}"
class="mx-auto rounded shadow d-block img-fluid"/>
</div>
<div class="flex-wrap mt-3 col d-flex align-content-center ms-5 me-5"
style="min-width: 300px">
<div>
<h3>{{ name }}</h3>
<p>{{ description | safe }}</p>
</div>
</div>
</div>
{% endmacro %}
{% macro prices_table(caption, names, prices) %}
<div class="pb-5 text-center">
<h3 class="h3">{{ caption }}</h3>
<div class="d-inline-flex">
<table class="table">
<tbody>
{% for name in names %}
<tr>
<th class="pe-3" scope="row">{{ name }}</th>
<td class="ps-3">{{ prices | nth(n=loop.index0) }}</td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
</div>
<hr>
{% endmacro %}