2023-11-24 06:50:16 -06:00
|
|
|
import useLocalSettingsStore from "@/store/localSettings";
|
2023-08-01 15:20:05 -05:00
|
|
|
import Image from "next/image";
|
2023-08-15 20:29:38 -05:00
|
|
|
import Link from "next/link";
|
2023-08-01 15:20:05 -05:00
|
|
|
import React, { ReactNode } from "react";
|
|
|
|
|
|
|
|
interface Props {
|
|
|
|
text?: string;
|
|
|
|
children: ReactNode;
|
|
|
|
}
|
|
|
|
|
|
|
|
export default function CenteredForm({ text, children }: Props) {
|
2023-11-24 06:50:16 -06:00
|
|
|
const { settings } = useLocalSettingsStore();
|
2023-08-01 15:20:05 -05:00
|
|
|
return (
|
2023-08-15 20:29:38 -05:00
|
|
|
<div className="absolute top-0 bottom-0 left-0 right-0 flex justify-center items-center p-5">
|
2023-10-24 14:57:37 -05:00
|
|
|
<div className="m-auto flex flex-col gap-2 w-full">
|
2023-11-24 02:06:33 -06:00
|
|
|
{true ? (
|
2023-11-06 07:25:57 -06:00
|
|
|
<Image
|
2023-11-24 06:50:16 -06:00
|
|
|
src={`/linkwarden_${
|
|
|
|
settings.theme === "dark" ? "dark" : "light"
|
|
|
|
}.png`}
|
2023-11-06 07:25:57 -06:00
|
|
|
width={640}
|
|
|
|
height={136}
|
|
|
|
alt="Linkwarden"
|
|
|
|
className="h-12 w-fit mx-auto"
|
|
|
|
/>
|
|
|
|
) : undefined}
|
2023-11-24 06:50:16 -06:00
|
|
|
{/* {settings.theme === "dark" ? (
|
2023-08-15 20:29:38 -05:00
|
|
|
<Image
|
2023-09-26 16:54:25 -05:00
|
|
|
src="/linkwarden_dark.png"
|
2023-09-26 01:39:23 -05:00
|
|
|
width={640}
|
|
|
|
height={136}
|
2023-08-15 20:29:38 -05:00
|
|
|
alt="Linkwarden"
|
|
|
|
className="h-12 w-fit mx-auto"
|
|
|
|
/>
|
|
|
|
) : (
|
|
|
|
<Image
|
2023-09-26 01:39:23 -05:00
|
|
|
src="/linkwarden_light.png"
|
|
|
|
width={640}
|
|
|
|
height={136}
|
2023-08-15 20:29:38 -05:00
|
|
|
alt="Linkwarden"
|
|
|
|
className="h-12 w-fit mx-auto"
|
|
|
|
/>
|
2023-11-06 07:25:57 -06:00
|
|
|
)} */}
|
2023-08-01 15:20:05 -05:00
|
|
|
{text ? (
|
2023-11-24 07:39:55 -06:00
|
|
|
<p className="text-lg max-w-[30rem] min-w-80 w-full mx-auto font-semibold px-2 text-center">
|
2023-08-01 15:20:05 -05:00
|
|
|
{text}
|
|
|
|
</p>
|
|
|
|
) : undefined}
|
|
|
|
{children}
|
2023-08-15 20:29:38 -05:00
|
|
|
<p className="text-center text-xs text-gray-500 mb-5 dark:text-gray-400">
|
|
|
|
© {new Date().getFullYear()}{" "}
|
|
|
|
<Link href="https://linkwarden.app" className="font-semibold">
|
|
|
|
Linkwarden
|
|
|
|
</Link>
|
|
|
|
. All rights reserved.
|
2023-08-01 15:20:05 -05:00
|
|
|
</p>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
);
|
|
|
|
}
|