Files
at-container-registry/pkg/appview/templates/components/docker-command.html
2026-01-16 23:19:41 -06:00

16 lines
781 B
HTML

{{ define "docker-command" }}
{{/*
Docker command component - displays a docker command with icon and copy button
Expects: string - the docker command to display
Usage: {{ template "docker-command" "docker pull atcr.io/alice/myapp:latest" }}
*/}}
<div class="cmd group" onclick="event.stopPropagation()">
<i data-lucide="terminal" class="size-4 shrink-0 text-base-content/60"></i>
<code>{{ . }}</code>
<button class="btn btn-ghost btn-xs absolute right-2 top-1/2 -translate-y-1/2 opacity-0 group-hover:opacity-100 transition-opacity" onclick="event.stopPropagation(); copyToClipboard(this.getAttribute('data-cmd'))" data-cmd="{{ . }}" aria-label="Copy command to clipboard">
<i data-lucide="copy" class="size-4"></i>
</button>
</div>
{{ end }}