File tree Expand file tree Collapse file tree 3 files changed +9
-15
lines changed Expand file tree Collapse file tree 3 files changed +9
-15
lines changed Original file line number Diff line number Diff line change @@ -25,14 +25,9 @@ export const handler: Handlers<unknown, State> = {
25
25
return Response . json ( {
26
26
schemaVersion : 1 ,
27
27
label : "" ,
28
- // namedLogo: "jsr", TODO: add icon to shields.io or simple-icons. temporary solution below.
29
- logoSvg : await Deno . readTextFile (
30
- new URL ( "../../static/logo.svg" , import . meta. url ) ,
31
- ) ,
32
28
message : packageResp . data . latestVersion ,
33
29
labelColor : "rgb(247,223,30)" ,
34
30
color : "rgb(8,51,68)" ,
35
- logoWidth : "25" ,
36
31
} ) ;
37
32
}
38
33
} else {
@@ -42,6 +37,9 @@ export const handler: Handlers<unknown, State> = {
42
37
const shieldsUrl = new URL ( "https://img.shields.io/endpoint" ) ;
43
38
shieldsUrl . search = url . search ;
44
39
shieldsUrl . searchParams . set ( "url" , url . href ) ;
40
+ shieldsUrl . searchParams . set ( "logo" , "jsr" ) ;
41
+ shieldsUrl . searchParams . set ( "logoColor" , "rgb(8,51,68)" ) ;
42
+ shieldsUrl . searchParams . set ( "logoSize" , "auto" ) ;
45
43
46
44
const res = await fetch ( shieldsUrl ) ;
47
45
Original file line number Diff line number Diff line change @@ -29,14 +29,9 @@ export const handler: Handlers<unknown, State> = {
29
29
return Response . json ( {
30
30
schemaVersion : 1 ,
31
31
label : "" ,
32
- // namedLogo: "jsr", TODO: add icon to shields.io or simple-icons. temporary solution below.
33
- logoSvg : await Deno . readTextFile (
34
- new URL ( "../../static/logo.svg" , import . meta. url ) ,
35
- ) ,
36
32
message : `${ packageResp . data . score } %` ,
37
33
labelColor : "rgb(247,223,30)" ,
38
34
color : "rgb(8,51,68)" ,
39
- logoWidth : "25" ,
40
35
} ) ;
41
36
}
42
37
} else {
@@ -46,6 +41,9 @@ export const handler: Handlers<unknown, State> = {
46
41
const shieldsUrl = new URL ( "https://img.shields.io/endpoint" ) ;
47
42
shieldsUrl . search = url . search ;
48
43
shieldsUrl . searchParams . set ( "url" , url . href ) ;
44
+ shieldsUrl . searchParams . set ( "logo" , "jsr" ) ;
45
+ shieldsUrl . searchParams . set ( "logoColor" , "rgb(8,51,68)" ) ;
46
+ shieldsUrl . searchParams . set ( "logoSize" , "auto" ) ;
49
47
50
48
const res = await fetch ( shieldsUrl ) ;
51
49
Original file line number Diff line number Diff line change @@ -25,14 +25,9 @@ export const handler: Handlers<unknown, State> = {
25
25
return Response . json ( {
26
26
schemaVersion : 1 ,
27
27
label : "" ,
28
- // namedLogo: "jsr", TODO: add icon to shields.io or simple-icons. temporary solution below.
29
- logoSvg : await Deno . readTextFile (
30
- new URL ( "../../static/logo.svg" , import . meta. url ) ,
31
- ) ,
32
28
message : `@${ scopeResp . data . scope } ` ,
33
29
labelColor : "rgb(247,223,30)" ,
34
30
color : "rgb(8,51,68)" ,
35
- logoWidth : "25" ,
36
31
} ) ;
37
32
}
38
33
} else {
@@ -42,6 +37,9 @@ export const handler: Handlers<unknown, State> = {
42
37
const shieldsUrl = new URL ( "https://img.shields.io/endpoint" ) ;
43
38
shieldsUrl . search = url . search ;
44
39
shieldsUrl . searchParams . set ( "url" , url . href ) ;
40
+ shieldsUrl . searchParams . set ( "logo" , "jsr" ) ;
41
+ shieldsUrl . searchParams . set ( "logoColor" , "rgb(8,51,68)" ) ;
42
+ shieldsUrl . searchParams . set ( "logoSize" , "auto" ) ;
45
43
46
44
const res = await fetch ( shieldsUrl ) ;
47
45
You can’t perform that action at this time.
0 commit comments