Skip to content

Commit

Permalink
feat: added branding component
Browse files Browse the repository at this point in the history
  • Loading branch information
Argeare5 committed Sep 27, 2023
1 parent 42e44b8 commit df4948d
Show file tree
Hide file tree
Showing 6 changed files with 171 additions and 4 deletions.
11 changes: 11 additions & 0 deletions public/images/icons/twitterX.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 10 additions & 0 deletions public/images/icons/web.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 0 additions & 4 deletions src/proposals/components/proposal/ProposalVotingPower.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -115,10 +115,6 @@ export function ProposalVotingPower({
display: 'inline-flex',
alignItems: 'center',
position: 'relative',
top: 2,
[theme.breakpoints.up('xl')]: {
top: 1,
},
}}>
<RepresentationIcon
address={representative.address}
Expand Down
111 changes: 111 additions & 0 deletions src/ui/components/Branding.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,111 @@
import { Box, useTheme } from '@mui/system';

import XIcon from '/public/images/icons/twitterX.svg';
import WebIcon from '/public/images/icons/web.svg';

import { IconBox } from '../primitives/IconBox';
import { Link } from './Link';

const brandingLinks = [
{
href: 'https://twitter.com/bgdlabs',
icon: XIcon,
},
{
href: 'https://bgdlabs.com',
icon: WebIcon,
},
];

export function Branding() {
const theme = useTheme();

return (
<Box
className="Branding"
sx={{
mt: 34,
[theme.breakpoints.up('sm')]: {
mt: 0,
position: 'absolute',
right: 5,
top: 5,
zIndex: 101,
},
[theme.breakpoints.up('md')]: {
right: 40,
},
}}>
<Box
sx={{
display: 'flex',
alignItems: 'center',
justifyContent: 'center',
flexDirection: 'column',
[theme.breakpoints.up('sm')]: { flexDirection: 'row' },
}}>
<Box
className="Branding__text"
sx={{
typography: 'body',
color: '$textDisabled',
[theme.breakpoints.up('sm')]: { mr: 6 },
}}>
by BGD Labs
</Box>
<Box
sx={{
display: 'flex',
alignItems: 'center',
mt: 10,
[theme.breakpoints.up('sm')]: { mt: 0 },
}}>
{brandingLinks.map((link, index) => (
<Link
href={link.href}
inNewWindow
key={index}
css={{
transition: 'all 0.2s ease',
ml: 10,
'&:first-of-type': {
ml: 0,
},
[theme.breakpoints.up('sm')]: { ml: 6 },
hover: { opacity: 0.7 },
}}>
<IconBox
className="Branding__icon"
sx={{
width: 20,
height: 20,
[theme.breakpoints.up('sm')]: {
width: 14,
height: 14,
},
'> svg': {
width: 20,
height: 20,
path: {
'&:last-of-type': {
fill: theme.palette.$appBackground,
},
'&:first-of-type': {
fill: theme.palette.$textDisabled,
},
},
[theme.breakpoints.up('sm')]: {
width: 14,
height: 14,
},
},
}}>
{link.icon()}
</IconBox>
</Link>
))}
</Box>
</Box>
</Box>
);
}
3 changes: 3 additions & 0 deletions src/ui/layouts/MainLayout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import React, { ReactNode, useEffect } from 'react';
import { useStore } from '../../store';
import { isForIPFS } from '../../utils/appConfig';
import { AppLoading } from '../components/AppLoading';
import { Branding } from '../components/Branding';
import NoSSR from '../primitives/NoSSR';
import { setRelativePath } from '../utils/relativePath';
import { AppHeader } from './AppHeader';
Expand Down Expand Up @@ -85,6 +86,8 @@ export function MainLayout({ children }: MainLayoutProps) {
</>
)}
</Box>

<Branding />
</Box>
);
}
36 changes: 36 additions & 0 deletions src/ui/utils/GlobalStyles.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,24 @@ export function GlobalStyles() {
borderTopColor: '#101423',
borderLeftColor: '#101423',
},

'.Branding': {
'.Branding__text': {
color: '#C6C3D1',
},
'.Branding__icon': {
'> svg': {
path: {
'&:last-of-type': {
fill: '#EDF0FC',
},
'&:first-of-type': {
fill: '#C6C3D1',
},
},
},
},
},
},
"[data-theme='dark']": {
body: {
Expand Down Expand Up @@ -327,6 +345,24 @@ export function GlobalStyles() {
borderTopColor: '#ADAECF',
borderLeftColor: '#ADAECF',
},

'.Branding': {
'.Branding__text': {
color: '#47557C',
},
'.Branding__icon': {
'> svg': {
path: {
'&:last-of-type': {
fill: '#1C2445',
},
'&:first-of-type': {
fill: '#47557C',
},
},
},
},
},
},
};

Expand Down

0 comments on commit df4948d

Please sign in to comment.