% from "templates/macros/icons.html" import icon with context % macro show_repo(repo, donate=False, edit=False, unlist=False)

{{ repo.name }} {{ _("(fork)") if repo.is_fork else '' }} % if repo.stars_count != None {{ icon('star', _("Stars")) }} {{ repo.stars_count }} % endif % set last_update = to_age(repo.last_update, granularity='week') {{ _("Updated this week") if last_update.days > -7 else _("Updated {timespan_ago}", timespan_ago=last_update) }} % if unlist % endif

{{ repo.description or '' }}

% if edit

% elif donate % set owner = repo.get_owner() % set claimed = bool(owner) and owner.participant.status == 'active' {{ _("Donate") if claimed else _("Pledge") }} % endif
% endmacro