Skip to content

Commit f3f8507

Browse files
Ritesh2351235Ritesh Hiremath
andauthored
fix: Author Rendering at the Blog page (#1066)
* Changing the tailwindconfig file * added the changes to blogpage * resolving include file conflict * Reverted _includes/community to match upstream/main * Adding some changes to blogpage * Some changes in string concatenation * Adding safelist * Trying some changes in the code * Removing the safelist * Updated the join method * Adding the purgeble edited file --------- Co-authored-by: Ritesh Hiremath <[email protected]>
1 parent dacc9ef commit f3f8507

File tree

1 file changed

+15
-33
lines changed

1 file changed

+15
-33
lines changed

pages/blog/index.page.tsx

Lines changed: 15 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -299,40 +299,22 @@ export default function StaticMarkdownPage({
299299
items-center
300300
`}
301301
>
302-
<div
303-
className={`
304-
flex
305-
flex-row
306-
pl-2
307-
mr-2
308-
`}
309-
>
302+
<div className='flex flex-row pl-2 mr-2'>
310303
{(frontmatter.authors || []).map(
311-
(author: Author, index: number) => {
312-
const sizeClass =
313-
frontmatter.authors.length > 2
314-
? 'h-8 w-8'
315-
: 'h-11 w-11';
316-
return (
317-
<div
318-
key={index}
319-
className={[
320-
'bg-slate-50',
321-
sizeClass,
322-
'rounded-full',
323-
'-ml-3',
324-
'bg-cover',
325-
'bg-center',
326-
'border-2',
327-
'border-white',
328-
].join(' ')}
329-
style={{
330-
backgroundImage: `url(${author.photo})`,
331-
zIndex: 10 - index,
332-
}}
333-
/>
334-
);
335-
},
304+
(author: Author, index: number) => (
305+
<div
306+
key={index}
307+
className={`bg-slate-50 rounded-full -ml-3 bg-cover bg-center border-2 border-white ${
308+
frontmatter.authors.length > 2
309+
? 'h-8 w-8'
310+
: 'h-11 w-11'
311+
}`}
312+
style={{
313+
backgroundImage: `url(${author.photo})`,
314+
zIndex: 10 - index,
315+
}}
316+
/>
317+
),
336318
)}
337319
</div>
338320

0 commit comments

Comments
 (0)