style: radial gradient background
This commit is contained in:
parent
65e7ec9429
commit
130ef2589c
|
|
@ -16,7 +16,7 @@ import {
|
||||||
import { env } from '@/constants';
|
import { env } from '@/constants';
|
||||||
import { FleekERC721 } from '@/integrations/ethereum/contracts';
|
import { FleekERC721 } from '@/integrations/ethereum/contracts';
|
||||||
import { forwardStyledRef } from '@/theme';
|
import { forwardStyledRef } from '@/theme';
|
||||||
import { AppLog } from '@/utils';
|
import { AppLog, getDate, getRepositoryFromURL } from '@/utils';
|
||||||
import { parseNumberToHexColor } from '@/utils/color';
|
import { parseNumberToHexColor } from '@/utils/color';
|
||||||
|
|
||||||
import { IndexedNFA } from '../indexed-nfa.context';
|
import { IndexedNFA } from '../indexed-nfa.context';
|
||||||
|
|
@ -73,8 +73,7 @@ const Header: React.FC = () => {
|
||||||
<S.Aside.Header.Wrapper>
|
<S.Aside.Header.Wrapper>
|
||||||
<S.Aside.Header.Container>
|
<S.Aside.Header.Container>
|
||||||
<S.Aside.Header.Header>{nfa.name}</S.Aside.Header.Header>
|
<S.Aside.Header.Header>{nfa.name}</S.Aside.Header.Header>
|
||||||
{/* TODO remove once subrgraph integration is merged */}
|
<Badge verified={nfa.verified} />
|
||||||
<Badge verified={Math.random() > 0.5} />
|
|
||||||
</S.Aside.Header.Container>
|
</S.Aside.Header.Container>
|
||||||
|
|
||||||
<Flex css={{ gap: '$1h' }}>
|
<Flex css={{ gap: '$1h' }}>
|
||||||
|
|
@ -110,10 +109,7 @@ const NFAInfo: React.FC = () => {
|
||||||
|
|
||||||
<S.Aside.Divider.Elipse />
|
<S.Aside.Divider.Elipse />
|
||||||
|
|
||||||
<HeaderData label="Created">
|
<HeaderData label="Created">{getDate(nfa.createdAt)}</HeaderData>
|
||||||
{/* TODO: place correct data */}
|
|
||||||
12/12/22
|
|
||||||
</HeaderData>
|
|
||||||
</Flex>
|
</Flex>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
@ -208,18 +204,17 @@ const ButtonsFragment: React.FC = () => {
|
||||||
const PropertiesFragment: React.FC = () => {
|
const PropertiesFragment: React.FC = () => {
|
||||||
const { nfa } = IndexedNFA.useContext();
|
const { nfa } = IndexedNFA.useContext();
|
||||||
|
|
||||||
//TODO replace with real data
|
|
||||||
const traitsToShow = useMemo(() => {
|
const traitsToShow = useMemo(() => {
|
||||||
return [
|
return [
|
||||||
[nfa.ENS, 'ENS'],
|
[nfa.ENS, 'ENS'],
|
||||||
[nfa.gitRepository.id, 'Repository'],
|
[getRepositoryFromURL(nfa.gitRepository.id), 'Repository'],
|
||||||
[10, 'Version'],
|
[10, 'Version'],
|
||||||
[nfa.externalURL, 'Domain'],
|
[nfa.externalURL, 'Domain'],
|
||||||
];
|
];
|
||||||
}, [nfa]);
|
}, [nfa]);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Flex css={{ flexDirection: 'column', gap: '$3' }}>
|
<Flex css={{ flexDirection: 'column', gap: '$3', height: '336px' }}>
|
||||||
{traitsToShow.map(([value, label], index) => (
|
{traitsToShow.map(([value, label], index) => (
|
||||||
<S.Aside.Overview.Container
|
<S.Aside.Overview.Container
|
||||||
css={{ gap: '$1', p: '$2h $4' }}
|
css={{ gap: '$1', p: '$2h $4' }}
|
||||||
|
|
@ -239,7 +234,9 @@ const OverviewFragment: React.FC = () => {
|
||||||
const { nfa } = IndexedNFA.useContext();
|
const { nfa } = IndexedNFA.useContext();
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<S.Aside.Overview.Container css={{ gap: '$4h', p: '$6' }}>
|
<S.Aside.Overview.Container
|
||||||
|
css={{ gap: '$4h', p: '$5 $6', height: '336px' }}
|
||||||
|
>
|
||||||
<S.Aside.Overview.Row.Container>
|
<S.Aside.Overview.Row.Container>
|
||||||
<S.Aside.Overview.Row.Label>Token ID</S.Aside.Overview.Row.Label>
|
<S.Aside.Overview.Row.Label>Token ID</S.Aside.Overview.Row.Label>
|
||||||
<S.Aside.Overview.Row.Value>{nfa.tokenId}</S.Aside.Overview.Row.Value>
|
<S.Aside.Overview.Row.Value>{nfa.tokenId}</S.Aside.Overview.Row.Value>
|
||||||
|
|
@ -258,7 +255,7 @@ const OverviewFragment: React.FC = () => {
|
||||||
<S.Aside.Overview.Row.Container>
|
<S.Aside.Overview.Row.Container>
|
||||||
<S.Aside.Overview.Row.Label>Description</S.Aside.Overview.Row.Label>
|
<S.Aside.Overview.Row.Label>Description</S.Aside.Overview.Row.Label>
|
||||||
</S.Aside.Overview.Row.Container>
|
</S.Aside.Overview.Row.Container>
|
||||||
<S.Aside.Overview.Description>
|
<S.Aside.Overview.Description css={{ overflowY: 'scroll' }}>
|
||||||
{nfa.description}
|
{nfa.description}
|
||||||
</S.Aside.Overview.Description>
|
</S.Aside.Overview.Description>
|
||||||
</S.Aside.Overview.Container>
|
</S.Aside.Overview.Container>
|
||||||
|
|
@ -294,7 +291,7 @@ export const IndexedNFAAsideFragment: React.FC = () => {
|
||||||
const { nfa } = IndexedNFA.useContext();
|
const { nfa } = IndexedNFA.useContext();
|
||||||
|
|
||||||
const { backgroundColor } = App.useContext();
|
const { backgroundColor } = App.useContext();
|
||||||
const background = `linear-gradient(230deg, #${backgroundColor} 0%, #181818 80%)`;
|
const background = `radial-gradient(closest-corner circle at 90% 45%, #${backgroundColor}8c 1% ,#${backgroundColor}57 20%, transparent 40%), radial-gradient(closest-corner circle at 60% 25%, #${backgroundColor} 3%, #${backgroundColor}73 30%, #181818 70%)`;
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
setTop(ref.current?.getBoundingClientRect().top);
|
setTop(ref.current?.getBoundingClientRect().top);
|
||||||
|
|
@ -303,7 +300,7 @@ export const IndexedNFAAsideFragment: React.FC = () => {
|
||||||
return (
|
return (
|
||||||
<S.Aside.Container
|
<S.Aside.Container
|
||||||
ref={ref}
|
ref={ref}
|
||||||
css={{ top, background: background, backdropFilter: 'blur(10px)' }}
|
css={{ top, background, backdropFilter: 'blur(10px)' }}
|
||||||
>
|
>
|
||||||
<Preview />
|
<Preview />
|
||||||
<Header />
|
<Header />
|
||||||
|
|
|
||||||
|
|
@ -14,6 +14,7 @@ import {
|
||||||
import { getDate, getRepositoryFromURL, getTimeSince } from '@/utils';
|
import { getDate, getRepositoryFromURL, getTimeSince } from '@/utils';
|
||||||
|
|
||||||
import { IndexedNFAStyles as S } from '../indexed-nfa.styles';
|
import { IndexedNFAStyles as S } from '../indexed-nfa.styles';
|
||||||
|
import { IndexedNFA } from '../indexed-nfa.context';
|
||||||
|
|
||||||
type SortItem = {
|
type SortItem = {
|
||||||
value: string;
|
value: string;
|
||||||
|
|
@ -205,27 +206,31 @@ const apMocks = new Array(20).fill(0).map((_, index) => ({
|
||||||
}));
|
}));
|
||||||
|
|
||||||
const AccessPointsListFragment: React.FC = () => {
|
const AccessPointsListFragment: React.FC = () => {
|
||||||
//TODO add infinite scroll
|
const {
|
||||||
|
nfa: { accessPoints },
|
||||||
|
} = IndexedNFA.useContext();
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<S.Main.AccessPoint.List>
|
<S.Main.AccessPoint.List>
|
||||||
{apMocks.map((item, index) => (
|
{accessPoints.map((item, index) => (
|
||||||
<S.Main.AccessPoint.Grid key={index}>
|
<S.Main.AccessPoint.Grid key={index}>
|
||||||
<S.Main.AccessPoint.Thumbnail>
|
<S.Main.AccessPoint.Thumbnail>
|
||||||
<img src={item.thumbnail} />
|
<img src={Rectangle1} />
|
||||||
</S.Main.AccessPoint.Thumbnail>
|
</S.Main.AccessPoint.Thumbnail>
|
||||||
<S.Main.AccessPoint.Data.Container>
|
<S.Main.AccessPoint.Data.Container>
|
||||||
<S.Main.AccessPoint.Title>{item.domain}</S.Main.AccessPoint.Title>
|
<S.Main.AccessPoint.Title>{item.id}</S.Main.AccessPoint.Title>
|
||||||
<Flex
|
<Flex
|
||||||
css={{ gap: '$2h', alignItems: 'center', textAlign: 'center' }}
|
css={{ gap: '$2h', alignItems: 'center', textAlign: 'center' }}
|
||||||
>
|
>
|
||||||
<Text css={{ color: '$slate11' }}>
|
<Text css={{ color: '$slate11' }}>
|
||||||
<ResolvedAddress>{item.owner}</ResolvedAddress>
|
<ResolvedAddress>{item.owner.id}</ResolvedAddress>
|
||||||
</Text>
|
</Text>
|
||||||
<S.Main.Divider.Elipse />
|
<S.Main.Divider.Elipse />
|
||||||
<Text css={{ color: '$slate11' }}>220 views</Text>
|
<Text css={{ color: '$slate11' }}>220 views</Text>
|
||||||
<S.Main.Divider.Elipse />
|
<S.Main.Divider.Elipse />
|
||||||
<Text css={{ color: '$slate11' }}>2 months ago</Text>
|
<Text css={{ color: '$slate11' }}>
|
||||||
|
{getTimeSince(item.createdAt)}
|
||||||
|
</Text>
|
||||||
</Flex>
|
</Flex>
|
||||||
</S.Main.AccessPoint.Data.Container>
|
</S.Main.AccessPoint.Data.Container>
|
||||||
</S.Main.AccessPoint.Grid>
|
</S.Main.AccessPoint.Grid>
|
||||||
|
|
|
||||||
|
|
@ -35,6 +35,7 @@ export const IndexedNFAStyles = {
|
||||||
borderRadius: '$lg',
|
borderRadius: '$lg',
|
||||||
padding: Spacing,
|
padding: Spacing,
|
||||||
maxWidth: '24rem',
|
maxWidth: '24rem',
|
||||||
|
mixBlendMode: 'screen',
|
||||||
|
|
||||||
'@media (max-width: 580px)': {
|
'@media (max-width: 580px)': {
|
||||||
position: 'static',
|
position: 'static',
|
||||||
|
|
@ -109,7 +110,7 @@ export const IndexedNFAStyles = {
|
||||||
Container: styled('div', {
|
Container: styled('div', {
|
||||||
display: 'flex',
|
display: 'flex',
|
||||||
flexDirection: 'column',
|
flexDirection: 'column',
|
||||||
backgroundColor: '$slate4',
|
backgroundColor: 'rgba(255, 255, 255, 0.06)',
|
||||||
borderRadius: '$lg',
|
borderRadius: '$lg',
|
||||||
fontSize: '14px',
|
fontSize: '14px',
|
||||||
}),
|
}),
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue