{%- macro group(content, group) -%} {{ h.snippet("group/snippets/group_item.html", group=group, **kwargs) }} {%- endmacro %} {%- macro organization(content, organization) -%} {{ h.snippet("organization/snippets/organization_item.html", organization=organization, **kwargs) }} {%- endmacro %} {%- macro package(content, package) -%} {{ h.snippet("snippets/package_item.html", package=package, **kwargs) }} {%- endmacro %} {%- macro resource(content, resource, package) -%} {{ h.snippet('package/snippets/resource_item.html', res=resource, package=package, **kwargs) }} {%- endmacro %} {%- macro user(content, user) -%}
  • {{ h.linked_user(user.name, maxlength=20) }}
  • {%- endmacro %} {%- macro facet(content, key, value, count, active) -%} {% set href = h.remove_url_param(key, value) if active and key else h.add_url_param(new_params={key: value}) %} {% set truncated = content|truncate(22) %} {%- endmacro %} {%- macro activity(content, activity) -%} {{ h.snippet([ "snippets/activities/{}.html".format(activity.activity_type.replace(' ', '_')), "snippets/activities/fallback.html" ], activity=activity, **kwargs) }} {%- endmacro %} {% macro license(content, id, url) %} {{ h.snippet("snippets/license.html", **kwargs) }} {% endmacro %}