Skip to content

Commit

Permalink
Created footer section
Browse files Browse the repository at this point in the history
  • Loading branch information
AmirKakavand committed Aug 9, 2024
1 parent d1fdeb8 commit 35529f8
Show file tree
Hide file tree
Showing 8 changed files with 70 additions and 3 deletions.
52 changes: 52 additions & 0 deletions app/components/Footer.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
import React from "react";
import Image from "next/image";
import { FaGithub } from "react-icons/fa";
import { FaXTwitter, FaTelegram } from "react-icons/fa6";

const Footer = () => {
return (
<footer className="flex flex-col mt-8 space-y-2">
<hr className=" border-t-2 border-[#00DCF7]" />
<div className="flex flex-col sm:flex-row sm:justify-between sm:px-6">
<div className="flex flex-row items-center justify-center space-x-2">
<Image
src={"/images/AmirKakavand.jpg"}
width={"80"}
height={"80"}
alt="Photo of Amir Kakavand"
className="rounded-full w-14 h-14 hidden sm:block"
/>
<span className="text-xs sm:text-xl">
Designed and developed by Amir Kakavand
</span>
</div>
{/* Social Media */}
<div className="flex flex-row items-center justify-center space-x-10 mt-2 sm:mt-0">
<a
href="https://github.com/AmirKakavand"
target="_blank"
rel="noopener noreferrer"
>
<FaGithub className="text-3xl" />
</a>
<a
href="https://x.com/Amirkkvnd"
target="_blank"
rel="noopener noreferrer"
>
<FaXTwitter className="text-3xl" />
</a>
<a
href="https://t.me/Amirkkvnd"
target="_blank"
rel="noopener noreferrer"
>
<FaTelegram className="text-3xl" />
</a>
</div>
</div>
</footer>
);
};

export default Footer;
7 changes: 4 additions & 3 deletions app/components/Header.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { useState, Dispatch, SetStateAction } from "react";
import { MagnifyingGlassIcon, XMarkIcon } from "@heroicons/react/24/outline";
import { IoCloseOutline } from "react-icons/io5";
import { IoIosSearch } from "react-icons/io";

interface IHeaderProps {
name: string;
Expand Down Expand Up @@ -33,9 +34,9 @@ const Header = ({ name, setName, setSearchQuery }: IHeaderProps) => {
/>
<div className="hidden md:inline text-slate-600 inset-y-auto right-0.5 md:right-4 absolute">
{name === "" ? (
<MagnifyingGlassIcon className="w-7 h-7" />
<IoIosSearch className="w-7 h-7" />
) : (
<XMarkIcon
<IoCloseOutline
className={mouseHover ? "w-7 h-7 cursor-pointer" : "w-7 h-7"}
onMouseEnter={() => setMouseHover(true)}
onMouseLeave={() => setMouseHover(false)}
Expand Down
3 changes: 3 additions & 0 deletions app/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { useState, useEffect } from "react";
import { CharactersPage } from "./components/CharactersPage";
import { handleSearch } from "./utils/handleSearch";
import Header from "./components/Header";
import Footer from "./components/Footer";

export default function Home() {
const [pageNo, setPageNo] = useState<number>(1);
Expand All @@ -23,6 +24,8 @@ export default function Home() {
searchQuery={searchQuery}
/>
)}

{searchQuery === "" && pageNo === 1 && <Footer />}
</main>
);
}
Expand Down
10 changes: 10 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
"next": "14.2.5",
"react": "^18",
"react-dom": "^18",
"react-icons": "^5.2.1",
"swr": "^2.2.5"
},
"devDependencies": {
Expand Down
Binary file added public/images/AmirKakavand.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/images/github.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/images/telegram.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 35529f8

Please sign in to comment.