Skip to content

Commit 05bbebf

Browse files
committed
More cleanup and added a footer.
1 parent e59f45b commit 05bbebf

File tree

7 files changed

+51
-11
lines changed

7 files changed

+51
-11
lines changed

components/Footer.tsx

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
import Link from "next/link";
2+
3+
export const Footer = () => {
4+
return (
5+
<footer className="inset-x-0 bottom-0 bg-slate-700 text-center text-vanilla-100 py-3">
6+
Built with{" "}
7+
<span role="img" aria-label="love">
8+
❤️
9+
</span>{" "}
10+
by the{" "}
11+
<Link
12+
href="https://socialimpact.github.com"
13+
target="_blank"
14+
rel="noopener noreferrer"
15+
className="text-violet-100 hover:underline"
16+
>
17+
Github Social Impact Team
18+
</Link>{" "}
19+
& designed by{" "}
20+
<Link
21+
href="https://github.com/designbygia"
22+
target="_blank"
23+
rel="noopener noreferrer"
24+
className="text-violet-100 hover:underline"
25+
>
26+
@designbygia
27+
</Link>
28+
</footer>
29+
);
30+
};

components/GeneralFilter.tsx

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,21 @@
1+
import { FaSearch } from "react-icons/fa";
2+
13
type GeneralFilterProps = {
24
filter: string | number | readonly string[] | undefined;
35
setFilter: (filter: string | number | readonly string[] | undefined) => void;
46
};
57

68
export const GeneralFilter = ({ filter, setFilter }: GeneralFilterProps) => {
79
return (
8-
<input type="text" value={filter} onChange={(e) => setFilter(e.target.value)} placeholder="Search Repositories" className="flex-1 border rounded-sm p-2 mb-4" />
10+
<div className="flex border bg-vanilla-100 rounded-sm mr-4">
11+
<FaSearch className="self-center mr-2 ml-2" />
12+
<input
13+
type="text"
14+
value={filter}
15+
onChange={(e) => setFilter(e.target.value)}
16+
placeholder="Search Repositories"
17+
className="flex-1 rounded-sm p-2"
18+
/>
19+
</div>
920
);
1021
};
11-
12-
13-

components/GitHubOctocat.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ import Image from "next/image";
22

33
export const GitHubOctocat = () => {
44
return (
5-
<div className="absolute z-10 right-80 top-60">
6-
<Image src="/octocatwithbody.svg" alt="First Issue" width={384} height={384} />
5+
<div className="absolute z-10 right-80 top-60 hidden sm:block">
6+
<Image src="/octocatwithbody.svg" alt="First Issue" width={384} height={384} />
77
</div>
88
);
99
};

components/HappyCommitsInfo.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ type FilterProps = {
66

77
export const HappyCommitsInfo = ({filter, setFilter}: FilterProps) => {
88
return (
9-
<div style={{ paddingLeft: "10%" }}>
9+
<div className="flex" style={{ paddingLeft: "10%" }}>
1010
<div style={{ width: 541, height: 291, flexDirection: "column" }}>
1111
<div
1212
style={{

components/RepositoryList.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ export const RepositoryList = ({ repositories, filter }: RepositoryListProps) =>
5757

5858
return (
5959
<main className="grow">
60-
<div className="p-4 w-full">
60+
<div className="p-4 w-full mb-4">
6161
<div className="flex justify-center">
6262
<div className="w-[85%] justify-start items-start inline-flex mb-4">
6363
<FilterInfo />

components/RepositoryMetadata.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ export const RepositoryMetadata = ({
1515
repositoryTopics
1616
}: RepositoryMetadataProps) => {
1717
return (
18-
<div className="justify-start items-start gap-6 inline-flex">
18+
<div className="justify-start items-start gap-6 inline-flex flex-wrap">
1919
<div className="justify-start items-center gap-1 flex">
2020
<div className="text-zinc-900 text-sm font-normal font-['Inter'] leading-[21px]">
2121
Issues:{" "}
@@ -37,7 +37,7 @@ export const RepositoryMetadata = ({
3737
</div>
3838
</div>
3939
</div>
40-
<div className="justify-start items-center gap-1 flex">
40+
{repositoryTopics && repositoryTopics.length > 0 &&<div className="justify-start items-center gap-1 flex">
4141
<div className="text-zinc-900 text-sm font-normal font-['Inter'] leading-[21px]">
4242
Label:
4343
</div>
@@ -46,7 +46,7 @@ export const RepositoryMetadata = ({
4646
{repositoryTopics && repositoryTopics.map(topic => topic.display).join(', ')}
4747
</div>
4848
</div>
49-
</div>
49+
</div>}
5050
<div className="justify-start items-center gap-1 flex">
5151
<div className="text-zinc-900 text-sm font-normal font-['Inter'] leading-[21px]">
5252
Last activity:

pages/index.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import { useAppData } from "../hooks/useAppData";
66
import { Navbar } from "../components/Navbar";
77
import { HeroContainer } from "../components/HeroContainer";
88
import { GitHubOctocat } from "../components/GitHubOctocat";
9+
import { Footer } from "../components/Footer";
910

1011
export default function Home() {
1112
const { repositories } = useAppData();
@@ -20,6 +21,7 @@ export default function Home() {
2021
<HeroContainer filter={filter} setFilter={setFilter} />
2122
<GitHubOctocat />
2223
<RepositoryList repositories={repositories} filter={filter} />
24+
<Footer />
2325
</>
2426
);
2527
}

0 commit comments

Comments
 (0)