Merge branch 'fix/ui-issues'

This commit is contained in:
Vinta Chen
2026-10-26 12:08:16 +08:00
9 changed files with 293 additions and 521 deletions
+5 -1
View File
@@ -1905,7 +1905,10 @@ th[data-sort].sort-asc::after {
}
.col-num,
.col-cat {
.col-cat,
.group-count,
/* Leaves the arrow column as narrow as the row arrows */
.back-to-top-label {
display: none;
}
@@ -1947,6 +1950,7 @@ th[data-sort].sort-asc::after {
.col-arrow {
width: 1.8rem;
text-align: right;
}
}
+22
View File
@@ -0,0 +1,22 @@
<nav class="hero-category-nav" aria-labelledby="hero-category-heading">
<details class="hero-category-details" open>
<summary class="hero-category-meta">
<h2 id="hero-category-heading">Browse by category</h2>
</summary>
<ul class="hero-category-links">
{% for category in nav_categories %}
<li>
<a class="hero-category-link" href="{{ category_urls[category.name] }}"
>{{ category.name }}</a
>
</li>
{% endfor %}
</ul>
</details>
<script>
// Collapse before first paint on phones, where the open list pushes the table about 1.5 screens down
if (matchMedia("(max-width: 680px)").matches) {
document.currentScript.previousElementSibling.open = false;
}
</script>
</nav>
+133
View File
@@ -0,0 +1,133 @@
{% macro entry_rows(entry, index, home=false) %}
{# On section and subcategory pages the group heading already names the row's use case #}
{% set grouped_page = entry_groups and not group_categories %}
{% set section_path = "/categories/" ~ parent_category.slug ~ "/" if parent_category else current_path %}
<tr
class="row"
{% if not home and not group_categories %}id="entry-{{ entry.name | slugify }}"{% endif %}
tabindex="0"
aria-expanded="false"
aria-controls="expand-{{ index }}"
>
<td class="col-num">{{ index }}</td>
<td class="col-name">
<a href="{{ entry.url }}" target="_blank" rel="noopener"
>{{ entry.name }}</a
>
<span class="mobile-cat{% if grouped_page and (not entry.subcategories or category_urls[entry.subcategories[0].value.split(' > ')[0]] == section_path) %} repeats-heading{% endif %}"
>{% if entry.subcategories %}{{ entry.subcategories[0].name }}{%
else %}{{ entry.categories[0] if home else category.name }}{% endif %}</span
>
</td>
<td class="col-downloads">
{% if entry.downloads is not none %}{{
"{:,}".format(entry.downloads) }}{% elif entry.source_type ==
'Stdlib' %}<span class="source-badge">Stdlib</span>{% elif
entry.bundled %}<span class="source-badge">Bundled</span>{% elif
entry.badge %}<span class="source-badge">{{ entry.badge }}</span>{%
else %}<span class="source-badge">Not on PyPI</span>{% endif %}
</td>
<td class="col-stars">
{% if entry.stars is not none %}{{ "{:,}".format(entry.stars) }}{%
elif entry.source_type %}<span class="source-badge"
>{{ entry.source_type }}</span
>{% else %}&mdash;{% endif %}
</td>
<td
class="col-commit"
{%
if
entry.last_commit_at
%}data-commit="{{ entry.last_commit_at }}"
{%
endif
%}
>
{% if entry.last_commit_at %}<time
datetime="{{ entry.last_commit_at }}"
>{{ entry.last_commit_at[:10] }}</time
>{% else %}&mdash;{% endif %}
</td>
<td class="col-cat">
{% for subcat in entry.subcategories %}
<a class="tag{% if subcat.url == current_path %} active{% endif %}{% if grouped_page and category_urls[subcat.value.split(' > ')[0]] == section_path %} repeats-heading{% endif %}" href="{{ category_urls[subcat.value.split(' > ')[0]] }}#{{ subcat.slug }}">
{{ subcat.name }}
</a>
{% endfor %}
{% for cat in entry.categories %}
<a
class="tag{% if category_urls[cat] == current_path %} active{% endif %}{% if grouped_page and category_urls[cat] == current_path %} repeats-heading{% endif %}"
href="{{ category_urls[cat] }}"
>{{ cat }}</a
>
{% endfor %}
{% if entry.groups %}
{% set group_url = filter_urls[entry.groups[0]] %}
<a
class="tag tag-group{% if group_url == current_path %} active{% endif %}"
href="{{ group_url }}"
>
{{ entry.groups[0] }}
</a>
{% endif %}
{% if entry.source_type == 'Stdlib' %}
<a
class="tag tag-source{% if '/categories/built-in/' == current_path %} active{% endif %}"
href="/categories/built-in/"
>
Stdlib
</a>
{% endif %}
</td>
<td class="col-arrow"><span class="arrow" aria-hidden="true">&rarr;</span></td>
</tr>
{% if entry.description %}
<tr class="desc-row"{% if home %} hidden{% endif %}>
<td class="col-num"></td>
<td colspan="6">
<div class="desc-text">{{ entry.description | safe }}</div>
</td>
</tr>
{% endif %}
<tr class="expand-row" id="expand-{{ index }}">
<td></td>
<td colspan="5">
<div class="expand-content">
{% if entry.also_see %}
<div class="expand-also-see">
Also see: {% for see in entry.also_see %}<a
href="{{ see.url }}"
target="_blank"
rel="noopener"
>{{ see.name }}</a
>{% if not loop.last %}, {% endif %}{% endfor %}
</div>
{% endif %}
<div class="expand-meta">
{% if entry.owner %}<a
href="https://github.com/{{ entry.owner }}"
target="_blank"
rel="noopener"
>{{ entry.owner }}</a
><span class="expand-sep">/</span>{% endif %}<a
href="{{ entry.url }}"
target="_blank"
rel="noopener"
>{{ entry.url | replace("https://", "") }}</a
>
{% if entry.stars is not none %}<span
class="expand-stars"
><span class="expand-sep">/</span>{{
"{:,}".format(entry.stars) }} stars</span
>{% endif %} {% if entry.last_commit_at %}<span class="expand-commit"
><span class="expand-sep">/</span
><time datetime="{{ entry.last_commit_at }}"
>{{ entry.last_commit_at[:10] }}</time
></span
>{% endif %}
</div>
</div>
</td>
<td></td>
</tr>
{% endmacro %}
+23
View File
@@ -0,0 +1,23 @@
<section class="final-cta">
<div class="section-shell">
<p class="section-label">Contribute</p>
<h2>Know a project that belongs here?</h2>
<p>Tell us what it does and why it stands out.</p>
<div class="final-cta-actions">
<a
href="https://github.com/vinta/awesome-python/blob/master/CONTRIBUTING.md"
class="hero-action hero-action-primary"
target="_blank"
rel="noopener"
>Submit a project</a
>
<a
href="https://github.com/vinta/awesome-python"
class="hero-action hero-action-secondary"
target="_blank"
rel="noopener"
>Star the repository</a
>
</div>
</div>
</section>
+74
View File
@@ -0,0 +1,74 @@
{% macro projects_table(count, scope, editorial=false) %}
<div class="controls section-shell">
<h2 class="sr-only">Search and filter</h2>
<div class="search-wrap">
<svg
class="search-icon"
aria-hidden="true"
width="16"
height="16"
viewBox="0 0 24 24"
fill="none"
stroke="currentColor"
stroke-width="2.5"
stroke-linecap="round"
stroke-linejoin="round"
>
<circle cx="11" cy="11" r="8" />
<line x1="21" y1="21" x2="16.65" y2="16.65" />
</svg>
<input
type="search"
class="search"
placeholder="Search {{ count }} project{{ "s" if count != 1 }} {{ scope }}…"
data-short-placeholder="Search {{ count }} project{{ "s" if count != 1 }}…"
aria-label="Search projects"
/>
</div>
</div>
<h2 class="sr-only">Results</h2>
<div
class="table-wrap"
tabindex="0"
role="region"
aria-label="Projects table"
>
<table class="table"{% if editorial %} data-default-sort="editorial"{% endif %}>
<thead>
<tr>
<th class="col-num"><span class="sr-only">Row number</span></th>
<th class="col-name" data-sort="name">
<button type="button" class="sort-btn">Project Name</button>
</th>
<th class="col-downloads" data-sort="downloads">
<button type="button" class="sort-btn" title="PyPI downloads, last 30 days">PyPI Downloads</button>
</th>
<th class="col-stars" data-sort="stars">
<button type="button" class="sort-btn">GitHub Stars</button>
</th>
<th class="col-commit" data-sort="commit-time">
<button type="button" class="sort-btn">Last Commit</button>
</th>
<th class="col-cat">Tags</th>
<th class="col-arrow">
<button class="back-to-top" aria-label="Back to top">
<span class="back-to-top-label">Top</span> &uarr;
</button>
</th>
</tr>
</thead>
<tbody>
{{ caller() }}
</tbody>
</table>
</div>
<div class="no-results" hidden>
<p>No projects match your search.</p>
<p class="no-results-hint">
Try a broader term, or
<button class="no-results-clear">browse all projects</button>.
</p>
</div>
{% endmacro %}
+20
View File
@@ -0,0 +1,20 @@
<nav class="hero-topbar{% if not home %} category-topbar{% endif %}" aria-label="Site">
{% if home %}
<span class="hero-brand-mini">Awesome Python</span>
{% else %}
<a href="/" class="hero-brand-mini">Awesome Python</a>
{% endif %}
<div class="hero-topbar-actions">
{% if all_projects %}
<a href="/#library-index" class="hero-topbar-link">All projects</a>
{% endif %}
<a
href="https://github.com/vinta/awesome-python/blob/master/CONTRIBUTING.md"
class="hero-topbar-link hero-topbar-link-strong"
target="_blank"
rel="noopener"
>Submit a project</a
>
<a href="/sponsorship/" class="hero-topbar-link">Sponsorship</a>
</div>
</nav>
+7 -255
View File
@@ -1,4 +1,6 @@
{% extends "base.html" %}
{% from "_projects_table.html" import projects_table %}
{% from "_entry_rows.html" import entry_rows with context %}
{% block title %}{{ category_title }}{% endblock %}
{% block description %}{{ category_description }}{% endblock %}
{% block canonical_url %}{{ category_url }}{% endblock %}
@@ -11,20 +13,7 @@
<div class="hero-noise" aria-hidden="true"></div>
<div class="category-hero-shell">
<nav class="hero-topbar category-topbar" aria-label="Site">
<a href="/" class="hero-brand-mini">Awesome Python</a>
<div class="hero-topbar-actions">
<a href="/#library-index" class="hero-topbar-link">All projects</a>
<a
href="https://github.com/vinta/awesome-python/blob/master/CONTRIBUTING.md"
class="hero-topbar-link hero-topbar-link-strong"
target="_blank"
rel="noopener"
>Submit a project</a
>
<a href="/sponsorship/" class="hero-topbar-link">Sponsorship</a>
</div>
</nav>
{%+ with all_projects = true %}{% include "_topbar.html" %}{% endwith +%}
<div class="category-hero-copy">
{% if parent_category %}
@@ -55,158 +44,12 @@
</div>
{% if group_categories %}
<nav class="hero-category-nav" aria-labelledby="hero-category-heading">
<div class="hero-category-meta">
<h2 id="hero-category-heading">Browse by category</h2>
</div>
<ul class="hero-category-links">
{% for sub in group_categories %}
<li>
<a class="hero-category-link" href="{{ category_urls[sub.name] }}"
>{{ sub.name }}</a
>
</li>
{% endfor %}
</ul>
</nav>
{%+ with nav_categories = group_categories %}{% include "_category_nav.html" %}{% endwith +%}
{% endif %}
</div>
</header>
{% endblock %}
{% block content %}
{% macro entry_rows(entry, index) %}
{# On section and subcategory pages the group heading already names the row's use case #}
{% set grouped_page = entry_groups and not group_categories %}
{% set section_path = "/categories/" ~ parent_category.slug ~ "/" if parent_category else current_path %}
<tr
class="row"
{% if not group_categories %}id="entry-{{ entry.name | slugify }}"{% endif %}
tabindex="0"
aria-expanded="false"
aria-controls="expand-{{ index }}"
>
<td class="col-num">{{ index }}</td>
<td class="col-name">
<a href="{{ entry.url }}" target="_blank" rel="noopener"
>{{ entry.name }}</a
>
<span class="mobile-cat{% if grouped_page and (not entry.subcategories or category_urls[entry.subcategories[0].value.split(' > ')[0]] == section_path) %} repeats-heading{% endif %}"
>{% if entry.subcategories %}{{ entry.subcategories[0].name }}{%
else %}{{ category.name }}{% endif %}</span
>
</td>
<td class="col-downloads">
{% if entry.downloads is not none %}{{
"{:,}".format(entry.downloads) }}{% elif entry.source_type ==
'Stdlib' %}<span class="source-badge">Stdlib</span>{% elif
entry.bundled %}<span class="source-badge">Bundled</span>{% elif
entry.badge %}<span class="source-badge">{{ entry.badge }}</span>{%
else %}<span class="source-badge">Not on PyPI</span>{% endif %}
</td>
<td class="col-stars">
{% if entry.stars is not none %}{{ "{:,}".format(entry.stars) }}{%
elif entry.source_type %}<span class="source-badge"
>{{ entry.source_type }}</span
>{% else %}&mdash;{% endif %}
</td>
<td
class="col-commit"
{%
if
entry.last_commit_at
%}data-commit="{{ entry.last_commit_at }}"
{%
endif
%}
>
{% if entry.last_commit_at %}<time
datetime="{{ entry.last_commit_at }}"
>{{ entry.last_commit_at[:10] }}</time
>{% else %}&mdash;{% endif %}
</td>
<td class="col-cat">
{% for subcat in entry.subcategories %}
<a class="tag{% if subcat.url == current_path %} active{% endif %}{% if grouped_page and category_urls[subcat.value.split(' > ')[0]] == section_path %} repeats-heading{% endif %}" href="{{ category_urls[subcat.value.split(' > ')[0]] }}#{{ subcat.slug }}">
{{ subcat.name }}
</a>
{% endfor %}
{% for cat in entry.categories %}
<a
class="tag{% if category_urls[cat] == current_path %} active{% endif %}{% if grouped_page and category_urls[cat] == current_path %} repeats-heading{% endif %}"
href="{{ category_urls[cat] }}"
>{{ cat }}</a
>
{% endfor %}
{% if entry.groups %}
{% set group_url = filter_urls[entry.groups[0]] %}
<a
class="tag tag-group{% if group_url == current_path %} active{% endif %}"
href="{{ group_url }}"
>
{{ entry.groups[0] }}
</a>
{% endif %}
{% if entry.source_type == 'Stdlib' %}
<a
class="tag tag-source{% if '/categories/built-in/' == current_path %} active{% endif %}"
href="/categories/built-in/"
>
Stdlib
</a>
{% endif %}
</td>
<td class="col-arrow"><span class="arrow" aria-hidden="true">&rarr;</span></td>
</tr>
{% if entry.description %}
<tr class="desc-row">
<td class="col-num"></td>
<td colspan="6">
<div class="desc-text">{{ entry.description | safe }}</div>
</td>
</tr>
{% endif %}
<tr class="expand-row" id="expand-{{ index }}">
<td></td>
<td colspan="5">
<div class="expand-content">
{% if entry.also_see %}
<div class="expand-also-see">
Also see: {% for see in entry.also_see %}<a
href="{{ see.url }}"
target="_blank"
rel="noopener"
>{{ see.name }}</a
>{% if not loop.last %}, {% endif %}{% endfor %}
</div>
{% endif %}
<div class="expand-meta">
{% if entry.owner %}<a
href="https://github.com/{{ entry.owner }}"
target="_blank"
rel="noopener"
>{{ entry.owner }}</a
><span class="expand-sep">/</span>{% endif %}<a
href="{{ entry.url }}"
target="_blank"
rel="noopener"
>{{ entry.url | replace("https://", "") }}</a
>
{% if entry.stars is not none %}<span
class="expand-stars"
><span class="expand-sep">/</span>{{
"{:,}".format(entry.stars) }} stars</span
>{% endif %} {% if entry.last_commit_at %}<span class="expand-commit"
><span class="expand-sep">/</span
><time datetime="{{ entry.last_commit_at }}"
>{{ entry.last_commit_at[:10] }}</time
></span
>{% endif %}
</div>
</div>
</td>
<td></td>
</tr>
{% endmacro %}
{% include "_sponsor_band.html" %}
<section class="results-section" id="library-index">
@@ -229,66 +72,7 @@
</p>
</div>
<div class="controls section-shell">
<h2 class="sr-only">Search and filter</h2>
<div class="search-wrap">
<svg
class="search-icon"
aria-hidden="true"
width="16"
height="16"
viewBox="0 0 24 24"
fill="none"
stroke="currentColor"
stroke-width="2.5"
stroke-linecap="round"
stroke-linejoin="round"
>
<circle cx="11" cy="11" r="8" />
<line x1="21" y1="21" x2="16.65" y2="16.65" />
</svg>
<input
type="search"
class="search"
placeholder="Search {{ entries | length }} project{{ "s" if not single_entry }} in {{ category.name }}…"
data-short-placeholder="Search {{ entries | length }} project{{ "s" if not single_entry }}…"
aria-label="Search projects"
/>
</div>
</div>
<h2 class="sr-only">Results</h2>
<div
class="table-wrap"
tabindex="0"
role="region"
aria-label="Projects table"
>
<table class="table"{% if entry_groups %} data-default-sort="editorial"{% endif %}>
<thead>
<tr>
<th class="col-num"><span class="sr-only">Row number</span></th>
<th class="col-name" data-sort="name">
<button type="button" class="sort-btn">Project Name</button>
</th>
<th class="col-downloads" data-sort="downloads">
<button type="button" class="sort-btn" title="PyPI downloads, last 30 days">PyPI Downloads</button>
</th>
<th class="col-stars" data-sort="stars">
<button type="button" class="sort-btn">GitHub Stars</button>
</th>
<th class="col-commit" data-sort="commit-time">
<button type="button" class="sort-btn">Last Commit</button>
</th>
<th class="col-cat">Tags</th>
<th class="col-arrow">
<button class="back-to-top" aria-label="Back to top">
Top &uarr;
</button>
</th>
</tr>
</thead>
<tbody>
{% call projects_table(entries | length, "in " ~ category.name, entry_groups) %}
{% if entry_groups %}
{% set row = namespace(index=0) %}
{% for group in entry_groups %}
@@ -315,17 +99,7 @@
{{ entry_rows(entry, loop.index) }}
{% endfor %}
{% endif %}
</tbody>
</table>
</div>
<div class="no-results" hidden>
<p>No projects match your search.</p>
<p class="no-results-hint">
Try a broader term, or
<button class="no-results-clear">browse all projects</button>.
</p>
</div>
{% endcall %}
</section>
{% if guide_html %}
@@ -337,27 +111,5 @@
</section>
{% endif %}
<section class="final-cta">
<div class="section-shell">
<p class="section-label">Contribute</p>
<h2>Know a project that belongs here?</h2>
<p>Tell us what it does and why it stands out.</p>
<div class="final-cta-actions">
<a
href="https://github.com/vinta/awesome-python/blob/master/CONTRIBUTING.md"
class="hero-action hero-action-primary"
target="_blank"
rel="noopener"
>Submit a project</a
>
<a
href="https://github.com/vinta/awesome-python"
class="hero-action hero-action-secondary"
target="_blank"
rel="noopener"
>Star the repository</a
>
</div>
</div>
</section>
{% include "_final_cta.html" +%}
{% endblock %}
+8 -252
View File
@@ -1,4 +1,6 @@
{% extends "base.html" %}
{% from "_projects_table.html" import projects_table %}
{% from "_entry_rows.html" import entry_rows with context %}
{% block extra_head %}
<script type="application/ld+json">{{ homepage_json_ld | safe }}</script>
{% endblock %}
@@ -7,19 +9,7 @@
<div class="hero-noise" aria-hidden="true"></div>
<div class="hero-shell">
<nav class="hero-topbar" aria-label="Site">
<span class="hero-brand-mini">Awesome Python</span>
<div class="hero-topbar-actions">
<a
href="https://github.com/vinta/awesome-python/blob/master/CONTRIBUTING.md"
class="hero-topbar-link hero-topbar-link-strong"
target="_blank"
rel="noopener"
>Submit a project</a
>
<a href="/sponsorship/" class="hero-topbar-link">Sponsorship</a>
</div>
</nav>
{%+ with home = true %}{% include "_topbar.html" %}{% endwith +%}
<div class="hero-grid">
<div class="hero-copy">
@@ -50,28 +40,7 @@
</div>
</div>
<nav class="hero-category-nav" aria-labelledby="hero-category-heading">
<details class="hero-category-details" open>
<summary class="hero-category-meta">
<h2 id="hero-category-heading">Browse by category</h2>
</summary>
<ul class="hero-category-links">
{% for category in categories %}
<li>
<a class="hero-category-link" href="{{ category_urls[category.name] }}"
>{{ category.name }}</a
>
</li>
{% endfor %}
</ul>
</details>
<script>
// Collapse before first paint on phones, where the open list pushes the table about 1.5 screens down
if (matchMedia("(max-width: 680px)").matches) {
document.currentScript.previousElementSibling.open = false;
}
</script>
</nav>
{%+ with nav_categories = categories %}{% include "_category_nav.html" %}{% endwith +%}
</div>
</header>
{% endblock %}
@@ -89,225 +58,12 @@
</p>
</div>
<div class="controls section-shell">
<h2 class="sr-only">Search and filter</h2>
<div class="search-wrap">
<svg
class="search-icon"
aria-hidden="true"
width="16"
height="16"
viewBox="0 0 24 24"
fill="none"
stroke="currentColor"
stroke-width="2.5"
stroke-linecap="round"
stroke-linejoin="round"
>
<circle cx="11" cy="11" r="8" />
<line x1="21" y1="21" x2="16.65" y2="16.65" />
</svg>
<input
type="search"
class="search"
placeholder="Search {{ entries | length }} projects across {{ total_categories }} categories…"
data-short-placeholder="Search {{ entries | length }} projects…"
aria-label="Search projects"
/>
</div>
</div>
<h2 class="sr-only">Results</h2>
<div
class="table-wrap"
tabindex="0"
role="region"
aria-label="Projects table"
>
<table class="table">
<thead>
<tr>
<th class="col-num"><span class="sr-only">Row number</span></th>
<th class="col-name" data-sort="name">
<button type="button" class="sort-btn">Project Name</button>
</th>
<th class="col-downloads" data-sort="downloads">
<button type="button" class="sort-btn" title="PyPI downloads, last 30 days">PyPI Downloads</button>
</th>
<th class="col-stars" data-sort="stars">
<button type="button" class="sort-btn">GitHub Stars</button>
</th>
<th class="col-commit" data-sort="commit-time">
<button type="button" class="sort-btn">Last Commit</button>
</th>
<th class="col-cat">Tags</th>
<th class="col-arrow">
<button class="back-to-top" aria-label="Back to top">
Top &uarr;
</button>
</th>
</tr>
</thead>
<tbody>
{% call projects_table(entries | length, "across " ~ total_categories ~ " categories") %}
{% for entry in entries %}
<tr
class="row"
tabindex="0"
aria-expanded="false"
aria-controls="expand-{{ loop.index }}"
>
<td class="col-num">{{ loop.index }}</td>
<td class="col-name">
<a href="{{ entry.url }}" target="_blank" rel="noopener"
>{{ entry.name }}</a
>
<span class="mobile-cat"
>{% if entry.subcategories %}{{ entry.subcategories[0].name }}{%
else %}{{ entry.categories[0] }}{% endif %}</span
>
</td>
<td class="col-downloads">
{% if entry.downloads is not none %}{{
"{:,}".format(entry.downloads) }}{% elif entry.source_type ==
'Stdlib' %}<span class="source-badge">Stdlib</span>{% elif
entry.bundled %}<span class="source-badge">Bundled</span>{% elif
entry.badge %}<span class="source-badge">{{ entry.badge }}</span>{%
else %}<span class="source-badge">Not on PyPI</span>{% endif %}
</td>
<td class="col-stars">
{% if entry.stars is not none %}{{ "{:,}".format(entry.stars) }}{%
elif entry.source_type %}<span class="source-badge"
>{{ entry.source_type }}</span
>{% else %}&mdash;{% endif %}
</td>
<td
class="col-commit"
{%
if
entry.last_commit_at
%}data-commit="{{ entry.last_commit_at }}"
{%
endif
%}
>
{% if entry.last_commit_at %}<time
datetime="{{ entry.last_commit_at }}"
>{{ entry.last_commit_at[:10] }}</time
>{% else %}&mdash;{% endif %}
</td>
<td class="col-cat">
{% for subcat in entry.subcategories %}
<a class="tag" href="{{ category_urls[subcat.value.split(' > ')[0]] }}#{{ subcat.slug }}">
{{ subcat.name }}
</a>
{% endfor %} {% for cat in entry.categories %}
<a
class="tag"
href="{{ category_urls[cat] }}"
>{{ cat }}</a
>
{% endfor %}
<a
class="tag tag-group"
href="{{ filter_urls[entry.groups[0]] }}"
>
{{ entry.groups[0] }}
</a>
{% if entry.source_type == 'Stdlib' %}
<a
class="tag tag-source"
href="/categories/built-in/"
>
Stdlib
</a>
{% endif %}
</td>
<td class="col-arrow"><span class="arrow" aria-hidden="true">&rarr;</span></td>
</tr>
{% if entry.description %}
<tr class="desc-row" hidden>
<td class="col-num"></td>
<td colspan="6">
<div class="desc-text">{{ entry.description | safe }}</div>
</td>
</tr>
{% endif %}
<tr class="expand-row" id="expand-{{ loop.index }}">
<td></td>
<td colspan="5">
<div class="expand-content">
{% if entry.also_see %}
<div class="expand-also-see">
Also see: {% for see in entry.also_see %}<a
href="{{ see.url }}"
target="_blank"
rel="noopener"
>{{ see.name }}</a
>{% if not loop.last %}, {% endif %}{% endfor %}
</div>
{% endif %}
<div class="expand-meta">
{% if entry.owner %}<a
href="https://github.com/{{ entry.owner }}"
target="_blank"
rel="noopener"
>{{ entry.owner }}</a
><span class="expand-sep">/</span>{% endif %}<a
href="{{ entry.url }}"
target="_blank"
rel="noopener"
>{{ entry.url | replace("https://", "") }}</a
>
{% if entry.stars is not none %}<span
class="expand-stars"
><span class="expand-sep">/</span>{{
"{:,}".format(entry.stars) }} stars</span
>{% endif %} {% if entry.last_commit_at %}<span class="expand-commit"
><span class="expand-sep">/</span
><time datetime="{{ entry.last_commit_at }}"
>{{ entry.last_commit_at[:10] }}</time
></span
>{% endif %}
</div>
</div>
</td>
<td></td>
</tr>
{{ entry_rows(entry, loop.index, home=true) }}
{% endfor %}
</tbody>
</table>
</div>
<div class="no-results" hidden>
<p>No projects match your search.</p>
<p class="no-results-hint">
Try a broader term, or
<button class="no-results-clear">browse all projects</button>.
</p>
</div>
{% endcall %}
</section>
<section class="final-cta">
<div class="section-shell">
<p class="section-label">Contribute</p>
<h2>Know a project that belongs here?</h2>
<p>Tell us what it does and why it stands out.</p>
<div class="final-cta-actions">
<a
href="https://github.com/vinta/awesome-python/blob/master/CONTRIBUTING.md"
class="hero-action hero-action-primary"
target="_blank"
rel="noopener"
>Submit a project</a
>
<a
href="https://github.com/vinta/awesome-python"
class="hero-action hero-action-secondary"
target="_blank"
rel="noopener"
>Star the repository</a
>
</div>
</div>
</section>
{% include "_final_cta.html" +%}
{% endblock %}
+1 -13
View File
@@ -11,19 +11,7 @@
<div class="hero-noise" aria-hidden="true"></div>
<div class="category-hero-shell">
<nav class="hero-topbar category-topbar" aria-label="Site">
<a href="/" class="hero-brand-mini">Awesome Python</a>
<div class="hero-topbar-actions">
<a
href="https://github.com/vinta/awesome-python/blob/master/CONTRIBUTING.md"
class="hero-topbar-link hero-topbar-link-strong"
target="_blank"
rel="noopener"
>Submit a project</a
>
<a href="/sponsorship/" class="hero-topbar-link">Sponsorship</a>
</div>
</nav>
{%+ include "_topbar.html" +%}
<div class="category-hero-copy sponsorship-hero-copy">
<p class="hero-kicker">Sponsorship</p>