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

Change Alephium logo import style #734

Merged
merged 2 commits into from
Jul 15, 2024
Merged
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
9 changes: 5 additions & 4 deletions apps/explorer/src/components/AssetLogo.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import styled, { css, useTheme } from 'styled-components'
import { queries } from '@/api'
import { useAssetMetadata } from '@/api/assets/assetsHooks'
import NFTThumbnail from '@/components/NFTThumbnail'
import AlephiumLogoSVG from '@/images/alephium_logo_monochrome.svg'
import { ReactComponent as AlephiumLogo } from '@/images/alephium_logo_monochrome.svg'
import { NFTMetadataWithFile } from '@/types/assets'

interface AssetLogoProps {
Expand Down Expand Up @@ -56,7 +56,7 @@ const AssetLogo = (props: AssetLogoProps) => {
return (
<AssetLogoStyled className={className} {...props}>
{assetId === ALPH.id ? (
<FramedImage src={AlephiumLogoSVG} borderRadius="full" isAlph />
<FramedImage borderRadius="full" isAlph />
) : assetType === 'fungible' ? (
metadata.verified ? (
<FramedImage src={metadata.logoURI} borderRadius="full" />
Expand Down Expand Up @@ -116,7 +116,7 @@ const FramedImage = ({
}}
isAlph={isAlph}
>
<Image style={{ backgroundImage: `url(${src})` }} />
{isAlph ? <AlephiumLogo /> : <Image style={{ backgroundImage: `url(${src})` }} />}
</ImageFrame>
)
}
Expand All @@ -142,14 +142,15 @@ const Image = styled.div`

const ImageFrame = styled.div<{ isAlph?: boolean }>`
overflow: hidden;
display: flex;
height: 100%;
width: 100%;
background-color: ${({ theme }) => theme.bg.tertiary};
${({ isAlph }) =>
isAlph &&
css`
background: linear-gradient(218.53deg, #0075ff 9.58%, #d340f8 86.74%);
background: linear-gradient(218.53deg, #0026ff 9.58%, #f840a5 86.74%);
`};
`

Expand Down
4 changes: 2 additions & 2 deletions apps/explorer/src/components/SearchBar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ const SearchIcon = styled(RiSearchLine)`
color: ${({ theme }) => theme.font.primary};
position: absolute;
right: 20px;
top: 15px;
top: 13px;
z-index: 11;
height: 21px;
cursor: pointer;
Expand All @@ -142,7 +142,7 @@ const SearchInput = styled.input`
width: 100%;
height: 100%;
border: 1px solid ${({ theme }) => theme.border.primary};
border-radius: 6px;
border-radius: 50px;
padding: 0 50px 0 20px;
color: ${({ theme }) => theme.font.primary};
background-color: ${({ theme }) => theme.bg.primary};
Expand Down
6 changes: 5 additions & 1 deletion apps/explorer/src/pages/HomePage/HomePage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ const HomePage = () => {
<StyledSection>
{width && width > deviceSizes.mobile && (
<Search>
<h2>{t('Search')}</h2>
<SearchHeader>{t('Search')}</SearchHeader>
<SearchBar />
</Search>
)}
Expand Down Expand Up @@ -274,6 +274,10 @@ const Search = styled.div`
width: 60%;
`

const SearchHeader = styled.h2`
margin-left: 20px;
`

const StatisticsSection = styled.div`
flex: 1;
min-width: 300px;
Expand Down