Skip to content

Commit d555d0c

Browse files
authored
fix: update authors display in BlogPostItemHeaderAuthors component (#134)
before: <img width="604" height="107" alt="image" src="https://github.com/user-attachments/assets/486c4a50-d175-42cb-a1b5-2ffea1200ced" /> after: <img width="756" height="97" alt="image" src="https://github.com/user-attachments/assets/92f4d0e2-ddd9-4a5d-831e-3e1efce90468" />
1 parent ace9656 commit d555d0c

3 files changed

Lines changed: 9 additions & 14 deletions

File tree

sites/wonderland/blog/2025-12-24-ctf.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ During Devconnect 2025 in Buenos Aires, we hosted a Solidity CTF designed by and
1414

1515
<!-- truncate -->
1616

17-
The competition methodology was straightforward but intense: each team would compete to hack various challenges, earning points based on problem complexity and solution speed. With snacks and drinks provided, participants could focus entirely on giving their best performance (while being bothered but some wonders going around...). The top two teams with the most points would walk away with rewards, but more importantly, everyone left with deeper insights into smart contract security.
17+
The competition methodology was straightforward but intense: each team would compete to hack various challenges, earning points based on problem complexity and solution speed. With snacks and drinks provided, participants could focus entirely on giving their best performance (while being bothered by some wonders going around...). The top two teams with the most points would walk away with rewards, but more importantly, everyone left with deeper insights into smart contract security.
1818

1919
The CTF unfolded across three distinct stages, designed to simulate real-world scenarios: from recovering stolen funds and blocking attackers, to racing against other whitehats in a dramatic rescue operation. This article walks through the solutions to all seven challenges, going through the vulnerabilities and exploitation techniques that separated the winning teams from the rest.
2020

sites/wonderland/src/theme/BlogPostItem/Header/Authors/index.tsx

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -35,18 +35,16 @@ export default function BlogPostItemHeaderAuthors({
3535
const formatted = date ? withOrdinal(new Date(date)) : undefined;
3636
if ((!authors || authors.length === 0) && !date) return null;
3737

38-
const shown = (authors || []).slice(0, 2);
39-
const remaining = Math.max((authors?.length ?? 0) - shown.length, 0);
40-
const aria = shown.length
41-
? `Authors: ${shown.map((a) => a.name || "").filter(Boolean).join(', ')}${remaining ? `, and ${remaining} more` : ''}`
38+
const aria = authors.length
39+
? `Authors: ${authors.map((a) => a.name || "").filter(Boolean).join(', ')}`
4240
: undefined;
4341

4442
return (
4543
<div className="wl-post-meta" aria-label={aria}>
4644
{/* Avatars */}
4745
{authors && authors.length > 0 && (
4846
<div className="wl-post-authors-avatars">
49-
{shown.map((a, idx) => (
47+
{authors.map((a, idx) => (
5048
a?.imageURL ? (
5149
<img
5250
key={`${a.key || a.name || idx}-avatar`}
@@ -61,9 +59,9 @@ export default function BlogPostItemHeaderAuthors({
6159

6260
{/* Names and date */}
6361
<div className="wl-post-author-line">
64-
{shown && shown.length > 0 && (
62+
{authors && authors.length > 0 && (
6563
<div className="wl-post-authors-line">
66-
{shown.map((a, idx) => (
64+
{authors.map((a, idx) => (
6765
<span key={`${a.key || a.name || idx}-name`} className="wl-post-author">
6866
{a?.page && a?.key ? (
6967
<Link to={`/blog/authors/${a.key}`} className="wl-post-author-name wl-post-author-name--link">
@@ -72,12 +70,9 @@ export default function BlogPostItemHeaderAuthors({
7270
) : (
7371
<span className="wl-post-author-name">{a?.name || ""}</span>
7472
)}
75-
{idx < shown.length - 1 && <span className="wl-post-author-sep">,</span>}
73+
{idx < authors.length - 1 && <span className="wl-post-author-sep">,</span>}
7674
</span>
7775
))}
78-
{remaining > 0 && (
79-
<span className="wl-post-author wl-post-author-name" aria-hidden>{`+${remaining}`}</span>
80-
)}
8176
</div>
8277
)}
8378
{formatted && (

sites/wonderland/src/theme/BlogPostPage/index.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,8 @@ export default function BlogPostPageWrapper(props: any) {
3232
<div className="wl-share">
3333
{(() => {
3434
const currentUrl = typeof window !== "undefined" ? window.location.href : meta?.permalink ?? "";
35-
const shareText = `I went through the @Wonderland's blog rabbit hole 🐇 Take a look at this post 👉${meta?.title ?? ""}\n${currentUrl}`;
36-
const intent = `https://twitter.com/intent/tweet?text=${encodeURIComponent(shareText)}`;
35+
const shareText = `I went through the @Wonderland's blog rabbit hole 🐇 Take a look at this post 👉${meta?.title ?? ""}`;
36+
const intent = `https://twitter.com/intent/tweet?text=${encodeURIComponent(shareText)}&url=${encodeURIComponent(currentUrl)}`;
3737
return (
3838
<a
3939
className="wl-share-button"

0 commit comments

Comments
 (0)