Skip to content

Commit

Permalink
refactor: #6 Division into components
Browse files Browse the repository at this point in the history
  • Loading branch information
bkrowka committed Mar 24, 2024
1 parent 917d763 commit 2286d16
Showing 1 changed file with 42 additions and 24 deletions.
66 changes: 42 additions & 24 deletions src/components/common/Footer/Footer.tsx
Original file line number Diff line number Diff line change
@@ -1,33 +1,51 @@
import { FaFacebook, FaInstagram, FaYoutube, FaTwitch } from "react-icons/fa";
import { FaXTwitter } from "react-icons/fa6";

function BottomLink ({ children }: { children: React.ReactNode }) {
return (
<p className="font-sans text-xs cursor-pointer">{children}</p>
);
}

function TopFooter () {
return (
<div className="flex flex-col lg:flex-row px-6 py-5">
<span className="flex w-full justify-center lg:justify-start order-2 lg:order-1 ">
<img src="/logo/blue/logo_img_blue.png" alt="logo" className="w-12 h-12"/>
</span>
<span className="flex w-full justify-center lg:justify-end items-center space-x-6 mb-6 lg:mb-0 text-darkblue order-1 lg:order-2">
<FaFacebook className="w-8 h-8 cursor-pointer"/>
<FaInstagram className="w-8 h-8 cursor-pointer"/>
<FaXTwitter className="w-8 h-8 cursor-pointer"/>
<FaYoutube className="w-8 h-8 cursor-pointer"/>
<FaTwitch className="w-8 h-8 cursor-pointer"/>
</span>
</div>
)
}

function BotFooter () {
return (
<div className="flex flex-col lg:flex-row px-6 py-5 text-blue border-t border-blue">
<span className="flex w-full justify-center lg:justify-start py-4 lg:py-0 order-2 lg:order-1">
<p className="font-sans text-xs">KONFERNO © 2024 Wszelkie prawa zastrzeżone</p>
</span>
<span className="flex flex-wrap lg:flex-nowrap w-full justify-center lg:justify-end items-center space-x-6 order-1 lg:order-2">
<BottomLink>Sponsorzy</BottomLink>
<BottomLink>Ostrzeżenie prawne</BottomLink>
<BottomLink>Polityka prywatności</BottomLink>
<BottomLink>Polityka plików cookies</BottomLink>
<BottomLink>Kanał informacyjny</BottomLink>
</span>
</div>
)
}

export default function Footer () {
return (
<footer>
<div className="flex flex-col lg:flex-row px-6 py-5">
<span className="flex w-full justify-center lg:justify-start order-2 lg:order-1 ">
<img src="/logo/blue/logo_img_blue.png" alt="logo" className="w-12 h-12"/>
</span>
<span className="flex w-full justify-center lg:justify-end items-center space-x-6 mb-6 lg:mb-0 text-darkblue order-1 lg:order-2">
<FaFacebook className="w-8 h-8 cursor-pointer"/>
<FaInstagram className="w-8 h-8 cursor-pointer"/>
<FaXTwitter className="w-8 h-8 cursor-pointer"/>
<FaYoutube className="w-8 h-8 cursor-pointer"/>
<FaTwitch className="w-8 h-8 cursor-pointer"/>
</span>
</div>
<div className="flex flex-col lg:flex-row px-6 py-5 text-blue border-t border-blue">
<span className="flex w-full justify-center lg:justify-start py-4 lg:py-0 order-2 lg:order-1">
<p className="font-sans text-xs">KONFERNO © 2024 Wszelkie prawa zastrzeżone</p>
</span>
<span className="flex flex-wrap lg:flex-nowrap w-full justify-center lg:justify-end items-center space-x-6 order-1 lg:order-2">
<p className="font-sans text-xs cursor-pointer">Sponsorzy</p>
<p className="font-sans text-xs cursor-pointer">Ostrzeżenie prawne</p>
<p className="font-sans text-xs cursor-pointer">Polityka prywatności</p>
<p className="font-sans text-xs cursor-pointer">Polityka plików cookies</p>
<p className="font-sans text-xs cursor-pointer">Kanał informacyjny</p>
</span>
</div>
<TopFooter/>
<BotFooter/>
</footer>
)
}

0 comments on commit 2286d16

Please sign in to comment.