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

Footer made dynamic & centered + Padding in Footer fixed #54

Merged
merged 4 commits into from
Jan 9, 2025
Merged
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
19 changes: 16 additions & 3 deletions app/page.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
"use client";
import Image from "next/image";
import Link from "next/link";
import { Button } from "@/components/ui/button";
Expand All @@ -14,8 +15,17 @@ import { SocialLinks } from "@/components/SocialLinks";
import { Highlight } from "@/components/ui/hero-hihglight";
import PricingCard from "@/components/LandingComponents/PriceCard";
import Navbar1 from "@/components/navbar";
import { useEffect, useState } from "react";

export default function LandingPage() {
const [currentYear, setCurrentYear] = useState<number>(
new Date().getFullYear()
);

useEffect(() => {
// Set the current year dynamically on mount
setCurrentYear(new Date().getFullYear());
}, []);
return (
<div className="flex flex-col min-h-screen bg-background">
<Navbar1 />
Expand Down Expand Up @@ -222,7 +232,9 @@ export default function LandingPage() {
</div>
</section>
</main>
<footer className="w-full py-12 px-4 md:px-6 border-t bg-secondary">
<footer className="w-full pt-8 pb-4 px-4 md:px-6 border-t bg-secondary">
{/* <-- Changed pt-12 into pt-8 and pb-4 to reduce unnecessary padding */}

<div className="container mx-auto">
<div className="flex flex-col md:flex-row justify-between items-center mb-8">
<div className="flex items-center space-x-4 mb-4 md:mb-0">
Expand Down Expand Up @@ -366,9 +378,10 @@ export default function LandingPage() {
</ul>
</div>
</div>
<div className="flex flex-col md:flex-row justify-between items-center pt-8 border-t border-border">
<div className="flex flex-col md:flex-row justify-center items-center pt-8 border-t border-border">
{/* <-- Changed justify-between into justify-center to center the copyright statement*/}
<p className="text-sm text-muted-foreground mb-4 md:mb-0">
© 2023 LeetCode Journal. All rights reserved.
© {currentYear} LeetCode Journal. All rights reserved.
</p>
</div>
</div>
Expand Down
Loading