mirror of
https://github.com/ShayManor/github-readme-stats.git
synced 2026-12-02 11:53:48 +05:30
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:
@@ -4,6 +4,7 @@ Uses the same card wrapper + theme system as real widgets so they look consisten
|
||||
"""
|
||||
from .themes.themes import THEMES
|
||||
from .utils.svg_helpers import card_wrapper, escape
|
||||
from .widgets.attribution import attribution_text
|
||||
|
||||
_MESSAGES = {
|
||||
"building": ("Building @{u}'s widget\u2026", "This usually takes under a minute."),
|
||||
@@ -24,5 +25,8 @@ def render(variant: str, username: str, theme: str = "dark") -> str:
|
||||
f'font-size="18" font-weight="600" fill="{palette["text"]}">{escape(title)}</text>'
|
||||
f'<text x="24" y="82" font-family="-apple-system,Segoe UI,sans-serif" '
|
||||
f'font-size="13" fill="{palette["text_secondary"]}">{escape(subtitle)}</text>'
|
||||
# The card is 120 tall and the subtitle ends around y=85, so the
|
||||
# footer fits inside the existing bottom padding.
|
||||
+ attribution_text(palette, 200, 112, 0)
|
||||
)
|
||||
return card_wrapper(inner, width=400, height=120, theme=palette)
|
||||
|
||||
Reference in New Issue
Block a user