mirror of
https://github.com/vinta/awesome-python.git
synced 2026-05-23 02:31:14 +08:00
feat: show category label on mobile in project name column
On narrow screens the category column is hidden. This adds a .mobile-cat span inside the name cell that renders the first category below the project name, giving mobile users the context they were missing. Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -611,6 +611,10 @@ kbd {
|
|||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.mobile-cat {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
.col-name > a {
|
.col-name > a {
|
||||||
color: var(--ink);
|
color: var(--ink);
|
||||||
font-size: clamp(1rem, 1.5vw, 1.08rem);
|
font-size: clamp(1rem, 1.5vw, 1.08rem);
|
||||||
@@ -1066,6 +1070,18 @@ th[data-sort].sort-asc::after {
|
|||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.col-name {
|
||||||
|
white-space: normal;
|
||||||
|
}
|
||||||
|
|
||||||
|
.mobile-cat {
|
||||||
|
display: block;
|
||||||
|
margin-top: 0.25rem;
|
||||||
|
font-size: var(--text-tag);
|
||||||
|
font-weight: 600;
|
||||||
|
color: var(--ink-muted);
|
||||||
|
}
|
||||||
|
|
||||||
.col-stars {
|
.col-stars {
|
||||||
width: 5.4rem;
|
width: 5.4rem;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -151,6 +151,7 @@
|
|||||||
<a href="{{ entry.url }}" target="_blank" rel="noopener"
|
<a href="{{ entry.url }}" target="_blank" rel="noopener"
|
||||||
>{{ entry.name }}</a
|
>{{ entry.name }}</a
|
||||||
>
|
>
|
||||||
|
<span class="mobile-cat">{{ entry.categories[0] }}</span>
|
||||||
</td>
|
</td>
|
||||||
<td class="col-stars">
|
<td class="col-stars">
|
||||||
{% if entry.stars is not none %}{{ "{:,}".format(entry.stars) }}{%
|
{% if entry.stars is not none %}{{ "{:,}".format(entry.stars) }}{%
|
||||||
|
|||||||
Reference in New Issue
Block a user