Skip to content

Commit

Permalink
💄 remove transition style
Browse files Browse the repository at this point in the history
  • Loading branch information
JohnsonMao committed Nov 6, 2023
1 parent c2fc9e6 commit aca134f
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions src/app/[lang]/Menu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -38,14 +38,14 @@ function Menu({ menu }: MenuProps) {
href={href}
className={cn(
'relative block p-3 text-xl leading-none no-underline',
'text-zinc-700 transition-colors hover:text-primary-500 dark:text-zinc-300 dark:hover:text-primary-500',
'text-zinc-700 hover:text-primary-500 dark:text-zinc-300 dark:hover:text-primary-500',
activeLinkIndex === index &&
'fluorescent-text text-primary-500 dark:text-primary-500'
)}
>
{text}
{activeLinkIndex === index && (
<span className="absolute bottom-0 left-0 h-px w-full translate-y-1/2 bg-gradient-to-l from-transparent from-15% via-primary-500 to-transparent to-85%" />
<span className="absolute inset-x-2 bottom-0 h-px translate-y-1/2 bg-gradient-to-l from-transparent via-primary-500 to-transparent" />
)}
</Link>
</li>
Expand Down
2 changes: 1 addition & 1 deletion src/app/[lang]/posts/[postId]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ async function PostPage({ params: { postId } }: PostParams) {
<Container as="main" className="mx-2 block py-8 lg:flex lg:px-2">
<aside className="hidden w-40 shrink-0 lg:block xl:w-60">
<nav className="sticky top-[var(--header-height)] px-4">
<h4 className="my-3 text-lg font-semibold text-gray-900 transition-colors dark:text-gray-100">
<h4 className="my-3 text-lg font-semibold text-gray-900 dark:text-gray-100">
目錄
</h4>
<TableOfContents source={source} />
Expand Down
4 changes: 2 additions & 2 deletions src/app/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ function HtmlLayout({ children }: React.PropsWithChildren) {
return (
<Html>
<body>
<div className="lattice fixed inset-x-0 top-0 -z-50 h-screen transition-colors">
<Container className="h-screen border-x-2 border-zinc-500/5 bg-zinc-100/70 transition-colors dark:bg-zinc-900/70" />
<div className="lattice fixed inset-x-0 top-0 -z-50 h-screen">
<Container className="h-screen border-x-2 border-zinc-500/5 bg-zinc-100/70 dark:bg-zinc-900/70" />
</div>
<Providers>{children}</Providers>
</body>
Expand Down
2 changes: 1 addition & 1 deletion src/components/TableOfContents/TableOfContents.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ function TableOfContents({ source }: TableOfContentsProps) {
href={`#${heading.id}`}
title={heading.text}
className={cn(
'mb-0.5 block overflow-hidden text-ellipsis whitespace-nowrap text-left text-sm transition-colors hover:underline',
'mb-0.5 block overflow-hidden text-ellipsis whitespace-nowrap text-left text-sm hover:underline',
heading.id === activeId
? 'font-medium text-primary-500 hover:text-primary-600 dark:hover:text-primary-400'
: 'font-normal text-gray-500 hover:text-gray-800 dark:text-gray-400 dark:hover:text-gray-200',
Expand Down

0 comments on commit aca134f

Please sign in to comment.