mirror of https://github.com/docker/docs.git
23 lines
655 B
HTML
23 lines
655 B
HTML
{{ $innerHTML := highlight .Inner .Type
|
|
| replaceRE
|
|
`<([A-Z_]+)?>`
|
|
`<var
|
|
class="text-violet-light dark:text-violet-dark font-bold"
|
|
>$1</var>`
|
|
}}
|
|
|
|
<div x-data class="group relative">
|
|
<button
|
|
class="material-symbols-rounded hidden group-hover:block absolute top-3 right-3 text-gray-light-300 dark:text-gray-dark-600"
|
|
title="Copy"
|
|
@click="window.navigator.clipboard.writeText($refs.code.textContent.replaceAll(/^\$\s*/gm, ''));
|
|
$el.textContent='check_circle';
|
|
setTimeout(() => $el.textContent='content_copy', 2000);"
|
|
>
|
|
content_copy
|
|
</button>
|
|
<div x-ref="code">
|
|
{{- safeHTML $innerHTML -}}
|
|
</div>
|
|
</div>
|