@@ -41,8 +41,21 @@ const Pre: React.FC<Props> = ({
4141
4242 const showFileNamePanel = showPanel && ! ! title
4343
44+ const isBash = highlighted . lang === 'shellscript'
45+
4446 return (
4547 < >
48+ { isBash && ! showFileNamePanel && (
49+ < div className = "relative flex h-9 items-center justify-start pr-12 font-display text-2xs text-zinc-300 sm:text-xs" >
50+ { /* one-off breakpoint to hide the filename on extremely narrow screens - to avoid interfering with the lang select */ }
51+ < div className = "relative flex h-full items-center justify-center gap-x-1 px-4" >
52+ < div className = "size-[6px] rounded-full bg-zinc-300/10" />
53+ < div className = "size-[6px] rounded-full bg-zinc-300/10" />
54+ < div className = "size-[6px] rounded-full bg-zinc-300/10" />
55+ </ div >
56+ < div className = "absolute bottom-0 h-[1px] w-full bg-zinc-300/5" />
57+ </ div >
58+ ) }
4659 { showFileNamePanel && (
4760 < div className = "relative flex h-10 items-center justify-start pr-12 font-display text-2xs text-zinc-300 sm:text-xs" >
4861 { /* one-off breakpoint to hide the filename on extremely narrow screens - to avoid interfering with the lang select */ }
@@ -55,13 +68,16 @@ const Pre: React.FC<Props> = ({
5568 < div className = "absolute bottom-0 h-[1px] w-full bg-zinc-300/5" />
5669 </ div >
5770 ) }
58- < CopyButton code = { highlighted . code } showPanel = { showPanel } />
71+ < CopyButton
72+ code = { highlighted . code }
73+ className = { cn ( showFileNamePanel && 'top-12' , isBash && 'top-11' ) }
74+ />
5975 < CodeHikePre
6076 code = { highlighted }
6177 handlers = { handlers }
6278 className = { cn (
6379 'overflow-auto overscroll-x-contain p-4' ,
64- showPanel && ! title && 'pt-8 ' , // add padding to ensure the code doesn't touch the top of the panel
80+ showPanel && ! title && 'pt-7 ' , // add padding to ensure the code doesn't touch the top of the panel
6581 className ,
6682 ) }
6783 style = { {
0 commit comments