feat(widgets): attribution on every widget, and make it legible

Five of the seven standalone widgets and all three placeholder cards
carried no attribution at all, and where it did render it was font-size 9
at opacity 0.5 (about 2.1:1 contrast) at the bottom of a 1500px card. Each
embedded widget sits on a public profile and is the only organic
acquisition surface we have.

Shared helper so the styling can't drift again. font-size 10, opacity
0.75 (about 3.1:1), still using the theme's text_secondary so it stays
roughly 4x fainter than the user's own content. Composite output is
byte-identical in size; four standalone cards grow 16px where the footer
would otherwise collide with existing content.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BwMoSbmK77Ph7XaV5YnAdS
This commit is contained in:
shay
2026-08-22 16:10:26 -07:00
co-authored by Claude Opus 5
parent 06ab1c878e
commit 769cde552d
11 changed files with 150 additions and 23 deletions
+5 -1
View File
@@ -3,6 +3,7 @@
from ..models import AchievementData
from ..themes import THEMES
from ..utils import escape, card_wrapper
from .attribution import FOOTER_H, attribution_text
def _achievement_icon_svg(icon_type: str, color: str) -> str:
@@ -69,5 +70,8 @@ def render_achievements_widget(
font-size="10" fill="{t["text_secondary"]}">{escape(ach.subtitle)}{(" · " + escape(ach.event_date)) if ach.event_date else ""}</text>
</g>'''
total_h = len(shown) * 56 + 50
# The last achievement row leaves only 14px below it, so reserve
# FOOTER_H for the attribution footer.
total_h = len(shown) * 56 + 50 + FOOTER_H
items += attribution_text(t, 190, total_h - 36 - 8)
return card_wrapper(items, 380, total_h, t, "Achievements")