{# ----------------------------------------------------- #} {# Set the Author Data Variable from the robust injection point #} {# Data is now available in config.extra.author_data #} {% set authors = config.extra.authors | default({}) %} {% set author_data = {'authors': authors} %} {% if page.meta is not defined or 'showauthors' not in page.meta or page.meta.showauthors %} {# Check if there's any metadata to display #} {% set has_authors = page.meta.authors and page.meta.authors | length > 0 %} {% set has_group_info = page.meta.contactemail or page.meta.mattermost or page.meta.gitlab or page.meta.indico or page.meta.indicomb or page.meta.cds or page.meta.intnote or page.meta.supportnote or page.meta.atlastalk or page.meta.zoomroom or page.meta.groups or page.meta.group %} {% if has_authors or has_group_info %}
{# ── Left column: author cards, 2 per row, wraps ── #}
{% if page.meta.authors %} {% for author_entry in page.meta.authors %} {# Resolve author from registry or accept inline object #} {% if author_entry is mapping and 'name' in author_entry %} {% set author = author_entry %} {% else %} {% set author_key = (author_entry | trim) | lower %} {% set authors_map = author_data['authors'] if 'authors' in author_data else author_data %} {% if authors_map and author_key in authors_map %} {% set author = authors_map[author_key] %} {% else %} {% set author = none %} {% endif %} {% endif %} {% if author %} {% set ns = namespace(info_title='') %} {% if author.pronouns and author.timezone %} {% set ns.info_title = author.pronouns ~ ' • ' ~ author.timezone %} {% elif author.pronouns %} {% set ns.info_title = author.pronouns %} {% elif author.timezone %} {% set ns.info_title = author.timezone %} {% endif %}
{% if author.glance %} {% if author.avatar and author.avatar != "" %} {{ author.name }} {% else %} {% set name = author.name | default('') %} {% set name_parts = (name | split(' ')) | list %} {% set first_initial = (name_parts[0][:1]) | upper if name_parts | length > 0 else '' %} {% set last_initial = (name_parts[-1][:1]) | upper if name_parts | length > 1 else '' %} {% set initials = first_initial ~ last_initial %} {% set hash_value = ((author.name | length * 47) + (author.name | replace(' ', '') | length * 31)) % 360 %} {{ initials }} {% endif %} eye {% else %} {% if author.avatar and author.avatar != "" %} {{ author.name }} {% else %} {% set name = author.name | default('') %} {% set name_parts = (name | split(' ')) | list %} {% set first_initial = (name_parts[0][:1]) | upper if name_parts | length > 0 else '' %} {% set last_initial = (name_parts[-1][:1]) | upper if name_parts | length > 1 else '' %} {% set initials = first_initial ~ last_initial %} {% set hash_value = ((author.name | length * 47) + (author.name | replace(' ', '') | length * 31)) % 360 %} {{ initials }} {% endif %} {% endif %} {% if author.pronouns or author.timezone %}
{% endif %}
{% if author.email %} {{ author.name }} {% else %} {{ author.name }} {% endif %}
{% if author.description %}
{{ author.description }}
{% endif %}
{% else %}
{{ author_entry }} (not found in .authors.yml)
{% endif %} {% endfor %} {% endif %}
{# ── Right column: group-info icons, 2-column grid, never wraps ── #}
{% set all_links = [] %} {% if page.meta.egroup is defined and page.meta.egroup %} {% set _egroot = (page.meta.egroup | split('@'))[0] %} {% set all_links = all_links + [{'url': 'https://gms.web.cern.ch/group/' ~ _egroot ~ '/details', 'title': 'Join ' ~ _egroot ~ ' e-group', 'color': 'blue', 'icon': 'lucide/mail-plus.svg'}] %} {% endif %} {% if page.meta.mattermost %} {% set all_links = all_links + [{'url': page.meta.mattermost, 'title': 'Mattermost Channel', 'color': 'indigo', 'icon': 'lucide/compass.svg'}] %} {% endif %} {% if page.meta.gitlab %} {% set all_links = all_links + [{'url': page.meta.gitlab, 'title': 'GitLab Repository', 'color': 'orange', 'icon': 'simple/gitlab.svg'}] %} {% endif %} {% if page.meta.indico %} {% set all_links = all_links + [{'url': page.meta.indico, 'title': 'Indico', 'color': 'blue-green', 'icon': 'lucide/infinity.svg'}] %} {% endif %} {% if page.meta.indicomb %} {% set all_links = all_links + [{'url': page.meta.indicomb, 'title': 'Indicomb', 'color': 'blue-green', 'icon': 'lucide/briefcase.svg'}] %} {% endif %} {% if page.meta.cds %} {% set all_links = all_links + [{'url': page.meta.cds, 'title': 'CDS', 'color': 'blue', 'icon': 'lucide/book-open.svg'}] %} {% endif %} {% if page.meta.intnote %} {% set all_links = all_links + [{'url': page.meta.intnote, 'title': 'Internal Note', 'color': 'blue', 'icon': 'lucide/file-text.svg'}] %} {% endif %} {% if page.meta.supportnote %} {% set all_links = all_links + [{'url': page.meta.supportnote, 'title': 'Support Note', 'color': 'blue', 'icon': config.theme.icon.supportnote}] %} {% endif %} {% if page.meta.atlastalk %} {% set all_links = all_links + [{'url': page.meta.atlastalk, 'title': 'ATLAS Talk', 'color': 'blue', 'icon': config.theme.icon.atlastalk}] %} {% endif %} {% if page.meta.zoomroom %} {% set all_links = all_links + [{'url': page.meta.zoomroom, 'title': 'Zoom Room', 'color': 'blue', 'icon': 'lucide/video.svg'}] %} {% endif %} {% if page.meta.whiteboard %} {% set all_links = all_links + [{'url': page.meta.whiteboard, 'title': 'Whiteboard', 'color': 'grey', 'icon': 'lucide/pen-line.svg'}] %} {% endif %} {% if page.meta.docs %} {% set all_links = all_links + [{'url': page.meta.docs, 'title': 'Docs', 'color': 'blue', 'icon': 'lucide/file-text.svg'}] %} {% endif %} {% if page.meta.spreadsheet %} {% set all_links = all_links + [{'url': page.meta.spreadsheet, 'title': 'Spreadsheet', 'color': 'green', 'icon': 'lucide/file-spreadsheet.svg'}] %} {% endif %} {% if page.meta.slides %} {% set all_links = all_links + [{'url': page.meta.slides, 'title': 'Slides', 'color': 'yellow', 'icon': 'lucide/presentation.svg'}] %} {% endif %} {% if page.meta.mandate %} {% set all_links = all_links + [{'url': page.meta.mandate, 'title': 'Mandate', 'color': 'green', 'icon': 'lucide/file-badge.svg'}] %} {% endif %} {% if page.meta.groups and page.meta.groups is iterable and page.meta.groups is not string %} {% for group_id in page.meta.groups %} {% set authors_map = author_data['authors'] if 'authors' in author_data else author_data %} {% if authors_map and group_id in authors_map %} {% set group_meta = authors_map[group_id] %} {% set link_url = group_meta.glance | default(group_meta.email is not none and 'mailto:' ~ group_meta.email or none) %} {% if link_url %} {% set all_links = all_links + [{'url': link_url, 'title': group_meta.name, 'color': 'pink', 'icon': 'lucide/users.svg'}] %} {% endif %} {% endif %} {% endfor %} {% elif page.meta.group %} {% set group_id = page.meta.group %} {% set authors_map = author_data['authors'] if 'authors' in author_data else author_data %} {% if authors_map and group_id in authors_map %} {% set group_meta = authors_map[group_id] %} {% set link_url = group_meta.glance | default(group_meta.email is not none and 'mailto:' ~ group_meta.email or none) %} {% if link_url %} {% set all_links = all_links + [{'url': link_url, 'title': group_meta.name, 'color': 'pink', 'icon': 'lucide/users.svg'}] %} {% endif %} {% endif %} {% endif %} {% for link in all_links %} {% include ".icons/" ~ link.icon %} {% endfor %}

{% endif %} {# End of has_authors or has_group_info check #} {% endif %}