Files
at-container-registry/pkg/appview/templates/partials/push-list.html
2025-10-08 20:50:27 -05:00

60 lines
2.1 KiB
HTML

{{ range .Pushes }}
<div class="push-card">
<div class="push-header">
{{ if .IconURL }}
<img src="{{ .IconURL }}" alt="{{ .Repository }}" class="push-icon">
{{ else }}
<div class="push-icon-placeholder">{{ firstChar .Repository }}</div>
{{ end }}
<div class="push-info">
<div class="push-title-row">
<div class="push-title">
<a href="/u/{{ .Handle }}" class="push-user">{{ .Handle }}</a>
<span class="push-separator">/</span>
<a href="/r/{{ .Handle }}/{{ .Repository }}" class="push-repo">{{ .Repository }}</a>
<span class="push-separator">:</span>
<span class="push-tag">{{ .Tag }}</span>
</div>
<div class="push-stats">
<span class="push-stat">
<span class="star-icon"></span>
<span class="stat-count">{{ .StarCount }}</span>
</span>
<span class="push-stat">
<span class="pull-icon"></span>
<span class="stat-count">{{ .PullCount }}</span>
</span>
</div>
</div>
{{ if .Description }}
<p class="push-description">{{ .Description }}</p>
{{ end }}
</div>
</div>
<div class="push-details">
<code class="digest" title="{{ .Digest }}">{{ .Digest }}</code>
<span class="separator"></span>
<time class="timestamp" datetime="{{ .CreatedAt.Format "2006-01-02T15:04:05Z07:00" }}">
{{ timeAgo .CreatedAt }}
</time>
</div>
</div>
{{ end }}
{{ if .HasMore }}
<button class="load-more"
hx-get="/api/recent-pushes?offset={{ .NextOffset }}"
hx-target="#push-list"
hx-swap="beforeend">
Load More
</button>
{{ end }}
{{ if eq (len .Pushes) 0 }}
<div class="empty-state">
<p>No pushes yet. Start using ATCR by pushing your first image!</p>
<pre><code>docker push {{ .RegistryURL }}/yourhandle/myapp:latest</code></pre>
</div>
{{ end }}