mirror of
https://github.com/imfing/hextra.git
synced 2025-06-20 08:21:52 -04:00
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:
@ -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>
|
||||
|
Reference in New Issue
Block a user