Skip to content
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
15 changes: 15 additions & 0 deletions components/SideBar.js
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down Expand Up @@ -638,6 +639,20 @@ function SideBar({ setIsOpenSideBar, access, isOpenSideBar }) {
>
<SignOut collapsed={collapsed} />
</Menu.Item>
<Menu.Item
as="div"
disabled
className="group flex cursor-default items-center justify-between gap-2 rounded-b-2xl hover:bg-th-secondary-200 lg:rounded-b-none"
>
<Link
href="https://hiscoder.com"
target="_blank"
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`}
>
<Hiscoder className="w-6 min-w-[1.25rem]" />
{!collapsed && <p>Powered by HisCoder.com</p>}
</Link>
</Menu.Item>
</div>
</div>
<AvatarSelector id={user?.id} />
Expand Down
7 changes: 4 additions & 3 deletions components/StartPage/Feedback.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 })
Expand Down Expand Up @@ -50,9 +50,10 @@ function Feedback({ onClose }) {

return (
<div className="flex w-full flex-col gap-6 md:gap-0">
{isStartPage && (
{isConnectWithUsPage && (
<p className="font-semibold md:font-bold">{t('start-page:WriteToUs')}</p>
)}

<div className="flex flex-grow items-center" onClick={(e) => e.stopPropagation()}>
<Toaster />
{!isSent ? (
Expand Down Expand Up @@ -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')}
Expand Down
20 changes: 20 additions & 0 deletions components/StartPage/HiscoderLink.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
import Link from 'next/link'

import Hiscoder from 'public/icons/hiscoder.svg'

function HiscoderLink() {
return (
<div className="mx-auto flex flex-1 items-center">
<Link
href="https://hiscoder.com"
target="_blank"
className="flex items-center gap-4 p-2 text-[#CACACA] hover:text-gray-400"
>
<span>Powered by</span>
<Hiscoder className="h-8" />
</Link>
</div>
)
}

export default HiscoderLink
8 changes: 6 additions & 2 deletions pages/[slug].js
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down Expand Up @@ -80,7 +81,7 @@ const SlugPage = () => {
const imageUrl = `${urlGlobal}/social.webp`

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

<link rel="icon" href="/favicon.ico" />
</Head>
<StartPage defaultContentKey={pageContent.contentKey || null} />
<div className="flex flex-1 flex-col justify-center">
<StartPage defaultContentKey={pageContent.contentKey || null} />
</div>
<HiscoderLink />
</main>
)
}
Expand Down
8 changes: 6 additions & 2 deletions pages/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand All @@ -24,7 +25,7 @@ export default function Home() {
const { query } = useRouter()

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

<link rel="icon" href={metadata.icons.icon} sizes="any" />
</Head>
<StartPage defaultContentKey={query?.contentKey || null} />
<div className="flex flex-1 flex-col justify-center">
<StartPage defaultContentKey={query?.contentKey || null} />
</div>
<HiscoderLink />
</main>
)
}
Expand Down
4 changes: 4 additions & 0 deletions public/icons/hiscoder-short.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 public/icons/hiscoder.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading