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

refactor: ♻️ content #10

Merged
merged 9 commits into from
Aug 28, 2024
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
2 changes: 1 addition & 1 deletion src/app/blog/[id]/AnimatedBlogPost.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ export default function AnimatedBlogPost({
initial={{ opacity: 0 }}
animate={{ opacity: 1 }}
transition={{ duration: 0.5 }}
className="container mx-auto px-4 py-8 pt-16 text-gray-900 dark:text-gray-100 bg-white dark:bg-gray-800"
className="container mx-auto px-4 py-8 text-gray-900 dark:text-gray-100 bg-white dark:bg-gray-800"
>
<div className="flex flex-col md:flex-row gap-8">
<aside className="md:w-1/4">
Expand Down
2 changes: 1 addition & 1 deletion src/components/app/AnimatedLayout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ export default function AnimatedLayout({ children }: AnimatedLayoutProps) {
exit="out"
variants={pageVariants}
// transition={pageTransition}
className="flex-grow container mx-auto px-4"
className="flex-grow container mx-auto px-4 mt-16"
>
{children}
</motion.main>
Expand Down
2 changes: 1 addition & 1 deletion src/components/app/Header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export default function Header() {
const pathname = usePathname();

return (
<header className="sticky top-0 z-50 w-full border-b border-border/40 bg-background/95 backdrop-blur supports-[backdrop-filter]:bg-background/60">
<header className="fixed top-0 z-50 w-full border-b border-border/40 bg-background/95 backdrop-blur supports-[backdrop-filter]:bg-background/60">
<div className="container flex h-14 max-w-screen-2xl items-center">
<Link href="/" className="mr-6 flex items-center space-x-2">
<span className="font-bold">我的博客</span>
Expand Down
16 changes: 10 additions & 6 deletions src/components/blog/id/ReadingProgress.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,15 @@ export default function ReadingProgress() {
if (!isVisible) return null;

return (
<div className="fixed top-0 left-0 w-full h-1 bg-gray-200 z-50">
<div
style={{ width: `${width}%` }}
className="h-full bg-primary transition-all duration-300 ease-out"
></div>
</div>
<>
{width && (
<div className="fixed top-0 left-0 w-full h-1 bg-gray-200 z-50">
<div
style={{ width: `${width}%` }}
className="h-full bg-primary transition-all duration-300 ease-out"
></div>
</div>
)}
</>
);
}
Loading