2023-04-30 14:53:49 +02:00
|
|
|
// Dependencies
|
|
|
|
import { useTranslation } from 'next-i18next'
|
2023-09-29 08:05:40 +02:00
|
|
|
import { collection } from 'site/hooks/use-design.mjs'
|
2023-04-30 14:53:49 +02:00
|
|
|
// Components
|
|
|
|
import { ModalWrapper } from 'shared/components/wrappers/modal.mjs'
|
2023-09-29 08:05:40 +02:00
|
|
|
import { Link } from 'shared/components/link.mjs'
|
2023-04-30 14:53:49 +02:00
|
|
|
|
2023-09-29 08:05:40 +02:00
|
|
|
export const ns = ['sde']
|
2023-04-30 14:53:49 +02:00
|
|
|
|
2023-09-30 14:34:41 +02:00
|
|
|
export const ModalDesignPicker = () => {
|
2023-04-30 14:53:49 +02:00
|
|
|
const { t } = useTranslation(ns)
|
|
|
|
|
|
|
|
return (
|
|
|
|
<ModalWrapper flex="col" justify="top lg:justify-center" slideFrom="left">
|
2023-09-29 08:05:40 +02:00
|
|
|
<div className="max-w-xl">
|
|
|
|
<h2>{t('sde:chooseATemplate')}</h2>
|
2023-04-30 14:53:49 +02:00
|
|
|
<div className="flex flex-row p-4 w-full flex-wrap gap-2">
|
2023-09-29 08:05:40 +02:00
|
|
|
{collection.map((d) => (
|
|
|
|
<Link
|
|
|
|
href={`/design/${d}`}
|
2023-05-19 16:31:28 +02:00
|
|
|
key={d}
|
2023-04-30 14:53:49 +02:00
|
|
|
className={`btn w-64 btn-secondary flex flex-col flex-nowrap items-start
|
|
|
|
gap-2 py-2 h-auto border border-secondary justify-start text-left bg-opacity-30
|
|
|
|
hover:bg-opacity-20 hover:bg-secondary btn-ghost
|
|
|
|
border border-secondary hover:border hover:border-secondary
|
|
|
|
`}
|
|
|
|
>
|
2023-09-29 08:05:40 +02:00
|
|
|
<div className="text-lg font-bold">{t(`sde:${d}.t`)}</div>
|
|
|
|
<div className={`normal-case text-base-content`}>{t(`sde:${d}.d`)}</div>
|
|
|
|
</Link>
|
2023-04-30 14:53:49 +02:00
|
|
|
))}
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</ModalWrapper>
|
|
|
|
)
|
|
|
|
}
|