디자인 핸드오프(design_handoff_console_redesign)를 실제 앱에 반영.
CSS 드롭인 교체 + 최소 마크업 추가, HTMX 훅·id·data 속성은 모두 보존.
- app.css: 재디자인 토큰/컴포넌트로 교체(요약카드 호버 리프트, 표
제브라, 중앙 경고형 배포 모달, secondary/ghost/danger 버튼 체계,
진행률·상태칩·스켈레톤 등).
- base.html: 브랜드 로고 큐브(.brand-mark) 추가 + 데모 배너.
- repo_list: 요약 카드 .card-top/.card-ico + 검색 돋보기 아이콘.
- table_wrap: 회전형 정렬 인디케이터, 동기화 버튼 아이콘.
- progress: .sync-head/.sync-pct/.is-active/.indeterminate 구조.
- deploy_modal: 중앙 경고형 + 현재→대상 프리뷰 카드 + 타입-투-컨펌
체크/X 시각 상태.
- deploy_success: 그려지는 체크 원 배너.
- version_list: 표 → .version-item 카드 리스트.
Pico v2 호환(미리보기는 pico-shim 기준이라 안 드러났던 것):
- Pico 의 `:is(...).secondary`(0,2,0)·hover(0,4,0) 특정성을 이기도록
오버라이드를 :is() 형태로 상향 → 동기화 버튼 흰배경+파란글씨 유지,
hover 시 어두워지던 문제 해결.
- `input[type=search]` 의 Pico 기본 돋보기 배경 제거(아이콘 중복).
- `td` 배경을 투명 처리해 tr 제브라/hover 가 보이도록(Pico 의
`td{background:var(--pico-background-color)}` 가 덮던 문제), 줄무늬
색을 --bg-alt 로 또렷하게.
- .row-action 을 40px 고정 → 버튼↔진행률↔배지 교체 시 높이 흔들림·
위아래 테두리 잘림 해소.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
85 lines
3.9 KiB
HTML
85 lines
3.9 KiB
HTML
{#
|
|
표 + 페이저 조각. 검색/정렬/페이지 이동의 swap 대상(#repo-table-wrap).
|
|
정렬 헤더와 페이저는 현재 검색어(q)를 #repo-search 에서 hx-include 로 가져온다.
|
|
hidden state(sort/dir, data-state)는 검색창이 정렬 상태를 함께 보내도록 노출.
|
|
#}
|
|
<div id="repo-table-wrap">
|
|
<input type="hidden" name="sort" value="{{ sort }}" data-state>
|
|
<input type="hidden" name="dir" value="{{ dir }}" data-state>
|
|
|
|
{% macro sorth(col, label, extra="") %}
|
|
<th class="{{ extra }}">
|
|
<a href="#" class="th-sort{% if sort == col %} is-active{% if dir == 'desc' %} desc{% endif %}{% endif %}"
|
|
hx-get="/repos/table" hx-target="#repo-table-wrap" hx-swap="outerHTML"
|
|
hx-include="#repo-search"
|
|
hx-vals='{"sort": "{{ col }}", "dir": "{{ 'desc' if (sort == col and dir == 'asc') else 'asc' }}"}'>
|
|
{{ label }}{% if sort == col %} <span class="sort-ind">▲</span>{% endif %}
|
|
</a>
|
|
</th>
|
|
{% endmacro %}
|
|
|
|
{% if total %}
|
|
<div class="table-card">
|
|
<table>
|
|
<thead>
|
|
<tr>
|
|
{{ sorth("name", "저장소") }}
|
|
{{ sorth("verified", "검증") }}
|
|
{{ sorth("version", "최신 버전", "num") }}
|
|
{{ sorth("packages", "패키지 수", "num") }}
|
|
{{ sorth("last_sync", "마지막 동기화") }}
|
|
<th></th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
{% for repo in repos %}
|
|
<tr>
|
|
<td class="repo-name"><a href="/repos/{{ repo.uuid }}/versions">{{ repo.name }}</a></td>
|
|
<td><span class="badge badge-{{ repo.gpg.level }}">{{ repo.gpg.label }}</span></td>
|
|
<td class="num">{% if repo.latest_version is not none %}v{{ repo.latest_version }}{% else %}—{% endif %}</td>
|
|
<td class="num">{% if repo.package_count is not none %}{{ repo.package_count }}{% else %}—{% endif %}</td>
|
|
<td class="mono">{{ repo.last_sync or "—" }}</td>
|
|
<td>
|
|
<div id="sync-{{ repo.uuid }}" class="row-action">
|
|
<button class="secondary btn-sm btn-icon"
|
|
hx-post="/repos/{{ repo.uuid }}/sync"
|
|
hx-target="#sync-{{ repo.uuid }}"
|
|
hx-swap="innerHTML"
|
|
hx-disabled-elt="this">
|
|
<svg class="icon" viewBox="0 0 24 24" width="14" height="14" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M23 4v6h-6M1 20v-6h6"/><path d="M3.5 9a9 9 0 0 1 14.9-3.4L23 10M1 14l4.6 4.4A9 9 0 0 0 20.5 15"/></svg>
|
|
동기화
|
|
</button>
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
{% endfor %}
|
|
</tbody>
|
|
</table>
|
|
|
|
{% if pages > 1 %}
|
|
<div class="pager">
|
|
<button class="ghost btn-sm btn-icon" {% if page <= 1 %}disabled{% endif %}
|
|
hx-get="/repos/table" hx-target="#repo-table-wrap" hx-swap="outerHTML"
|
|
hx-include="#repo-search"
|
|
hx-vals='{"sort": "{{ sort }}", "dir": "{{ dir }}", "page": "{{ page - 1 }}"}'>
|
|
<svg class="icon" viewBox="0 0 10 10" width="8" height="8" aria-hidden="true"><path d="M7 1 2 5l5 4z" fill="currentColor"/></svg>
|
|
이전
|
|
</button>
|
|
<span class="mono">{{ page }} / {{ pages }}</span>
|
|
<button class="ghost btn-sm btn-icon" {% if page >= pages %}disabled{% endif %}
|
|
hx-get="/repos/table" hx-target="#repo-table-wrap" hx-swap="outerHTML"
|
|
hx-include="#repo-search"
|
|
hx-vals='{"sort": "{{ sort }}", "dir": "{{ dir }}", "page": "{{ page + 1 }}"}'>
|
|
다음
|
|
<svg class="icon" viewBox="0 0 10 10" width="8" height="8" aria-hidden="true"><path d="M3 1l5 4-5 4z" fill="currentColor"/></svg>
|
|
</button>
|
|
</div>
|
|
{% endif %}
|
|
</div>
|
|
{% elif q %}
|
|
<p class="empty-note">'{{ q }}' 검색 결과가 없습니다.</p>
|
|
{% else %}
|
|
<p class="empty-note">등록된 저장소가 없습니다.</p>
|
|
{% endif %}
|
|
</div>
|