Skip to content

Commit 50b61bc

Browse files
committed
refactor: replace footer from lib with manually added one
1 parent a15aa23 commit 50b61bc

File tree

2 files changed

+122
-2
lines changed

2 files changed

+122
-2
lines changed

src/bootstrap/app.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import React, { useState } from 'react'
22
import { BrowserRouter } from 'react-router-dom'
33
import { Helmet } from 'react-helmet'
4-
import Footer from '@kleros/react-components/dist/footer'
4+
import Footer from '../components/footer.tsx'
55
import styled from 'styled-components/macro'
66
import Web3Provider from 'web3-react'
77
import { Layout } from 'antd'
@@ -93,7 +93,7 @@ const App = () => {
9393
</Layout>
9494
</StyledLayout>
9595
<FooterWrapper>
96-
<Footer appName="Kleros · Curate" contractExplorerURL="" />
96+
<Footer />
9797
</FooterWrapper>
9898
<WalletModal connectors={connectors} />
9999
<WelcomeModal />

src/components/footer.tsx

Lines changed: 120 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,120 @@
1+
import React from 'react'
2+
import styled from 'styled-components'
3+
import icons from './social-icons'
4+
5+
const SOCIAL_NAV = [
6+
{
7+
icon: icons.github,
8+
href: 'https://github.com/kleros'
9+
},
10+
{
11+
icon: icons.slack,
12+
href: 'https://slack.kleros.io/'
13+
},
14+
{
15+
icon: icons.reddit,
16+
href: 'https://reddit.com/r/Kleros/'
17+
},
18+
{
19+
icon: icons.twitter,
20+
href: 'https://twitter.com/kleros_io?'
21+
},
22+
{
23+
icon: icons.blog,
24+
href: 'https://blog.kleros.io/'
25+
},
26+
{
27+
icon: icons.telegram,
28+
href: 'https://t.me/kleros'
29+
},
30+
{
31+
icon: icons.linkedin,
32+
href: 'https://www.linkedin.com/company/kleros/'
33+
}
34+
]
35+
36+
const Footer = () => (
37+
<StyledFooter>
38+
<a
39+
href="https://kleros.io"
40+
className="g-kleros_footer__anchor"
41+
style={{ display: 'flex', alignItems: 'center' }}
42+
>
43+
{icons.securedByKleros}
44+
</a>
45+
<div className="g-kleros_footer__help">
46+
<SocialLink href="https://t.me/kleros">
47+
I need help {icons.help}
48+
</SocialLink>
49+
</div>
50+
<div className="g-kleros_footer__social">
51+
{SOCIAL_NAV.map(item => (
52+
<SocialLink href={item.href}>{item.icon}</SocialLink>
53+
))}
54+
</div>
55+
</StyledFooter>
56+
)
57+
58+
export default Footer
59+
60+
const SocialLink: React.FC<{
61+
children: React.ReactNode
62+
href: string
63+
}> = ({ children, href }) => (
64+
<a
65+
className="g-kleros_footer__anchor"
66+
href={href}
67+
rel="noopener noreferrer"
68+
target="_blank"
69+
>
70+
{children}
71+
</a>
72+
)
73+
74+
const StyledFooter = styled.footer`
75+
font-family: Roboto, sans-serif;
76+
font-size: 1rem;
77+
width: 100%;
78+
height: 4rem;
79+
display: grid;
80+
background: #4d00b4;
81+
grid: 1fr / [footer-start] 1fr [banner] 18fr [help] 12fr 1fr [footer-end];
82+
align-items: center;
83+
justify-items: center;
84+
85+
.g-kleros_footer__anchor {
86+
color: white;
87+
text-decoration: none;
88+
margin-left: 1rem;
89+
}
90+
91+
.g-kleros_footer__help {
92+
display: grid;
93+
grid-column: help;
94+
justify-self: end;
95+
color: white;
96+
}
97+
98+
.g-kleros_footer__social {
99+
display: none;
100+
grid: 1fr / 1fr 1fr 1fr 1fr 1fr 1fr 1fr;
101+
grid-column: social;
102+
justify-self: stretch;
103+
align-items: center;
104+
text-align: center;
105+
}
106+
@media (min-width: 992px) {
107+
.g-kleros_footer {
108+
grid: 1fr / [footer-start] 1fr [banner] 20fr [title] 20fr [help] 8fr 2fr [social] 10fr 1fr [footer-end];
109+
}
110+
111+
.g-kleros_footer__title {
112+
display: initial;
113+
}
114+
115+
.g-kleros_footer__social {
116+
display: grid;
117+
margin-right: 1.8rem;
118+
}
119+
}
120+
`

0 commit comments

Comments
 (0)