From cf19623a96db2e5364ec4014b76610ff4435c50d Mon Sep 17 00:00:00 2001 From: Kirill Klimenko Date: Fri, 3 May 2024 22:20:11 +0200 Subject: [PATCH 1/4] Reskin footer --- src/components/pages/AppHome/AppFooter.tsx | 70 +++++++++++----------- src/components/ui/proposal/Icons.tsx | 41 +++++++++++++ src/i18n/locales/en/home.json | 2 +- 3 files changed, 77 insertions(+), 36 deletions(-) diff --git a/src/components/pages/AppHome/AppFooter.tsx b/src/components/pages/AppHome/AppFooter.tsx index e4550e56f9..6cde0e80dd 100644 --- a/src/components/pages/AppHome/AppFooter.tsx +++ b/src/components/pages/AppHome/AppFooter.tsx @@ -1,55 +1,55 @@ -import { Flex, Link, Spacer, Text } from '@chakra-ui/react'; -import { Trans, useTranslation } from 'react-i18next'; +import { Flex, Text } from '@chakra-ui/react'; +import { useTranslation } from 'react-i18next'; import { URL_DECENT } from '../../../constants/url'; import ExternalLink from '../../ui/links/ExternalLink'; -import Divider from '../../ui/utils/Divider'; +import { DecentFooterLogo } from '../../ui/proposal/Icons'; export function AppFooter() { const { t } = useTranslation('home'); + const commitHash = import.meta.env.VITE_APP_GIT_HASH; return ( - + {t('audit')} + + {commitHash.substring(0, 7)} + - - - Made with 💜 by - - Decent DAO - - - - - {t('audit')} - | + {t('homeAttribution')} - - {import.meta.env.VITE_APP_GIT_HASH.substring(0, 7)} - + {/* @todo This should be replaced with proper logo that will include DAO word */} + + + DAO + + ); diff --git a/src/components/ui/proposal/Icons.tsx b/src/components/ui/proposal/Icons.tsx index eb370cf932..7bfb4fa35c 100644 --- a/src/components/ui/proposal/Icons.tsx +++ b/src/components/ui/proposal/Icons.tsx @@ -618,3 +618,44 @@ export function DocsIllustration() { ); } + +export function DecentFooterLogo() { + return ( + + + + + + + + + + ); +} diff --git a/src/i18n/locales/en/home.json b/src/i18n/locales/en/home.json index f1e8c25834..8051649ca3 100644 --- a/src/i18n/locales/en/home.json +++ b/src/i18n/locales/en/home.json @@ -11,6 +11,6 @@ "shutterTitle": "Shutter DAO 0x36", "myosinTitle": "Myosin", "textMoreDAOs": "Load More", - "homeAttribution": "Made with 💜 by <1>Decent DAO", + "homeAttribution": "Made with love by", "audit": "Audit" } From cb94e76ce4db757d09c96a326300da05451e1578 Mon Sep 17 00:00:00 2001 From: Kirill Klimenko Date: Tue, 7 May 2024 15:12:12 +0200 Subject: [PATCH 2/4] Make footer great again --- src/components/ui/links/ExternalLink.tsx | 7 +- .../AppFooter.tsx => ui/page/Footer.tsx} | 21 ++-- src/components/ui/page/Layout/index.tsx | 100 +++++++++--------- src/constants/common.ts | 3 +- src/i18n/locales/en/home.json | 1 + src/pages/HomePage.tsx | 3 +- 6 files changed, 75 insertions(+), 60 deletions(-) rename src/components/{pages/AppHome/AppFooter.tsx => ui/page/Footer.tsx} (68%) diff --git a/src/components/ui/links/ExternalLink.tsx b/src/components/ui/links/ExternalLink.tsx index 3e71fdf7f4..51ec44de6a 100644 --- a/src/components/ui/links/ExternalLink.tsx +++ b/src/components/ui/links/ExternalLink.tsx @@ -1,6 +1,7 @@ import { Link, LinkProps } from '@chakra-ui/react'; +import { Ref, forwardRef } from 'react' -export default function ExternalLink({ children, ...rest }: LinkProps) { +export default function ExternalLink({ children, internalRef, ...rest }: LinkProps & { internalRef?: Ref}) { return ( {children} ); } + +export const ExtrernalLinkWrappable = forwardRef(({ children, ...props}: LinkProps, ref) => {children}); +ExtrernalLinkWrappable.displayName = 'ExtrernalLinkWrappable'; \ No newline at end of file diff --git a/src/components/pages/AppHome/AppFooter.tsx b/src/components/ui/page/Footer.tsx similarity index 68% rename from src/components/pages/AppHome/AppFooter.tsx rename to src/components/ui/page/Footer.tsx index 6cde0e80dd..45aafb715d 100644 --- a/src/components/pages/AppHome/AppFooter.tsx +++ b/src/components/ui/page/Footer.tsx @@ -1,10 +1,10 @@ -import { Flex, Text } from '@chakra-ui/react'; +import { Flex, Text, Tooltip } from '@chakra-ui/react'; import { useTranslation } from 'react-i18next'; import { URL_DECENT } from '../../../constants/url'; -import ExternalLink from '../../ui/links/ExternalLink'; -import { DecentFooterLogo } from '../../ui/proposal/Icons'; +import ExternalLink, { ExtrernalLinkWrappable } from '../links/ExternalLink'; +import { DecentFooterLogo } from '../proposal/Icons'; -export function AppFooter() { +export function Footer() { const { t } = useTranslation('home'); const commitHash = import.meta.env.VITE_APP_GIT_HASH; return ( @@ -14,12 +14,17 @@ export function AppFooter() { alignSelf="flex-end" justifyContent="flex-end" py="1rem" - mt="2rem" + px="3rem" > {t('audit')} - - {commitHash.substring(0, 7)} - + + + {commitHash.substring(0, 7)} + + + - - - - - - - + + + + + +
+ + + + -
- - - - - - - - - + + + + + +