handbook_engine / app /templates /partials /university.html
internationalscholarsprogram's picture
Update app/templates/partials/university.html
f498bcf verified
{# University section partial β€” iterates within handbook.html #}
<div class="{{ uni.classes | join(' ') }}" {% if uni.anchor %}id="{{ uni.anchor | e }}" {% endif %} {% if uni.sort_order
is not none %}data-sort="{{ uni.sort_order }}" {% endif %} data-section-key="university"
data-section-title="{{ uni.name | e }}">
{# ── University Title ── #}
{% if uni.website %}
<div class="uni-name">
<a class="uni-name-link" href="{{ uni.website | e }}" target="_blank" rel="noopener noreferrer">{{ uni.name | e
}}</a>
</div>
{% else %}
<div class="uni-name">{{ uni.name | e }}</div>
{% endif %}
{# ── Two-column: Summary + Campus Image ── #}
<table class="school-top-table" cellspacing="0" cellpadding="0">
<tr>
<td class="school-top-summary">
{% if uni.overview %}
<ul class="summary-ul">
{% if uni.overview.founded %}<li><span class="lbl">Founded:</span> {{ uni.overview.founded | e }}
</li>{% endif %}
{% if uni.overview.total_students %}<li><span class="lbl">Total Students:</span> {{
uni.overview.total_students | e }}</li>{% endif %}
{% if uni.overview.undergraduates %}<li><span class="lbl">Undergraduate Students:</span> {{
uni.overview.undergraduates | e }}</li>{% endif %}
{% if uni.overview.postgraduates %}<li><span class="lbl">Postgraduate Students:</span> {{
uni.overview.postgraduates | e }}</li>{% endif %}
{% if uni.overview.acceptance_rate %}
<li><span class="lbl">Acceptance Rate:</span> {{ uni.overview.acceptance_rate | e }}</li>
{% endif %}
{% if uni.overview.location %}
<li><span class="lbl">Location:</span> {{ uni.overview.location | e }}</li>
{% endif %}
{% if uni.overview.tuition %}<li><span class="lbl">Yearly Tuition/Out-of-State Tuition:</span> {{
uni.overview.tuition | e }}</li>{% endif %}
</ul>
{% if uni.website %}
<div class="uni-website">
<span class="lbl">Website:</span>
<a href="{{ uni.website | e }}" target="_blank" rel="noopener noreferrer">{{ uni.website | e }}</a>
</div>
{% endif %}
{% endif %}
</td>
<td class="school-top-campus">
{% if uni.campus_image %}
<img class="campus-top-img" src="{{ uni.campus_image | e }}" alt="Campus Image" />
{% else %}
<div class="campus-placeholder-cell">Campus image unavailable</div>
{% endif %}
</td>
</tr>
</table>
{# ── Benefits ── #}
{% if uni.benefits is defined and uni.benefits is not none %}
<div class="benefits-section">
<div class="benefits-bar">Benefits for ISP Students</div>
{% if uni.benefits %}
<ul class="benefits-ul">
{% for b in uni.benefits %}
{% if b %}
<li class="benefit-li"><span class="benefit-bullet">&bull;</span> <span class="benefit-text">{{ b | e
}}</span></li>
{% endif %}
{% endfor %}
</ul>
{% else %}
<div class="muted">No benefits listed.</div>
{% endif %}
</div>
{% endif %}
{# ── Funding ── #}
{% if uni.funding_items %}
<div class="benefits-section">
<div class="benefits-bar">{{ uni.funding_heading | e }}</div>
<ul class="benefits-ul">
{% for item in uni.funding_items %}
{% if item %}
<li class="benefit-li">
<span class="benefit-bullet">&bull;</span>
<span class="benefit-text">{{ item | e }}</span>
</li>
{% endif %}
{% endfor %}
</ul>
</div>
{% endif %}
{# ── Programs Table ── #}
{% if uni.programs is defined %}
<div class="qualify">To qualify for The International Scholars Program at {{ uni.name | e }}, you must be willing to
study any of the following programs:</div>
{% if uni.programs %}
<table class="programs">
<thead>
<tr>
<th>Program</th>
<th>Designation</th>
<th>Entrance Examination</th>
</tr>
</thead>
<tbody>
{% for p in uni.programs %}
<tr>
<td>
{% if p.link %}<a href="{{ p.link | e }}" target="_blank" rel="noopener noreferrer">{{ p.name | e
}}</a>
{% else %}{{ p.name | e }}{% endif %}
</td>
<td>{{ p.designation | e }}</td>
<td>{{ p.entrance | e }}</td>
</tr>
{% endfor %}
</tbody>
</table>
{% else %}
<div class="muted">No programs listed.</div>
{% endif %}
{% endif %}
{# ── Extra Sections ── #}
{% for extra in uni.extra_sections %}
{{ extra.rendered_html }}
{% endfor %}
</div>