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
All checks were successful
Deploy App / docker (ubuntu-latest) (push) Successful in 1m1s
This commit is contained in:
parent
fa7d3c5ea4
commit
f5203f9742
@ -63,8 +63,7 @@ export default async function Page(): Promise<JSX.Element> {
|
|||||||
const endpointsSize = Object.entries(endpoints).length;
|
const endpointsSize = Object.entries(endpoints).length;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="flex justify-center text-center">
|
<Card className="w-full xs:w-fit text-center">
|
||||||
<Card className="w-max xs:w-fit">
|
|
||||||
<h1 className="text-xl">Mojang Status</h1>
|
<h1 className="text-xl">Mojang Status</h1>
|
||||||
<p>The current status of Mojang Services</p>
|
<p>The current status of Mojang Services</p>
|
||||||
|
|
||||||
@ -98,6 +97,5 @@ export default async function Page(): Promise<JSX.Element> {
|
|||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
</Card>
|
</Card>
|
||||||
</div>
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -37,7 +37,7 @@ export default function Home(): JSX.Element {
|
|||||||
{buttons.map((button, index) => {
|
{buttons.map((button, index) => {
|
||||||
return (
|
return (
|
||||||
<Tooltip key={index}>
|
<Tooltip key={index}>
|
||||||
<TooltipTrigger>
|
<TooltipTrigger asChild>
|
||||||
<Button key={index}>
|
<Button key={index}>
|
||||||
<Link href={button.url} target={button.openInNewTab ? "_blank" : ""}>
|
<Link href={button.url} target={button.openInNewTab ? "_blank" : ""}>
|
||||||
<p>{button.title}</p>
|
<p>{button.title}</p>
|
||||||
|
@ -51,7 +51,7 @@ function checkPlatform(platform: ServerPlatform): boolean {
|
|||||||
|
|
||||||
export async function generateMetadata({ params: { platform, hostname } }: Params): Promise<Metadata> {
|
export async function generateMetadata({ params: { platform, hostname } }: Params): Promise<Metadata> {
|
||||||
try {
|
try {
|
||||||
if (checkPlatform(platform) === false) {
|
if (!checkPlatform(platform)) {
|
||||||
// Invalid platform
|
// Invalid platform
|
||||||
return generateEmbed({
|
return generateEmbed({
|
||||||
title: "Server Not Found",
|
title: "Server Not Found",
|
||||||
|
@ -6,9 +6,9 @@ export default function Container({
|
|||||||
children: React.ReactNode;
|
children: React.ReactNode;
|
||||||
}>): JSX.Element {
|
}>): JSX.Element {
|
||||||
return (
|
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 />
|
<NavBar />
|
||||||
<div className="w-full flex-1 p-4">{children}</div>
|
<div className="w-full flex m-4 justify-center">{children}</div>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -11,7 +11,7 @@ type Page = {
|
|||||||
const pages: Page[] = [
|
const pages: Page[] = [
|
||||||
{ title: "Player", url: "/player" },
|
{ title: "Player", url: "/player" },
|
||||||
{ title: "Server", url: "/server/java" },
|
{ title: "Server", url: "/server/java" },
|
||||||
{ title: "Mojang Status", url: "/mojang/status" },
|
{ title: "Mojang", url: "/mojang/status" },
|
||||||
];
|
];
|
||||||
|
|
||||||
export default function NavBar(): JSX.Element {
|
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()}>
|
<form className="flex gap-2 justify-center mt-2" action="" onSubmit={(event) => event.preventDefault()}>
|
||||||
<Input
|
<Input
|
||||||
className="w-fit"
|
className="w-fit"
|
||||||
|
type="search"
|
||||||
|
name="query"
|
||||||
placeholder="Name / UUID"
|
placeholder="Name / UUID"
|
||||||
value={id}
|
value={id}
|
||||||
onChange={(event) => {
|
onChange={(event) => {
|
||||||
|
@ -70,7 +70,15 @@ export function LookupServer(): JSX.Element {
|
|||||||
action=""
|
action=""
|
||||||
onSubmit={(event) => event.preventDefault()}
|
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">
|
<div className="flex gap-2 justify-center">
|
||||||
<LookupButton platform={ServerPlatform.Java} />
|
<LookupButton platform={ServerPlatform.Java} />
|
||||||
<LookupButton platform={ServerPlatform.Bedrock} />
|
<LookupButton platform={ServerPlatform.Bedrock} />
|
||||||
|
Loading…
Reference in New Issue
Block a user