Skip to content

Commit

Permalink
More cleanup and added a footer.
Browse files Browse the repository at this point in the history
  • Loading branch information
seanmarcia committed Sep 26, 2023
1 parent e59f45b commit d03f8f3
Show file tree
Hide file tree
Showing 8 changed files with 54 additions and 14 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,9 +66,9 @@ jobs:
- name: Update happycommits.json
uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_message: update happycommits.json [skip actions]
branch: json-updates
file_pattern: 'happycommits.json'
commit_message: update generated.json [skip actions]
branch: main
file_pattern: 'generated.json'
skip_checkout: true
push_options: '--force'
- name: Static HTML export with Next.js
Expand Down
30 changes: 30 additions & 0 deletions components/Footer.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
import Link from "next/link";

export const Footer = () => {
return (
<footer className="inset-x-0 bottom-0 bg-slate-700 text-center text-vanilla-100 py-3">
Built with{" "}
<span role="img" aria-label="love">
❤️
</span>{" "}
by the{" "}
<Link
href="https://socialimpact.github.com"
target="_blank"
rel="noopener noreferrer"
className="text-violet-100 hover:underline"
>
Github Social Impact Team
</Link>{" "}
& designed by{" "}
<Link
href="https://github.com/designbygia"
target="_blank"
rel="noopener noreferrer"
className="text-violet-100 hover:underline"
>
@designbygia
</Link>
</footer>
);
};
16 changes: 12 additions & 4 deletions components/GeneralFilter.tsx
Original file line number Diff line number Diff line change
@@ -1,13 +1,21 @@
import { FaSearch } from "react-icons/fa";

type GeneralFilterProps = {
filter: string | number | readonly string[] | undefined;
setFilter: (filter: string | number | readonly string[] | undefined) => void;
};

export const GeneralFilter = ({ filter, setFilter }: GeneralFilterProps) => {
return (
<input type="text" value={filter} onChange={(e) => setFilter(e.target.value)} placeholder="Search Repositories" className="flex-1 border rounded-sm p-2 mb-4" />
<div className="flex border bg-vanilla-100 rounded-sm mr-4">
<FaSearch className="self-center mr-2 ml-2" />
<input
type="text"
value={filter}
onChange={(e) => setFilter(e.target.value)}
placeholder="Search Repositories"
className="flex-1 rounded-sm p-2"
/>
</div>
);
};



4 changes: 2 additions & 2 deletions components/GitHubOctocat.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ import Image from "next/image";

export const GitHubOctocat = () => {
return (
<div className="absolute z-10 right-80 top-60">
<Image src="/octocatwithbody.svg" alt="First Issue" width={384} height={384} />
<div className="absolute z-10 right-80 top-60 hidden sm:block">
<Image src="/octocatwithbody.svg" alt="First Issue" width={384} height={384} />
</div>
);
};
2 changes: 1 addition & 1 deletion components/HappyCommitsInfo.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ type FilterProps = {

export const HappyCommitsInfo = ({filter, setFilter}: FilterProps) => {
return (
<div style={{ paddingLeft: "10%" }}>
<div className="flex" style={{ paddingLeft: "10%" }}>
<div style={{ width: 541, height: 291, flexDirection: "column" }}>
<div
style={{
Expand Down
2 changes: 1 addition & 1 deletion components/RepositoryList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ export const RepositoryList = ({ repositories, filter }: RepositoryListProps) =>

return (
<main className="grow">
<div className="p-4 w-full">
<div className="p-4 w-full mb-4">
<div className="flex justify-center">
<div className="w-[85%] justify-start items-start inline-flex mb-4">
<FilterInfo />
Expand Down
6 changes: 3 additions & 3 deletions components/RepositoryMetadata.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export const RepositoryMetadata = ({
repositoryTopics
}: RepositoryMetadataProps) => {
return (
<div className="justify-start items-start gap-6 inline-flex">
<div className="justify-start items-start gap-6 inline-flex flex-wrap">
<div className="justify-start items-center gap-1 flex">
<div className="text-zinc-900 text-sm font-normal font-['Inter'] leading-[21px]">
Issues:{" "}
Expand All @@ -37,7 +37,7 @@ export const RepositoryMetadata = ({
</div>
</div>
</div>
<div className="justify-start items-center gap-1 flex">
{repositoryTopics && repositoryTopics.length > 0 &&<div className="justify-start items-center gap-1 flex">
<div className="text-zinc-900 text-sm font-normal font-['Inter'] leading-[21px]">
Label:
</div>
Expand All @@ -46,7 +46,7 @@ export const RepositoryMetadata = ({
{repositoryTopics && repositoryTopics.map(topic => topic.display).join(', ')}
</div>
</div>
</div>
</div>}
<div className="justify-start items-center gap-1 flex">
<div className="text-zinc-900 text-sm font-normal font-['Inter'] leading-[21px]">
Last activity:
Expand Down
2 changes: 2 additions & 0 deletions pages/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import { useAppData } from "../hooks/useAppData";
import { Navbar } from "../components/Navbar";
import { HeroContainer } from "../components/HeroContainer";
import { GitHubOctocat } from "../components/GitHubOctocat";
import { Footer } from "../components/Footer";

export default function Home() {
const { repositories } = useAppData();
Expand All @@ -20,6 +21,7 @@ export default function Home() {
<HeroContainer filter={filter} setFilter={setFilter} />
<GitHubOctocat />
<RepositoryList repositories={repositories} filter={filter} />
<Footer />
</>
);
}

0 comments on commit d03f8f3

Please sign in to comment.