File tree Expand file tree Collapse file tree 3 files changed +9
-3
lines changed Expand file tree Collapse file tree 3 files changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -39,6 +39,7 @@ section.prose {
3939.header-link {
4040 @apply text-slate-400 hover:text-slate-600 transition-all duration-200 no-underline cursor-pointer;
4141 text-decoration : none !important ;
42+ vertical-align : baseline;
4243}
4344
4445.header-link : hover {
@@ -48,6 +49,7 @@ section.prose {
4849
4950.header-link svg {
5051 @apply w-4 h-4 inline-block;
52+ vertical-align : baseline;
5153}
5254
5355/* Ensure header links don't interfere with prose styling */
Original file line number Diff line number Diff line change 33{{- $text := .Text | safeHTML -}}
44< h {{ $level }} id ="{{ $anchor }} " class ="group relative ">
55 {{ $text }}
6- < a href ="#{{ $anchor }} " class ="header-link opacity-0 group-hover:opacity-100 transition-opacity duration-200 ml-2 align-middle " aria-label ="Link to this section " title ="Copy link to clipboard ">
7- < svg class ="inline-block w-4 h-4 " fill ="currentColor " viewBox ="0 0 20 20 " xmlns ="http://www.w3.org/2000/svg ">
6+ < a href ="#{{ $anchor }} " class ="header-link opacity-0 group-hover:opacity-100 transition-opacity duration-200 ml-1 align-baseline " aria-label ="Link to this section " title ="Copy link to clipboard ">
7+ < svg class ="inline-block w-4 h-4 align-baseline " fill ="currentColor " viewBox ="0 0 20 20 " xmlns ="http://www.w3.org/2000/svg ">
88 < path fill-rule ="evenodd " d ="M12.586 4.586a2 2 0 112.828 2.828l-3 3a2 2 0 01-2.828 0 1 1 0 00-1.414 1.414 4 4 0 005.656 0l3-3a4 4 0 00-5.656-5.656l-1.5 1.5a1 1 0 101.414 1.414l1.5-1.5zm-5 5a2 2 0 012.828 0 1 1 0 101.414-1.414 4 4 0 00-5.656 0l-3 3a4 4 0 105.656 5.656l1.5-1.5a1 1 0 10-1.414-1.414l-1.5 1.5a2 2 0 11-2.828-2.828l3-3z " clip-rule ="evenodd "> </ path >
99 </ svg >
1010 </ a >
Original file line number Diff line number Diff line change @@ -110,6 +110,10 @@ const mobileMenu = (() => {
110110 const href = linkElement . getAttribute ( 'href' )
111111 const fullUrl = window . location . origin + window . location . pathname + href
112112
113+ // Update the URL hash to provide immediate visual feedback
114+ window . location . hash = href
115+
116+ // Copy to clipboard
113117 if ( navigator . clipboard && navigator . clipboard . writeText ) {
114118 navigator . clipboard . writeText ( fullUrl ) . then ( ( ) => {
115119 showCopyFeedback ( linkElement )
@@ -133,7 +137,7 @@ const mobileMenu = (() => {
133137 setTimeout ( ( ) => {
134138 linkElement . setAttribute ( 'title' , originalTitle )
135139 linkElement . classList . remove ( 'copied' )
136- } , 1500 )
140+ } , 2000 )
137141 }
138142
139143 // Fallback copy method for older browsers
You can’t perform that action at this time.
0 commit comments