mirror of
https://github.com/prdlk/leetcode.git
synced 2026-11-02 13:12:44 +00:00
feat(docs): add docs link fallback and inline difficulty badge in changelog page
This commit is contained in:
1 parent
7f6a7d4776
commit
4b8496c113
1 file changed
+5
-11
@@ -82,29 +82,23 @@ const description = "Every topic and review the campaign finished, newest first.
|
||||
{r.problems.map((p) => (
|
||||
<li class="flex items-baseline gap-3 text-base leading-relaxed text-muted-foreground">
|
||||
<span class="select-none text-border" aria-hidden="true">—</span>
|
||||
<span class="min-w-0 flex-1">
|
||||
<span class="min-w-0">
|
||||
<span class="mr-2 font-mono text-xs uppercase tracking-wide">{p.set}</span>
|
||||
<a class="text-foreground no-underline hover:underline" href={issueUrl(p.issue)}>
|
||||
{/* The problem's docs page; its issue only until it has one. */}
|
||||
<a class="text-foreground no-underline hover:underline" href={p.docs ?? issueUrl(p.issue)}>
|
||||
{p.title}
|
||||
</a>
|
||||
{p.docs && (
|
||||
<a class="ml-2 font-mono text-xs text-emerald-500 no-underline hover:underline" href={p.docs}>
|
||||
view →
|
||||
</a>
|
||||
)}
|
||||
</span>
|
||||
{/* Its own right-hand column, one width for all three, so the
|
||||
badges line up down the card instead of crowding the link. */}
|
||||
{DIFFICULTY[p.difficulty] && (
|
||||
<span
|
||||
class:list={[
|
||||
"w-12 shrink-0 rounded-full border py-px text-center font-mono text-[11px] leading-4",
|
||||
"ml-2 inline-block rounded-full border px-2 py-px align-middle font-mono text-[11px] leading-4",
|
||||
DIFFICULTY[p.difficulty]!.class,
|
||||
]}
|
||||
>
|
||||
{DIFFICULTY[p.difficulty]!.label}
|
||||
</span>
|
||||
)}
|
||||
</span>
|
||||
</li>
|
||||
))}
|
||||
</ul>
|
||||
|
||||
Reference in new issue
Block a user