From 6e4e510e2e24b11afc95d6cdc64d81a59370b571 Mon Sep 17 00:00:00 2001 From: Cypro Freelance <110410268+Proxyy587@users.noreply.github.com> Date: Wed, 26 Jun 2024 00:17:24 +0530 Subject: [PATCH] PR #1 by SVRJS --- app/globals.css | 34 ++-- components/shared/Footer.tsx | 257 ++++++++++++++++++--------- components/shared/Hero.tsx | 294 +++++++++++++++---------------- components/shared/MobileNav.tsx | 150 ++++++++-------- components/shared/Navbar.tsx | 242 ++++++++++++++++--------- components/ui/icons.tsx | 303 +++++++++++--------------------- pages/_app.js | 11 -- pages/_app.tsx | 23 +++ pages/globals.css | 7 + public/logo.svg | 11 +- public/logodark.svg | 11 +- theme.config.tsx | 143 +++++++++++---- tsconfig.json | 2 +- 13 files changed, 812 insertions(+), 676 deletions(-) delete mode 100644 pages/_app.js create mode 100644 pages/_app.tsx create mode 100644 pages/globals.css diff --git a/app/globals.css b/app/globals.css index 756e519..6aa6ba4 100644 --- a/app/globals.css +++ b/app/globals.css @@ -1,5 +1,3 @@ -@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@400;600;700;900&display=swap"); - @tailwind base; @tailwind components; @tailwind utilities; @@ -7,7 +5,20 @@ html { height: 100%; width: 100%; - font-family: "Poppins" sans-serif; + font-family: "Poppins", sans-serif; + overflow-x: hidden; +} + +body { + user-select: text; + overflow-x: clip; +} + +* { + list-style: none; + padding: 0; + margin: 0; + scroll-behavior: smooth; } @layer base { @@ -61,23 +72,6 @@ html { } } -* { - list-style: none; - padding: 0; - margin: 0; - scroll-behavior: smooth; -} - -html { - overflow-x: hidden; -} - -body { - font-family: var(--font-poppins); - user-select: text; - overflow-x: clip; -} - @layer base { * { @apply border-border; diff --git a/components/shared/Footer.tsx b/components/shared/Footer.tsx index 1797c90..5d01bc6 100644 --- a/components/shared/Footer.tsx +++ b/components/shared/Footer.tsx @@ -5,92 +5,177 @@ import Iconss from "../ui/icons"; import { FOOTERLINKS } from "@/constants"; const Footer = () => { - return ( - <> - - - ); + return ( + <> + + + ); }; export default Footer; diff --git a/components/shared/Hero.tsx b/components/shared/Hero.tsx index 515931a..43a1b7f 100644 --- a/components/shared/Hero.tsx +++ b/components/shared/Hero.tsx @@ -11,162 +11,158 @@ import { cn } from "@/lib/utils"; import Image from "next/image"; const happyMonkey = Happy_Monkey({ - preload: true, - weight: ["400"], - subsets: ["latin"], + preload: true, + weight: ["400"], + subsets: ["latin"], }); const Hero = () => { - const [isCopied, setIsCopied] = useState(false); - const [command, setCommand] = useState( - "curl -fsSL https://downloads.svrjs.org/installer/svr.js.installer.linux.20240509.sh > /tmp/installer.sh && sudo bash /tmp/installer.sh" - ); - const [selectedButton, setSelectedButton] = useState<"linux" | "docker">( - "linux" - ); + const [isCopied, setIsCopied] = useState(false); + const [command, setCommand] = useState( + "curl -fsSL https://downloads.svrjs.org/installer/svr.js.installer.linux.20240509.sh > /tmp/installer.sh && sudo bash /tmp/installer.sh" + ); + const [selectedButton, setSelectedButton] = useState<"linux" | "docker">( + "linux" + ); - const commands = { - linux: - "curl -fsSL https://downloads.svrjs.org/installer/svr.js.installer.linux.20240509.sh > /tmp/installer.sh && sudo bash /tmp/installer.sh", - docker: - "docker pull svrjs/svrjs && docker run --name mysvrjs -d -p 80:80 --restart=always svrjs/svrjs", - }; + const commands = { + linux: + "curl -fsSL https://downloads.svrjs.org/installer/svr.js.installer.linux.20240509.sh > /tmp/installer.sh && sudo bash /tmp/installer.sh", + docker: + "docker pull svrjs/svrjs && docker run --name mysvrjs -d -p 80:80 --restart=always svrjs/svrjs", + }; - const copyToClipboard = () => { - navigator.clipboard.writeText(command); - setIsCopied(true); - setTimeout(() => setIsCopied(false), 2000); - }; + const copyToClipboard = () => { + navigator.clipboard.writeText(command); + setIsCopied(true); + setTimeout(() => setIsCopied(false), 2000); + }; - const handleButtonClick = (type: "linux" | "docker") => { - setCommand(commands[type]); - setSelectedButton(type); - }; + const handleButtonClick = (type: "linux" | "docker") => { + setCommand(commands[type]); + setSelectedButton(type); + }; - return ( -
- -
- - 🎉{" "} -
- - Expanding server functionality - -
-
-

- - Simplify - {" "} - your server logic performance -

-
-

- SVR.JS is a web server that runs on top of Node.JS, thus enabling - server-side JavaScript on webpages. SVR.JS also has an integrated log - viewer and more... -

-
- -

|

-

or

- - - -
- Curly arrow - - Try Now! - -
-
-
- - -
-
-
- -
-
-
- ); + return ( +
+ +
+ + 🎉{" "} +
+ + Expanding server functionality + +
+
+

+ + Simplify + {" "} + your server logic performance +

+
+

+ SVR.JS is a web server that runs on top of Node.JS, thus enabling + server-side JavaScript on webpages. SVR.JS also has an integrated log + viewer and more... +

+
+ +

|

+

or

+ + + +
+ Curly arrow + + Try Now! + +
+
+
+ + +
+
+
+ +
+
+
+ ); }; export default Hero; diff --git a/components/shared/MobileNav.tsx b/components/shared/MobileNav.tsx index 8879872..cfc0165 100644 --- a/components/shared/MobileNav.tsx +++ b/components/shared/MobileNav.tsx @@ -1,9 +1,9 @@ import { - Sheet, - SheetContent, - SheetHeader, - SheetTitle, - SheetTrigger, + Sheet, + SheetContent, + SheetHeader, + SheetTitle, + SheetTrigger, } from "../ui/sheet"; import { Menu } from "lucide-react"; import Image from "next/image"; @@ -13,77 +13,75 @@ import { NAVBAR } from "@/constants"; import { buttonVariants } from "../ui/button"; const MobileNav = () => { - return ( -
- - - - - - - - - {`logo`} - {`logo`} - - - - - -
- ); + return ( +
+ + + + + + + + + {`logo`} + {`logo`} + + + + + +
+ ); }; export default MobileNav; diff --git a/components/shared/Navbar.tsx b/components/shared/Navbar.tsx index 9d5b636..8cd28c3 100644 --- a/components/shared/Navbar.tsx +++ b/components/shared/Navbar.tsx @@ -1,9 +1,9 @@ "use client"; import { - NavigationMenu, - NavigationMenuItem, - NavigationMenuList, + NavigationMenu, + NavigationMenuItem, + NavigationMenuList, } from "@radix-ui/react-navigation-menu"; import Image from "next/image"; import Link from "next/link"; @@ -14,85 +14,169 @@ import MobileNav from "./MobileNav"; import { usePathname } from "next/navigation"; const Navbar = () => { - const pathname = usePathname(); - return ( -
- {/* LOGO LEFT NAVBAR */} - - - - - {`logo`} - {`logo`} - - + const pathname = usePathname(); + return ( +
+ {/* LOGO LEFT NAVBAR */} + + + + + + + + + + + + + + + + + + + + + + + - {/* Mobile view */} - + {/* Mobile view */} + - {/* Desktop Menu */} - + {/* Desktop Menu */} + -
- {NAVBAR.rightLinks?.map(({ href = "", label, target }) => ( - - git - git - - ))} - -
-
-
-
- ); +
+ {NAVBAR.rightLinks?.map(({ href = "", label, target }) => ( + + Git + + + + + ))} + +
+
+
+
+ ); }; export default Navbar; diff --git a/components/ui/icons.tsx b/components/ui/icons.tsx index abecd9c..6f794a2 100644 --- a/components/ui/icons.tsx +++ b/components/ui/icons.tsx @@ -2,205 +2,116 @@ import Link from "next/link"; import { buttonVariants } from "./button"; const Iconss = () => { - const cards = { - aboutCard: { - description: - "Discover more about our services and offerings. We aim to provide the best experience for our users.", - socialLinks: { - x: "https://x.com/SVR_JS", - Mastodon: "https://mastodon.social/@svrjs", - Bluesky: "https://bsky.app/profile/svrjs.org", - Odysee: "https://odysee.com/@SVRJS", - }, - }, - }; + const cards = { + aboutCard: { + description: + "Discover more about our services and offerings. We aim to provide the best experience for our users.", + socialLinks: { + x: "https://x.com/SVR_JS", + Mastodon: "https://mastodon.social/@svrjs", + Bluesky: "https://bsky.app/profile/svrjs.org", + Odysee: "https://odysee.com/@SVRJS", + }, + }, + }; - return ( - <> - - X icon -
- - - -
-
- - - -
- - - Mastodon icon -
- - - -
-
- - - -
- + return ( + <> + + X icon + + + + + + Mastodon icon - - Bluesky icon -
- - - - - - - - - - -
-
- - - - - - - - - - -
- + + + + - - Odysee icon -
- - - - - - - - - - -
-
- - - - - - - - - - -
- - - ); + + Bluesky icon + + + + + + + + Odysee icon + + + + + + + ); }; export default Iconss; diff --git a/pages/_app.js b/pages/_app.js deleted file mode 100644 index 162115d..0000000 --- a/pages/_app.js +++ /dev/null @@ -1,11 +0,0 @@ -import "@/app/globals.css"; - -function MyApp({ Component, pageProps }) { - return ( -
- -
- ); -} - -export default MyApp; diff --git a/pages/_app.tsx b/pages/_app.tsx new file mode 100644 index 0000000..30dc5f3 --- /dev/null +++ b/pages/_app.tsx @@ -0,0 +1,23 @@ +import { Poppins } from "next/font/google"; +import "./globals.css"; + +const poppins = Poppins({ + weight: ["400", "600", "700", "900"], + subsets: ["latin"], +}); + +function MyApp({ Component, pageProps }: any) { + return ( + <> + +
+ +
+ + ); +} +export default MyApp; diff --git a/pages/globals.css b/pages/globals.css new file mode 100644 index 0000000..9cf4cdb --- /dev/null +++ b/pages/globals.css @@ -0,0 +1,7 @@ +html { + font-family: "Poppins", sans-serif; +} + +* { + scroll-behavior: smooth; +} diff --git a/public/logo.svg b/public/logo.svg index 34254f4..5746014 100644 --- a/public/logo.svg +++ b/public/logo.svg @@ -1,10 +1 @@ - - - - - - - - - - + \ No newline at end of file diff --git a/public/logodark.svg b/public/logodark.svg index ebc731d..bcfa1c9 100644 --- a/public/logodark.svg +++ b/public/logodark.svg @@ -1,10 +1 @@ - - - - - - - - - - + \ No newline at end of file diff --git a/theme.config.tsx b/theme.config.tsx index 81fc328..a1980e3 100644 --- a/theme.config.tsx +++ b/theme.config.tsx @@ -18,55 +18,122 @@ export default { content: null, }, logo: ( - <> - {`logo`} -

+ + + + + + + - SVRJS -

- + transform="matrix(.57654 0 0 .57653 -3.77 -.913)" + /> + + + + + + + + + ), project: { - link: "https://git.svrjs.org/", icon: ( - - - - - - - - - - - - - + ), + link: "https://git.svrjs.org", }, footer: { component: null, diff --git a/tsconfig.json b/tsconfig.json index e7a8a9e..2566b95 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -21,6 +21,6 @@ "@/*": ["./*"] } }, - "include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts", "lib/Hoc/withAuth.jsx" , "**/*.mdx", "pages/_app.jsx"], + "include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts", "lib/Hoc/withAuth.jsx" , "**/*.mdx", "pages/_app.tsx"], "exclude": ["node_modules"] }