{#
  Document Metadata Component

  Displays publication date and reading time in a clean, minimal format.

  Variables:
    - page: Current page object (required)
    - page.date: Publication/update date (optional)
    - page.content: Page content (for reading time calculation)

  Template Functions Used:
    - locale_date(date, 'long', lang): Formats date according to locale
    - reading_time: Calculates reading time from content
    - current_lang(): Gets current language

  Features:
    - Locale-aware date formatting
    - Reading time estimation
    - SVG icons
    - Minimal, clean design

  Usage:
    {% include 'partials/docs-meta.html' %}
#}

{% if page.date or page.content %}
<div class="docs-meta">
  {% if page.date %}
  <time datetime="{{ page.date | date_iso }}" class="docs-meta-item">
    <svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
      <rect x="3" y="4" width="18" height="18" rx="2" ry="2"></rect>
      <line x1="16" y1="2" x2="16" y2="6"></line>
      <line x1="8" y1="2" x2="8" y2="6"></line>
      <line x1="3" y1="10" x2="21" y2="10"></line>
    </svg>
    <span>{{ locale_date(page.date, 'long', current_lang()) }}</span>
  </time>
  {% endif %}

  {% if page.content %}
  <span class="docs-meta-item">
    <svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
      <circle cx="12" cy="12" r="10"></circle>
      <polyline points="12 6 12 12 16 14"></polyline>
    </svg>
    <span>{{ page.content | reading_time }} min read</span>
  </span>
  {% endif %}
</div>
{% endif %}
