2023-06-19 16:27:13 -05:00
|
|
|
import { useTranslation } from 'next-i18next'
|
|
|
|
|
2023-07-17 20:10:08 -05:00
|
|
|
export const Author = ({ author = '' }) => {
|
2023-06-19 16:27:13 -05:00
|
|
|
const { t } = useTranslation(['posts'])
|
|
|
|
return (
|
|
|
|
<div id="author" className="flex flex-col lg:flex-row m-auto p-2 items-center">
|
|
|
|
<div className="theme-gradient w-40 h-40 p-2 rounded-full aspect-square hidden lg:block">
|
|
|
|
<div
|
|
|
|
className={`
|
|
|
|
w-lg bg-cover bg-center rounded-full aspect-square
|
|
|
|
hidden lg:block
|
|
|
|
`}
|
2023-07-17 20:10:08 -05:00
|
|
|
// style={{ backgroundImage: `url(${author.image})` }}
|
2023-06-19 16:27:13 -05:00
|
|
|
></div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div className="theme-gradient p-2 rounded-full aspect-square w-40 h-40 lg:hidden m-auto">
|
2023-07-17 20:10:08 -05:00
|
|
|
{/*<img
|
2023-06-19 16:27:13 -05:00
|
|
|
className={`block w-full h-full mx-auto rounded-full`}
|
|
|
|
src={author.image}
|
2023-07-17 20:10:08 -05:00
|
|
|
alt={author}
|
|
|
|
/>*/}
|
2023-06-19 16:27:13 -05:00
|
|
|
</div>
|
|
|
|
<div
|
|
|
|
className={`
|
|
|
|
text-center p-2 px-4 rounded-r-lg bg-opacity-50
|
|
|
|
lg:text-left
|
|
|
|
`}
|
|
|
|
>
|
|
|
|
<p
|
|
|
|
className="text-xl"
|
|
|
|
dangerouslySetInnerHTML={{
|
2023-07-17 20:10:08 -05:00
|
|
|
__html: t('xMadeThis', { x: author || 'FIXME: no display name' }),
|
2023-06-19 16:27:13 -05:00
|
|
|
}}
|
|
|
|
/>
|
2023-07-17 20:10:08 -05:00
|
|
|
<div className="prose mdx">FIXME: implement author bios</div>
|
2023-06-19 16:27:13 -05:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
)
|
|
|
|
}
|