Skip to content

Commit

Permalink
fix: clerk style
Browse files Browse the repository at this point in the history
Signed-off-by: Innei <i@innei.in>
  • Loading branch information
Innei committed May 1, 2024
1 parent 1643f95 commit 33f0669
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 21 deletions.
14 changes: 8 additions & 6 deletions src/components/layout/header/internal/HeaderActionButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,23 +3,25 @@ import clsx from 'clsx'
import type { JSX } from 'react'

export const HeaderActionButton = forwardRef<
HTMLButtonElement,
JSX.IntrinsicElements['button']
HTMLDivElement,
JSX.IntrinsicElements['div']
>(({ children, ...rest }, ref) => {
return (
<button
<div
role="button"
tabIndex={1}
className={clsx(
'group size-10 rounded-full bg-gradient-to-b',
'from-zinc-50/50 to-white/90 px-3 text-sm ring-1 ring-zinc-900/5 backdrop-blur transition dark:from-zinc-900/50 dark:to-zinc-800/90 dark:ring-white/10 dark:hover:ring-white/20',
'shadow-lg shadow-zinc-800/5',
'px-3 text-sm ring-1 ring-zinc-900/5 backdrop-blur transition dark:ring-white/10 dark:hover:ring-white/20',

'flex center',
)}
{...rest}
ref={ref}
aria-label="Header Action"
>
{children}
</button>
</div>
)
})

Expand Down
28 changes: 15 additions & 13 deletions src/components/modules/post/PostMetaBar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -42,19 +42,21 @@ export const PostMetaBar: Component<{
</span>
</>
)}
{!!meta.modified && isClient ? (
<FloatPopover
mobileAsSheet
wrapperClassName="text-xs"
as="span"
type="tooltip"
triggerElement="(已编辑)"
>
编辑于 <RelativeTime date={meta.modified} />
</FloatPopover>
) : (
<span className="text-xs">(已编辑)</span>
)}
{meta.modified ? (
isClient ? (
<FloatPopover
mobileAsSheet
wrapperClassName="text-xs"
as="span"
type="tooltip"
triggerElement="(已编辑)"
>
编辑于 <RelativeTime date={meta.modified} />
</FloatPopover>
) : (
<span className="text-xs">(已编辑)</span>
)
) : null}
</div>

{!!meta.category && (
Expand Down
6 changes: 4 additions & 2 deletions src/styles/clerk.css
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,11 @@
.cl-cardBox {
@apply overflow-visible;
}

.cl-socialButtons {
@apply flex flex-wrap items-center justify-center;
}
.cl-socialButtonsIconButton {
@apply aspect-square rounded-md bg-accent/5 p-3;
@apply box-content flex aspect-square h-5 min-h-0 w-5 items-center justify-center rounded-md bg-accent/5 p-3;
}
.cl-footer {
@apply hidden;
Expand Down

0 comments on commit 33f0669

Please sign in to comment.