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

View file

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

View file

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

View file

@ -54,6 +54,7 @@ const LogsPage: React.FC = () => {
const reversedDownloads = [...downloads].reverse();
if (loading) {
document.title = "Change Logs - SVRJS";
return (
<section className="wrapper container py-24 md:py-28 gap-4 flex flex-col">
<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 { Metadata } from "next";
// baseURL [ENV]
export const metadata: Metadata = {
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 = () => {
return (
<section

View file

@ -1,7 +1,34 @@
import { Metadata } from "next";
// baseURL [ENV]
export const metadata: Metadata = {
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({

View file

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

View file

@ -1,11 +1,37 @@
import { Metadata } from "next";
// baseURL [ENV]
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 }) => {
return <main>{children}</main>;
return <main>{children}</main>;
};
export default ModLayout;

View file

@ -4,8 +4,35 @@ import ReactMarkdown from "react-markdown";
import { Metadata } from "next";
// baseURL [ENV]
export const metadata: Metadata = {
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 = () => {

View file

@ -2,8 +2,35 @@ import ReactMarkdown from "react-markdown";
import { TERMS_AND_CONDITIONS } from "@/constants/guidelines";
import { Metadata } from "next";
// baseURL [ENV]
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 = () => {
@ -13,7 +40,7 @@ const TermsOfService = () => {
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">
Terms and Conditions
Terms Of Service
</h1>
<p className="md:text-lg text-muted-foreground text-start mb-6">
Last updated: 24.04.2024

View file

@ -37,7 +37,7 @@ const Vulnerabilities = () => {
if (response.ok) {
const data: Vulnerabilities[] = await response.json();
setDownloads(data);
document.title = "Vulnerabilities | SVRJS";
document.title = "Vulnerabilities - SVRJS";
} else {
throw new Error(`HTTP error! status: ${response.status}`);
}
@ -60,7 +60,7 @@ const Vulnerabilities = () => {
(mod) => mod.vulnerabilities && mod.vulnerabilities.trim() !== ""
);
setMods(filteredMods);
document.title = "Vulnerabilities | SVRJS";
document.title = "Vulnerabilities - SVRJS";
} else {
throw new Error(`HTTP error! status: ${response.status}`);
}
@ -86,6 +86,7 @@ const Vulnerabilities = () => {
const reversedMods = [...mods].reverse();
if (loading) {
document.title = "Vulnerabilities - SVRJS";
return (
<section className="wrapper container py-24 md:py-28 gap-4 flex flex-col">
<div className="mb-3">
@ -121,7 +122,7 @@ const Vulnerabilities = () => {
{reversedDownloads.map((download) => (
<div
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>
<ul className="list-disc pl-5">
@ -132,7 +133,7 @@ const Vulnerabilities = () => {
</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>
</div>
@ -140,13 +141,13 @@ const Vulnerabilities = () => {
{reversedMods.map((mod) => (
<div
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">
{mod.title}
</h2>
{mod.vulnerabilities && (
<div className="prose max-w-full md:prose-lg dark:prose-invert">
<div className="prose max-w-full md:prose-lg dark:prose-invert ">
<ReactMarkdown>{mod.vulnerabilities}</ReactMarkdown>
</div>
)}

BIN
bun.lockb

Binary file not shown.

View file

@ -2,6 +2,7 @@ import {
BadgeAlert,
BarChart4,
Bug,
BugIcon,
Cog,
File,
Mail,
@ -150,6 +151,7 @@ export const FOOTERLINKS = {
additional: [
{ href: "/contribute", label: "Contribute" },
{ href: "/vulnerabilities", label: "Vulnerabilities" },
{ href: "https://git.svrjs.org", label: "Git Server" },
{ href: "http://status.svrjs.org", label: "Server Uptime" },
],
social: {
@ -198,6 +200,11 @@ export const AdminLinks = [
url: "/admin/multi-logs",
icon: File,
},
{
name: "Vulnerabilities",
url: "/admin/vulnerabilities",
icon: BugIcon,
},
{
name: "Back Home",
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
export const emails = [
{

View file

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