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 #160

Merged
merged 6 commits into from
Feb 11, 2023
Merged
Show file tree
Hide file tree
Changes from 5 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
23 changes: 23 additions & 0 deletions components/Footer/Footer.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
import Image from "next/image";
import Link from "next/link";
import type { FC } from "react";
import Logo from "../logo";

interface FooterProps {}

export const Footer: FC<FooterProps> = ({}) => {
return (
<div className="w-full flex items-baseline justify-center z-20 gap-1 rounded-lg bg-[#ffffff0a] backdrop-blur-md sm:py-3 py-2 px-1">
<p className="md:text-lg text-center text-gray-200">
Open source |{" "}
<Link
href="https://github.com/rupali-codes/LinksHub/blob/main/LICENSE"
target="_blank"
>
<span className="border-b-[1px]">MIT License</span>
</Link>{" "}
2023 LinksHub
</p>
</div>
);
};
1 change: 1 addition & 0 deletions components/Footer/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
import { Footer } from "./Footer";
8 changes: 5 additions & 3 deletions components/cards/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,11 @@ import { data } from "../../database/data";
import { IData } from "../../types";
import { LinkContainer } from "../LinksContainer/LinkContainer";
import { BackToTopButton } from "../BackToTop/BackToTopButton";
import { useTheme } from "next-themes";

const Cards = () => {
const router = useRouter();
const { theme } = useTheme();

const filterDB = data.filter((item) =>
item.subcategory
Expand All @@ -16,9 +18,9 @@ const Cards = () => {

return (
<div
className={`flex flex-wrap flex-col md:flex-row w-full md:justify-start gap-4 items-center ${
filterDB.length < 3 && "lg:justify-start"
}`}
className={`flex flex-wrap md:flex-row w-full md:justify-start gap-4 content-start lg:h-[calc(90vh-80px)] h-[calc(90vh-150px)] overflow-y-scroll mb-2 ${
theme === "light" ? "scrollColorLight" : "scrollColorDark"
} ${filterDB.length < 3 && "lg:justify-start"}`}
>
{filterDB?.map((data: IData, key: number) => (
<LinkContainer
Expand Down
4 changes: 3 additions & 1 deletion layouts/GeneralLayout.tsx
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
import React, { ReactNode } from "react";
import { Footer } from "../components/Footer/Footer";
import { SideNavbar } from "../components/SideNavbar";

const GeneralLayout = ({ children }: { children: ReactNode }) => {
return (
<section>
<SideNavbar />
<div className="bg-gray-100 dark:bg-[#101623] transition-all ease-in duration-300 mx-auto mt-20 min-h-[calc(100vh-80px)] md:pb-8 lg:ml-20 lg:mt-0 lg:min-h-screen lg:pl-[290px]">
<div className="bg-gray-100 dark:bg-[#101623] transition-all ease-in duration-300 mx-auto mt-20 min-h-[calc(100vh-85px)] md:pb-[1.5rem] lg:ml-20 lg:mt-0 lg:pl-[290px] px-4">
{children}
<Footer />
</div>
</section>
);
Expand Down
2 changes: 1 addition & 1 deletion pages/[subcategory].tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ const SubCategory = () => {
const router = useRouter();
const title :any = `LinksHub - ${router.asPath.charAt(1).toUpperCase()}${router.asPath.slice(2)}`;
return (
<section className="px-4">
<section>
<Head>
<title>{title}</title>
</Head>
Expand Down
2 changes: 1 addition & 1 deletion pages/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export default function Home() {
<meta name="viewport" content="width=device-width, initial-scale=1" />
<link rel="icon" href="/icon.ico" className="rounded-full" />
</Head>
<main className="h-screen flex flex-col">
<main className="lg:h-[calc(100vh-85px)] h-[calc(100vh-150px)] flex flex-col">
<TopBar header="Home" />
<div className="m-auto md:text-7xl text-5xl gap-2 flex items-center justify-center">
<Logo />
Expand Down