<div style="border-radius: 8px; margin: 10px; padding: 10px; width: {{ width }}px; background: #e5edf5; border: 0; min-width: 600px;">
    <div style="display: grid; grid-template-columns: 3fr 1fr; grid-gap: 20px; width:{{ width }}px;">
        <div style="padding: 10px 0px 10px 20px;">
            <table>
                {% for key, value in metadata.items() %}
                    {% if key != 'Exception' and (value or key in ( 'Id', 'Image#')) %}
                        <tr style="background: #e5edf5;">
                            <td style="font-weight: 600; margin: 0;padding: 2px; ">{{ key }}:</td>
                            <td style="text-align: left;padding: 2px 5px 2px 10px;">{{value}}</td>
                        </tr>
                    {% endif %}
                {% endfor %}
            </table>

        </div>
        <a href="https://stabrise.com/scaledp/"><img src="https://raw.githubusercontent.com/StabRise/ScaleDP/refs/heads/master/images/scaledp.webp"
                style="width: 200px; margin:10px 20px 0 0px;justify-self: end;"/></a>
    </div>
        {% if metadata.Exception %}
            <p><pre style="border-radius: 8px;overflow:auto;background-color: rgb(255, 221, 221);padding: 1em;">{{metadata.Exception}}</pre></p>
        {% else %}
            {% block body %}
            {% endblock %}
        {% endif %}
</div>
