<style id="print-style" scoped>
    html, body {
        margin: 0;
        padding: 0;
    }

    .template-28-page {
        width: 100%;
        margin: 0;
        page-break-after: always;
    }

    .template-28-certificate {
        width: 100%;
        min-height: 282mm;
        padding: 88mm 5mm 16mm 5mm;
        font-family: "Times New Roman", serif;
        color: #222;
    }

    .template-28-body {
        width: 100%;
        font-size: 28px;
    }

    .template-28-line {
        display: table;
        width: 100%;
        border-collapse: separate;
        border-spacing: 0;
        margin-bottom: 40px;
    }

    .template-28-text {
        display: table-cell;
        width: 1px;
        white-space: nowrap;
        vertical-align: bottom;
        padding-bottom: 3px;
    }

    .template-28-leader {
        display: table-cell;
        vertical-align: bottom;
        border-bottom: 2px dotted #333;
        padding: 0 3px 3px;
        font-weight: 600;
        white-space: nowrap;
        overflow: hidden;
    }

    .template-28-name,
    .template-28-parent,
    .template-28-register,
    .template-28-degree,
    .template-28-month,
    .template-28-grade,
    .template-28-class {
        text-transform: uppercase;
    }

    .template-28-class {
        width: 28mm;
    }

    .template-28-award-note {
        width: 100%;
        margin: 85px 0 0;
        font-size: 28px;
        line-height: 2.5;
        text-align: justify;
    }
</style>
{% for student in data.studentData %}
	{% if student.isResultBlocked == true %}
		{# NOT AVAILABALE #}
		<div class="page-a4" style="page-break-after: always; page-break-before: always;    padding-top: 150px; padding-bottom: 150px;">
			<div class='text-danger bold text-center fsize-14 failed'>RESULT IS BLOCKED FOR THE STUDENT {{student.name|raw |upper}} ({{student.regNo|raw}}) </div>
		</div>
	{% else %}
        {% set parentName = student.fatherName|default(student.motherName|default('')) %}
        {% set overallGrade = student.overallGrade|default(student.markDetails.grade|default('')) %}
        <div class='template-28-page'>
            <div class='template-28-certificate'>
                <div class='template-28-body'>
                    <div class='template-28-line'>
                        <span class='template-28-text'>This is to certify that Mr./Ms.&#160;</span>
                        <span class='template-28-leader template-28-name'>{{ student.name ?: '&nbsp;' | raw }}</span>
                    </div>
                    <div class='template-28-line'>
                        <span class='template-28-text'>Son / Daughter of Shri&#160;</span>
                        <span class='template-28-leader template-28-parent'>{% if parentName %}{{ parentName }}{% else %}&nbsp;{% endif %}</span>
                        <span class='template-28-text'>&#160;bearing</span>
                    </div>
                    <div class='template-28-line'>
                        <span class='template-28-text'>Register Number&#160;</span>
                        <span class='template-28-leader template-28-register'>{% if student.regNo %}{{ student.regNo }}{% else %}&nbsp;{% endif %}</span>
                        <span class='template-28-text'>&#160;has successfully fulfilled all the</span>
                    </div>
                    <div class='template-28-line'>
                        <span class='template-28-text'>requirements for award of the degree in&#160;</span>
                        <span class='template-28-leader template-28-degree'>{% if student.streamName %}{{ student.streamName }}{% else %}&nbsp;{% endif %}</span>
                        <span class='template-28-text'>&#160;securing a</span>
                    </div>
                    <div class='template-28-line'>
                        <span class='template-28-leader template-28-class'>{% if student.markDetails.class %}{{ student.markDetails.class }}{% else %}&nbsp;{% endif %}</span>
                        <span class='template-28-text'>&#160;Class with&#160;</span>
                        <span class='template-28-leader template-28-grade'>{% if overallGrade %}{{ overallGrade }}{% else %}&nbsp;{% endif %}</span>
                        <span class='template-28-text'>&#160;Grade in the examination</span>
                    </div>
                    <div class='template-28-line'>
                        <span class='template-28-text'>held in the month of&#160;</span>
                        <span class='template-28-leader template-28-month'>{% if student.lastMonthYear %}{{ student.lastMonthYear|replace({' - ': ' '}) }}{% else %}&nbsp;{% endif %}</span>
                    </div>
                </div>

                <div class='template-28-award-note'>
                    This certificate has been awarded from this College under Bengaluru City University, Bengaluru, Karnataka.
                </div>
            </div>
        </div>
    {% endif %}
{% endfor %}
