diff --git a/src/imwald/core/author_html.py b/src/imwald/core/author_html.py
index 5d40f35..f97bbb8 100644
--- a/src/imwald/core/author_html.py
+++ b/src/imwald/core/author_html.py
@@ -21,7 +21,12 @@ def avatar_img_or_placeholder(
size_px: int,
*,
border_hex: str = "#2a3d34",
+ profile_href: str | None = None,
) -> str:
+ """
+ ``profile_href``: if set (e.g. ``imwald://pub/…``), the avatar is clickable for that profile.
+ If unset but a picture URL exists, the avatar links to the full-size image (same URL as ``src``).
+ """
pic = safe_http_url(parsed.get("picture"))
r = max(6, size_px // 5)
if pic:
@@ -29,6 +34,11 @@ def avatar_img_or_placeholder(
f''
)
+ if profile_href:
+ return (
+ f'{img}'
+ )
return (
f'{img}'
@@ -55,11 +65,11 @@ def feed_op_author_block_html(
) -> str:
"""Top-of-note author row: picture, display name, npub, optional nip05/about lines (links to profile tab)."""
disp = html.escape(display_name_from_profile(parsed))
- av = avatar_img_or_placeholder(parsed, 52, border_hex=border)
- npub_e = html.escape(npub_bech)
- pk_s = html.escape(pk_short)
pk_l = pubkey_hex.strip().lower()
href = html.escape(f"imwald://pub/{pk_l}", quote=True)
+ av = avatar_img_or_placeholder(parsed, 52, border_hex=border, profile_href=href)
+ npub_e = html.escape(npub_bech)
+ pk_s = html.escape(pk_short)
inner = (
f'