{% extends "base.html" %}

{% block content %}
<section>
  <!-- 상태 라벨 + 연결 배지를 한 줄로 (로드 시 1회 + 30초마다 폴링) -->
  <div class="status-row">
    <span class="status-label">상태</span>
    <div hx-get="/pulp-status" hx-trigger="load, every 30s" hx-swap="innerHTML">
      <span class="status-line status-loading">연결 확인 중…</span>
    </div>
  </div>
</section>

<section>
  <div class="section-head">
    <h2>저장소</h2>
    <button hx-get="/repos" hx-target="#repo-list" hx-swap="outerHTML"
            class="ghost btn-sm btn-icon">
      <svg class="icon" viewBox="0 0 16 16" width="14" height="14" fill="none"
           stroke="currentColor" stroke-width="1.6" stroke-linecap="round"
           stroke-linejoin="round" aria-hidden="true">
        <path d="M13.6 8a5.6 5.6 0 1 1-1.7-4"/>
        <path d="M12.4 1.8V4.2H10"/>
      </svg>
      새로고침
    </button>
  </div>
  {% include "partials/repo_list.html" %}
</section>
{% endblock %}
