|
22 | 22 | } |
23 | 23 |
|
24 | 24 | .container { |
25 | | - max-width: 720px; |
26 | | - margin: 0 auto; |
| 25 | + display: flex; |
| 26 | + gap: 24px; |
27 | 27 | padding: 40px 20px 60px; |
| 28 | + max-width: 1200px; |
| 29 | + margin: 0 auto; |
| 30 | + } |
| 31 | + |
| 32 | + /* Left column — results */ |
| 33 | + .col-left { |
| 34 | + flex: 1; |
| 35 | + min-width: 0; |
| 36 | + } |
| 37 | + |
| 38 | + /* Right column — controls */ |
| 39 | + .col-right { |
| 40 | + width: 280px; |
| 41 | + flex-shrink: 0; |
28 | 42 | } |
29 | 43 |
|
30 | 44 | /* Header */ |
31 | 45 | .header { |
32 | | - text-align: center; |
33 | | - margin-bottom: 32px; |
| 46 | + margin-bottom: 24px; |
34 | 47 | } |
35 | 48 |
|
36 | 49 | .header a { |
|
46 | 59 | .logo { |
47 | 60 | display: flex; |
48 | 61 | align-items: center; |
49 | | - justify-content: center; |
50 | 62 | gap: 12px; |
51 | | - margin: 16px 0 8px; |
| 63 | + margin: 12px 0 4px; |
52 | 64 | } |
53 | 65 |
|
54 | 66 | .logo svg { |
55 | | - width: 40px; |
56 | | - height: 40px; |
| 67 | + width: 32px; |
| 68 | + height: 32px; |
57 | 69 | } |
58 | 70 |
|
59 | 71 | .logo h1 { |
60 | | - font-size: 28px; |
| 72 | + font-size: 24px; |
61 | 73 | font-weight: 700; |
62 | 74 | color: #2d2d2d; |
63 | 75 | } |
64 | 76 |
|
65 | 77 | .subtitle { |
66 | | - font-size: 16px; |
| 78 | + font-size: 14px; |
67 | 79 | color: #75715e; |
68 | 80 | } |
69 | 81 |
|
70 | 82 | /* Status */ |
71 | 83 | .status { |
72 | 84 | display: flex; |
73 | 85 | align-items: center; |
74 | | - justify-content: center; |
75 | 86 | gap: 8px; |
76 | | - margin: 24px 0; |
77 | | - padding: 12px 20px; |
| 87 | + margin-bottom: 20px; |
| 88 | + padding: 10px 16px; |
78 | 89 | border-radius: 8px; |
79 | | - font-size: 15px; |
| 90 | + font-size: 14px; |
80 | 91 | font-weight: 500; |
81 | 92 | } |
82 | 93 |
|
|
107 | 118 |
|
108 | 119 | /* Sections */ |
109 | 120 | .section { |
110 | | - margin-bottom: 24px; |
| 121 | + margin-bottom: 16px; |
111 | 122 | } |
112 | 123 |
|
113 | 124 | .section-title { |
114 | | - font-size: 13px; |
| 125 | + font-size: 11px; |
115 | 126 | font-weight: 600; |
116 | 127 | text-transform: uppercase; |
117 | 128 | letter-spacing: 0.5px; |
118 | 129 | color: #75715e; |
119 | | - margin-bottom: 10px; |
| 130 | + margin-bottom: 8px; |
120 | 131 | } |
121 | 132 |
|
122 | 133 | .button-row { |
123 | 134 | display: flex; |
124 | | - gap: 10px; |
| 135 | + gap: 8px; |
125 | 136 | flex-wrap: wrap; |
126 | 137 | } |
127 | 138 |
|
|
130 | 141 | display: inline-flex; |
131 | 142 | align-items: center; |
132 | 143 | gap: 6px; |
133 | | - padding: 10px 18px; |
| 144 | + padding: 8px 14px; |
134 | 145 | border: none; |
135 | 146 | border-radius: 6px; |
136 | 147 | font-family: inherit; |
137 | | - font-size: 14px; |
| 148 | + font-size: 13px; |
138 | 149 | font-weight: 600; |
139 | 150 | cursor: pointer; |
140 | 151 | transition: opacity 0.15s, transform 0.1s; |
|
157 | 168 | .btn-method { |
158 | 169 | background: #3e3d32; |
159 | 170 | color: #a6e22e; |
| 171 | + width: 100%; |
| 172 | + justify-content: center; |
160 | 173 | } |
161 | 174 |
|
162 | 175 | .btn-fire-all { |
163 | 176 | background: #a6e22e; |
164 | 177 | color: #272822; |
165 | | - font-size: 16px; |
166 | | - padding: 14px 28px; |
| 178 | + font-size: 14px; |
| 179 | + padding: 12px 20px; |
167 | 180 | width: 100%; |
168 | 181 | justify-content: center; |
169 | | - margin-top: 8px; |
| 182 | + margin-top: 4px; |
170 | 183 | } |
171 | 184 |
|
172 | 185 | .btn-fire-all:hover { |
|
178 | 191 | color: #75715e; |
179 | 192 | border: 1px solid #d5d5d0; |
180 | 193 | font-weight: 500; |
181 | | - padding: 8px 16px; |
| 194 | + padding: 6px 12px; |
182 | 195 | } |
183 | 196 |
|
184 | 197 | /* Results */ |
185 | 198 | .results-header { |
186 | 199 | display: flex; |
187 | 200 | align-items: center; |
188 | 201 | justify-content: space-between; |
189 | | - margin-top: 36px; |
190 | 202 | margin-bottom: 12px; |
191 | 203 | } |
192 | 204 |
|
|
274 | 286 | } |
275 | 287 |
|
276 | 288 | /* Responsive */ |
277 | | - @media (max-width: 480px) { |
| 289 | + @media (max-width: 640px) { |
278 | 290 | .container { |
| 291 | + flex-direction: column-reverse; |
279 | 292 | padding: 24px 16px 40px; |
280 | 293 | } |
281 | 294 |
|
282 | | - .logo h1 { |
283 | | - font-size: 24px; |
| 295 | + .col-right { |
| 296 | + width: 100%; |
284 | 297 | } |
285 | 298 |
|
286 | 299 | .button-row { |
287 | | - flex-direction: column; |
| 300 | + flex-direction: row; |
288 | 301 | } |
289 | 302 |
|
290 | 303 | .btn-method { |
291 | | - width: 100%; |
292 | | - justify-content: center; |
293 | | - } |
294 | | - |
295 | | - .btn-fire-all { |
296 | | - font-size: 15px; |
297 | | - padding: 12px 20px; |
298 | | - } |
299 | | - |
300 | | - .result-body { |
301 | | - font-size: 11px; |
| 304 | + width: auto; |
| 305 | + flex: 1; |
302 | 306 | } |
303 | 307 | } |
304 | 308 | </style> |
305 | 309 | </head> |
306 | 310 | <body> |
307 | 311 | <div class="container"> |
308 | | - <!-- Header --> |
309 | | - <div class="header"> |
310 | | - <a href="index.html">← nostrkey.com</a> |
311 | | - <div class="logo"> |
312 | | - <svg viewBox="0 0 100 100" xmlns="http://www.w3.org/2000/svg"> |
313 | | - <circle cx="50" cy="50" r="45" stroke="#a6e22e" stroke-width="4" fill="#3e3d32"/> |
314 | | - <path d="M35 50L45 60L65 40" stroke="#a6e22e" stroke-width="6" stroke-linecap="round" stroke-linejoin="round" fill="none"/> |
315 | | - </svg> |
316 | | - <h1>NostrKey</h1> |
| 312 | + <!-- Left column — results --> |
| 313 | + <div class="col-left"> |
| 314 | + <div class="results-header"> |
| 315 | + <h2>Results</h2> |
| 316 | + <button class="btn btn-clear" id="btn-clear">Clear</button> |
| 317 | + </div> |
| 318 | + <div id="results"> |
| 319 | + <div class="empty-state">Click a button to test a window.nostr method</div> |
317 | 320 | </div> |
318 | | - <p class="subtitle">Extension Test</p> |
319 | | - </div> |
320 | | - |
321 | | - <!-- Status --> |
322 | | - <div id="status" class="status not-detected"> |
323 | | - <span class="status-dot"></span> |
324 | | - <span>Checking for extension…</span> |
325 | 321 | </div> |
326 | 322 |
|
327 | | - <!-- Test Buttons --> |
328 | | - <div class="section"> |
329 | | - <div class="section-title">Identity</div> |
330 | | - <div class="button-row"> |
331 | | - <button class="btn btn-method" id="btn-getPublicKey">Get Public Key</button> |
332 | | - <button class="btn btn-method" id="btn-getRelays">Get Relays</button> |
| 323 | + <!-- Right column — controls (near extension popup) --> |
| 324 | + <div class="col-right"> |
| 325 | + <!-- Header --> |
| 326 | + <div class="header"> |
| 327 | + <a href="index.html">← nostrkey.com</a> |
| 328 | + <div class="logo"> |
| 329 | + <svg viewBox="0 0 100 100" xmlns="http://www.w3.org/2000/svg"> |
| 330 | + <circle cx="50" cy="50" r="45" stroke="#a6e22e" stroke-width="4" fill="#3e3d32"/> |
| 331 | + <path d="M35 50L45 60L65 40" stroke="#a6e22e" stroke-width="6" stroke-linecap="round" stroke-linejoin="round" fill="none"/> |
| 332 | + </svg> |
| 333 | + <h1>NostrKey</h1> |
| 334 | + </div> |
| 335 | + <p class="subtitle">Extension Test</p> |
333 | 336 | </div> |
334 | | - </div> |
335 | 337 |
|
336 | | - <div class="section"> |
337 | | - <div class="section-title">Signing</div> |
338 | | - <div class="button-row"> |
339 | | - <button class="btn btn-method" id="btn-signEvent">Sign Test Event</button> |
| 338 | + <!-- Status --> |
| 339 | + <div id="status" class="status not-detected"> |
| 340 | + <span class="status-dot"></span> |
| 341 | + <span>Checking for extension…</span> |
340 | 342 | </div> |
341 | | - </div> |
342 | 343 |
|
343 | | - <div class="section"> |
344 | | - <div class="section-title">Encryption — NIP-44</div> |
345 | | - <div class="button-row"> |
346 | | - <button class="btn btn-method" id="btn-nip44Encrypt">Encrypt</button> |
347 | | - <button class="btn btn-method" id="btn-nip44Decrypt">Decrypt</button> |
| 344 | + <!-- Test Buttons --> |
| 345 | + <div class="section"> |
| 346 | + <div class="section-title">Identity</div> |
| 347 | + <div class="button-row"> |
| 348 | + <button class="btn btn-method" id="btn-getPublicKey">Get Public Key</button> |
| 349 | + </div> |
| 350 | + <div class="button-row" style="margin-top:8px"> |
| 351 | + <button class="btn btn-method" id="btn-getRelays">Get Relays</button> |
| 352 | + </div> |
348 | 353 | </div> |
349 | | - </div> |
350 | 354 |
|
351 | | - <div class="section"> |
352 | | - <div class="section-title">Encryption — NIP-04 (deprecated)</div> |
353 | | - <div class="button-row"> |
354 | | - <button class="btn btn-method" id="btn-nip04Encrypt">Encrypt</button> |
355 | | - <button class="btn btn-method" id="btn-nip04Decrypt">Decrypt</button> |
| 355 | + <div class="section"> |
| 356 | + <div class="section-title">Signing</div> |
| 357 | + <div class="button-row"> |
| 358 | + <button class="btn btn-method" id="btn-signEvent">Sign Test Event</button> |
| 359 | + </div> |
356 | 360 | </div> |
357 | | - </div> |
358 | 361 |
|
359 | | - <div class="section"> |
360 | | - <button class="btn btn-fire-all" id="btn-fire-all"> |
361 | | - ⚡ Fire All — Test Every Method |
362 | | - </button> |
363 | | - </div> |
| 362 | + <div class="section"> |
| 363 | + <div class="section-title">NIP-44</div> |
| 364 | + <div class="button-row"> |
| 365 | + <button class="btn btn-method" id="btn-nip44Encrypt">Encrypt</button> |
| 366 | + </div> |
| 367 | + <div class="button-row" style="margin-top:8px"> |
| 368 | + <button class="btn btn-method" id="btn-nip44Decrypt">Decrypt</button> |
| 369 | + </div> |
| 370 | + </div> |
364 | 371 |
|
365 | | - <!-- Results --> |
366 | | - <div class="results-header"> |
367 | | - <h2>Results</h2> |
368 | | - <button class="btn btn-clear" id="btn-clear">Clear</button> |
369 | | - </div> |
| 372 | + <div class="section"> |
| 373 | + <div class="section-title">NIP-04 (deprecated)</div> |
| 374 | + <div class="button-row"> |
| 375 | + <button class="btn btn-method" id="btn-nip04Encrypt">Encrypt</button> |
| 376 | + </div> |
| 377 | + <div class="button-row" style="margin-top:8px"> |
| 378 | + <button class="btn btn-method" id="btn-nip04Decrypt">Decrypt</button> |
| 379 | + </div> |
| 380 | + </div> |
370 | 381 |
|
371 | | - <div id="results"> |
372 | | - <div class="empty-state">Click a button above to test a window.nostr method</div> |
| 382 | + <div class="section"> |
| 383 | + <button class="btn btn-fire-all" id="btn-fire-all"> |
| 384 | + ⚡ Fire All |
| 385 | + </button> |
| 386 | + </div> |
373 | 387 | </div> |
374 | 388 | </div> |
375 | 389 |
|
|
0 commit comments