Skip to content

Commit

Permalink
feat: font | icons | footer styling
Browse files Browse the repository at this point in the history
  • Loading branch information
0xtiti committed Aug 2, 2024
1 parent cf39d0a commit 0c4803b
Show file tree
Hide file tree
Showing 31 changed files with 249 additions and 94 deletions.
8 changes: 5 additions & 3 deletions public/locales/en/common.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
{
"HOME": {
"title": "ZKsync Ecosystem",
"gasPrice": "Gas Price",
"title": "ZKsync",
"subtitle": "Ecosystem",
"gasPrice": "L1 Gas Price",
"transfer": "ERC-20 Transfer",
"lockedAssets": "Locked assets in shared bridge",
"DASHBOARD": {
Expand Down Expand Up @@ -50,7 +51,8 @@
"FOOTER": {
"docs": "Documentation",
"github": "GitHub",
"madeWithLove": "Made with ❤️ by"
"madeWith": "Made with",
"by": "by"
},
"LOCALES": {
"en": "English",
Expand Down
8 changes: 5 additions & 3 deletions public/locales/es/common.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
{
"HOME": {
"title": "Ecosistema ZKsync",
"gasPrice": "Precio del gas",
"title": "ZKsync",
"subtitle": "Ecosistema",
"gasPrice": "Precio del gas L1",
"transfer": "Transferencia ERC-20",
"lockedAssets": "Activos bloqueados en puente compartido",
"DASHBOARD": {
Expand Down Expand Up @@ -50,7 +51,8 @@
"FOOTER": {
"docs": "Documentación",
"github": "GitHub",
"madeWithLove": "Hecho con ❤️ por"
"madeWithLove": "Hecho con",
"by": "por"
},
"LOCALES": {
"en": "Inglés",
Expand Down
21 changes: 21 additions & 0 deletions src/assets/font/css/inter.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
/*
Copyright 2020 The Inter Project Authors (https://github.com/rsms/inter)
This Font Software is licensed under the SIL Open Font License, Version 1.1.
This license is copied below, and is also available with a FAQ at:
https://openfontlicense.org
-----------------------------------------------------------
SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
-----------------------------------------------------------
*/

@font-face {
font-family: 'Inter-Variable';
src:
url('../fonts/Inter-Italic-VariableFont_opsz,wght.ttf') format('ttf'),
url('../fonts/Inter-VariableFont_opsz,wght.ttf') format('ttf');
font-weight: 200 700;
font-display: swap;
font-style: normal;
}
Binary file not shown.
Binary file not shown.
6 changes: 6 additions & 0 deletions src/assets/icons/darkMode.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 5 additions & 0 deletions src/assets/icons/gasDark.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 5 additions & 0 deletions src/assets/icons/gasLight.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes
10 changes: 10 additions & 0 deletions src/assets/icons/githubLight.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions src/assets/icons/heartDark.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions src/assets/icons/heartLight.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes
4 changes: 4 additions & 0 deletions src/assets/icons/searchLight.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
12 changes: 12 additions & 0 deletions src/assets/icons/wonderlandDark.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
12 changes: 12 additions & 0 deletions src/assets/icons/wonderlandLight.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: 4 additions & 0 deletions src/assets/icons/zkLogoDark.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: 4 additions & 0 deletions src/assets/icons/zkLogoLight.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
11 changes: 7 additions & 4 deletions src/components/BasicSelect.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -66,10 +66,13 @@ export const BasicSelect = ({ list, value, setValue, disabled, dataTest }: Basic
);
};

const SBox = styled(Box)({
display: 'flex',
flexDirection: 'column',
gap: '0.5rem',
export const SBox = styled(Box)(() => {
const { currentTheme } = useCustomTheme();
return {
display: 'flex',
gap: currentTheme.gap,
alignItems: 'center',
};
});

const MenuButton = styled(Button)(() => {
Expand Down
54 changes: 54 additions & 0 deletions src/components/Gas.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
import { Typography, Box, styled } from '@mui/material';
import Image from 'next/image';
import { useTranslation } from 'next-i18next';

import GasLight from '~/assets/icons/gasLight.svg';
import GasDark from '~/assets/icons/gasDark.svg';
import { useCustomTheme } from '~/hooks';
import { SBox } from '~/components';

export const Gas = () => {
const { theme } = useCustomTheme();
const { t } = useTranslation();

return (
<GasContainer>
<Image src={theme === 'dark' ? GasDark : GasLight} alt='gas' />
<Box>
<SBox>
<Typography>{t('HOME.gasPrice')}:</Typography>
<GasValueText>10 wei</GasValueText>
</SBox>
<SBox>
<Typography>{t('HOME.transfer')}:</Typography>
<GasValueText>$10</GasValueText>
</SBox>
</Box>
</GasContainer>
);
};

const GasContainer = styled(Box)(() => {
const { currentTheme } = useCustomTheme();

return {
display: 'flex',
alignItems: 'center',
color: currentTheme.textSecondary,
gap: currentTheme.gap,
fontWeight: 400,
fontSize: '0.7rem',
lineHeight: '1.25rem',
padding: '0.5rem 1rem',
};
});

const GasValueText = styled(Typography)(() => {
const { currentTheme } = useCustomTheme();

return {
color: currentTheme.textPrimary,
fontWeight: 500,
letterSpacing: '-0.03em',
};
});
Loading

0 comments on commit 0c4803b

Please sign in to comment.