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

added footer component and resolve merge conflicts #25

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
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
25 changes: 25 additions & 0 deletions src/components/Footer.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
import React from "react";
import ItemsContainer from "./ItemsContainer";

const Footer = () => {
return (
<footer className="bg-gray-900 text-white">
<div className="md:flex md:justify-between md:items-center sm:px-12 px-4 bg-gray-900 py-7">
<div>

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Empty div?

</div>
</div>
<ItemsContainer />
<div
className="flex justify-center and items-center
text-center pt-2 text-teal-400 text-sm pb-8"
>
<span>© 2022 SpaceyaTech|All rights reserved.</span>
</div>
</footer>
);
};

export default Footer


21 changes: 21 additions & 0 deletions src/components/Item.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

use tsx

const Item = ({ Links, title }) => {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lowercase for variable names

return (
<ul>
<h1 className="mb-1 font-semibold">{title}</h1>
{Links.map((link) => (
<li key={link.name}>
<a
className="text-gray-400 hover:text-teal-400 duration-300
text-sm cursor-pointer leading-6"
href={link.link}
>
{link.name}
</a>
</li>
))}
</ul>
);
};

export default Item;
46 changes: 46 additions & 0 deletions src/components/ItemsContainer.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
import Item from "./Item";
import SocialIcons from "./SocialIcons";
import { Icons } from "./Menus";
import { Company, Resources, QuickLinks} from "./Menus";
const ItemsContainer = () => {
return (
<div className=" grid justify-evenly text-teal-400 grid-cols-10 sm:grid-cols-3 lg:grid-cols-5 gap-6 sm:px-8 px-5 py-8">

<div>
<img src="icon.png" alt="" />
<div className="mt-4" >
<SocialIcons Icons={Icons} />
</div>
</div>
<Item Links={Company} title="Company" />
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you could include title in interface as well

<Item Links={Resources} title="Resources" />
<Item Links={QuickLinks} title="Quick Links" />
<div >
<h2>News Letter</h2>
<p className="text-gray-400">Subscribe to our newsletter to get your weekly dose of news, updates, tips , and even special offers !</p>
<div className="" >
<div>
<input
type="text "
placeholder="Write your Email here"
className="text-gray-800 w-5
sm:w-72 sm:mr-5 mr-1 lg:mb-0 mb-4 py-2.5 rounded px-2 focus:outline-none"
/>
</div>
<div>
<button
className="bg-teal-400 hover:bg-teal-500 border-solid border-2 border-green-500 duration-300 px-5 py-2.5 m-4 font-[Poppins]
rounded-md text-white md:w-auto w-full"
>
Subscribe!
</button>
</div>
</div>
</div>
</div>
);
};


//
export default ItemsContainer;
32 changes: 32 additions & 0 deletions src/components/Menus.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Create an interface for the items.
something like this: export interface SomeName{ name: string; link: string }

and then use as: export const Company: SomeName[] = [ { name: "...", link: "..." } ]

This helps with strongly typing stuff

export const Company = [
{ name: "About Us", link: "#" },
{ name: "FAQ", link: "#" },
{ name: "Sign Up", link: "#" },
{ name: "Login", link: "#" }
];
export const Resources = [
{ name: "Contact Us", link: "#" },
{ name: "Community", link: "#" },
{ name: "Privacy Policy", link: "#" },
{ name: "Terms of Use", link: "#" },
{ name: "Mentorship", link: "#" },
];
export const QuickLinks = [
{ name: "Home", link: "#" },
{ name: "Jobs", link: "#" },
{ name: "Mentorship", link: "#" },
{ name: "Events", link: "#" },
];

export const Icons = [
{ name: "logo-facebook", link: "#" },
{ name: "logo-twitter", link: "#" },
{ name: "logo-github", link: "#" },
{ name: "logo-linkedin", link: "#" },
{ name: "logo-instagram", link: "#" },
];
// export const NewsLetter = [
// { name: "Subscribe to our newsletter to get your weekly dose of news, updates, tips , and even special offers !" },
// ];

19 changes: 19 additions & 0 deletions src/components/SocialIcons.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

convert to tsx

const SocialIcons = ({ Icons }) => {
return (
<div className="text-teal-500">
{Icons.map((icon) => (
<span
key={icon.name}
className=" p-1 cursor-pointer inline-flex items-center
rounded-full bg-gray-700 mx-1.5 text-xl hover:text-gray-100 hover:bg-teal-500
duration-300 "
>
<ion-icon name={icon.name}></ion-icon>
</span>
))}
</div>
);
};

export default SocialIcons;
Binary file added src/components/icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.