mirror of
https://github.com/kremalicious/blog.git
synced 2025-01-03 18:35:07 +01:00
cleanup
This commit is contained in:
parent
4e2b8f7615
commit
a0504d5d2b
@ -4,7 +4,6 @@ import { Image } from '../atoms/Image'
|
||||
import { Post } from '../../@types/Post'
|
||||
import PostTitle from '../templates/Post/Title'
|
||||
import styles from './PostTeaser.module.scss'
|
||||
import PostDate from './PostDate'
|
||||
|
||||
export const postTeaserQuery = graphql`
|
||||
fragment PostTeaser on MarkdownRemark {
|
||||
@ -48,17 +47,17 @@ export default function PostTeaser({
|
||||
onClick={toggleSearch && toggleSearch}
|
||||
>
|
||||
{image ? (
|
||||
<Image
|
||||
fluid={image.childImageSharp.fluid}
|
||||
alt={title}
|
||||
original={image.childImageSharp.original}
|
||||
/>
|
||||
<Image fluid={image.childImageSharp.fluid} alt={title} />
|
||||
) : (
|
||||
<span className={styles.empty} />
|
||||
)}
|
||||
|
||||
<PostTitle slug={slug} title={title} className={styles.title} />
|
||||
{date && !hideDate && <PostDate date={date} updated={updated} />}
|
||||
<PostTitle
|
||||
title={title}
|
||||
date={hideDate ? null : date}
|
||||
updated={updated}
|
||||
className={styles.title}
|
||||
/>
|
||||
</Link>
|
||||
)
|
||||
}
|
||||
|
@ -4,14 +4,12 @@ import Icon from '../../atoms/Icon'
|
||||
import PostDate from '../../molecules/PostDate'
|
||||
|
||||
export default function PostTitle({
|
||||
slug,
|
||||
linkurl,
|
||||
title,
|
||||
date,
|
||||
updated,
|
||||
className
|
||||
}: {
|
||||
slug?: string
|
||||
linkurl?: string
|
||||
title: string
|
||||
date?: string
|
||||
@ -33,10 +31,6 @@ export default function PostTitle({
|
||||
</h1>
|
||||
<div className={styles.linkurl}>{linkHostname}</div>
|
||||
</>
|
||||
) : slug ? (
|
||||
<h1 className={`${styles.hentry__title} ${className && className}`}>
|
||||
{title}
|
||||
</h1>
|
||||
) : (
|
||||
<>
|
||||
<h1 className={`${styles.hentry__title} ${className && className}`}>
|
||||
|
@ -48,13 +48,7 @@ export default function Post({
|
||||
|
||||
{type === 'article' && <PostLead post={post} />}
|
||||
|
||||
{image && (
|
||||
<Image
|
||||
fluid={image.childImageSharp.fluid}
|
||||
alt={title}
|
||||
original={image.childImageSharp.original}
|
||||
/>
|
||||
)}
|
||||
{image && <Image fluid={image.childImageSharp.fluid} alt={title} />}
|
||||
</header>
|
||||
|
||||
{type === 'photo' ? (
|
||||
|
Loading…
Reference in New Issue
Block a user