File tree Expand file tree Collapse file tree 2 files changed +42
-7
lines changed Expand file tree Collapse file tree 2 files changed +42
-7
lines changed Original file line number Diff line number Diff line change @@ -12,6 +12,34 @@ import Logo from "@assets/GraphScript.png";
12
12
import "./style.css" ;
13
13
14
14
export function Hero ( ) {
15
+ const actions = [
16
+ {
17
+ name : "Get Ecosystem" ,
18
+ icon : Trees ,
19
+ href : "https://github.com/GraphScript-Labs/" ,
20
+ } ,
21
+ {
22
+ name : "GSAM Compiler" ,
23
+ icon : Drill ,
24
+ href : "https://github.com/GraphScript-Labs/gsam-compiler" ,
25
+ } ,
26
+ {
27
+ name : "Online Editor" ,
28
+ icon : ToolCase ,
29
+ href : "https://graphscript-labs.github.io/editor" ,
30
+ } ,
31
+ {
32
+ name : "Documentation" ,
33
+ icon : LibraryBig ,
34
+ href : "https://graphscript-labs.github.io/docs" ,
35
+ } ,
36
+ {
37
+ name : "Open Source" ,
38
+ icon : FolderGit2 ,
39
+ href : "https://github.com/GraphScript-Labs" ,
40
+ } ,
41
+ ] ;
42
+
15
43
return ( < >
16
44
< div className = "hero" >
17
45
< div className = "content" >
@@ -26,11 +54,13 @@ export function Hero() {
26
54
</ div >
27
55
</ div >
28
56
< div className = "actions" >
29
- < HeroCard name = "Get Ecosystem" icon = { Trees } />
30
- < HeroCard name = "GSAM Compiler" icon = { Drill } />
31
- < HeroCard name = "Online Editor" icon = { ToolCase } />
32
- < HeroCard name = "Documentation" icon = { LibraryBig } />
33
- < HeroCard name = "Source Code" icon = { FolderGit2 } />
57
+ {
58
+ actions . map ( ( action , index ) => < HeroCard
59
+ key = { index }
60
+ { ...action }
61
+ />
62
+ )
63
+ }
34
64
</ div >
35
65
</ div >
36
66
</ > ) ;
Original file line number Diff line number Diff line change 1
1
import { MoveUpRight } from "lucide-react" ;
2
2
import "./style.css" ;
3
3
4
- export function HeroCard ( { name, icon } ) {
4
+ export function HeroCard ( { name, icon, href } ) {
5
5
const CardIcon = icon ;
6
6
7
+ const openLink = ( ) => {
8
+ if ( ! href ) return ;
9
+ window . open ( href , "_blank" ) ;
10
+ } ;
11
+
7
12
return ( < >
8
- < div className = "hero-card" >
13
+ < div className = "hero-card" onClick = { openLink } >
9
14
< div className = "hero-card-icon-container" >
10
15
< CardIcon className = "hero-card-icon" />
11
16
</ div >
You can’t perform that action at this time.
0 commit comments