Skip to content

Commit 7a705fb

Browse files
authored
Merge pull request #758 from hiscoder-com/add-hiscoder-logo
Add hiscoder logo
2 parents c72488a + 2a2eec4 commit 7a705fb

7 files changed

Lines changed: 67 additions & 7 deletions

File tree

components/SideBar.js

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ import Burger from 'public/icons/burger.svg'
3131
import Camera from 'public/icons/camera.svg'
3232
import Close from 'public/icons/close.svg'
3333
import CreateProject from 'public/icons/create-project.svg'
34+
import Hiscoder from 'public/icons/hiscoder-short.svg'
3435
import Localization from 'public/icons/localization.svg'
3536
import Notes from 'public/icons/notes.svg'
3637
import Projects from 'public/icons/projects.svg'
@@ -638,6 +639,20 @@ function SideBar({ setIsOpenSideBar, access, isOpenSideBar }) {
638639
>
639640
<SignOut collapsed={collapsed} />
640641
</Menu.Item>
642+
<Menu.Item
643+
as="div"
644+
disabled
645+
className="group flex cursor-default items-center justify-between gap-2 rounded-b-2xl hover:bg-th-secondary-200 lg:rounded-b-none"
646+
>
647+
<Link
648+
href="https://hiscoder.com"
649+
target="_blank"
650+
className={`flex gap-2.5 py-3 pl-4 text-th-text-primary group-hover:text-th-text-primary group-hover:opacity-70 lg:text-th-secondary-300`}
651+
>
652+
<Hiscoder className="w-6 min-w-[1.25rem]" />
653+
{!collapsed && <p>Powered by HisCoder.com</p>}
654+
</Link>
655+
</Menu.Item>
641656
</div>
642657
</div>
643658
<AvatarSelector id={user?.id} />

components/StartPage/Feedback.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ function Feedback({ onClose }) {
1616
const [isSaving, setIsSaving] = useState(false)
1717
const [isSent, setIsSent] = useState(false)
1818
const router = useRouter()
19-
const isStartPage = router.asPath === '/'
19+
const isConnectWithUsPage = router.asPath === '/connect-with-us'
2020

2121
const handleChange = (e) => {
2222
setFeedback({ ...feedback, [e.target.name]: e.target.value })
@@ -50,9 +50,10 @@ function Feedback({ onClose }) {
5050

5151
return (
5252
<div className="flex w-full flex-col gap-6 md:gap-0">
53-
{isStartPage && (
53+
{isConnectWithUsPage && (
5454
<p className="font-semibold md:font-bold">{t('start-page:WriteToUs')}</p>
5555
)}
56+
5657
<div className="flex flex-grow items-center" onClick={(e) => e.stopPropagation()}>
5758
<Toaster />
5859
{!isSent ? (
@@ -93,7 +94,7 @@ function Feedback({ onClose }) {
9394
type="submit"
9495
isLoading={isSaving}
9596
className={`relative rounded-lg px-5 py-4 text-center text-sm font-medium text-th-text-secondary-100 md:text-base ${
96-
isStartPage ? 'bg-slate-550' : 'bg-th-primary-100'
97+
isConnectWithUsPage ? 'bg-slate-550' : 'bg-th-primary-100'
9798
}`}
9899
>
99100
{t('users:Send')}
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
import Link from 'next/link'
2+
3+
import Hiscoder from 'public/icons/hiscoder.svg'
4+
5+
function HiscoderLink() {
6+
return (
7+
<div className="mx-auto flex flex-1 items-center">
8+
<Link
9+
href="https://hiscoder.com"
10+
target="_blank"
11+
className="flex items-center gap-4 p-2 text-[#CACACA] hover:text-gray-400"
12+
>
13+
<span>Powered by</span>
14+
<Hiscoder className="h-8" />
15+
</Link>
16+
</div>
17+
)
18+
}
19+
20+
export default HiscoderLink

pages/[slug].js

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import { useRouter } from 'next/router'
44
import { serverSideTranslations } from 'next-i18next/serverSideTranslations'
55
import { useTranslation } from 'react-i18next'
66

7+
import HiscoderLink from 'components/StartPage/HiscoderLink'
78
import StartPage from 'components/StartPage/StartPage'
89

910
import { urlGlobal } from 'utils/openGraph'
@@ -80,7 +81,7 @@ const SlugPage = () => {
8081
const imageUrl = `${urlGlobal}/social.webp`
8182

8283
return (
83-
<main className="flex min-h-screen flex-col justify-center bg-th-secondary-100 font-sans">
84+
<main className="flex min-h-screen flex-col bg-th-secondary-100 font-sans">
8485
<Head>
8586
<title>{pageContent.title || t('LEVEL')}</title>
8687
<meta
@@ -114,7 +115,10 @@ const SlugPage = () => {
114115

115116
<link rel="icon" href="/favicon.ico" />
116117
</Head>
117-
<StartPage defaultContentKey={pageContent.contentKey || null} />
118+
<div className="flex flex-1 flex-col justify-center">
119+
<StartPage defaultContentKey={pageContent.contentKey || null} />
120+
</div>
121+
<HiscoderLink />
118122
</main>
119123
)
120124
}

pages/index.js

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import { useRouter } from 'next/router'
33

44
import { serverSideTranslations } from 'next-i18next/serverSideTranslations'
55

6+
import HiscoderLink from 'components/StartPage/HiscoderLink'
67
import StartPage from 'components/StartPage/StartPage'
78

89
import { openGraph, urlGlobal } from '../utils/openGraph'
@@ -24,7 +25,7 @@ export default function Home() {
2425
const { query } = useRouter()
2526

2627
return (
27-
<main className="flex min-h-screen flex-col justify-center bg-th-secondary-100 font-sans">
28+
<main className="flex min-h-screen flex-col bg-th-secondary-100 font-sans">
2829
<Head>
2930
<title>{metadata.title.template.replace('%s', metadata.title.default)}</title>
3031
<meta name="description" content={metadata.description} />
@@ -45,7 +46,10 @@ export default function Home() {
4546

4647
<link rel="icon" href={metadata.icons.icon} sizes="any" />
4748
</Head>
48-
<StartPage defaultContentKey={query?.contentKey || null} />
49+
<div className="flex flex-1 flex-col justify-center">
50+
<StartPage defaultContentKey={query?.contentKey || null} />
51+
</div>
52+
<HiscoderLink />
4953
</main>
5054
)
5155
}

public/icons/hiscoder-short.svg

Lines changed: 4 additions & 0 deletions
Loading

public/icons/hiscoder.svg

Lines changed: 12 additions & 0 deletions
Loading

0 commit comments

Comments
 (0)