Skip to content

Commit 4e6ac43

Browse files
committed
Landing Page Changes
1 parent 7edc95b commit 4e6ac43

File tree

8 files changed

+192
-204
lines changed

8 files changed

+192
-204
lines changed

src/App.jsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
import { GSAbout } from "@components/GSAbout"
22
import { Hero } from "@components/Hero"
3+
import { Navbar } from "@components/Navbar"
34

45
export function App() {
56
return (<>
7+
<Navbar />
68
<Hero />
79
<GSAbout />
810
</>)

src/components/Hero/index.jsx

Lines changed: 8 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -1,69 +1,23 @@
1-
import {
2-
Drill,
3-
FolderGit2,
4-
LibraryBig,
5-
ToolCase,
6-
Trees,
7-
} from "lucide-react";
8-
9-
import { HeroCard } from "@components/HeroCard";
10-
111
import Logo from "@assets/GraphScript.png";
122
import "./style.css";
133

144
export function Hero() {
15-
const actions = [
16-
{
17-
name: "Get Ecosystem",
18-
icon: Trees,
19-
href: "https://github.com/GraphScript-Labs/installer/releases",
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-
435
return (<>
446
<div className="hero">
45-
<span className="hero-background" />
46-
477
<div className="content">
488
<div className="brand">
499
<div className="brand-logo">
5010
<img src={Logo} alt="GraphScript Logo" />
5111
</div>
52-
<div className="brand-name">GraphScript</div>
53-
</div>
54-
<div className="slogan">
55-
It's about Logic not Syntax
56-
</div>
57-
</div>
5812

59-
<div className="actions">
60-
{
61-
actions.map((action, index) => <HeroCard
62-
key={index}
63-
{...action}
64-
/>
65-
)
66-
}
13+
<div className="brand-name">
14+
GraphScript
15+
</div>
16+
17+
<div className="slogan">
18+
It's about Logic not Syntax
19+
</div>
20+
</div>
6721
</div>
6822
</div>
6923
</>);

src/components/Hero/style.css

Lines changed: 4 additions & 63 deletions
Original file line numberDiff line numberDiff line change
@@ -6,68 +6,9 @@
66
gap: 4rem;
77
height: 100vh;
88
position: relative;
9-
margin-bottom: 4rem;
10-
119
--gradient-height: 3rem;
1210
}
1311

14-
.hero::before {
15-
content: '';
16-
position: absolute;
17-
top: 100%;
18-
left: 0;
19-
width: 100%;
20-
height: var(--gradient-height);
21-
z-index: -1;
22-
background: linear-gradient(
23-
to right,
24-
var(--color-secondary),
25-
var(--color-tertiary)
26-
);
27-
}
28-
29-
.hero::after {
30-
content: '';
31-
position: absolute;
32-
top: 100%;
33-
left: 0;
34-
width: 100%;
35-
height: var(--gradient-height);
36-
z-index: -1;
37-
background: linear-gradient(
38-
to bottom,
39-
transparent,
40-
var(--color-background)
41-
);
42-
}
43-
44-
.hero-background {
45-
position: absolute;
46-
padding: 1rem;
47-
left: 0;
48-
top: 0;
49-
height: 100%;
50-
width: 100%;
51-
aspect-ratio: 1;
52-
z-index: -1;
53-
pointer-events: none;
54-
background: linear-gradient(
55-
to bottom right,
56-
var(--color-primary),
57-
var(--color-secondary),
58-
var(--color-tertiary)
59-
);
60-
}
61-
62-
.hero-background::before {
63-
content: '';
64-
display: block;
65-
width: 100%;
66-
height: 100%;
67-
border-radius: 1rem;
68-
background: var(--color-background);
69-
}
70-
7112
.content {
7213
display: flex;
7314
flex-direction: column;
@@ -82,8 +23,8 @@
8223
}
8324

8425
.brand-logo {
85-
width: 10rem;
86-
height: 10rem;
26+
width: min(50vw, 20rem);
27+
aspect-ratio: 1;
8728
}
8829

8930
.brand-logo img {
@@ -93,13 +34,13 @@
9334
}
9435

9536
.brand-name {
96-
font-size: 4rem;
37+
font-size: min(6rem, 10vw);
9738
font-weight: bold;
9839
margin-top: 0.5rem;
9940
}
10041

10142
.slogan {
102-
font-size: 1.2rem;
43+
font-size: min(2rem, 4vw);
10344
color: #666;
10445
margin-top: 0.5rem;
10546
}

src/components/HeroCard/index.jsx

Lines changed: 0 additions & 23 deletions
This file was deleted.

src/components/HeroCard/style.css

Lines changed: 0 additions & 64 deletions
This file was deleted.

src/components/Navbar/index.jsx

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
import { useState } from "react";
2+
import { Hamburger } from "lucide-react";
3+
4+
import "./style.css";
5+
6+
export function Navbar() {
7+
const [active, setActive] = useState(false);
8+
9+
const links = [
10+
{
11+
name: "Get Ecosystem",
12+
href: "https://github.com/GraphScript-Labs/installer/releases",
13+
},
14+
{
15+
sep: true,
16+
},
17+
{
18+
name: "GSAM Compiler",
19+
href: "https://github.com/GraphScript-Labs/gsam-compiler",
20+
},
21+
{
22+
sep: true,
23+
},
24+
{
25+
name: "Online Editor",
26+
href: "https://graphscript-labs.github.io/editor",
27+
},
28+
{
29+
sep: true,
30+
},
31+
{
32+
name: "Documentation",
33+
href: "https://graphscript-labs.github.io/docs",
34+
},
35+
{
36+
sep: true,
37+
},
38+
{
39+
name: "Open Source",
40+
href: "https://github.com/GraphScript-Labs",
41+
},
42+
];
43+
44+
return (<>
45+
<div className="navbar">
46+
<div
47+
onClick={() => setActive(!active)}
48+
className={[
49+
"hamburger",
50+
active ? "active" : "",
51+
].join(" ")}
52+
>
53+
<Hamburger className="hamburger-icon" />
54+
</div>
55+
56+
<div className="nav-links">
57+
{links.map((link, index) => (link.sep
58+
? <span className="nav-link-sep" key={`sep-${index}`} />
59+
: <a
60+
key={link.name}
61+
href={link.href}
62+
className="nav-link"
63+
>
64+
{link.name}
65+
</a>
66+
))}
67+
</div>
68+
</div>
69+
</>);
70+
}
71+

0 commit comments

Comments
 (0)