Skip to content

Commit 4f7b2d3

Browse files
committed
some clean
Signed-off-by: TuvalSimha <tuval.simha@gmail.com>
1 parent 4d43a53 commit 4f7b2d3

File tree

8 files changed

+601
-84
lines changed

8 files changed

+601
-84
lines changed

src/components/Conf/Button/index.tsx

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
import React from "react"
2+
3+
interface Props {
4+
text: React.ReactNode
5+
className?: string
6+
href?: string
7+
}
8+
9+
const ButtonConf = ({ text, href, className }: Props) => {
10+
return (
11+
<button
12+
className={
13+
className ??
14+
"no-underline inline-flex text-white bg-purple-500 border-0 py-2 px-6 focus:outline-none hover:bg-purple-600 rounded text-lg "
15+
}
16+
>
17+
<a className="cursor-pointer no-underline hover:no-underline" href={href}>
18+
{text}
19+
</a>
20+
</button>
21+
)
22+
}
23+
24+
export default ButtonConf

src/components/Conf/Footer/index.tsx

Lines changed: 50 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,26 @@
11
import React from "react"
2-
import Link from "../../Link"
2+
import SocialIcons from "../SocialIcons"
33

4-
interface LinkItem {
5-
text: string
6-
href: string
7-
icon?: string
8-
}
9-
10-
interface FooterLinks {
11-
text?: string
12-
href?: string
13-
subsections: LinkItem[]
14-
}
15-
16-
const getLinks = (): FooterLinks[] => [
4+
const links = [
175
{
18-
subsections: [
6+
category: "GraphQLConf",
7+
links: [
198
{ text: "GraphQLConf", href: "/" },
209
{ text: "Speakers", href: "/#speakers" },
2110
{ text: "Venue", href: "/#venue" },
2211
],
2312
},
2413
{
25-
subsections: [
26-
// TODO: Edit the href link to the correct page
14+
category: "Register",
15+
links: [
2716
{ text: "Register", href: "/#register" },
2817
{ text: "Speak", href: "/cfp" },
2918
{ text: "Sponsor", href: "/PDF" },
3019
],
3120
},
3221
{
33-
subsections: [
34-
// TODO: Edit the href link to the correct page
22+
category: "FAQ",
23+
links: [
3524
{ text: "FAQ", href: "/faq" },
3625
{ text: "Code of Conduct", href: "/faq#codeofconduct" },
3726
{ text: "Contact Us", href: "/faq#contact" },
@@ -41,42 +30,50 @@ const getLinks = (): FooterLinks[] => [
4130

4231
const FooterConf = () => {
4332
return (
44-
<div>
45-
<footer>
46-
<section className="sitemap">
47-
{getLinks().map((section, i) => (
48-
<div key={i}>
49-
<h5>
50-
{section.href ? (
51-
<Link href={section.href}>{section.text}</Link>
52-
) : (
53-
<span>{section.text}</span>
54-
)}
55-
</h5>
56-
{section.subsections.map((subsection: any, i) => (
57-
<Link key={i} href={subsection.href}>
58-
{subsection.icon && <img src={subsection.icon} />}
59-
{subsection.text}
60-
</Link>
61-
))}
33+
<footer className="text-gray-600 body-font">
34+
<div className="container px-5 py-24 mx-auto flex md:items-center lg:items-start md:flex-row md:flex-nowrap flex-wrap flex-col">
35+
<div className="w-64 flex-shrink-0 md:mx-0 mx-auto text-center md:text-left">
36+
<a className="flex title-font font-medium items-center md:justify-start justify-center text-gray-900">
37+
<img src="/img/graphql-conf-logo.svg" className="w-[200px]" />
38+
</a>
39+
</div>
40+
<div className="flex-grow flex flex-wrap md:pl-20 -mb-10 md:mt-0 mt-10 md:text-left text-center">
41+
{links.map((link, i) => (
42+
<div key={i} className="lg:w-1/4 md:w-1/2 w-full px-4">
43+
<nav className="list-none mb-20 ">
44+
{link.links.map((link, i) => (
45+
<li key={i}>
46+
<a className="text-white font-semibold text-base hover:text-white hover:font-semibold cursor-pointer">
47+
{link.text}
48+
</a>
49+
</li>
50+
))}
51+
</nav>
6252
</div>
6353
))}
64-
65-
<img src="/img/conf/footer.png" height={150} />
66-
</section>
67-
<section className="copyright">
68-
Copyright © {`${new Date().getFullYear()}`} The GraphQL Foundation.
69-
All rights reserved.
70-
<br />
71-
For web site terms of use, trademark policy and general project
72-
policies please see&nbsp;
73-
<a href="https://lfprojects.org" target="_blank">
74-
https://lfprojects.org
75-
</a>
76-
.
77-
</section>
78-
</footer>
79-
</div>
54+
</div>
55+
</div>
56+
<div className="bg-[#862e69]">
57+
<div className="container mx-auto py-4 px-5 flex flex-wrap flex-col sm:flex-row">
58+
<p className="text-white text-sm text-center sm:text-left">
59+
<section>
60+
Copyright © {`${new Date().getFullYear()}`} The GraphQL
61+
Foundation. All rights reserved.
62+
<br />
63+
For web site terms of use, trademark policy and general project
64+
policies please see&nbsp;
65+
<a href="https://lfprojects.org" target="_blank">
66+
https://lfprojects.org
67+
</a>
68+
.
69+
</section>
70+
</p>
71+
<span className="inline-flex sm:ml-auto sm:mt-0 mt-2 justify-center sm:justify-start ">
72+
<SocialIcons />
73+
</span>
74+
</div>
75+
</div>
76+
</footer>
8077
)
8178
}
8279

src/components/Conf/Header/index.tsx

Lines changed: 26 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
import React from "react"
2-
import Logo from "../../Logo"
3-
import Search from "../../Search"
4-
import Link from "../../Link"
2+
import ButtonConf from "../Button"
53

64
interface LinkItem {
75
section: string
@@ -32,28 +30,34 @@ const links: LinkItem[] = [
3230
},
3331
]
3432

33+
const classes = {
34+
button:
35+
"inline-flex text-white bg-purple-500 border-0 py-2 px-6 focus:outline-none hover:bg-purple-600 rounded text-lg",
36+
background: "bg-[#862e69]",
37+
}
38+
3539
const HeaderConf = () => {
3640
return (
37-
<header>
38-
<section>
39-
<Link className="conf-header" href="/">
40-
<img
41-
src="/img/conf/logo-color.png"
42-
alt="GraphQL Conf Logo"
43-
style={{ height: "50px", width: "auto" }}
44-
/>
45-
</Link>
46-
<nav>
47-
<input type="checkbox" id="menubox" aria-label="Menu" />
48-
<div>
49-
{links.map((link, i) => (
50-
<Link key={i} href={link.href}>
51-
{link.text}
52-
</Link>
53-
))}
54-
</div>
41+
<header className={classes.background}>
42+
<div className="container mx-auto flex flex-wrap p-5 flex-col md:flex-row items-center">
43+
<nav className="flex lg:w-2/5 flex-wrap items-center text-base md:ml-auto">
44+
{links.map((link, i) => (
45+
<a
46+
className="mr-5 text-white font-normal hover:font-extrabold hover:text-white"
47+
key={i}
48+
href={link.href}
49+
>
50+
{link.text}
51+
</a>
52+
))}
5553
</nav>
56-
</section>
54+
<a className="flex order-first lg:order-none lg:w-1/5 title-font font-medium items-center lg:items-center lg:justify-center mb-4 md:mb-0">
55+
<img src="/img/graphql-conf-logo.svg" className="w-[150px]" />
56+
</a>
57+
<div className="lg:w-2/5 inline-flex lg:justify-end ml-5 lg:ml-0">
58+
<ButtonConf text="REGISTER NOW" href="/" />
59+
</div>
60+
</div>
5761
</header>
5862
)
5963
}

src/components/Conf/Layout/index.tsx

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
import React from "react"
2+
3+
import "../../../assets/css/style.less"
4+
5+
interface Props {
6+
children: React.ReactNode
7+
className?: string
8+
}
9+
const LayoutConf = ({ children, className }: Props): JSX.Element => (
10+
<>
11+
<div className={className}>{children}</div>
12+
</>
13+
)
14+
15+
export default LayoutConf
Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
import React from "react"
2+
3+
const SocialIcons = () => {
4+
return (
5+
<>
6+
<a className="ml-5 mt-3 text-white cursor-pointer" href="/">
7+
<svg
8+
fill="currentColor"
9+
stroke-linecap="round"
10+
stroke-linejoin="round"
11+
stroke-width="2"
12+
className="w-5 h-5"
13+
viewBox="0 0 24 24"
14+
>
15+
<path d="M18 2h-3a5 5 0 00-5 5v3H7v4h3v8h4v-8h3l1-4h-4V7a1 1 0 011-1h3z"></path>
16+
</svg>
17+
</a>
18+
<a className="ml-5 mt-3 text-white cursor-pointer" href="/">
19+
<svg
20+
fill="currentColor"
21+
stroke-linecap="round"
22+
stroke-linejoin="round"
23+
stroke-width="2"
24+
className="w-5 h-5"
25+
viewBox="0 0 24 24"
26+
>
27+
<path d="M23 3a10.9 10.9 0 01-3.14 1.53 4.48 4.48 0 00-7.86 3v1A10.66 10.66 0 013 4s-4 9 5 13a11.64 11.64 0 01-7 2c9 5 20 0 20-11.5a4.5 4.5 0 00-.08-.83A7.72 7.72 0 0023 3z"></path>
28+
</svg>
29+
</a>
30+
<a className="ml-5 mt-3 text-white cursor-pointer" href="/">
31+
<svg
32+
fill="none"
33+
stroke="currentColor"
34+
stroke-linecap="round"
35+
stroke-linejoin="round"
36+
stroke-width="2"
37+
className="w-5 h-5"
38+
viewBox="0 0 24 24"
39+
>
40+
<rect width="20" height="20" x="2" y="2" rx="5" ry="5"></rect>
41+
<path d="M16 11.37A4 4 0 1112.63 8 4 4 0 0116 11.37zm1.5-4.87h.01"></path>
42+
</svg>
43+
</a>
44+
<a className="ml-5 mt-3 text-white cursor-pointer" href="/">
45+
<svg
46+
fill="currentColor"
47+
stroke="currentColor"
48+
stroke-linecap="round"
49+
stroke-linejoin="round"
50+
stroke-width="0"
51+
className="w-5 h-5"
52+
viewBox="0 0 24 24"
53+
>
54+
<path
55+
stroke="none"
56+
d="M16 8a6 6 0 016 6v7h-4v-7a2 2 0 00-2-2 2 2 0 00-2 2v7h-4v-7a6 6 0 016-6zM2 9h4v12H2z"
57+
></path>
58+
<circle cx="4" cy="4" r="2" stroke="none"></circle>
59+
</svg>
60+
</a>
61+
</>
62+
)
63+
}
64+
65+
export default SocialIcons

src/pages/conf/index.tsx

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,13 @@ import FooterConf from "../../components/Conf/Footer"
44
import HeaderConf from "../../components/Conf/Header"
55
import "../../assets/css/style.less"
66
import "../../assets/css/global.css"
7-
8-
const classes = {
9-
button:
10-
"inline-flex text-white bg-purple-500 border-0 py-2 px-6 focus:outline-none hover:bg-purple-600 rounded text-lg",
11-
}
7+
import LayoutConf from "../../components/Conf/Layout"
8+
import ButtonConf from "../../components/Conf/Button"
129

1310
export default () => {
1411
return (
15-
<>
12+
<LayoutConf>
13+
<HeaderConf />
1614
<div className="text-gray-600 body-font bg-[url('/img/bg-graphql-conf.png')]">
1715
<div className="container mx-auto flex px-5 py-24 items-center justify-center flex-col">
1816
<div className="flex flex-col items-center lg:w-2/3 w-full">
@@ -25,14 +23,14 @@ export default () => {
2523
</h2>
2624
<p className="mb-8 leading-relaxed text-white">#GRAPHQLCONF</p>
2725
<div className="flex justify-center gap-4">
28-
<button className={classes.button}>REGISTER NOW</button>
29-
<button className={classes.button}>SUBMIT TO SPEAK</button>
26+
<ButtonConf text="JOIN AS A SPONSOR" href="/" />
27+
<ButtonConf text="SUBMIT TO SPEAK" href="/" />
3028
</div>
3129
</div>
3230
</div>
3331
</div>
3432
<FooterConf />
35-
</>
33+
</LayoutConf>
3634
)
3735
}
3836

static/img/graphql-conf-footer.png

342 KB
Loading

0 commit comments

Comments
 (0)