Skip to content

Commit c0b80fd

Browse files
committed
fix: surface sponsorship link in header
1 parent 32ae78f commit c0b80fd

5 files changed

Lines changed: 9 additions & 1 deletion

File tree

website/static/style.css

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,9 @@ kbd {
236236

237237
.hero-topbar-actions {
238238
display: flex;
239+
flex-wrap: wrap;
239240
align-items: center;
241+
justify-content: flex-end;
240242
gap: 0.75rem;
241243
}
242244

website/templates/category.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
rel="noopener"
2424
>Submit a project</a
2525
>
26+
<a href="/sponsorship/" class="hero-topbar-link">Sponsorship</a>
2627
</div>
2728
</nav>
2829

website/templates/index.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
rel="noopener"
1919
>Submit a project</a
2020
>
21+
<a href="/sponsorship/" class="hero-topbar-link">Sponsorship</a>
2122
</div>
2223
</nav>
2324

website/templates/sponsorship.html

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
rel="noopener"
2323
>Submit a project</a
2424
>
25+
<a href="/sponsorship/" class="hero-topbar-link">Sponsorship</a>
2526
</div>
2627
</nav>
2728

@@ -48,7 +49,7 @@ <h1>Sponsor Awesome Python</h1>
4849
>Email sponsorship@awesome-python.com</a
4950
>
5051
<a
51-
href="https://github.com/vinta/awesome-python"
52+
href="https://github.com/vinta/awesome-python/blob/master/SPONSORSHIP.md"
5253
class="hero-action hero-action-secondary"
5354
target="_blank"
5455
rel="noopener"

website/tests/test_build.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -283,6 +283,7 @@ def test_build_creates_category_pages_with_metadata_and_links(self, tmp_path):
283283
assert parser.links_by_rel["canonical"] == "https://awesome-python.com/categories/widgets/"
284284
assert parser.meta_by_property["og:url"] == "https://awesome-python.com/categories/widgets/"
285285
assert '<link rel="alternate" type="text/plain" href="/llms.txt" title="LLMs text entry point" />' not in category_html
286+
assert '<a href="/sponsorship/" class="hero-topbar-link">Sponsorship</a>' in category_html
286287
assert "<h1>Widgets</h1>" in category_html
287288
assert 'Widget libraries. Also see <a href="https://example.com/widgets" target="_blank" rel="noopener">awesome-widgets</a>.' in category_html
288289
assert 'href="https://example.com/w1"' in category_html
@@ -481,6 +482,7 @@ def test_index_contains_aligned_homepage_metadata(self, tmp_path):
481482
assert parser.meta_by_name["twitter:description"] == expected_description
482483
assert parser.meta_by_name["twitter:image"] == expected_image
483484
assert "<head>\n <meta charset" in html
485+
assert '<a href="/sponsorship/" class="hero-topbar-link">Sponsorship</a>' in html
484486
assert 'id="hero-category-heading">Browse by category</h2>' in html
485487
assert 'class="hero-category-link" href="/categories/ai-and-agents/"' in html
486488

@@ -750,6 +752,7 @@ def test_sponsorship_page_contains_json_ld(self, tmp_path):
750752
"Sponsorship for awesome-python: tiers, audience, and how to get your product in front of professional Python developers evaluating tools for production use."
751753
)
752754
assert parser.links_by_rel["canonical"] == "https://awesome-python.com/sponsorship/"
755+
assert '<a href="/sponsorship/" class="hero-topbar-link">Sponsorship</a>' in html
753756

754757
marker = '<script type="application/ld+json">'
755758
start = html.index(marker) + len(marker)

0 commit comments

Comments
 (0)