refactor(website): move the sponsor band into a template partial

The sponsor band markup lived inline in index.html, so another page could show it only by copying the markup. The rendered homepage is byte-identical.

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
Vinta Chen
2026-10-21 09:09:22 +08:00
co-authored by Claude
parent 636584efd2
commit 45ad644f1b
2 changed files with 26 additions and 25 deletions
+25
View File
@@ -0,0 +1,25 @@
{% if sponsors %}
<section class="sponsor-band" aria-labelledby="sponsor-heading" data-reveal>
<div class="section-shell sponsor-shell">
<header class="sponsor-meta">
<p class="section-label" id="sponsor-heading">Sponsors</p>
<a class="sponsor-become" href="/sponsorship/"> Become a sponsor </a>
</header>
<ul class="sponsor-list">
{% for sponsor in sponsors %}
<li class="sponsor">
<a
class="sponsor-link"
href="{{ sponsor.url }}"
target="_blank"
rel="noopener"
>
<span class="sponsor-name">{{ sponsor.name }}</span>
</a>
<p class="sponsor-desc">{{ sponsor.description | safe }}</p>
</li>
{% endfor %}
</ul>
</div>
</section>
{% endif %}
+1 -25
View File
@@ -70,31 +70,7 @@
</header>
{% endblock %}
{% block content %}
{% if sponsors %}
<section class="sponsor-band" aria-labelledby="sponsor-heading" data-reveal>
<div class="section-shell sponsor-shell">
<header class="sponsor-meta">
<p class="section-label" id="sponsor-heading">Sponsors</p>
<a class="sponsor-become" href="/sponsorship/"> Become a sponsor </a>
</header>
<ul class="sponsor-list">
{% for sponsor in sponsors %}
<li class="sponsor">
<a
class="sponsor-link"
href="{{ sponsor.url }}"
target="_blank"
rel="noopener"
>
<span class="sponsor-name">{{ sponsor.name }}</span>
</a>
<p class="sponsor-desc">{{ sponsor.description | safe }}</p>
</li>
{% endfor %}
</ul>
</div>
</section>
{% endif %}
{% include "_sponsor_band.html" %}
<section class="results-section" id="library-index">
<div class="results-intro section-shell" data-reveal>