From 2dc80c7ab68e7b061b45cf2f1c76c2296b79c7ad Mon Sep 17 00:00:00 2001 From: valyukhov Date: Fri, 20 Dec 2024 14:29:33 +0300 Subject: [PATCH 1/4] refactor: :recycle: add logo --- components/StartPage/Feedback.js | 7 ++++--- components/StartPage/HiscoderLink.js | 16 ++++++++++++++++ pages/[slug].js | 8 ++++++-- pages/index.js | 8 ++++++-- public/icons/hiscoder.svg | 12 ++++++++++++ 5 files changed, 44 insertions(+), 7 deletions(-) create mode 100644 components/StartPage/HiscoderLink.js create mode 100644 public/icons/hiscoder.svg diff --git a/components/StartPage/Feedback.js b/components/StartPage/Feedback.js index 57cb275d..25aba873 100644 --- a/components/StartPage/Feedback.js +++ b/components/StartPage/Feedback.js @@ -16,7 +16,7 @@ function Feedback({ onClose }) { const [isSaving, setIsSaving] = useState(false) const [isSent, setIsSent] = useState(false) const router = useRouter() - const isStartPage = router.asPath === '/' + const isConnectWithUsPage = router.asPath === '/connect-with-us' const handleChange = (e) => { setFeedback({ ...feedback, [e.target.name]: e.target.value }) @@ -50,9 +50,10 @@ function Feedback({ onClose }) { return (
- {isStartPage && ( + {isConnectWithUsPage && (

{t('start-page:WriteToUs')}

)} +
e.stopPropagation()}> {!isSent ? ( @@ -93,7 +94,7 @@ function Feedback({ onClose }) { type="submit" isLoading={isSaving} className={`relative rounded-lg px-5 py-4 text-center text-sm font-medium text-th-text-secondary-100 md:text-base ${ - isStartPage ? 'bg-slate-550' : 'bg-th-primary-100' + isConnectWithUsPage ? 'bg-slate-550' : 'bg-th-primary-100' }`} > {t('users:Send')} diff --git a/components/StartPage/HiscoderLink.js b/components/StartPage/HiscoderLink.js new file mode 100644 index 00000000..6f7cbdee --- /dev/null +++ b/components/StartPage/HiscoderLink.js @@ -0,0 +1,16 @@ +import Link from 'next/link' + +import Hiscoder from 'public/icons/hiscoder.svg' + +function HiscoderLink() { + return ( +
+
Powered by
+ + + +
+ ) +} + +export default HiscoderLink diff --git a/pages/[slug].js b/pages/[slug].js index 3c00b74b..b2cbfa70 100644 --- a/pages/[slug].js +++ b/pages/[slug].js @@ -4,6 +4,7 @@ import { useRouter } from 'next/router' import { serverSideTranslations } from 'next-i18next/serverSideTranslations' import { useTranslation } from 'react-i18next' +import HiscoderLink from 'components/StartPage/HiscoderLink' import StartPage from 'components/StartPage/StartPage' import { urlGlobal } from 'utils/openGraph' @@ -80,7 +81,7 @@ const SlugPage = () => { const imageUrl = `${urlGlobal}/social.webp` return ( -
+
{pageContent.title || t('LEVEL')} { - +
+ +
+
) } diff --git a/pages/index.js b/pages/index.js index 1e5b70c1..e2d1fb38 100644 --- a/pages/index.js +++ b/pages/index.js @@ -3,6 +3,7 @@ import { useRouter } from 'next/router' import { serverSideTranslations } from 'next-i18next/serverSideTranslations' +import HiscoderLink from 'components/StartPage/HiscoderLink' import StartPage from 'components/StartPage/StartPage' import { openGraph, urlGlobal } from '../utils/openGraph' @@ -24,7 +25,7 @@ export default function Home() { const { query } = useRouter() return ( -
+
{metadata.title.template.replace('%s', metadata.title.default)} @@ -45,7 +46,10 @@ export default function Home() { - +
+ +
+
) } diff --git a/public/icons/hiscoder.svg b/public/icons/hiscoder.svg new file mode 100644 index 00000000..3099bc97 --- /dev/null +++ b/public/icons/hiscoder.svg @@ -0,0 +1,12 @@ + + + + + + + + + + + + From e894bf6ca13f846e9dd07b68b2b97003d795ddcc Mon Sep 17 00:00:00 2001 From: valyukhov Date: Fri, 20 Dec 2024 15:25:23 +0300 Subject: [PATCH 2/4] feat: :sparkles: add link hiscoder to sidebar --- components/SideBar.js | 15 +++++++++++++++ public/icons/hiscoder-short.svg | 4 ++++ 2 files changed, 19 insertions(+) create mode 100644 public/icons/hiscoder-short.svg diff --git a/components/SideBar.js b/components/SideBar.js index aa147811..5afb2454 100644 --- a/components/SideBar.js +++ b/components/SideBar.js @@ -31,6 +31,7 @@ import Burger from 'public/icons/burger.svg' import Camera from 'public/icons/camera.svg' import Close from 'public/icons/close.svg' import CreateProject from 'public/icons/create-project.svg' +import Hiscoder from 'public/icons/hiscoder-short.svg' import Localization from 'public/icons/localization.svg' import Notes from 'public/icons/notes.svg' import Projects from 'public/icons/projects.svg' @@ -638,6 +639,20 @@ function SideBar({ setIsOpenSideBar, access, isOpenSideBar }) { > + + + + {!collapsed &&

Powered by HisCoder.com

} + +
diff --git a/public/icons/hiscoder-short.svg b/public/icons/hiscoder-short.svg new file mode 100644 index 00000000..c413025f --- /dev/null +++ b/public/icons/hiscoder-short.svg @@ -0,0 +1,4 @@ + + + + From 044b4ce116aa9f047b5b79208e416b5d213fc912 Mon Sep 17 00:00:00 2001 From: valyukhov Date: Fri, 20 Dec 2024 18:53:44 +0300 Subject: [PATCH 3/4] fix: :bug: fix logo --- components/StartPage/HiscoderLink.js | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/components/StartPage/HiscoderLink.js b/components/StartPage/HiscoderLink.js index 6f7cbdee..0ef44d2d 100644 --- a/components/StartPage/HiscoderLink.js +++ b/components/StartPage/HiscoderLink.js @@ -4,9 +4,13 @@ import Hiscoder from 'public/icons/hiscoder.svg' function HiscoderLink() { return ( -
-
Powered by
- +
+ + Powered by
From 2a2eec4393ac12e5b7c11d6aec4b86896db4c8ee Mon Sep 17 00:00:00 2001 From: valyukhov Date: Fri, 20 Dec 2024 19:14:57 +0300 Subject: [PATCH 4/4] fix: :bug: fix padding --- components/StartPage/HiscoderLink.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/StartPage/HiscoderLink.js b/components/StartPage/HiscoderLink.js index 0ef44d2d..82f6e3a1 100644 --- a/components/StartPage/HiscoderLink.js +++ b/components/StartPage/HiscoderLink.js @@ -8,7 +8,7 @@ function HiscoderLink() { Powered by