@@ -5,7 +5,7 @@ const router = useRouter()
55const isHomepage = computed (() => route .path === ' /' )
66
77useHead ({
8- titleTemplate : ( titleChunk ) => {
8+ titleTemplate : titleChunk => {
99 return titleChunk ? titleChunk : ' npmx - Better npm Package Browser'
1010 },
1111})
@@ -14,11 +14,7 @@ useHead({
1414function handleGlobalKeydown(e : KeyboardEvent ) {
1515 // Ignore if user is typing in an input, textarea, or contenteditable
1616 const target = e .target as HTMLElement
17- if (
18- target .tagName === ' INPUT'
19- || target .tagName === ' TEXTAREA'
20- || target .isContentEditable
21- ) {
17+ if (target .tagName === ' INPUT' || target .tagName === ' TEXTAREA' || target .isContentEditable ) {
2218 return
2319 }
2420
@@ -32,8 +28,7 @@ function handleGlobalKeydown(e: KeyboardEvent) {
3228
3329 if (searchInput ) {
3430 searchInput .focus ()
35- }
36- else {
31+ } else {
3732 // Navigate to search page
3833 router .push (' /search' )
3934 }
@@ -51,17 +46,11 @@ onUnmounted(() => {
5146
5247<template >
5348 <div class =" min-h-screen flex flex-col bg-bg text-fg" >
54- <a
55- href =" #main-content"
56- class =" skip-link font-mono"
57- >Skip to main content</a >
49+ <a href =" #main-content" class =" skip-link font-mono" >Skip to main content</a >
5850
5951 <AppHeader :show-logo =" !isHomepage" />
6052
61- <div
62- id =" main-content"
63- class =" flex-1"
64- >
53+ <div id =" main-content" class =" flex-1" >
6554 <NuxtPage />
6655 </div >
6756
@@ -71,7 +60,9 @@ onUnmounted(() => {
7160
7261<style >
7362/* Base reset and defaults */
74- * , * ::before , * ::after {
63+ * ,
64+ * ::before ,
65+ * ::after {
7566 box-sizing : border-box ;
7667}
7768
9485 text-decoration : underline ;
9586 text-underline-offset : 3px ;
9687 text-decoration-color : #404040 ;
97- transition : color 0.2s ease , text-decoration-color 0.2s ease ;
88+ transition :
89+ color 0.2s ease ,
90+ text-decoration-color 0.2s ease ;
9891}
9992
10093a :hover {
@@ -190,12 +183,26 @@ button {
190183}
191184
192185/* Visual styling based on original README heading level */
193- .readme-content [data-level = " 1" ] { font-size : 1.5rem ; }
194- .readme-content [data-level = " 2" ] { font-size : 1.25rem ; padding-bottom : 0.5rem ; border-bottom : 1px solid #262626 ; }
195- .readme-content [data-level = " 3" ] { font-size : 1.125rem ; }
196- .readme-content [data-level = " 4" ] { font-size : 1rem ; }
197- .readme-content [data-level = " 5" ] { font-size : 0.925rem ; }
198- .readme-content [data-level = " 6" ] { font-size : 0.875rem ; }
186+ .readme-content [data-level = ' 1' ] {
187+ font-size : 1.5rem ;
188+ }
189+ .readme-content [data-level = ' 2' ] {
190+ font-size : 1.25rem ;
191+ padding-bottom : 0.5rem ;
192+ border-bottom : 1px solid #262626 ;
193+ }
194+ .readme-content [data-level = ' 3' ] {
195+ font-size : 1.125rem ;
196+ }
197+ .readme-content [data-level = ' 4' ] {
198+ font-size : 1rem ;
199+ }
200+ .readme-content [data-level = ' 5' ] {
201+ font-size : 0.925rem ;
202+ }
203+ .readme-content [data-level = ' 6' ] {
204+ font-size : 0.875rem ;
205+ }
199206
200207.readme-content p {
201208 margin-bottom : 1rem ;
@@ -310,52 +317,52 @@ button {
310317}
311318
312319/* Note - blue */
313- .readme-content blockquote [data-callout = " note" ] {
320+ .readme-content blockquote [data-callout = ' note' ] {
314321 border-left-color : #3b82f6 ;
315322 background : rgba (59 , 130 , 246 , 0.05 );
316323}
317- .readme-content blockquote [data-callout = " note" ]::before {
318- content : " Note" ;
324+ .readme-content blockquote [data-callout = ' note' ]::before {
325+ content : ' Note' ;
319326 color : #3b82f6 ;
320327}
321328
322329/* Tip - green */
323- .readme-content blockquote [data-callout = " tip" ] {
330+ .readme-content blockquote [data-callout = ' tip' ] {
324331 border-left-color : #22c55e ;
325332 background : rgba (34 , 197 , 94 , 0.05 );
326333}
327- .readme-content blockquote [data-callout = " tip" ]::before {
328- content : " Tip" ;
334+ .readme-content blockquote [data-callout = ' tip' ]::before {
335+ content : ' Tip' ;
329336 color : #22c55e ;
330337}
331338
332339/* Important - purple */
333- .readme-content blockquote [data-callout = " important" ] {
340+ .readme-content blockquote [data-callout = ' important' ] {
334341 border-left-color : #a855f7 ;
335342 background : rgba (168 , 85 , 247 , 0.05 );
336343}
337- .readme-content blockquote [data-callout = " important" ]::before {
338- content : " Important" ;
344+ .readme-content blockquote [data-callout = ' important' ]::before {
345+ content : ' Important' ;
339346 color : #a855f7 ;
340347}
341348
342349/* Warning - yellow/orange */
343- .readme-content blockquote [data-callout = " warning" ] {
350+ .readme-content blockquote [data-callout = ' warning' ] {
344351 border-left-color : #eab308 ;
345352 background : rgba (234 , 179 , 8 , 0.05 );
346353}
347- .readme-content blockquote [data-callout = " warning" ]::before {
348- content : " Warning" ;
354+ .readme-content blockquote [data-callout = ' warning' ]::before {
355+ content : ' Warning' ;
349356 color : #eab308 ;
350357}
351358
352359/* Caution - red */
353- .readme-content blockquote [data-callout = " caution" ] {
360+ .readme-content blockquote [data-callout = ' caution' ] {
354361 border-left-color : #ef4444 ;
355362 background : rgba (239 , 68 , 68 , 0.05 );
356363}
357- .readme-content blockquote [data-callout = " caution" ]::before {
358- content : " Caution" ;
364+ .readme-content blockquote [data-callout = ' caution' ]::before {
365+ content : ' Caution' ;
359366 color : #ef4444 ;
360367}
361368
@@ -424,15 +431,15 @@ p > span > code,
424431}
425432
426433/* Safari search input fixes */
427- input [type = " search" ] {
434+ input [type = ' search' ] {
428435 -webkit-appearance : none ;
429436 appearance : none ;
430437}
431438
432- input [type = " search" ]::-webkit-search-decoration ,
433- input [type = " search" ]::-webkit-search-cancel-button ,
434- input [type = " search" ]::-webkit-search-results-button ,
435- input [type = " search" ]::-webkit-search-results-decoration {
439+ input [type = ' search' ]::-webkit-search-decoration ,
440+ input [type = ' search' ]::-webkit-search-cancel-button ,
441+ input [type = ' search' ]::-webkit-search-results-button ,
442+ input [type = ' search' ]::-webkit-search-results-decoration {
436443 -webkit-appearance : none ;
437444 appearance : none ;
438445}
0 commit comments