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: some ui #60

Merged
merged 2 commits into from
Aug 9, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 8 additions & 5 deletions src/components/widgets/post/PostItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,13 @@ export const PostItem = memo<{ data: PostModel }>(({ data }) => {
return (
<Link
href={postLink}
className="relative flex flex-col py-6 focus-visible:!shadow-none"
className="relative flex flex-col py-8 focus-visible:!shadow-none"
>
<PostItemHoverOverlay />
<h2 className="relative text-center text-2xl font-medium lg:text-left">
<h2
className="relative text-2xl font-medium"
style={{ wordBreak: 'break-word' }}
Innei marked this conversation as resolved.
Show resolved Hide resolved
>
<Balancer>{data.title}</Balancer>

<PostPinIcon pin={!!data.pin} id={data.id} />
Expand All @@ -36,12 +39,12 @@ export const PostItem = memo<{ data: PostModel }>(({ data }) => {
摘要: {data.summary}
</p>
)}
<div className="relative overflow-hidden">
<div className="relative overflow-hidden text-justify">
{hasImage && (
<div
className={clsx(
'float-right h-24 w-24 overflow-hidden rounded-md',
'bg-contain bg-center bg-no-repeat',
'float-right mb-2 ml-3 h-[5.5rem] w-[5.5rem] overflow-hidden rounded-md',
'bg-cover bg-center bg-no-repeat',
)}
style={{ backgroundImage: `url(${hasImage})` }}
/>
Expand Down
2 changes: 1 addition & 1 deletion src/components/widgets/post/PostMetaBar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ export const PostMetaBar: Component<{
return (
<div
className={clsxm(
'flex min-w-0 flex-shrink flex-grow flex-wrap space-x-2 text-sm',
'flex min-w-0 flex-shrink flex-grow flex-wrap gap-2 text-sm',
className,
)}
>
Expand Down
2 changes: 1 addition & 1 deletion src/components/widgets/post/PostPagination.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import type { FC } from 'react'
import { MotionButtonBase } from '~/components/ui/button'

const className =
'rounded-md border-[2px] border-accent/50 px-4 py-2 hover:border-accent transition-colors'
'rounded-md border-[2px] border-accent/50 px-4 py-2 hover:border-accent text-accent transition-colors'

export const PostPagination: FC<{ pagination: Pager }> = ({ pagination }) => {
return (
Expand Down