[#122] capitalize author name

This commit is contained in:
amirhouieh 2023-08-29 17:58:52 +02:00
parent 2d5cb87e99
commit dab25d06d9
4 changed files with 13 additions and 8 deletions

View File

@ -9,10 +9,6 @@ type Props = {
}
const ArticleBlocks = ({ data }: Props) => {
// const {data: searchResultBlocks = []} = useArticleContext()
// const ids = searchResultBlocks?.map(
// (block) => (block as SearchResultsItemTypes).doc.id,
// )
const { setTocId, tocId } = useArticleContainerContext()
const headingElementsRef = useIntersectionObserver(setTocId)

View File

@ -1,6 +1,7 @@
import styled from '@emotion/styled'
import { LPE } from '../../types/lpe.types'
import { ResponsiveImage } from '../ResponsiveImage/ResponsiveImage'
import { lsdUtils } from '@/utils/lsd.utils'
type Props = {
image: LPE.Image.Document
@ -10,8 +11,16 @@ export const ArticleImageBlockWrapper = ({ image }: Props) => {
return (
<Container>
<ResponsiveImage data={image} />
<figcaption>{image.alt}</figcaption>
</Container>
)
}
const Container = styled.div``
const Container = styled.figure`
margin: 0;
padding: 0;
figcaption {
padding-top: 8px;
${lsdUtils.typography('body3')}
}
`

View File

@ -30,6 +30,7 @@ const Author = ({
const AuthorInfo = styled.div`
display: flex;
flex-direction: column;
text-transform: capitalize;
`
export default Author

View File

@ -19,7 +19,6 @@ export const ResponsiveImage = ({
data,
height,
fill = false,
alt = 'alt',
nextImageProps,
className,
}: Props) => {
@ -51,10 +50,10 @@ export const ResponsiveImage = ({
}}
>
<div>
<img src={lazyUrl} alt={alt} />
<img src={lazyUrl} alt={data.alt} title={data.alt} />
</div>
<div className={imageProps.className}>
<Image {...imageProps} alt={alt} />
<Image {...imageProps} alt={data.alt} title={data.alt} />
</div>
</Container>
)