fix branding

This commit is contained in:
RandyJC
2025-12-09 11:48:05 +01:00
parent 9d64f7f0b4
commit 684a6a3c12
4 changed files with 29 additions and 26 deletions

View File

@@ -1,9 +1,8 @@
"use client" "use client"
import logo from "@rahoot/web/assets/logo.svg" import BrandHeading from "@rahoot/web/components/BrandHeading"
import Loader from "@rahoot/web/components/Loader" import Loader from "@rahoot/web/components/Loader"
import { useSocket } from "@rahoot/web/contexts/socketProvider" import { useSocket } from "@rahoot/web/contexts/socketProvider"
import Image from "next/image"
import { PropsWithChildren, useEffect } from "react" import { PropsWithChildren, useEffect } from "react"
const AuthLayout = ({ children }: PropsWithChildren) => { const AuthLayout = ({ children }: PropsWithChildren) => {
@@ -22,7 +21,7 @@ const AuthLayout = ({ children }: PropsWithChildren) => {
<div className="bg-primary/15 absolute -right-[15vmin] -bottom-[15vmin] min-h-[75vmin] min-w-[75vmin] rotate-45"></div> <div className="bg-primary/15 absolute -right-[15vmin] -bottom-[15vmin] min-h-[75vmin] min-w-[75vmin] rotate-45"></div>
</div> </div>
<Image src={logo} className="mb-6 h-32" alt="logo" /> <BrandHeading className="mb-6" size="lg" />
<Loader className="h-23" /> <Loader className="h-23" />
<h2 className="mt-2 text-center text-2xl font-bold text-white drop-shadow-lg md:text-3xl"> <h2 className="mt-2 text-center text-2xl font-bold text-white drop-shadow-lg md:text-3xl">
Loading... Loading...
@@ -38,7 +37,7 @@ const AuthLayout = ({ children }: PropsWithChildren) => {
<div className="bg-primary/15 absolute -right-[15vmin] -bottom-[15vmin] min-h-[75vmin] min-w-[75vmin] rotate-45"></div> <div className="bg-primary/15 absolute -right-[15vmin] -bottom-[15vmin] min-h-[75vmin] min-w-[75vmin] rotate-45"></div>
</div> </div>
<Image src={logo} className="mb-6 h-32" alt="logo" /> <BrandHeading className="mb-6" size="lg" />
{children} {children}
</section> </section>
) )

View File

@@ -5,18 +5,28 @@ import clsx from "clsx"
type Props = { type Props = {
className?: string className?: string
size?: "md" | "lg"
} }
const BrandHeading = ({ className }: Props) => { const BrandHeading = ({ className, size = "lg" }: Props) => {
const { brandName } = useThemeStore() const { brandName } = useThemeStore()
const label = brandName || "Rahoot!" const label = brandName || "Rahoot!"
const sizeClass =
size === "lg"
? "text-4xl md:text-5xl"
: "text-2xl md:text-3xl"
return ( return (
<div className={clsx("text-center", className)}> <div
<div className="inline-flex rounded-md bg-white/90 px-4 py-2 text-3xl font-black text-[#f7931e] shadow-sm"> className={clsx(
"text-center font-black tracking-tight text-[#f7931e] drop-shadow-lg",
sizeClass,
className,
)}
>
{label} {label}
</div> </div>
</div>
) )
} }

View File

@@ -1,7 +1,6 @@
import Button from "@rahoot/web/components/Button" import Button from "@rahoot/web/components/Button"
import Form from "@rahoot/web/components/Form" import Form from "@rahoot/web/components/Form"
import Input from "@rahoot/web/components/Input" import Input from "@rahoot/web/components/Input"
import BrandHeading from "@rahoot/web/components/BrandHeading"
import { useEvent } from "@rahoot/web/contexts/socketProvider" import { useEvent } from "@rahoot/web/contexts/socketProvider"
import { KeyboardEvent, useState } from "react" import { KeyboardEvent, useState } from "react"
import toast from "react-hot-toast" import toast from "react-hot-toast"
@@ -28,9 +27,7 @@ const ManagerPassword = ({ onSubmit }: Props) => {
}) })
return ( return (
<div className="flex w-full max-w-xl flex-col items-center gap-6"> <Form className="w-full max-w-xl">
<BrandHeading />
<Form>
<Input <Input
type="password" type="password"
onChange={(e) => setPassword(e.target.value)} onChange={(e) => setPassword(e.target.value)}
@@ -39,7 +36,6 @@ const ManagerPassword = ({ onSubmit }: Props) => {
/> />
<Button onClick={handleSubmit}>Submit</Button> <Button onClick={handleSubmit}>Submit</Button>
</Form> </Form>
</div>
) )
} }

View File

@@ -1,11 +1,9 @@
"use client" "use client"
import BrandHeading from "@rahoot/web/components/BrandHeading"
import { PropsWithChildren } from "react" import { PropsWithChildren } from "react"
const BrandShell = ({ children }: PropsWithChildren) => ( const BrandShell = ({ children }: PropsWithChildren) => (
<div className="flex min-h-screen flex-col items-center justify-center gap-6 px-4"> <div className="flex min-h-screen flex-col items-center justify-center gap-6 px-4">
<BrandHeading />
{children} {children}
</div> </div>
) )