{% import "partials/language.html" as lang with context %}
{# SPDX-FileCopyrightText: 2026 PythonWoods <dev@pythonwoods.dev> #}
{# SPDX-License-Identifier: Apache-2.0 #}
{#
  source.html — repo widget with version fact inline alongside stars/forks.
  Uses native md-source__fact so Material handles flex layout, colors,
  separators, and responsive behaviour automatically.
#}
<a href="{{ config.repo_url }}" title="{{ lang.t('source') }}" class="md-source" data-md-component="source">
  <div class="md-source__icon md-icon">
    {% set icon = config.theme.icon.repo or "fontawesome/brands/git-alt" %}
    {% include ".icons/" ~ icon ~ ".svg" %}
  </div>
  <div class="md-source__repository">
    {{ config.repo_name }}
    <ul class="md-source__facts">
      <li class="md-source__fact md-source__fact--stars"></li>
      <li class="md-source__fact md-source__fact--forks"></li>
      {% if config.extra.version %}
      <li class="md-source__fact md-source__fact--version">
        {{ config.extra.version }}
      </li>
      {% endif %}
    </ul>
  </div>
</a>
