Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Author Rendering at the Blog page #1066

Open
wants to merge 12 commits into
base: main
Choose a base branch
from
48 changes: 15 additions & 33 deletions pages/blog/index.page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -299,40 +299,22 @@ export default function StaticMarkdownPage({
items-center
`}
>
<div
className={`
flex
flex-row
pl-2
mr-2
`}
>
<div className='flex flex-row pl-2 mr-2'>
{(frontmatter.authors || []).map(
(author: Author, index: number) => {
const sizeClass =
frontmatter.authors.length > 2
? 'h-8 w-8'
: 'h-11 w-11';
return (
<div
key={index}
className={[
'bg-slate-50',
sizeClass,
'rounded-full',
'-ml-3',
'bg-cover',
'bg-center',
'border-2',
'border-white',
].join(' ')}
style={{
backgroundImage: `url(${author.photo})`,
zIndex: 10 - index,
}}
/>
);
},
(author: Author, index: number) => (
<div
key={index}
className={`bg-slate-50 rounded-full -ml-3 bg-cover bg-center border-2 border-white ${
frontmatter.authors.length > 2
? 'h-8 w-8'
: 'h-11 w-11'
}`}
style={{
backgroundImage: `url(${author.photo})`,
zIndex: 10 - index,
}}
/>
),
)}
</div>

Expand Down