diff options
Diffstat (limited to 'templates')
-rw-r--r-- | templates/badge.svg.jinja | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/templates/badge.svg.jinja b/templates/badge.svg.jinja index 8143cff..02ba3db 100644 --- a/templates/badge.svg.jinja +++ b/templates/badge.svg.jinja @@ -5,7 +5,7 @@ {%- set ROWS = 1 + versions|length -%} {%- set OUTER_MARGIN = 5 -%} {%- set FONT_WIDENESS = 0.5 -%} -{%- set LONGEST_REPO = versions.keys()|map('length')|max -%} +{%- set LONGEST_REPO = versions.keys()|map(attribute='full_repo_name')|map('length')|max -%} {%- set LONGEST_VERSION = versions.values()|map('string')|map('length')|max -%} {%- set VERSION_X = OUTER_MARGIN + LONGEST_REPO * FONT_WIDENESS * FONT_SIZE -%} {%- set VERSION_WIDTH = OUTER_MARGIN + LONGEST_VERSION * FONT_WIDENESS * FONT_SIZE -%} @@ -21,7 +21,7 @@ <line x1="0" y1="{{ y(ROW_HEIGHT - ROW_MARGIN / 2) }}" x2="{{ WIDTH }}" y2="{{ y(ROW_HEIGHT - ROW_MARGIN / 2) }}" stroke="white" stroke-width="{{ ROW_MARGIN }}"></line>{{ end_row() }} {% for repo, version in versions.items() %} - <text x="{{ OUTER_MARGIN }}" y="{{ texty() }}">{{ repo }}</text> + <text x="{{ OUTER_MARGIN }}" y="{{ texty() }}">{{ repo.full_repo_name }}</text> <rect x="{{ VERSION_X }}" y="{{ y() }}" width="{{ VERSION_WIDTH }}" height="{{ ROW_HEIGHT }}" fill="{% if version < newest_version %}red{% else %}green{% endif %}"></rect> <text x="{{ VERSION_X + OUTER_MARGIN }}" y="{{ texty() }}">{{ version }}</text>{{ end_row() }} |