67
67
68
68
< div id ="codeModal_{{ $uniqueId }} " style ="display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.5); z-index: 1050; ">
69
69
< div style ="position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); background: white; border-radius: 8px; max-width: 90%; max-height: 90%; overflow: auto; box-shadow: 0 4px 20px rgba(0,0,0,0.3); ">
70
- < div style ="padding: 20px ; border-bottom: 1px solid #dee2e6; display: flex; justify-content: space-between; align-items: center; ">
70
+ < div style ="position: sticky; top: 0; z-index: 10; background: white; box-shadow: 0 2px 2px rgba(0,0,0,0.1); padding: 10px 15px ; border-bottom: 1px solid #dee2e6; display: flex; justify-content: space-between; align-items: center; height: 50px ; ">
71
71
< h5 style ="margin: 0; "> {{ $path }}</ h5 >
72
72
< div >
73
73
< button onclick ="copyCode('{{ $uniqueId }}', event) " style ="margin-right: 10px; padding: 5px 10px; border: 1px solid #007bff; background: #007bff; color: white; border-radius: 4px; cursor: pointer; ">
@@ -98,7 +98,7 @@ <h5 style="margin: 0;">{{ $path }}</h5>
98
98
window . copyCode = window . copyCode || function ( id , event ) {
99
99
const codeElement = document . getElementById ( 'codeContent_' + id ) ;
100
100
const code = codeElement . textContent ;
101
-
101
+
102
102
if ( navigator . clipboard ) {
103
103
navigator . clipboard . writeText ( code ) . then ( ( ) => {
104
104
const btn = event . target ;
@@ -119,7 +119,7 @@ <h5 style="margin: 0;">{{ $path }}</h5>
119
119
textArea . select ( ) ;
120
120
document . execCommand ( 'copy' ) ;
121
121
document . body . removeChild ( textArea ) ;
122
-
122
+
123
123
const btn = event . target ;
124
124
const originalText = btn . textContent ;
125
125
btn . textContent = 'Copied!' ;
0 commit comments