{#
  Copyright (c) 2024-2025, The Linux Foundation.
  SPDX-License-Identifier: Apache-2.0
#}

<a
  class="board-card"
  {% if board.doc_page -%}
  href="../{{ board.doc_page | replace(".rst", ".html") }}"
  {% else -%}
  href="#"
  {% endif -%}
  aria-label="Open the documentation page for {{ board.full_name }}"
  data-name="{{ board.full_name}}"
  data-arch="{{ board.archs | join(" ") }}"
  data-vendor="{{ board.vendor }}"
  data-socs="{{ board.socs | join(" ") }}"
  data-supported-features="
    {%- set feature_types = [] -%}
    {%- for target_features in board.supported_features.values() -%}
      {%- for feature_type in target_features.keys() -%}
        {%- if feature_type not in feature_types -%}
          {%- set _ = feature_types.append(feature_type) -%}
        {%- endif -%}
      {%- endfor -%}
    {%- endfor -%}
    {{- feature_types|join(' ') -}}
  "
  data-compatibles="
    {%- set all_compatibles = [] -%}
    {%- for target_compatibles in board.compatibles.values() -%}
      {%- for compatible in target_compatibles -%}
        {%- if compatible not in all_compatibles -%}
          {%- set _ = all_compatibles.append(compatible) -%}
        {%- endif -%}
      {%- endfor -%}
    {%- endfor -%}
    {{- all_compatibles|join(' ') -}}
  "
  tabindex="0">
  <div class="vendor">{{ vendors[board.vendor] }}</div>
  {% if board.image -%}
  <img alt="A picture of the {{ board.full_name }} board"
    src="../_images/{{ board.image.split('/')[-1] }}" class="picture" />
  {% else -%}
  <div class="no-picture fa fa-microchip picture"></div>
  {% endif -%}
  <div class="board-name">{{ board.full_name }}</div>
  <div class="arch">{{ board.archs | join(", ") }}</div>
</a>
