make mojang status card the whole width of the screen on mobile
All checks were successful
Deploy App / docker (ubuntu-latest) (push) Successful in 1m1s

This commit is contained in:
Lee 2024-04-17 23:29:11 +01:00
parent fa7d3c5ea4
commit f5203f9742
7 changed files with 49 additions and 41 deletions

@ -63,8 +63,7 @@ export default async function Page(): Promise<JSX.Element> {
const endpointsSize = Object.entries(endpoints).length;
return (
<div className="flex justify-center text-center">
<Card className="w-max xs:w-fit">
<Card className="w-full xs:w-fit text-center">
<h1 className="text-xl">Mojang Status</h1>
<p>The current status of Mojang Services</p>
@ -98,6 +97,5 @@ export default async function Page(): Promise<JSX.Element> {
)}
</div>
</Card>
</div>
);
}

@ -37,7 +37,7 @@ export default function Home(): JSX.Element {
{buttons.map((button, index) => {
return (
<Tooltip key={index}>
<TooltipTrigger>
<TooltipTrigger asChild>
<Button key={index}>
<Link href={button.url} target={button.openInNewTab ? "_blank" : ""}>
<p>{button.title}</p>

@ -51,7 +51,7 @@ function checkPlatform(platform: ServerPlatform): boolean {
export async function generateMetadata({ params: { platform, hostname } }: Params): Promise<Metadata> {
try {
if (checkPlatform(platform) === false) {
if (!checkPlatform(platform)) {
// Invalid platform
return generateEmbed({
title: "Server Not Found",

@ -6,9 +6,9 @@ export default function Container({
children: React.ReactNode;
}>): JSX.Element {
return (
<div className="z-[9999] m-auto flex h-screen min-h-full flex-col items-center opacity-90 xs:max-w-[1200px]">
<div className="z-[9999] m-auto flex h-screen min-h-full flex-col items-center opacity-90 w-full xs:max-w-[1200px]">
<NavBar />
<div className="w-full flex-1 p-4">{children}</div>
<div className="w-full flex m-4 justify-center">{children}</div>
</div>
);
}

@ -11,7 +11,7 @@ type Page = {
const pages: Page[] = [
{ title: "Player", url: "/player" },
{ title: "Server", url: "/server/java" },
{ title: "Mojang Status", url: "/mojang/status" },
{ title: "Mojang", url: "/mojang/status" },
];
export default function NavBar(): JSX.Element {

@ -40,6 +40,8 @@ export function LookupPlayer(): JSX.Element {
<form className="flex gap-2 justify-center mt-2" action="" onSubmit={(event) => event.preventDefault()}>
<Input
className="w-fit"
type="search"
name="query"
placeholder="Name / UUID"
value={id}
onChange={(event) => {

@ -70,7 +70,15 @@ export function LookupServer(): JSX.Element {
action=""
onSubmit={(event) => event.preventDefault()}
>
<Input className="w-fit" placeholder="Hostname" value={hostname} onChange={setHostnameValue} maxLength={128} />
<Input
className="w-fit"
type="search"
name="query"
placeholder="Hostname"
value={hostname}
onChange={setHostnameValue}
maxLength={128}
/>
<div className="flex gap-2 justify-center">
<LookupButton platform={ServerPlatform.Java} />
<LookupButton platform={ServerPlatform.Bedrock} />