{# File: reference_block_macro.html Description: This file defines a macro `reference_block` that generates a list of references, displaying them with appropriate icons for articles and software. The references are displayed with titles, authors, publication year, and DOI links (if available). Usage: `{% from 'reference_macro.html' import reference_block %}` Parameters: - references (list of dicts): A list of reference objects where each object contains: - 'type' (string): The type of reference, e.g., 'article' or 'software'. The macro will display an icon based on the type. - 'title' (string): The title of the reference. - 'authors' (list): A list of author objects, each containing: - 'given-names' (string): The author's given name(s). - 'family-names' (string): The author's family name(s). - 'orcid' (optional, string): The author's ORCID, if available. - 'year' (optional, int): The publication year of the reference. - 'doi' (optional, string): The DOI (Digital Object Identifier) of the reference. Example: references = [ { 'type': 'article', 'title': 'A Comprehensive Study on AI', 'authors': [ {'given-names': 'John', 'family-names': 'Doe', 'orcid': '0000-0001-2345-6789'}, {'given-names': 'Jane', 'family-names': 'Smith'} ], 'year': 2021, 'doi': '10.1234/ai.2021.5678' }, { 'type': 'software', 'title': 'AI Toolkit', 'authors': [ {'given-names': 'Alice', 'family-names': 'Johnson'} ], 'year': 2020, 'doi': '10.5678/software.2020.1234' } ] Features: - Displays a reference list with appropriate icons based on the reference type (e.g., 📖 for articles, 💻 for software). - Renders author names, with ORCID links if available. - Includes publication year and DOI links if provided. - Supports multiple authors with proper formatting (commas between authors). - Responsive, allowing easy customization with CSS classes. Dependencies: - Expects external images for ORCID logos and valid URLs for DOI links. - Requires basic CSS for layout using classes like `references-container`, `references-list`, `reference-item`, and `reference-icon`. #} {% macro reference_block(references) %} {%- if references is defined %}

References

{%- endif %} {% endmacro %}