started work on page footer
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
parent
789ddcf00c
commit
946bc5f6e6
@ -1,12 +1,13 @@
|
|||||||
{
|
{
|
||||||
"owner": {
|
"header": {
|
||||||
"fullName": "Guus van Meerveld",
|
"fullName": "Guus van Meerveld",
|
||||||
"name": "guus",
|
"name": "guus",
|
||||||
"description": "AI student at Radboud University. Creating software as a hobby.",
|
"description": "AI student at Radboud University. Creating software as a hobby.",
|
||||||
"contact": {
|
"contact": {
|
||||||
"email": "contact@guusvanmeerveld.dev",
|
"email": "contact@guusvanmeerveld.dev",
|
||||||
"git": "https://github.com/Guusvanmeerveld",
|
"git": "https://github.com/Guusvanmeerveld",
|
||||||
"linkedin": "https://linkedin.com/in/guus-van-meerveld-038357210"
|
"linkedin": "https://linkedin.com/in/guus-van-meerveld-038357210"
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
}
|
"footer": {}
|
||||||
|
}
|
||||||
|
@ -0,0 +1,12 @@
|
|||||||
|
import { Component } from "@typings/component";
|
||||||
|
|
||||||
|
export const Footer: Component = () => {
|
||||||
|
return (
|
||||||
|
<div className="container mx-auto columns-4">
|
||||||
|
<div className="w-full">hi</div>
|
||||||
|
<div className="w-full">hi</div>
|
||||||
|
<div className="w-full">hi</div>
|
||||||
|
<div className="w-full">hi</div>
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
};
|
@ -0,0 +1,37 @@
|
|||||||
|
"use client";
|
||||||
|
|
||||||
|
import { Switch } from "@nextui-org/react";
|
||||||
|
import { Component } from "@typings/component";
|
||||||
|
import { useTheme } from "next-themes";
|
||||||
|
|
||||||
|
import { useEffect, useState } from "react";
|
||||||
|
import { FiMoon, FiSun } from "react-icons/fi";
|
||||||
|
|
||||||
|
export const ThemeSwitcher: Component = () => {
|
||||||
|
const [mounted, setMounted] = useState(false);
|
||||||
|
const { theme, setTheme } = useTheme();
|
||||||
|
|
||||||
|
useEffect(() => {
|
||||||
|
setMounted(true);
|
||||||
|
}, []);
|
||||||
|
|
||||||
|
if (!mounted) return null;
|
||||||
|
|
||||||
|
return (
|
||||||
|
<div>
|
||||||
|
The current theme is: {theme}
|
||||||
|
<Switch
|
||||||
|
defaultSelected
|
||||||
|
size="lg"
|
||||||
|
color="primary"
|
||||||
|
onValueChange={(value) => {
|
||||||
|
value ? setTheme("dark") : setTheme("light");
|
||||||
|
}}
|
||||||
|
startContent={<FiSun />}
|
||||||
|
endContent={<FiMoon />}
|
||||||
|
>
|
||||||
|
Dark mode
|
||||||
|
</Switch>
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
};
|
@ -1,7 +1,15 @@
|
|||||||
"use client";
|
"use client";
|
||||||
|
|
||||||
import { NextUIProvider } from "@nextui-org/react";
|
import { NextUIProvider } from "@nextui-org/react";
|
||||||
|
import { Component } from "@typings/component";
|
||||||
|
import { ThemeProvider as NextThemesProvider } from "next-themes";
|
||||||
|
|
||||||
export function Providers({ children }: { children: React.ReactNode }) {
|
export const Providers: Component = ({ children }) => {
|
||||||
return <NextUIProvider>{children}</NextUIProvider>;
|
return (
|
||||||
}
|
<NextUIProvider>
|
||||||
|
<NextThemesProvider attribute="class" defaultTheme="dark">
|
||||||
|
{children}
|
||||||
|
</NextThemesProvider>
|
||||||
|
</NextUIProvider>
|
||||||
|
);
|
||||||
|
};
|
||||||
|
@ -0,0 +1,7 @@
|
|||||||
|
import z from "zod";
|
||||||
|
|
||||||
|
export const FooterPropsModel = z.object({});
|
||||||
|
|
||||||
|
export type FooterProps = z.infer<typeof FooterPropsModel>;
|
||||||
|
|
||||||
|
export default FooterProps;
|
@ -1,3 +1,3 @@
|
|||||||
import { FC, PropsWithChildren } from "react";
|
import { FC, PropsWithChildren } from "react";
|
||||||
|
|
||||||
export type Component<P> = FC<PropsWithChildren<P>>;
|
export type Component<P = unknown> = FC<PropsWithChildren<P>>;
|
||||||
|
@ -1,3 +1 @@
|
|||||||
import path from "path";
|
|
||||||
|
|
||||||
export const dataDirLocation = process.env.DATA_DIR ?? "/app/data";
|
export const dataDirLocation = process.env.DATA_DIR ?? "/app/data";
|
||||||
|
Loading…
Reference in new issue