Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Responsive footer #684

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
66 changes: 40 additions & 26 deletions src/components/Feed/ProposalCreator.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import React, { useEffect, useState } from 'react'
import { Link } from 'react-router-dom'
import {
EthIdenticon,
GU,
Expand Down Expand Up @@ -54,23 +55,33 @@ function ProposalCreator({ proposal }) {
display: flex;
`}
>
<div>
{profile?.image ? (
<img
src={profile.image}
height="43"
width="43"
alt=""
css={`
border-radius: 50%;
display: block;
object-fit: cover;
`}
/>
) : (
<EthIdenticon address={proposal.creator} radius={50} scale={1.8} />
)}
</div>
<Link to={`/profile?account=${proposal.creator}`}>
<div>
{profile?.image ? (
<img
src={profile.image}
height="43"
width="43"
alt=""
css={`
border-radius: 50%;
display: block;
object-fit: cover;
cursor: pointer;
`}
/>
) : (
<EthIdenticon
address={proposal.creator}
radius={50}
scale={1.8}
css={`
cursor: pointer;
`}
/>
)}
</div>
</Link>
<div
css={`
margin-left: ${1 * GU}px;
Expand All @@ -86,15 +97,18 @@ function ProposalCreator({ proposal }) {
ProposalType
) : (
<>
<strong
css={`
margin-right: ${1 * GU}px;
`}
>
{profile?.name
? profile.name
: shortenAddress(proposal.creator)}
</strong>
<Link to={`/profile?account=${proposal.creator}`}>
<strong
css={`
margin-right: ${1 * GU}px;
cursor: pointer;
`}
>
{profile?.name
? profile.name
: shortenAddress(proposal.creator)}
</strong>
</Link>
<span
css={`
margin-right: ${0.5 * GU}px;
Expand Down
7 changes: 6 additions & 1 deletion src/components/Feed/ProposalInfo.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,12 @@ function ProposalInfo({ loading, proposal, onSelectProposal }) {
const tokenIcon = getTokenIconBySymbol(primaryToken.symbol)

return (
<div>
<div
onClick={onSelectProposal}
css={`
cursor: pointer;
`}
>
<ProposalDescription
proposal={proposal}
onSelectProposal={onSelectProposal}
Expand Down
132 changes: 65 additions & 67 deletions src/components/Footer.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import {
textStyle,
useLayout,
useTheme,
useViewport,
} from '@1hive/1hive-ui'
import styled from 'styled-components'
import Layout from './Layout'
Expand All @@ -23,85 +22,84 @@ import homeSvg from '../assets/home.svg'

function Footer() {
const theme = useTheme()
const { below } = useViewport()
const compactMode = below('large')

return (
<footer
css={`
flex-shrink: 0;
width: 100%;
padding: ${5 * GU}px ${3 * GU}px;
padding: ${1 * GU}px ${1.3 * GU}px;
background: ${theme.surface};
`}
>
<Layout paddingBottom={0}>
{compactMode ? (
<FixedFooter />
) : (
<Layout paddingBottom={70}>
<FixedFooter />
<div
css={`
display: grid;
padding: 0px 0px 30px 10px;
grid-template-columns: repeat(auto-fit, minmax(100px, 0.3fr));
grid-row-gap: ${2 * GU}px;
& a {
color: ${theme.contentSecondary};
}
`}
>
<div>
<img src={logoSvg} height="40" alt="" />
</div>
<div
css={`
display: grid;
grid-template-columns: ${40 * GU}px ${25 * GU}px ${25 * GU}px;
grid-row-gap: ${2 * GU}px;

& a {
color: ${theme.contentSecondary};
}
line-height: 0.5;
`}
>
<div>
<img src={logoSvg} height="40" alt="" />
</div>
<div>
<h5
css={`
${textStyle('body1')};
margin-bottom: ${1.5 * GU}px;
`}
>
Community
</h5>
<Link href="https://discord.gg/4fm7pgB" external>
Discord
</Link>
<Link href="https://github.com/1Hive" external>
Github
</Link>
<Link href="https://twitter.com/1HiveOrg" external>
Twitter
</Link>
<Link href="https://t.me/honeyswapdex" external>
Telegram
</Link>
<Link href="https://forum.1hive.org/" external>
Forum
</Link>
</div>
<div>
<h5
css={`
${textStyle('body1')};
margin-bottom: ${1.5 * GU}px;
`}
>
Documentation
</h5>
<Link href="https://1hive.gitbook.io/1hive/" external>
Wiki
</Link>
<Link
href="https://1hive.gitbook.io/1hive/community/security/bug-bounty"
external
>
Bug Bounty
</Link>
<Link href="https://1hive.gitbook.io/1hive/guides/faq" external>
FAQs
</Link>
</div>
<h5
css={`
${textStyle('body1')};
margin-bottom: ${1.5 * GU}px;
`}
>
Community
</h5>
<Link href="https://discord.gg/4fm7pgB" external>
Discord
</Link>
<Link href="https://github.com/1Hive" external>
Github
</Link>
<Link href="https://twitter.com/1HiveOrg" external>
Twitter
</Link>
<Link href="https://t.me/honeyswapdex" external>
Telegram
</Link>
<Link href="https://forum.1hive.org/" external>
Forum
</Link>
</div>
<div>
<h5
css={`
${textStyle('body1')};
margin-bottom: ${1.5 * GU}px;
`}
>
Documentation
</h5>
<Link href="https://1hive.gitbook.io/1hive/" external>
Wiki
</Link>
<Link
href="https://1hive.gitbook.io/1hive/community/security/bug-bounty"
external
>
Bug Bounty
</Link>
<Link href="https://1hive.gitbook.io/1hive/guides/faq" external>
FAQs
</Link>
</div>
)}
</div>
)
</Layout>
</footer>
)
Expand Down