fix: code copy button is invisible when hover (#323)

* fix: code copy button is invisible when hover

* chore: update hugo_stats.json file
This commit is contained in:
Xin
2024-03-18 18:37:47 +00:00
committed by GitHub
parent c634cb83eb
commit 29e70c8b21
2 changed files with 4 additions and 4 deletions

View File

@ -4,7 +4,7 @@
{{- $copyCode := (T "copyCode") | default "Copy code" -}}
<div class="code-block hx-relative hx-mt-6 first:hx-mt-0 group/code">
<div class="code-block hx-relative hx-mt-6 first:hx-mt-0 hx-group/code">
{{- if $filename -}}
<div class="filename" dir="auto">{{ $filename }}</div>
{{- end -}}
@ -15,7 +15,7 @@
{{- end -}}
<div class="hx-opacity-0 hx-transition group-hover/code:hx-opacity-100 hx-flex hx-gap-1 hx-absolute hx-m-[11px] hx-right-0 {{ if $filename }}hx-top-8{{ else }}hx-top-0{{ end }}">
<button
class="code-copy-btn group/copybtn hx-transition-all active:hx-opacity-50 hx-bg-primary-700/5 hx-border hx-border-black/5 hx-text-gray-600 hover:hx-text-gray-900 hx-rounded-md hx-p-1.5 dark:hx-bg-primary-300/10 dark:hx-border-white/10 dark:hx-text-gray-400 dark:hover:hx-text-gray-50"
class="code-copy-btn hx-group/copybtn hx-transition-all active:hx-opacity-50 hx-bg-primary-700/5 hx-border hx-border-black/5 hx-text-gray-600 hover:hx-text-gray-900 hx-rounded-md hx-p-1.5 dark:hx-bg-primary-300/10 dark:hx-border-white/10 dark:hx-text-gray-400 dark:hover:hx-text-gray-50"
title="{{ $copyCode }}"
>
<div class="copy-icon group-[.copied]/copybtn:hx-hidden hx-pointer-events-none hx-h-4 hx-w-4"></div>