diff --git a/app/page.tsx b/app/page.tsx index 623f50b..e7f6dba 100644 --- a/app/page.tsx +++ b/app/page.tsx @@ -3,6 +3,8 @@ import Hero from '@/components/shared/Hero'; import HowItWorks from '@/components/shared/HowItWorks'; import Newsletter from '@/components/shared/Newsletter'; + + const RootPage = () => { return ( <> @@ -10,6 +12,7 @@ const RootPage = () => { + ); }; diff --git a/components/shared/FAQ.tsx b/components/shared/FAQ.tsx index 559e42a..a282715 100644 --- a/components/shared/FAQ.tsx +++ b/components/shared/FAQ.tsx @@ -1,7 +1,39 @@ +import { questions } from "@/constants"; import React from "react"; +import { + Accordion, + AccordionContent, + AccordionItem, + AccordionTrigger, +} from "../ui/accordion"; const Faq = () => { - return
Faq
; + return ( +
+

+ Frequently Asked Question +

+

+ Find answers to common questions about SVRJS +

+ + {questions.map(({ question, answer, key }) => ( + + + {question} + + + {answer} + + + ))} + +
+ ); }; export default Faq; diff --git a/components/shared/Footer.tsx b/components/shared/Footer.tsx new file mode 100644 index 0000000..6c261a9 --- /dev/null +++ b/components/shared/Footer.tsx @@ -0,0 +1,7 @@ +import React from "react"; + +const Footer = () => { + return
Footer
; +}; + +export default Footer; diff --git a/components/shared/Hero.tsx b/components/shared/Hero.tsx index 9a15521..f110f6d 100644 --- a/components/shared/Hero.tsx +++ b/components/shared/Hero.tsx @@ -45,7 +45,7 @@ const Hero = () => { return (
- {/* { ]} className={cn( "[mask-image:radial-gradient(300px_circle_at_center,white,transparent)]", - "inset-x-0 inset-y-[-50%] h-[200%] opacity-20" + "inset-x-0 inset-y-[-50%] h-[200%] opacity-30" )} - /> */} + />
🎉{" "} diff --git a/components/shared/Navbar.tsx b/components/shared/Navbar.tsx index f15a109..221a7fa 100644 --- a/components/shared/Navbar.tsx +++ b/components/shared/Navbar.tsx @@ -66,7 +66,9 @@ const Navbar = () => { key={label} href={href} target={target} - className={`border ${buttonVariants({ variant: 'ghost' })}`} + className={`border ${buttonVariants({ + variant: "ghost", + })} px-0 w-11`} > { const [submission, setSubmission] = useState< @@ -15,21 +25,50 @@ const Newsletter = () => {

-

+

Join The Newsletter!

Choosing the right website deployment option is important when creating a website, because it directly impacts the user experience - and the resources required to run your website. Website deployment is - a process of publishing a website into a production hosting - environment + and the resources required to run your website.

+ > + + + +
+ see here + + {submission === "idle" && "Subscribe Now"} + {submission === "loading" && ( +

Subscribing...

+ )} + {submission === "success" && ( +

+ 🎉 Subscribed successfully... +

+ )} + {submission === "error" && ( +

+ 😥 Something went wrong... +

+ )} +
+
+
+
); }; diff --git a/components/ui/accordion.tsx b/components/ui/accordion.tsx new file mode 100644 index 0000000..24c788c --- /dev/null +++ b/components/ui/accordion.tsx @@ -0,0 +1,58 @@ +"use client" + +import * as React from "react" +import * as AccordionPrimitive from "@radix-ui/react-accordion" +import { ChevronDown } from "lucide-react" + +import { cn } from "@/lib/utils" + +const Accordion = AccordionPrimitive.Root + +const AccordionItem = React.forwardRef< + React.ElementRef, + React.ComponentPropsWithoutRef +>(({ className, ...props }, ref) => ( + +)) +AccordionItem.displayName = "AccordionItem" + +const AccordionTrigger = React.forwardRef< + React.ElementRef, + React.ComponentPropsWithoutRef +>(({ className, children, ...props }, ref) => ( + + svg]:rotate-180", + className + )} + {...props} + > + {children} + + + +)) +AccordionTrigger.displayName = AccordionPrimitive.Trigger.displayName + +const AccordionContent = React.forwardRef< + React.ElementRef, + React.ComponentPropsWithoutRef +>(({ className, children, ...props }, ref) => ( + +
{children}
+
+)) + +AccordionContent.displayName = AccordionPrimitive.Content.displayName + +export { Accordion, AccordionItem, AccordionTrigger, AccordionContent } diff --git a/components/ui/input.tsx b/components/ui/input.tsx new file mode 100644 index 0000000..677d05f --- /dev/null +++ b/components/ui/input.tsx @@ -0,0 +1,25 @@ +import * as React from "react" + +import { cn } from "@/lib/utils" + +export interface InputProps + extends React.InputHTMLAttributes {} + +const Input = React.forwardRef( + ({ className, type, ...props }, ref) => { + return ( + + ) + } +) +Input.displayName = "Input" + +export { Input } diff --git a/constants/index.tsx b/constants/index.tsx index 854ace1..919df52 100644 --- a/constants/index.tsx +++ b/constants/index.tsx @@ -77,3 +77,42 @@ export const Features = [ "lorem ipsum dolor sit amet, consectetur adip lorem ipsum dolor lorem ipsum dolor", }, ]; + +export const questions = [ + { + key: "item-1", + question: "What is a web server?", + answer: + "A web server is computer software that accepts HTTP requests and serves websites. Web servers can also be underlying hardware running web server software.", + }, + { + key: "item-2", + question: "What is SVR.JS?", + answer: + "SVR.JS is web server software running on Node.JS that can host both static and dynamic content. With additional mods, SVR.JS can be used for different types of dynamic content and can even be used as a forward or reverse proxy. SVR.JS is licensed under a permissive MIT/X11 license", + }, + { + key: "item-3", + question: "How was SVR.JS created?", + answer: + "Someone in 2018 wanted to create a website, but he didn't know about setting up popular web server software like Apache httpd, NGINX, or IIS... So he created his own web server in Node.JS to serve his website! And he saved it in a file called svr.js. Since then, this web server has been gradually turned from a web server intended for one website into a general-purpose web server, which is what SVR.JS is today!", + }, + { + key: "item-4", + question: "How did SVR.JS get its name?", + answer: + "SVR.JS got its name from the original name of the server script: svr.js, one of many generic file names for a server written in JavaScript.", + }, + { + key: "item-5", + question: "What is Node.JS?", + answer: + "Node.JS is an asynchronous event-driven JavaScript runtime built on Chromium's V8 engine. Node.JS is designed to build scalable network applications.", + }, + { + key: "item-6", + question: "How can I use SVR.JS?", + answer: + "You can read its documentation to learn how to use the SVR.JS web server.", + }, +]; diff --git a/package-lock.json b/package-lock.json index 5335101..0ce0143 100644 --- a/package-lock.json +++ b/package-lock.json @@ -11,6 +11,7 @@ "@fortawesome/fontawesome-svg-core": "^6.5.2", "@fortawesome/free-regular-svg-icons": "^6.5.2", "@fortawesome/react-fontawesome": "^0.2.2", + "@radix-ui/react-accordion": "^1.1.2", "@radix-ui/react-dialog": "^1.0.5", "@radix-ui/react-dropdown-menu": "^2.0.6", "@radix-ui/react-navigation-menu": "^1.1.4", @@ -550,6 +551,38 @@ } } }, + "node_modules/@radix-ui/react-accordion": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@radix-ui/react-accordion/-/react-accordion-1.1.2.tgz", + "integrity": "sha512-fDG7jcoNKVjSK6yfmuAs0EnPDro0WMXIhMtXdTBWqEioVW206ku+4Lw07e+13lUkFkpoEQ2PdeMIAGpdqEAmDg==", + "license": "MIT", + "dependencies": { + "@babel/runtime": "^7.13.10", + "@radix-ui/primitive": "1.0.1", + "@radix-ui/react-collapsible": "1.0.3", + "@radix-ui/react-collection": "1.0.3", + "@radix-ui/react-compose-refs": "1.0.1", + "@radix-ui/react-context": "1.0.1", + "@radix-ui/react-direction": "1.0.1", + "@radix-ui/react-id": "1.0.1", + "@radix-ui/react-primitive": "1.0.3", + "@radix-ui/react-use-controllable-state": "1.0.1" + }, + "peerDependencies": { + "@types/react": "*", + "@types/react-dom": "*", + "react": "^16.8 || ^17.0 || ^18.0", + "react-dom": "^16.8 || ^17.0 || ^18.0" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + }, + "@types/react-dom": { + "optional": true + } + } + }, "node_modules/@radix-ui/react-alert-dialog": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/@radix-ui/react-alert-dialog/-/react-alert-dialog-1.0.5.tgz", @@ -680,6 +713,37 @@ } } }, + "node_modules/@radix-ui/react-collapsible": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/@radix-ui/react-collapsible/-/react-collapsible-1.0.3.tgz", + "integrity": "sha512-UBmVDkmR6IvDsloHVN+3rtx4Mi5TFvylYXpluuv0f37dtaz3H99bp8No0LGXRigVpl3UAT4l9j6bIchh42S/Gg==", + "license": "MIT", + "dependencies": { + "@babel/runtime": "^7.13.10", + "@radix-ui/primitive": "1.0.1", + "@radix-ui/react-compose-refs": "1.0.1", + "@radix-ui/react-context": "1.0.1", + "@radix-ui/react-id": "1.0.1", + "@radix-ui/react-presence": "1.0.1", + "@radix-ui/react-primitive": "1.0.3", + "@radix-ui/react-use-controllable-state": "1.0.1", + "@radix-ui/react-use-layout-effect": "1.0.1" + }, + "peerDependencies": { + "@types/react": "*", + "@types/react-dom": "*", + "react": "^16.8 || ^17.0 || ^18.0", + "react-dom": "^16.8 || ^17.0 || ^18.0" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + }, + "@types/react-dom": { + "optional": true + } + } + }, "node_modules/@radix-ui/react-collection": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/@radix-ui/react-collection/-/react-collection-1.0.3.tgz", diff --git a/package.json b/package.json index d3b288e..40ae0d3 100644 --- a/package.json +++ b/package.json @@ -12,6 +12,7 @@ "@fortawesome/fontawesome-svg-core": "^6.5.2", "@fortawesome/free-regular-svg-icons": "^6.5.2", "@fortawesome/react-fontawesome": "^0.2.2", + "@radix-ui/react-accordion": "^1.1.2", "@radix-ui/react-dialog": "^1.0.5", "@radix-ui/react-dropdown-menu": "^2.0.6", "@radix-ui/react-navigation-menu": "^1.1.4",