minor changes pt1

This commit is contained in:
Cypro Freelance 2024-08-01 20:02:57 +05:30
parent 133b894d2f
commit 41f190d5bf
15 changed files with 224 additions and 20 deletions

View file

@ -17,7 +17,7 @@ const Sidebar = () => {
<nav className="sidebar-nav"> <nav className="sidebar-nav">
<ul className="sidebar-nav_elements"> <ul className="sidebar-nav_elements">
{AdminLinks.slice(0, 5).map((link) => { {AdminLinks.slice(0, 6).map((link) => {
const isActive = link.url === pathname; const isActive = link.url === pathname;
return ( return (
@ -37,7 +37,7 @@ const Sidebar = () => {
</ul> </ul>
<ul className="sidebar-nav_elements"> <ul className="sidebar-nav_elements">
{AdminLinks.slice(5).map((link) => { {AdminLinks.slice(6).map((link) => {
const isActive = link.url === pathname; const isActive = link.url === pathname;
return ( return (

View file

@ -1,5 +1,6 @@
import React from "react"; import React from "react";
import Card from "../_components/Card"; import Card from "../_components/Card";
import { AdminDashboardLINKS } from "@/constants";
const AdminPage = () => { const AdminPage = () => {
return ( return (
@ -8,11 +9,9 @@ const AdminPage = () => {
<h1 className="h2-bold py-6">Admin Page</h1> <h1 className="h2-bold py-6">Admin Page</h1>
<div className="grid lg:grid-cols-2 grid-cols-1 gap-4 "> <div className="grid lg:grid-cols-2 grid-cols-1 gap-4 ">
<Card title="Downloads" url="/admin/downloads" /> {AdminDashboardLINKS.map((item, idx) => (
<Card title="Mods" url="/admin/mods" /> <Card key={idx} title={item.label} url={item.url} />
<Card title="Logs" url="/admin/changelogs" /> ))}
<Card title="MultiLogs" url="/admin/multi-logs" />
<Card title="Vulnerabilities" url="/admin/vulnerabilities" />
</div> </div>
</section> </section>
</> </>

View file

@ -19,7 +19,7 @@ const Page = ({ params }: { params: { slug: string } }) => {
if (response.ok) { if (response.ok) {
const data = await response.json(); const data = await response.json();
setPage(data); setPage(data);
return (document.title = `${data.title} Change Log | SVRJS`); return (document.title = `${data.title} Change Log - SVRJS`);
} else { } else {
if (response.status === 404) { if (response.status === 404) {
setNotFound(true); setNotFound(true);
@ -38,6 +38,7 @@ const Page = ({ params }: { params: { slug: string } }) => {
}, [slug]); }, [slug]);
if (loading) { if (loading) {
document.title = "Mods Change Logs - SVRJS";
return ( return (
<section className="wrapper container py-24 md:py-28 gap-4 flex flex-col"> <section className="wrapper container py-24 md:py-28 gap-4 flex flex-col">
<div className="mb-3"> <div className="mb-3">

View file

@ -54,6 +54,7 @@ const LogsPage: React.FC = () => {
const reversedDownloads = [...downloads].reverse(); const reversedDownloads = [...downloads].reverse();
if (loading) { if (loading) {
document.title = "Change Logs - SVRJS";
return ( return (
<section className="wrapper container py-24 md:py-28 gap-4 flex flex-col"> <section className="wrapper container py-24 md:py-28 gap-4 flex flex-col">
<div className="mb-3"> <div className="mb-3">

View file

@ -0,0 +1,37 @@
import { Metadata } from "next";
// baseURL [ENV]
export const metadata: Metadata = {
title: "Contact Us - SVRJS",
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://svrjs.org",
type: "website",
images: [
{
url: "https://svrjs.vercel.app/metadata/svrjs-cover.png",
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: ["https://svrjs.vercel.app/metadata/svrjs-cover.png"],
creator: "@SVR_JS",
},
};
const ContactLayout = ({ children }: { children: React.ReactNode }) => {
return <main>{children}</main>;
};
export default ContactLayout;

View file

@ -2,10 +2,36 @@ import ReactMarkdown from "react-markdown";
import { contribute } from "@/constants/guidelines"; import { contribute } from "@/constants/guidelines";
import { Metadata } from "next"; import { Metadata } from "next";
// baseURL [ENV]
export const metadata: Metadata = { export const metadata: Metadata = {
title: "Contribute - SVRJS", title: "Contribute - SVRJS",
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://svrjs.org",
type: "website",
images: [
{
url: "https://svrjs.vercel.app/metadata/svrjs-cover.png",
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: ["https://svrjs.vercel.app/metadata/svrjs-cover.png"],
creator: "@SVR_JS",
},
}; };
const Contribute = () => { const Contribute = () => {
return ( return (
<section <section

View file

@ -1,7 +1,34 @@
import { Metadata } from "next"; import { Metadata } from "next";
// baseURL [ENV]
export const metadata: Metadata = { export const metadata: Metadata = {
title: "Downloads - SVRJS", title: "Downloads - SVRJS",
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://svrjs.org",
type: "website",
images: [
{
url: "https://svrjs.vercel.app/metadata/svrjs-cover.png",
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: ["https://svrjs.vercel.app/metadata/svrjs-cover.png"],
creator: "@SVR_JS",
},
}; };
export default function DownloadLayout({ export default function DownloadLayout({

View file

@ -32,6 +32,7 @@ export const metadata: Metadata = {
creator: "@SVR_JS", creator: "@SVR_JS",
}, },
}; };
export default function PageLayout({ export default function PageLayout({
children, children,
}: { }: {

View file

@ -1,9 +1,35 @@
import { Metadata } from "next"; import { Metadata } from "next";
// baseURL [ENV]
export const metadata: Metadata = { export const metadata: Metadata = {
title: "MOD - SVRJS", title: "Mods - SVRJS",
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://svrjs.org",
type: "website",
images: [
{
url: "https://svrjs.vercel.app/metadata/svrjs-cover.png",
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: ["https://svrjs.vercel.app/metadata/svrjs-cover.png"],
creator: "@SVR_JS",
},
}; };
const ModLayout = ({ children }: { children: React.ReactNode }) => { const ModLayout = ({ children }: { children: React.ReactNode }) => {
return <main>{children}</main>; return <main>{children}</main>;
}; };

View file

@ -4,8 +4,35 @@ import ReactMarkdown from "react-markdown";
import { Metadata } from "next"; import { Metadata } from "next";
// baseURL [ENV]
export const metadata: Metadata = { export const metadata: Metadata = {
title: "Privacy Policy - SVRJS", title: "Privacy Policy - SVRJS",
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://svrjs.org",
type: "website",
images: [
{
url: "https://svrjs.vercel.app/metadata/svrjs-cover.png",
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: ["https://svrjs.vercel.app/metadata/svrjs-cover.png"],
creator: "@SVR_JS",
},
}; };
const PrivacyPolicy = () => { const PrivacyPolicy = () => {

View file

@ -2,8 +2,35 @@ import ReactMarkdown from "react-markdown";
import { TERMS_AND_CONDITIONS } from "@/constants/guidelines"; import { TERMS_AND_CONDITIONS } from "@/constants/guidelines";
import { Metadata } from "next"; import { Metadata } from "next";
// baseURL [ENV]
export const metadata: Metadata = { export const metadata: Metadata = {
title: "Terms Of Service - SVRJS", title: "Terms of Service - SVRJS",
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://svrjs.org",
type: "website",
images: [
{
url: "https://svrjs.vercel.app/metadata/svrjs-cover.png",
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: ["https://svrjs.vercel.app/metadata/svrjs-cover.png"],
creator: "@SVR_JS",
},
}; };
const TermsOfService = () => { const TermsOfService = () => {
@ -13,7 +40,7 @@ const TermsOfService = () => {
className="wrapper container py-24 md:py-28 gap-2 flex flex-col" className="wrapper container py-24 md:py-28 gap-2 flex flex-col"
> >
<h1 className="text-3xl md:text-5xl pb-1 md:pb-2 font-bold text-black dark:bg-clip-text dark:text-transparent dark:bg-gradient-to-b dark:from-white dark:to-neutral-400"> <h1 className="text-3xl md:text-5xl pb-1 md:pb-2 font-bold text-black dark:bg-clip-text dark:text-transparent dark:bg-gradient-to-b dark:from-white dark:to-neutral-400">
Terms and Conditions Terms Of Service
</h1> </h1>
<p className="md:text-lg text-muted-foreground text-start mb-6"> <p className="md:text-lg text-muted-foreground text-start mb-6">
Last updated: 24.04.2024 Last updated: 24.04.2024

View file

@ -37,7 +37,7 @@ const Vulnerabilities = () => {
if (response.ok) { if (response.ok) {
const data: Vulnerabilities[] = await response.json(); const data: Vulnerabilities[] = await response.json();
setDownloads(data); setDownloads(data);
document.title = "Vulnerabilities | SVRJS"; document.title = "Vulnerabilities - SVRJS";
} else { } else {
throw new Error(`HTTP error! status: ${response.status}`); throw new Error(`HTTP error! status: ${response.status}`);
} }
@ -60,7 +60,7 @@ const Vulnerabilities = () => {
(mod) => mod.vulnerabilities && mod.vulnerabilities.trim() !== "" (mod) => mod.vulnerabilities && mod.vulnerabilities.trim() !== ""
); );
setMods(filteredMods); setMods(filteredMods);
document.title = "Vulnerabilities | SVRJS"; document.title = "Vulnerabilities - SVRJS";
} else { } else {
throw new Error(`HTTP error! status: ${response.status}`); throw new Error(`HTTP error! status: ${response.status}`);
} }
@ -86,6 +86,7 @@ const Vulnerabilities = () => {
const reversedMods = [...mods].reverse(); const reversedMods = [...mods].reverse();
if (loading) { if (loading) {
document.title = "Vulnerabilities - SVRJS";
return ( return (
<section className="wrapper container py-24 md:py-28 gap-4 flex flex-col"> <section className="wrapper container py-24 md:py-28 gap-4 flex flex-col">
<div className="mb-3"> <div className="mb-3">
@ -121,7 +122,7 @@ const Vulnerabilities = () => {
{reversedDownloads.map((download) => ( {reversedDownloads.map((download) => (
<div <div
key={download._id} key={download._id}
className="flex-start flex-col prose dark:prose-invert mb-4 gap-4" className="flex-start flex-col prose dark:prose-invert gap-4"
> >
<h2 className="font-semibold text-3xl -mb-2">{download.version}</h2> <h2 className="font-semibold text-3xl -mb-2">{download.version}</h2>
<ul className="list-disc pl-5"> <ul className="list-disc pl-5">
@ -132,7 +133,7 @@ const Vulnerabilities = () => {
</div> </div>
))} ))}
<div className="prose max-w-full md:prose-lg dark:prose-invert"> <div className="prose max-w-full md:prose-lg dark:prose-invert mb-6 md:mb-9">
<ReactMarkdown>{VULNERABILITY}</ReactMarkdown> <ReactMarkdown>{VULNERABILITY}</ReactMarkdown>
</div> </div>
@ -140,7 +141,7 @@ const Vulnerabilities = () => {
{reversedMods.map((mod) => ( {reversedMods.map((mod) => (
<div <div
key={mod._id} key={mod._id}
className="flex-start flex-col prose dark:prose-invert my-6 md:my-9 gap-4" className="flex-start flex-col my-6 md:my-9 gap-4 w-full"
> >
<h2 className="text-2xl md:text-3xl py-1 md:py-2 font-bold text-black dark:bg-clip-text dark:text-transparent dark:bg-gradient-to-b dark:from-white dark:to-neutral-400 -mb-1"> <h2 className="text-2xl md:text-3xl py-1 md:py-2 font-bold text-black dark:bg-clip-text dark:text-transparent dark:bg-gradient-to-b dark:from-white dark:to-neutral-400 -mb-1">
{mod.title} {mod.title}

BIN
bun.lockb

Binary file not shown.

View file

@ -2,6 +2,7 @@ import {
BadgeAlert, BadgeAlert,
BarChart4, BarChart4,
Bug, Bug,
BugIcon,
Cog, Cog,
File, File,
Mail, Mail,
@ -150,6 +151,7 @@ export const FOOTERLINKS = {
additional: [ additional: [
{ href: "/contribute", label: "Contribute" }, { href: "/contribute", label: "Contribute" },
{ href: "/vulnerabilities", label: "Vulnerabilities" }, { href: "/vulnerabilities", label: "Vulnerabilities" },
{ href: "https://git.svrjs.org", label: "Git Server" },
{ href: "http://status.svrjs.org", label: "Server Uptime" }, { href: "http://status.svrjs.org", label: "Server Uptime" },
], ],
social: { social: {
@ -198,6 +200,11 @@ export const AdminLinks = [
url: "/admin/multi-logs", url: "/admin/multi-logs",
icon: File, icon: File,
}, },
{
name: "Vulnerabilities",
url: "/admin/vulnerabilities",
icon: BugIcon,
},
{ {
name: "Back Home", name: "Back Home",
url: "/", url: "/",
@ -205,6 +212,29 @@ export const AdminLinks = [
}, },
]; ];
export const AdminDashboardLINKS = [
{
label: "Downloads",
url: "/admin/downloads",
},
{
label: "SVRJS Mods",
url: "/admin/mods",
},
{
label: "Change Logs",
url: "/admin/changelogs",
},
{
label: "MultiLogs",
url: "/admin/multi-logs",
},
{
label: "Vulnerabilities",
url: "/admin/vulnerabilities",
},
];
// contact page emails // contact page emails
export const emails = [ export const emails = [
{ {

View file

@ -11,6 +11,7 @@
}, },
"dependencies": { "dependencies": {
"@hookform/resolvers": "^3.6.0", "@hookform/resolvers": "^3.6.0",
"@mdx-js/mdx": "^3.0.1",
"@radix-ui/react-accordion": "^1.1.2", "@radix-ui/react-accordion": "^1.1.2",
"@radix-ui/react-dialog": "^1.1.1", "@radix-ui/react-dialog": "^1.1.1",
"@radix-ui/react-dropdown-menu": "^2.1.1", "@radix-ui/react-dropdown-menu": "^2.1.1",