{% extends '_base.html' %}

{% block content %}
<div class="container py-4">
  <div class="text-center mb-4">
    {% if template.company and template.company.logo %}
      <img src="{{ template.company.logo.url }}" alt="logo" style="max-height:90px">
    {% endif %}
    <h4 class="mt-2">{{ cert.rendered_title }}</h4>
    {% if template.company %}<div class="text-muted">{{ template.company.name }}</div>{% endif %}
  </div>
  <div style="white-space:pre-line; line-height:1.9;">
    {{ cert.rendered_body|safe }}
  </div>
  <div class="mt-5 d-flex justify-content-between">
    <div>تاریخ: {{ cert.issued_at }}</div>
    <div class="text-center">
      {% if template.company and template.company.signature %}
        <img src="{{ template.company.signature.url }}" alt="seal" style="max-height:120px">
      {% endif %}
      <div>مهر و امضای شرکت</div>
    </div>
  </div>
</div>
<script>window.print()</script>
{% endblock %}


