From 570342e7153b4b0d808ad98ba568557eeedb2299 Mon Sep 17 00:00:00 2001 From: Eero Holmala Date: Sat, 1 Jun 2024 12:30:01 +0300 Subject: [PATCH] Frontend: Improve global styles, extract footer component --- .../src/app/(auth)/login/page.tsx | 12 +++++++----- wretched-machines-frontend/src/app/globals.css | 12 ++++++++++-- wretched-machines-frontend/src/app/layout.tsx | 6 ++++-- .../src/components/ui/content-box.tsx | 4 ++-- .../src/components/ui/footer.tsx | 11 +++++++++++ .../src/components/ui/navbar.tsx | 4 ++-- .../src/components/ui/page-title.tsx | 2 +- 7 files changed, 37 insertions(+), 14 deletions(-) create mode 100644 wretched-machines-frontend/src/components/ui/footer.tsx diff --git a/wretched-machines-frontend/src/app/(auth)/login/page.tsx b/wretched-machines-frontend/src/app/(auth)/login/page.tsx index 6536540..165e30b 100644 --- a/wretched-machines-frontend/src/app/(auth)/login/page.tsx +++ b/wretched-machines-frontend/src/app/(auth)/login/page.tsx @@ -2,6 +2,7 @@ import Form from "@/components/ui/form"; import { FormLabel, FormSubmitInput, FormTextInput } from "@/components/ui/form-input"; +import PageTitle from "@/components/ui/page-title"; import { ChangeEvent, useState } from "react"; const Login = () => { @@ -24,16 +25,17 @@ const Login = () => { } return ( -
+
+
- - Test + + Test
- - Test + + Test

Please choose a password.

diff --git a/wretched-machines-frontend/src/app/globals.css b/wretched-machines-frontend/src/app/globals.css index aaa1306..3dbbbd6 100644 --- a/wretched-machines-frontend/src/app/globals.css +++ b/wretched-machines-frontend/src/app/globals.css @@ -80,9 +80,17 @@ text-shadow: .3rem .3rem 0 #bab5a1; } + .text-eth { + color: rgba(0, 0, 0, 0.6); + } + + .bg-666666 { + background-color: #666666; + opacity: 1; + } + main, footer { - background-color: #d0de9e; - opacity: 0.6; + background-color: rgba(208, 222, 158, 0.6); background-image: linear-gradient(45deg, #d0d0d0 50%, #d0de9e 50%); background-size: 5px 5px; } diff --git a/wretched-machines-frontend/src/app/layout.tsx b/wretched-machines-frontend/src/app/layout.tsx index c070d6c..0c8bda1 100644 --- a/wretched-machines-frontend/src/app/layout.tsx +++ b/wretched-machines-frontend/src/app/layout.tsx @@ -4,6 +4,8 @@ import "./globals.css"; import { cn } from "@/lib/utils" import Navbar from "@/components/ui/navbar"; +import Footer from "@/components/ui/footer"; + const fontSans = FontSans({ subsets: ["latin"], @@ -12,7 +14,7 @@ const fontSans = FontSans({ export const metadata: Metadata = { title: "Wretched Machines", - description: "Generated by create next app", + description: "Website by MagicMuffin", }; export default function RootLayout({ @@ -28,7 +30,7 @@ export default function RootLayout({ )}> {children} -
Created by MagicMuffin | Copyright 2024
+
Created by MagicMuffin | Copyright 2024
); diff --git a/wretched-machines-frontend/src/components/ui/content-box.tsx b/wretched-machines-frontend/src/components/ui/content-box.tsx index 5f330f9..1c04fdc 100644 --- a/wretched-machines-frontend/src/components/ui/content-box.tsx +++ b/wretched-machines-frontend/src/components/ui/content-box.tsx @@ -8,8 +8,8 @@ interface ContentBoxProps { const ContentBox = (props: ContentBoxProps)=>{ return(
-
{props.title}
-
+
{props.title}
+
{props.children}
diff --git a/wretched-machines-frontend/src/components/ui/footer.tsx b/wretched-machines-frontend/src/components/ui/footer.tsx new file mode 100644 index 0000000..d1473ee --- /dev/null +++ b/wretched-machines-frontend/src/components/ui/footer.tsx @@ -0,0 +1,11 @@ +import { cn } from "@/lib/utils"; + +type FooterProps = { + children?: React.ReactNode; +}; + +const Footer = (props: FooterProps) => { + return(
{props.children}
); +} + +export default Footer; \ No newline at end of file diff --git a/wretched-machines-frontend/src/components/ui/navbar.tsx b/wretched-machines-frontend/src/components/ui/navbar.tsx index 7dd5f57..e5606af 100644 --- a/wretched-machines-frontend/src/components/ui/navbar.tsx +++ b/wretched-machines-frontend/src/components/ui/navbar.tsx @@ -6,9 +6,9 @@ const Break = ()=>
const Navbar = () => { return ( -
+
-
+
Home
diff --git a/wretched-machines-frontend/src/components/ui/page-title.tsx b/wretched-machines-frontend/src/components/ui/page-title.tsx index ee3d6f8..b0c7b5d 100644 --- a/wretched-machines-frontend/src/components/ui/page-title.tsx +++ b/wretched-machines-frontend/src/components/ui/page-title.tsx @@ -16,7 +16,7 @@ const AddSpacing = (text: string) : string => { const PageTitle = (props: PageTitleProps)=>{ const title = AddSpacing(props.title); return( -

{title}

+

{title}

); }