{{/* Version info banner - displays git commit info and build time */}}
{{ $buildInfo := .Site.Data.build_info }}
{{ if $buildInfo }}
<div class="version-info-banner">
  <div class="container-fluid">
    <div class="row align-items-center">
      <div class="col-md-8">
        <small class="text-muted">
          <i class="fab fa-git-alt me-1"></i>
          {{ if $buildInfo.git_tag }}
            <strong>{{ $buildInfo.git_tag }}</strong>
            {{ if ne $buildInfo.git_tag $buildInfo.git_commit }}
              <span class="text-muted">(@{{ $buildInfo.git_commit_short }})</span>
            {{ end }}
          {{ else }}
            <strong>{{ $buildInfo.git_branch }}</strong>
            <span class="text-muted">@{{ $buildInfo.git_commit_short }}</span>
          {{ end }}
          {{ if $buildInfo.git_dirty }}
            <span class="badge badge-warning ms-1">dirty</span>
          {{ end }}
        </small>
      </div>
      <div class="col-md-4 text-md-end">
        <small class="text-muted">
          <i class="far fa-clock me-1"></i>
          Built {{ $buildInfo.build_time_human }}
          {{ if $buildInfo.build_user }}
            by {{ $buildInfo.build_user }}
          {{ end }}
        </small>
      </div>
    </div>
  </div>
</div>
{{ end }}