{#
Copyright (C) 2026 Front Matter.
invenio-pidbox is free software; you can redistribute it and/or modify it
under the terms of the MIT License; see LICENSE file for more details.
Metrics for a set of records, the same cards invenio-pidbox shows for one
person or organization: absolute counts in the first row, shares of all
works in the second, and a column beside them that the instance chooses
(metrics_column.html): the share with an open license in a ring, or cards
of its own, one per row. Each card
links to the search it counts. The numbers come from a records API in the
browser, so the page renders without waiting for them, and the cards stay
hidden while there are no records.
Included with four variables:
metrics_id the id of the container, unique on the page
metrics_api the records API to count with, e.g. /api/records
metrics_search the search page the cards link to, e.g. /search
metrics_column the first column, as pidbox_metrics_column returns it
#}
{%- set pidbox_labels = pidbox_metrics_labels() %}
{%- macro metrics_card(id, label, icon_label) %}