mirror of
https://github.com/docker/docs.git
synced 2026-03-28 14:58:53 +07:00
- Refactoring styles to prevent unwanted specificity issues by using tailwind directives - Improve color consistency for code blocks and other components by replacing adhoc hex values with theme colors Signed-off-by: David Karlsson <35727626+dvdksn@users.noreply.github.com>
17 lines
600 B
HTML
17 lines
600 B
HTML
<div class="group relative">
|
|
<button
|
|
x-data="{ code: '{{encoding.Base64Encode .Inner}}' }"
|
|
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(atob(code).replaceAll(/^\$\s*/gm, ''));
|
|
$el.textContent='check_circle';
|
|
setTimeout(() => $el.textContent='content_copy', 2000);"
|
|
>
|
|
content_copy
|
|
</button>
|
|
{{ $result := transform.HighlightCodeBlock . }}
|
|
<div class="syntax-light dark:syntax-dark">
|
|
{{ $result.Wrapped }}
|
|
</div>
|
|
</div>
|