Files
2026-02-13 19:40:05 -06:00

16 lines
659 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">
{{ icon "terminal" "size-4 shrink-0 text-base-content/60" }}
<code>{{ . }}</code>
<button class="btn btn-ghost btn-xs absolute right-2 top-1/2 -translate-y-1/2 sm:opacity-0 sm:group-hover:opacity-100 focus:opacity-100 transition-opacity" data-cmd="{{ . }}" aria-label="Copy command to clipboard">
{{ icon "copy" "size-4" }}
</button>
</div>
{{ end }}