Skip to content

Commit 93584f4

Browse files
Copilotunbug
andauthored
fix: unify Featured top-3 badges to gold, add badges to post detail Featured section (#43)
Agent-Logs-Url: https://github.com/unbug/unbug.github.io/sessions/f9749eb5-4f40-4f82-8264-66862866bb95 Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: unbug <799578+unbug@users.noreply.github.com>
1 parent e431089 commit 93584f4

2 files changed

Lines changed: 5 additions & 4 deletions

File tree

_layouts/post.html

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -106,10 +106,11 @@ <h5 class="font-weight-bold spanborder"><span>Related</span></h5>
106106
<h5 class="font-weight-bold spanborder"><span>Featured</span></h5>
107107
<ol class="list-featured">
108108
{% for post in site.tags.featured %}
109-
<li class="mb-4">
109+
{% assign rank = forloop.index %}
110+
<li class="mb-4{% if rank <= 3 %} featured-rank-{{ rank }}{% endif %}">
110111
<span>
111112
<h6 class="font-weight-bold">
112-
<a href="{{site.baseurl}}{{ post.url }}" class="text-dark">{{ post.title }}</a>
113+
<a href="{{site.baseurl}}{{ post.url }}" class="text-dark">{{ post.title }}</a>{% if rank <= 3 %}<span class="featured-badge featured-badge-{{ rank }}">推荐</span>{% endif %}
113114
</h6>
114115
<span class="d-block text-muted">
115116
In <span class="catlist">

assets/css/theme.css

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -716,10 +716,10 @@ ol.list-featured li.featured-rank-3:before {
716716
background-color: #FFB800;
717717
}
718718
.featured-badge-2 {
719-
background-color: #A0A0A0;
719+
background-color: #FFB800;
720720
}
721721
.featured-badge-3 {
722-
background-color: #C8763A;
722+
background-color: #FFB800;
723723
}
724724
.catlist .sep:last-child {
725725
display:none;

0 commit comments

Comments
 (0)