diff --git a/.env b/.env new file mode 100644 index 0000000..e69de29 diff --git a/app/components/Landing.tsx b/app/components/Landing.tsx new file mode 100644 index 0000000..9a1e25b --- /dev/null +++ b/app/components/Landing.tsx @@ -0,0 +1,61 @@ +"use client"; +import React from "react"; +import Navbar from "../../components/Navbar"; +import { boxItems } from "@/constants"; +import Image from "next/image"; +import { cn } from "@/lib/utils"; + +export default function Landing() { + return ( +
+
+ +
+
+
+ {boxItems.map((item) => { + return ( +
+

{item.name}

+ icon +
+ ); + })} +
+
+ آخرین اخبار +
+
+
+ picture +
+
+
+
+
+
+
+
+
+ ); +} diff --git a/app/globals.css b/app/globals.css index 6a75725..3abece3 100644 --- a/app/globals.css +++ b/app/globals.css @@ -73,4 +73,14 @@ body { @apply bg-background text-foreground; } +} + +@font-face { + font-family: "yekan"; + src: url(../fonts/iranyekanwebregularfanum.ttf); +} + +@font-face { + font-family: "yekan-m"; + src: url(../fonts/iranyekanwebmediumfanum.ttf); } \ No newline at end of file diff --git a/app/layout.tsx b/app/layout.tsx index 40e027f..2e2291b 100644 --- a/app/layout.tsx +++ b/app/layout.tsx @@ -1,22 +1,22 @@ -import type { Metadata } from 'next' -import { Inter } from 'next/font/google' -import './globals.css' +import type { Metadata } from "next"; +import { Inter } from "next/font/google"; +import "./globals.css"; -const inter = Inter({ subsets: ['latin'] }) +const inter = Inter({ subsets: ["latin"] }); export const metadata: Metadata = { - title: 'Create Next App', - description: 'Generated by create next app', -} + title: "Create Next App", + description: "Generated by create next app", +}; export default function RootLayout({ children, }: { - children: React.ReactNode + children: React.ReactNode; }) { return ( - - {children} + + {children} - ) + ); } diff --git a/app/page.tsx b/app/page.tsx index 5d6afcf..f8c8429 100644 --- a/app/page.tsx +++ b/app/page.tsx @@ -1,114 +1,6 @@ -import Image from 'next/image' +import Landing from "@/app/components/Landing"; +import Image from "next/image"; export default function Home() { - return ( -
-

fdfdfdf

-
-

- Get started by editing  - app/page.tsx -

-
- - By{' '} - Vercel Logo - -
-
- -
- Next.js Logo -
- -
- -

- Docs{' '} - - -> - -

-

- Find in-depth information about Next.js features and API. -

-
- - -

- Learn{' '} - - -> - -

-

- Learn about Next.js in an interactive course with quizzes! -

-
- - -

- Templates{' '} - - -> - -

-

- Explore starter templates for Next.js. -

-
- - -

- Deploy{' '} - - -> - -

-

- Instantly deploy your Next.js site to a shareable URL with Vercel. -

-
-
-
- ) + return ; } diff --git a/components/Navbar.tsx b/components/Navbar.tsx new file mode 100644 index 0000000..c67cca7 --- /dev/null +++ b/components/Navbar.tsx @@ -0,0 +1,109 @@ +import React from "react"; +import { Input } from "./ui/input"; +import Image from "next/image"; +import { menuItems } from "@/constants"; +import Link from "next/link"; +import { Button } from "./ui/button"; + +export default function Navbar() { + return ( +
+
+

+ سال 1402 | مهارم تورم، رشد تولید +

+
+
+ + +
+
+

+ امروز: چهارشنبه 24 آبان 1402 +

+ + + + + + + + + + +
+
+
+
+
+
+ log +
+

ســــــــوت زن

+

سامانه افشار فساد شهرداری

+
+
+
+ {menuItems.map((item) => { + return ( + +
{item.name}
+ + ); + })} +
+
+ +
+
+ ); +} diff --git a/components/ui/button.tsx b/components/ui/button.tsx new file mode 100644 index 0000000..0ba4277 --- /dev/null +++ b/components/ui/button.tsx @@ -0,0 +1,56 @@ +import * as React from "react" +import { Slot } from "@radix-ui/react-slot" +import { cva, type VariantProps } from "class-variance-authority" + +import { cn } from "@/lib/utils" + +const buttonVariants = cva( + "inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50", + { + variants: { + variant: { + default: "bg-primary text-primary-foreground hover:bg-primary/90", + destructive: + "bg-destructive text-destructive-foreground hover:bg-destructive/90", + outline: + "border border-input bg-background hover:bg-accent hover:text-accent-foreground", + secondary: + "bg-secondary text-secondary-foreground hover:bg-secondary/80", + ghost: "hover:bg-accent hover:text-accent-foreground", + link: "text-primary underline-offset-4 hover:underline", + }, + size: { + default: "h-10 px-4 py-2", + sm: "h-9 rounded-md px-3", + lg: "h-11 rounded-md px-8", + icon: "h-10 w-10", + }, + }, + defaultVariants: { + variant: "default", + size: "default", + }, + } +) + +export interface ButtonProps + extends React.ButtonHTMLAttributes, + VariantProps { + asChild?: boolean +} + +const Button = React.forwardRef( + ({ className, variant, size, asChild = false, ...props }, ref) => { + const Comp = asChild ? Slot : "button" + return ( + + ) + } +) +Button.displayName = "Button" + +export { Button, buttonVariants } diff --git a/components/ui/input.tsx b/components/ui/input.tsx new file mode 100644 index 0000000..117bb03 --- /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 new file mode 100644 index 0000000..b6d66ef --- /dev/null +++ b/constants/index.tsx @@ -0,0 +1,13 @@ +export const menuItems = [ + { id: 1, name: "صفحه اصلی" }, + { id: 2, name: "اخبار" }, + { id: 3, name: "درباره ما" }, + { id: 4, name: "تماس با ما" }, + { id: 5, name: "پیگیری" }, +]; + +export const boxItems = [ + { id: 1, name: "ثبت شکایت", icon: "/img/box1.svg" }, + { id: 2, name: "پیگیری شکایت", icon: "/img/box2.svg" }, + { id: 3, name: "مشاهده آمار", icon: "/img/box3.svg" }, +]; diff --git a/package-lock.json b/package-lock.json index 9c15664..dfe1298 100644 --- a/package-lock.json +++ b/package-lock.json @@ -8,6 +8,7 @@ "name": "sootzani", "version": "0.1.0", "dependencies": { + "@radix-ui/react-slot": "^1.0.2", "@tanstack/react-query": "^5.8.7", "class-variance-authority": "^0.7.0", "clsx": "^2.0.0", @@ -376,6 +377,41 @@ "node": ">= 8" } }, + "node_modules/@radix-ui/react-compose-refs": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@radix-ui/react-compose-refs/-/react-compose-refs-1.0.1.tgz", + "integrity": "sha512-fDSBgd44FKHa1FRMU59qBMPFcl2PZE+2nmqunj+BWFyYYjnhIDWL2ItDs3rrbJDQOtzt5nIebLCQc4QRfz6LJw==", + "dependencies": { + "@babel/runtime": "^7.13.10" + }, + "peerDependencies": { + "@types/react": "*", + "react": "^16.8 || ^17.0 || ^18.0" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + } + } + }, + "node_modules/@radix-ui/react-slot": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/@radix-ui/react-slot/-/react-slot-1.0.2.tgz", + "integrity": "sha512-YeTpuq4deV+6DusvVUW4ivBgnkHwECUu0BiN43L5UCDFgdhsRUWAghhTF5MbvNTPzmiFOx90asDSUjWuCNapwg==", + "dependencies": { + "@babel/runtime": "^7.13.10", + "@radix-ui/react-compose-refs": "1.0.1" + }, + "peerDependencies": { + "@types/react": "*", + "react": "^16.8 || ^17.0 || ^18.0" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + } + } + }, "node_modules/@rushstack/eslint-patch": { "version": "1.6.0", "resolved": "https://registry.npmjs.org/@rushstack/eslint-patch/-/eslint-patch-1.6.0.tgz", @@ -443,13 +479,13 @@ "version": "15.7.11", "resolved": "https://registry.npmjs.org/@types/prop-types/-/prop-types-15.7.11.tgz", "integrity": "sha512-ga8y9v9uyeiLdpKddhxYQkxNDrfvuPrlFb0N1qnZZByvcElJaXthF1UhvCh9TLWJBEHeNtdnbysW7Y6Uq8CVng==", - "dev": true + "devOptional": true }, "node_modules/@types/react": { "version": "18.2.38", "resolved": "https://registry.npmjs.org/@types/react/-/react-18.2.38.tgz", "integrity": "sha512-cBBXHzuPtQK6wNthuVMV6IjHAFkdl/FOPFIlkd81/Cd1+IqkHu/A+w4g43kaQQoYHik/ruaQBDL72HyCy1vuMw==", - "dev": true, + "devOptional": true, "dependencies": { "@types/prop-types": "*", "@types/scheduler": "*", @@ -469,7 +505,7 @@ "version": "0.16.8", "resolved": "https://registry.npmjs.org/@types/scheduler/-/scheduler-0.16.8.tgz", "integrity": "sha512-WZLiwShhwLRmeV6zH+GkbOFT6Z6VklCItrDioxUnv+u4Ll+8vKeFySoFyK/0ctcRpOmwAicELfmys1sDc/Rw+A==", - "dev": true + "devOptional": true }, "node_modules/@typescript-eslint/parser": { "version": "6.12.0", @@ -1152,7 +1188,7 @@ "version": "3.1.2", "resolved": "https://registry.npmjs.org/csstype/-/csstype-3.1.2.tgz", "integrity": "sha512-I7K1Uu0MBPzaFKg4nI5Q7Vs2t+3gWWW648spaF+Rg7pI9ds18Ugn+lvg4SHczUdKlHI5LWBXyqfS8+DufyBsgQ==", - "dev": true + "devOptional": true }, "node_modules/damerau-levenshtein": { "version": "1.0.8", diff --git a/package.json b/package.json index 4557005..d666aa1 100644 --- a/package.json +++ b/package.json @@ -9,6 +9,7 @@ "lint": "next lint" }, "dependencies": { + "@radix-ui/react-slot": "^1.0.2", "@tanstack/react-query": "^5.8.7", "class-variance-authority": "^0.7.0", "clsx": "^2.0.0", diff --git a/public/img/bg.png b/public/img/bg.png new file mode 100644 index 0000000..e87866a Binary files /dev/null and b/public/img/bg.png differ diff --git a/public/img/box1.svg b/public/img/box1.svg new file mode 100644 index 0000000..f181997 --- /dev/null +++ b/public/img/box1.svg @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + + + diff --git a/public/img/box2.svg b/public/img/box2.svg new file mode 100644 index 0000000..c0ced20 --- /dev/null +++ b/public/img/box2.svg @@ -0,0 +1,21 @@ + + + + + + + + + + + + + + + + + + + + + diff --git a/public/img/box3.svg b/public/img/box3.svg new file mode 100644 index 0000000..341853a --- /dev/null +++ b/public/img/box3.svg @@ -0,0 +1,18 @@ + + + + + + + + + + + + + + + + + + diff --git a/public/img/logo.png b/public/img/logo.png new file mode 100644 index 0000000..c4643a0 Binary files /dev/null and b/public/img/logo.png differ diff --git a/public/img/pic1.png b/public/img/pic1.png new file mode 100644 index 0000000..5f7a6dc Binary files /dev/null and b/public/img/pic1.png differ diff --git a/tailwind.config.js b/tailwind.config.js index 52cb62d..1584525 100644 --- a/tailwind.config.js +++ b/tailwind.config.js @@ -16,7 +16,15 @@ module.exports = { }, }, extend: { + backgroundImage: { + mainBg: "url('/img/bg.png')", + }, colors: { + gradient1: "#E44D26", + gradient2: "#F16529 ", + blue: "#003778", + yellow: "#F7A600", + brown: "#D28249", border: "hsl(var(--border))", input: "hsl(var(--input))", ring: "hsl(var(--ring))",