contact page changes
This commit is contained in:
parent
7535227245
commit
cacf80e1fc
7 changed files with 128 additions and 67 deletions
|
@ -1,4 +1,5 @@
|
||||||
"use client";
|
"use client";
|
||||||
|
import { Skeleton } from "@/components/ui/skeleton";
|
||||||
import React, { useEffect, useState } from "react";
|
import React, { useEffect, useState } from "react";
|
||||||
import ReactMarkdown from "react-markdown";
|
import ReactMarkdown from "react-markdown";
|
||||||
|
|
||||||
|
@ -35,8 +36,16 @@ const Page = ({ params }: { params: { slug: string } }) => {
|
||||||
|
|
||||||
if (loading) {
|
if (loading) {
|
||||||
return (
|
return (
|
||||||
<section className="flex-center flex-col wrapper container">
|
<section className="wrapper container py-24 md:py-28 gap-4 flex flex-col">
|
||||||
<p className="text-lg">Loading...</p>
|
<div className="mb-3">
|
||||||
|
<Skeleton className="w-[400px] h-[50px] rounded-md" />
|
||||||
|
</div>
|
||||||
|
<div className="flex flex-col gap-4">
|
||||||
|
<Skeleton className="w-[300px] h-[30px] rounded-md" />
|
||||||
|
<Skeleton className="w-[200px] h-[20px] rounded-md" />
|
||||||
|
<Skeleton className="w-[200px] h-[20px] rounded-md" />
|
||||||
|
<Skeleton className="w-[200px] h-[20px] rounded-md" />
|
||||||
|
</div>
|
||||||
</section>
|
</section>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
@ -9,7 +9,6 @@ import { Button } from "@/components/ui/button";
|
||||||
import {
|
import {
|
||||||
Form,
|
Form,
|
||||||
FormControl,
|
FormControl,
|
||||||
FormDescription,
|
|
||||||
FormField,
|
FormField,
|
||||||
FormItem,
|
FormItem,
|
||||||
FormLabel,
|
FormLabel,
|
||||||
|
@ -19,6 +18,8 @@ import { Input } from "@/components/ui/input";
|
||||||
import { Textarea } from "@/components/ui/textarea";
|
import { Textarea } from "@/components/ui/textarea";
|
||||||
import { useToast } from "@/components/ui/use-toast";
|
import { useToast } from "@/components/ui/use-toast";
|
||||||
import { useState } from "react";
|
import { useState } from "react";
|
||||||
|
import { Separator } from "@/components/ui/separator";
|
||||||
|
import { emails } from "@/constants";
|
||||||
|
|
||||||
const ContactUs = () => {
|
const ContactUs = () => {
|
||||||
const { toast } = useToast();
|
const { toast } = useToast();
|
||||||
|
@ -66,25 +67,23 @@ const ContactUs = () => {
|
||||||
});
|
});
|
||||||
setLoading(false);
|
setLoading(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
console.log(values);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<div className="flex items-center justify-center py-16 md:py-24 w-full transition-all duration-300">
|
<div className="flex items-center justify-center py-12 md:py-16 w-full transition-all duration-300">
|
||||||
<h1 className="text-4xl md:text-6xl tracking-tight font-bold uppercase">
|
<h1 className="text-4xl md:text-6xl tracking-tight font-bold uppercase text-center text-gray-900 dark:text-white">
|
||||||
Contact Us
|
Contact Us
|
||||||
</h1>
|
</h1>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<section id="contact" className="w-full">
|
<section id="contact" className="w-full">
|
||||||
<div className="flex max-md:flex-center flex-col md:flex-row justify-between mx-auto p-5 max-w-4xl">
|
<div className="flex-center flex-col md:flex-row justify-between mx-auto p-6 max-w-5xl">
|
||||||
{/* Left contact page */}
|
{/* Left contact page */}
|
||||||
<Form {...form}>
|
<Form {...form}>
|
||||||
<form
|
<form
|
||||||
onSubmit={form.handleSubmit(onSubmit)}
|
onSubmit={form.handleSubmit(onSubmit)}
|
||||||
className="space-y-4 pb-8 mb-4 max-w-sm w-full"
|
className="space-y-4 pb-8 mb-8 max-w-lg w-full bg-accent border p-6 rounded-lg shadow-md"
|
||||||
>
|
>
|
||||||
<FormField
|
<FormField
|
||||||
control={form.control}
|
control={form.control}
|
||||||
|
@ -119,7 +118,11 @@ const ContactUs = () => {
|
||||||
<FormItem>
|
<FormItem>
|
||||||
<FormLabel>Message</FormLabel>
|
<FormLabel>Message</FormLabel>
|
||||||
<FormControl>
|
<FormControl>
|
||||||
<Textarea placeholder="Your Message" {...field} />
|
<Textarea
|
||||||
|
className="h-44"
|
||||||
|
placeholder="Your Message"
|
||||||
|
{...field}
|
||||||
|
/>
|
||||||
</FormControl>
|
</FormControl>
|
||||||
<FormMessage />
|
<FormMessage />
|
||||||
</FormItem>
|
</FormItem>
|
||||||
|
@ -128,11 +131,11 @@ const ContactUs = () => {
|
||||||
<Button
|
<Button
|
||||||
type="submit"
|
type="submit"
|
||||||
variant={"default"}
|
variant={"default"}
|
||||||
className="w-full"
|
className="w-full mt-2"
|
||||||
disabled={loading}
|
disabled={loading}
|
||||||
>
|
>
|
||||||
<div className="flex items-center justify-center">
|
<div className="flex items-center justify-center">
|
||||||
<span className="tracking-tight font-[600px]">SEND</span>
|
<span className="tracking-tight font-semibold">SEND</span>
|
||||||
<Send className="ml-2 w-5 h-5" />
|
<Send className="ml-2 w-5 h-5" />
|
||||||
</div>
|
</div>
|
||||||
</Button>
|
</Button>
|
||||||
|
@ -140,63 +143,32 @@ const ContactUs = () => {
|
||||||
</Form>
|
</Form>
|
||||||
|
|
||||||
{/* Right contact page */}
|
{/* Right contact page */}
|
||||||
<div className="max-w-xl mt-3 md:ml-5">
|
<div className="max-w-lg mt-8 md:mt-0 md:ml-8 p-12 border rounded-lg">
|
||||||
<ul className="ml-2 max-md:flex-center flex-col pr-5">
|
<ul className="space-y-4 mb-6">
|
||||||
<li className="mb-2 text-[#aaa] flex items-center">
|
{emails.map((email, index) => (
|
||||||
<WebhookIcon className="mr-2" size={24} />
|
<li
|
||||||
|
key={index}
|
||||||
|
className="text-gray-600 dark:text-gray-300 flex items-center"
|
||||||
|
>
|
||||||
|
<email.icon className="mr-2" size={24} />
|
||||||
<span>
|
<span>
|
||||||
<a
|
<a
|
||||||
href="mailto:#"
|
href={email.url}
|
||||||
title="Send me an email"
|
title={`Send an email to ${email.email}`}
|
||||||
className="opacity-70 hover:opacity-100 transition duration-200"
|
className="text-muted-foreground hover:text-accent-foreground transition duration-200"
|
||||||
>
|
>
|
||||||
webmaster@svrjs.org
|
{email.email}
|
||||||
</a>
|
|
||||||
</span>
|
|
||||||
</li>
|
|
||||||
<li className="mb-2 text-[#aaa] flex items-center">
|
|
||||||
<Bug className="mr-2" size={24} />
|
|
||||||
<span>
|
|
||||||
<a
|
|
||||||
href="mailto:#"
|
|
||||||
title="Send me an email"
|
|
||||||
className="opacity-70 hover:opacity-100 transition duration-200"
|
|
||||||
>
|
|
||||||
bugreports@svrjs.org
|
|
||||||
</a>
|
|
||||||
</span>
|
|
||||||
</li>
|
|
||||||
<li className="mb-2 text-[#aaa] flex items-center">
|
|
||||||
<Shield className="mr-2" size={24} />
|
|
||||||
<span>
|
|
||||||
<a
|
|
||||||
href="mailto:#"
|
|
||||||
title="Send me an email"
|
|
||||||
className="opacity-70 hover:opacity-100 transition duration-200"
|
|
||||||
>
|
|
||||||
vulnerability-reports@svrjs.org
|
|
||||||
</a>
|
|
||||||
</span>
|
|
||||||
</li>
|
|
||||||
<li className="mb-2 text-[#aaa] flex items-center">
|
|
||||||
<Mail className="mr-2" size={24} />
|
|
||||||
<span>
|
|
||||||
<a
|
|
||||||
href="mailto:#"
|
|
||||||
title="Send me an email"
|
|
||||||
className="opacity-70 hover:opacity-100 transition duration-200"
|
|
||||||
>
|
|
||||||
support@svrjs.org
|
|
||||||
</a>
|
</a>
|
||||||
</span>
|
</span>
|
||||||
</li>
|
</li>
|
||||||
|
))}
|
||||||
</ul>
|
</ul>
|
||||||
<hr className="border-t border-white opacity-60 my-4" />
|
<Separator />
|
||||||
<ul className="flex justify-center space-x-3 mb-6">
|
<ul className="flex justify-center space-x-3 my-6">
|
||||||
<Iconss />
|
<Iconss />
|
||||||
</ul>
|
</ul>
|
||||||
<hr className="border-t border-white opacity-60 my-4" />
|
<Separator />
|
||||||
<div className="text-center text-[#555] text-sm font-light">
|
<div className="text-center text-gray-500 mt-2 text-sm font-light">
|
||||||
© ALL RIGHTS RESERVED SVRJS
|
© ALL RIGHTS RESERVED SVRJS
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
BIN
bun.lockb
BIN
bun.lockb
Binary file not shown.
31
components/ui/separator.tsx
Normal file
31
components/ui/separator.tsx
Normal file
|
@ -0,0 +1,31 @@
|
||||||
|
"use client"
|
||||||
|
|
||||||
|
import * as React from "react"
|
||||||
|
import * as SeparatorPrimitive from "@radix-ui/react-separator"
|
||||||
|
|
||||||
|
import { cn } from "@/lib/utils"
|
||||||
|
|
||||||
|
const Separator = React.forwardRef<
|
||||||
|
React.ElementRef<typeof SeparatorPrimitive.Root>,
|
||||||
|
React.ComponentPropsWithoutRef<typeof SeparatorPrimitive.Root>
|
||||||
|
>(
|
||||||
|
(
|
||||||
|
{ className, orientation = "horizontal", decorative = true, ...props },
|
||||||
|
ref
|
||||||
|
) => (
|
||||||
|
<SeparatorPrimitive.Root
|
||||||
|
ref={ref}
|
||||||
|
decorative={decorative}
|
||||||
|
orientation={orientation}
|
||||||
|
className={cn(
|
||||||
|
"shrink-0 bg-border",
|
||||||
|
orientation === "horizontal" ? "h-[1px] w-full" : "h-full w-[1px]",
|
||||||
|
className
|
||||||
|
)}
|
||||||
|
{...props}
|
||||||
|
/>
|
||||||
|
)
|
||||||
|
)
|
||||||
|
Separator.displayName = SeparatorPrimitive.Root.displayName
|
||||||
|
|
||||||
|
export { Separator }
|
15
components/ui/skeleton.tsx
Normal file
15
components/ui/skeleton.tsx
Normal file
|
@ -0,0 +1,15 @@
|
||||||
|
import { cn } from "@/lib/utils"
|
||||||
|
|
||||||
|
function Skeleton({
|
||||||
|
className,
|
||||||
|
...props
|
||||||
|
}: React.HTMLAttributes<HTMLDivElement>) {
|
||||||
|
return (
|
||||||
|
<div
|
||||||
|
className={cn("animate-pulse rounded-md bg-muted", className)}
|
||||||
|
{...props}
|
||||||
|
/>
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
export { Skeleton }
|
|
@ -1,4 +1,13 @@
|
||||||
import { BadgeAlert, BarChart4, Cog, File, ShieldCheck } from "lucide-react";
|
import {
|
||||||
|
BadgeAlert,
|
||||||
|
BarChart4,
|
||||||
|
Bug,
|
||||||
|
Cog,
|
||||||
|
File,
|
||||||
|
Mail,
|
||||||
|
ShieldCheck,
|
||||||
|
WebhookIcon,
|
||||||
|
} from "lucide-react";
|
||||||
import { Download, Home, Settings, User } from "lucide-react";
|
import { Download, Home, Settings, User } from "lucide-react";
|
||||||
|
|
||||||
// Navbar
|
// Navbar
|
||||||
|
@ -195,3 +204,27 @@ export const AdminLinks = [
|
||||||
icon: Home,
|
icon: Home,
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
|
// contact page emails
|
||||||
|
export const emails = [
|
||||||
|
{
|
||||||
|
icon: WebhookIcon,
|
||||||
|
email: "webmaster@svrjs.org",
|
||||||
|
url: "mailto:webmaster@svrjs.org",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
icon: Bug,
|
||||||
|
email: "bugreports@svrjs.org",
|
||||||
|
url: "mailto:bugreports@svrjs.org",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
icon: ShieldCheck,
|
||||||
|
email: "vulnerability-reports@svrjs.org",
|
||||||
|
url: "mailto:vulnerability-reports@svrjs.org",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
icon: Mail,
|
||||||
|
email: "support@svrjs.org",
|
||||||
|
url: "mailto:support@svrjs.org",
|
||||||
|
},
|
||||||
|
];
|
||||||
|
|
|
@ -16,6 +16,7 @@
|
||||||
"@radix-ui/react-dropdown-menu": "^2.0.6",
|
"@radix-ui/react-dropdown-menu": "^2.0.6",
|
||||||
"@radix-ui/react-label": "^2.1.0",
|
"@radix-ui/react-label": "^2.1.0",
|
||||||
"@radix-ui/react-navigation-menu": "^1.1.4",
|
"@radix-ui/react-navigation-menu": "^1.1.4",
|
||||||
|
"@radix-ui/react-separator": "^1.1.0",
|
||||||
"@radix-ui/react-slot": "^1.1.0",
|
"@radix-ui/react-slot": "^1.1.0",
|
||||||
"@radix-ui/react-toast": "^1.2.1",
|
"@radix-ui/react-toast": "^1.2.1",
|
||||||
"@radix-ui/themes": "^3.0.5",
|
"@radix-ui/themes": "^3.0.5",
|
||||||
|
|
Loading…
Reference in a new issue