metadata, page title, minor changes

This commit is contained in:
Cypro Freelance 2024-07-28 20:17:09 +05:30
parent 406e4562f0
commit 98c97d2434
10 changed files with 81 additions and 16 deletions

View file

@ -13,7 +13,7 @@ const MobileNav = () => {
return (
<header className="header">
<Link href="/" className="flex items-center gap-2 md:py-2">
<Logo width={180} height={28} />
<Logo width={120} height={40} />
</Link>
<nav className="flex gap-2">
@ -23,7 +23,7 @@ const MobileNav = () => {
</SheetTrigger>
<SheetContent className="sheet-content sm:w-64">
<>
<Image src="/logo.svg" alt="" width={152} height={23} />
<Logo width={155} height={53} />
<ul className="header-nav_elements">
{AdminLinks.slice(0, 6).map((link) => {
const isActive = link.url === pathname;

View file

@ -12,7 +12,7 @@ const Sidebar = () => {
<aside className="sidebar">
<div className="flex size-full flex-col gap-4">
<Link href="/" className="sidebar-logo">
<Logo width={180} height={28} />
<Logo width={155} height={53} />
</Link>
<nav className="sidebar-nav">

View file

@ -0,0 +1,9 @@
import type { Metadata } from "next";
export const metadata: Metadata = {
title: "Admin // Changelogs",
};
export default function logPages({ children }: { children: React.ReactNode }) {
return <>{children}</>;
}

View file

@ -0,0 +1,9 @@
import type { Metadata } from "next";
export const metadata: Metadata = {
title: "Admin // Downloads",
};
export default function logPages({ children }: { children: React.ReactNode }) {
return <>{children}</>;
}

View file

@ -0,0 +1,9 @@
import type { Metadata } from "next";
export const metadata: Metadata = {
title: "Admin // Mods",
};
export default function logPages({ children }: { children: React.ReactNode }) {
return <>{children}</>;
}

View file

@ -0,0 +1,9 @@
import type { Metadata } from "next";
export const metadata: Metadata = {
title: "Admin // MultiLogs",
};
export default function logPages({ children }: { children: React.ReactNode }) {
return <>{children}</>;
}

View file

@ -2,6 +2,7 @@
import { Skeleton } from "@/components/ui/skeleton";
import React, { useEffect, useState } from "react";
import ReactMarkdown from "react-markdown";
import Head from "next/head";
const Page = ({ params }: { params: { slug: string } }) => {
const { slug } = params;
@ -18,9 +19,11 @@ const Page = ({ params }: { params: { slug: string } }) => {
if (response.ok) {
const data = await response.json();
setPage(data);
return (document.title = `${data.title} | SVRJS`);
} else {
if (response.status === 404) {
setNotFound(true);
return (document.title = "404 Not Found");
}
}
} catch (error) {
@ -68,14 +71,16 @@ const Page = ({ params }: { params: { slug: string } }) => {
}
return (
<section className="wrapper container py-24 md:py-28 gap-4 flex flex-col">
<h1 className="text-3xl md:text-5xl font-bold text-black dark:bg-clip-text dark:text-transparent dark:bg-gradient-to-b dark:from-white dark:to-neutral-400">
{page.title}
</h1>
<ReactMarkdown className="prose max-w-full prose-lg dark:prose-invert">
{page.content}
</ReactMarkdown>
</section>
<>
<section className="wrapper container py-24 md:py-28 gap-4 flex flex-col">
<h1 className="text-3xl md:text-5xl font-bold text-black dark:bg-clip-text dark:text-transparent dark:bg-gradient-to-b dark:from-white dark:to-neutral-400">
{page.title}
</h1>
<ReactMarkdown className="prose max-w-full prose-lg dark:prose-invert">
{page.content}
</ReactMarkdown>
</section>
</>
);
};

View file

@ -3,9 +3,33 @@ import Navbar from "@/components/shared/Navbar";
import { Metadata } from "next";
export const metadata: Metadata = {
title: "SVRJS - A Web Server running on Nodejs",
title: "SVRJS - A Web Server running on Node.js",
description:
"Experience unparalleled flexibility with SVR.JS - the ultimate web server for Node.js. Host web pages, run server-side JavaScript, utilize mods for extended functionality, and more. Integrated log viewer and user management tools included. Also supports Bun (experimental).",
openGraph: {
title: "SVRJS - A Web Server running on Node.js",
description:
"Experience unparalleled flexibility with SVR.JS - the ultimate web server for Node.js. Host web pages, run server-side JavaScript, utilize mods for extended functionality, and more. Integrated log viewer and user management tools included. Also supports Bun (experimental).",
url: "https://yourwebsite.com",
type: "website",
images: [
{
url: "https://yourwebsite.com/og-image.jpg",
width: 800,
height: 600,
alt: "SVRJS - A Web Server running on Node.js",
},
],
},
twitter: {
card: "summary_large_image",
site: "@SVR_JS",
title: "SVRJS - A Web Server running on Node.js",
description:
"Experience unparalleled flexibility with SVR.JS - the ultimate web server for Node.js. Host web pages, run server-side JavaScript, utilize mods for extended functionality, and more. Integrated log viewer and user management tools included. Also supports Bun (experimental).",
images: "/logo.svg",
},
};
export default function PageLayout({
children,
}: {

View file

@ -65,7 +65,7 @@ const Hero = () => {
</AnimatedGradientText>
<main className="text-5xl md:text-6xl font-bold">
<h1 className="inline custom-title">
<span className="bg-primary bg-clip-text text-transparent dark:bg-gradient-to-r dark:from-green-300 dark:to-primary">
<span className="bg-primary bg-clip-text text-transparent bg-gradient-to-r from-green-300 to-primary">
Simplify
</span>{" "}
your server logic performance

View file

@ -30,9 +30,9 @@ export const NAVBAR = {
label: "Blog",
},
{
href: "/contact",
href: "/forum",
target: "_self",
label: "Contact",
label: "Forum",
},
],
rightLinks: [