erp-platform/ui/src/components/layouts/AuthLayout/Side.tsx

59 lines
2.1 KiB
TypeScript
Raw Normal View History

2025-05-06 06:45:49 +00:00
import { cloneElement } from 'react'
import Avatar from '@/components/ui/Avatar'
import Logo from '@/components/template/Logo'
import { APP_NAME } from '@/constants/app.constant'
import type { CommonProps } from '@/@types/common'
2025-05-28 18:30:08 +00:00
import { useLocalization } from '@/utils/hooks/useLocalization'
2025-05-06 06:45:49 +00:00
interface SideProps extends CommonProps {
content?: React.ReactNode
}
const Side = ({ children, content, ...rest }: SideProps) => {
2025-05-28 18:30:08 +00:00
const { translate } = useLocalization()
return (
2025-05-06 06:45:49 +00:00
<div className="grid lg:grid-cols-3 h-full">
<div
2025-05-14 07:41:56 +00:00
className="relative bg-no-repeat bg-cover py-6 px-16 flex-col justify-between hidden lg:flex"
2025-05-06 06:45:49 +00:00
style={{
backgroundImage: `url('/img/others/auth-side-bg.jpg')`,
}}
>
2025-05-14 07:41:56 +00:00
<div className="absolute inset-0 bg-black bg-opacity-50 z-0"></div>
<div className="relative z-10 flex flex-col h-full justify-between">
<Logo className="drop-shadow-md" />
<div>
<div className="mb-6 flex items-center gap-4">
<Avatar className="border-2 border-white" shape="circle" src="/img/others/cto.png" />
<div className="text-white">
<div className="font-semibold text-base">Sedat ÖZTÜRK</div>
2025-05-28 18:30:08 +00:00
<span className="opacity-80">{ translate('::LoginPanel.Profil')}</span>
2025-05-14 07:41:56 +00:00
</div>
2025-05-06 06:45:49 +00:00
</div>
2025-05-14 07:41:56 +00:00
<p className="text-lg text-white opacity-80">
2025-05-28 18:30:08 +00:00
{ translate('::LoginPanel.Message')}
2025-05-14 07:41:56 +00:00
</p>
2025-05-06 06:45:49 +00:00
</div>
2025-05-14 07:41:56 +00:00
<span className="text-white">
Copyright &copy; {`${new Date().getFullYear()}`}{' '}
<span className="font-semibold">{`${APP_NAME}`}</span>{' '}
</span>
2025-05-06 06:45:49 +00:00
</div>
</div>
<div className="col-span-2 flex flex-col justify-start sm:justify-center items-center bg-white dark:bg-gray-800">
<div className="w-full xl:max-w-[450px] px-8 max-w-[380px]">
<div className="mb-8">{content}</div>
{children
? cloneElement(children as React.ReactElement, {
...rest,
})
: null}
</div>
</div>
</div>
)
}
export default Side