File tree Expand file tree Collapse file tree 3 files changed +15
-9
lines changed
apps/svelte.dev/src/routes/packages Expand file tree Collapse file tree 3 files changed +15
-9
lines changed Original file line number Diff line number Diff line change @@ -21,23 +21,24 @@ const arrToPackages = (arr: string[]) => {
21
21
} ;
22
22
23
23
// Netflix style page. Send pre-done cards with categories
24
- const homepage_data : { title : string ; packages : Package [ ] } [ ] = [
24
+ const homepage : { title : string ; href ? : string ; packages : Package [ ] } [ ] = [
25
25
{
26
- title : 'sv add-ons' ,
26
+ title : 'Svelte CLI add-ons' ,
27
+ href : '/docs/cli' ,
27
28
packages : arrToPackages ( PACKAGES_META . SV_ADD . packages )
28
29
}
29
30
] ;
30
31
31
32
for ( const { packages, title } of PACKAGES_META . FEATURED ) {
32
- homepage_data . push ( {
33
+ homepage . push ( {
33
34
title,
34
35
packages : arrToPackages ( packages )
35
36
} ) ;
36
37
}
37
38
38
- export async function load ( { url } ) {
39
+ export async function load ( ) {
39
40
return {
40
41
packages : registry ,
41
- homepage : homepage_data
42
+ homepage
42
43
} ;
43
44
}
Original file line number Diff line number Diff line change 22
22
23
23
<div class =" page content" >
24
24
<div in:fly ={{ y : 20 }}>
25
- {#each data .homepage as { title, packages }}
26
- <Category {title } {packages } />
25
+ {#each data .homepage as { title, href, packages }}
26
+ <Category {title } {href } { packages } />
27
27
{/each }
28
28
</div >
29
29
</div >
Original file line number Diff line number Diff line change 8
8
packages: Package [];
9
9
}
10
10
11
- let { title, packages }: Props = $props ();
11
+ let { title, href, packages }: Props = $props ();
12
12
13
13
let content: HTMLElement ;
14
14
let scroller: HTMLElement ;
37
37
38
38
<section class =" category" >
39
39
<header >
40
- <h2 >{title }</h2 >
40
+ <h2 >
41
+ {title }
42
+ {#if href }
43
+ (<a {href }>docs</a >)
44
+ {/if }
45
+ </h2 >
41
46
42
47
{#if ! at_start || ! at_end }
43
48
<div class =" controls" >
You can’t perform that action at this time.
0 commit comments