diff --git a/package-lock.json b/package-lock.json index 86168f1..67aaef7 100644 --- a/package-lock.json +++ b/package-lock.json @@ -8,12 +8,17 @@ "name": "duas", "version": "0.1.0", "dependencies": { + "axios": "^1.7.9", + "moment": "^2.30.1", + "moment-hijri": "^3.0.0", "next": "15.1.0", "react": "^19.0.0", - "react-dom": "^19.0.0" + "react-dom": "^19.0.0", + "react-icons": "^5.4.0" }, "devDependencies": { "@eslint/eslintrc": "^3", + "@types/moment-hijri": "^2.1.4", "@types/node": "^20", "@types/react": "^19", "@types/react-dom": "^19", @@ -862,6 +867,15 @@ "integrity": "sha512-dRLjCWHYg4oaA77cxO64oO+7JwCwnIzkZPdrrC71jQmQtlhM556pwKo5bUzqvZndkVbeFLIIi+9TC40JNF5hNQ==", "dev": true }, + "node_modules/@types/moment-hijri": { + "version": "2.1.4", + "resolved": "https://registry.npmjs.org/@types/moment-hijri/-/moment-hijri-2.1.4.tgz", + "integrity": "sha512-pGX1DaSducJDkJAC3q8fCuemow0pzI4oa0iKcspwQNPXuwlI55WRgBVrA6NVi+rf8bZN1qjWVsGdUatrLhZk6Q==", + "dev": true, + "dependencies": { + "moment": ">=2.14.0" + } + }, "node_modules/@types/node": { "version": "20.17.10", "resolved": "https://registry.npmjs.org/@types/node/-/node-20.17.10.tgz", @@ -1373,6 +1387,11 @@ "integrity": "sha512-OH/2E5Fg20h2aPrbe+QL8JZQFko0YZaF+j4mnQ7BGhfavO7OpSLa8a0y9sBwomHdSbkhTS8TQNayBfnW5DwbvQ==", "dev": true }, + "node_modules/asynckit": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", + "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==" + }, "node_modules/available-typed-arrays": { "version": "1.0.7", "resolved": "https://registry.npmjs.org/available-typed-arrays/-/available-typed-arrays-1.0.7.tgz", @@ -1397,6 +1416,16 @@ "node": ">=4" } }, + "node_modules/axios": { + "version": "1.7.9", + "resolved": "https://registry.npmjs.org/axios/-/axios-1.7.9.tgz", + "integrity": "sha512-LhLcE7Hbiryz8oMDdDptSrWowmB4Bl6RCt6sIJKpRB4XtVf0iEgewX3au/pJqm+Py1kCASkb/FFKjxQaLtxJvw==", + "dependencies": { + "follow-redirects": "^1.15.6", + "form-data": "^4.0.0", + "proxy-from-env": "^1.1.0" + } + }, "node_modules/axobject-query": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/axobject-query/-/axobject-query-4.1.0.tgz", @@ -1639,6 +1668,17 @@ "simple-swizzle": "^0.2.2" } }, + "node_modules/combined-stream": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", + "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", + "dependencies": { + "delayed-stream": "~1.0.0" + }, + "engines": { + "node": ">= 0.8" + } + }, "node_modules/commander": { "version": "4.1.1", "resolved": "https://registry.npmjs.org/commander/-/commander-4.1.1.tgz", @@ -1800,6 +1840,14 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/delayed-stream": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", + "integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==", + "engines": { + "node": ">=0.4.0" + } + }, "node_modules/detect-libc": { "version": "2.0.3", "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-2.0.3.tgz", @@ -2586,6 +2634,25 @@ "integrity": "sha512-AiwGJM8YcNOaobumgtng+6NHuOqC3A7MixFeDafM3X9cIUM+xUXoS5Vfgf+OihAYe20fxqNM9yPBXJzRtZ/4eA==", "dev": true }, + "node_modules/follow-redirects": { + "version": "1.15.9", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.9.tgz", + "integrity": "sha512-gew4GsXizNgdoRyqmyfMHyAmXsZDk6mHkSxZFCzW9gwlbtOW44CDtYavM+y+72qD/Vq2l550kMF52DT8fOLJqQ==", + "funding": [ + { + "type": "individual", + "url": "https://github.com/sponsors/RubenVerborgh" + } + ], + "engines": { + "node": ">=4.0" + }, + "peerDependenciesMeta": { + "debug": { + "optional": true + } + } + }, "node_modules/for-each": { "version": "0.3.3", "resolved": "https://registry.npmjs.org/for-each/-/for-each-0.3.3.tgz", @@ -2611,6 +2678,19 @@ "url": "https://github.com/sponsors/isaacs" } }, + "node_modules/form-data": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.1.tgz", + "integrity": "sha512-tzN8e4TX8+kkxGPK8D5u0FNmjPUjw3lwC9lSLxxoB/+GtsJG91CO8bSWy73APlgAZzZbXEYZJuxjkHH2w+Ezhw==", + "dependencies": { + "asynckit": "^0.4.0", + "combined-stream": "^1.0.8", + "mime-types": "^2.1.12" + }, + "engines": { + "node": ">= 6" + } + }, "node_modules/fsevents": { "version": "2.3.3", "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", @@ -3586,6 +3666,25 @@ "node": ">=8.6" } }, + "node_modules/mime-db": { + "version": "1.52.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", + "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/mime-types": { + "version": "2.1.35", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", + "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", + "dependencies": { + "mime-db": "1.52.0" + }, + "engines": { + "node": ">= 0.6" + } + }, "node_modules/minimatch": { "version": "3.1.2", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", @@ -3616,6 +3715,22 @@ "node": ">=16 || 14 >=14.17" } }, + "node_modules/moment": { + "version": "2.30.1", + "resolved": "https://registry.npmjs.org/moment/-/moment-2.30.1.tgz", + "integrity": "sha512-uEmtNhbDOrWPFS+hdjFCBfy9f2YoyzRpwcl+DqpC6taX21FzsTLQVbMV/W7PzNSX6x/bhC1zA3c2UQ5NzH6how==", + "engines": { + "node": "*" + } + }, + "node_modules/moment-hijri": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/moment-hijri/-/moment-hijri-3.0.0.tgz", + "integrity": "sha512-UcBcbHDA8ToVcKjY+vBEa/hI3GZYraueavWUSLY2TdrHDHhx+wUpRw96rssAqsbT4xo/TMimwQVBP4KhJ3EN5A==", + "dependencies": { + "moment": "^2.30.1" + } + }, "node_modules/ms": { "version": "2.1.3", "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", @@ -4177,6 +4292,11 @@ "react-is": "^16.13.1" } }, + "node_modules/proxy-from-env": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-1.1.0.tgz", + "integrity": "sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==" + }, "node_modules/punycode": { "version": "2.3.1", "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz", @@ -4225,6 +4345,14 @@ "react": "^19.0.0" } }, + "node_modules/react-icons": { + "version": "5.4.0", + "resolved": "https://registry.npmjs.org/react-icons/-/react-icons-5.4.0.tgz", + "integrity": "sha512-7eltJxgVt7X64oHh6wSWNwwbKTCtMfK35hcjvJS0yxEAhPM8oUKdS3+kqaW1vicIltw+kR2unHaa12S9pPALoQ==", + "peerDependencies": { + "react": "*" + } + }, "node_modules/react-is": { "version": "16.13.1", "resolved": "https://registry.npmjs.org/react-is/-/react-is-16.13.1.tgz", diff --git a/package.json b/package.json index a50a363..01d8f35 100644 --- a/package.json +++ b/package.json @@ -9,19 +9,24 @@ "lint": "next lint" }, "dependencies": { + "axios": "^1.7.9", + "moment": "^2.30.1", + "moment-hijri": "^3.0.0", + "next": "15.1.0", "react": "^19.0.0", "react-dom": "^19.0.0", - "next": "15.1.0" + "react-icons": "^5.4.0" }, "devDependencies": { - "typescript": "^5", + "@eslint/eslintrc": "^3", + "@types/moment-hijri": "^2.1.4", "@types/node": "^20", "@types/react": "^19", "@types/react-dom": "^19", - "postcss": "^8", - "tailwindcss": "^3.4.1", "eslint": "^9", "eslint-config-next": "15.1.0", - "@eslint/eslintrc": "^3" + "postcss": "^8", + "tailwindcss": "^3.4.1", + "typescript": "^5" } } diff --git a/public/assets/images/Frame 1000005074.svg b/public/assets/images/Frame 1000005074.svg new file mode 100644 index 0000000..2ec80f8 --- /dev/null +++ b/public/assets/images/Frame 1000005074.svg @@ -0,0 +1,259 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/public/assets/images/Group 27009.svg b/public/assets/images/Group 27009.svg new file mode 100644 index 0000000..66c4b86 --- /dev/null +++ b/public/assets/images/Group 27009.svg @@ -0,0 +1,4 @@ + + + + diff --git a/public/assets/images/Hosseiniye.svg b/public/assets/images/Hosseiniye.svg new file mode 100644 index 0000000..6403a51 --- /dev/null +++ b/public/assets/images/Hosseiniye.svg @@ -0,0 +1,3 @@ + + + diff --git a/public/assets/images/Inner Plugin Iframe.svg b/public/assets/images/Inner Plugin Iframe.svg new file mode 100644 index 0000000..74fbe12 --- /dev/null +++ b/public/assets/images/Inner Plugin Iframe.svg @@ -0,0 +1,4 @@ + + + + diff --git a/public/assets/images/Setting.svg b/public/assets/images/Setting.svg new file mode 100644 index 0000000..ae4e9cd --- /dev/null +++ b/public/assets/images/Setting.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/public/assets/images/Untitled-1-02.svg b/public/assets/images/Untitled-1-02.svg new file mode 100644 index 0000000..34ce5a6 --- /dev/null +++ b/public/assets/images/Untitled-1-02.svg @@ -0,0 +1,7 @@ + + + + + + + diff --git a/public/assets/images/Vector.svg b/public/assets/images/Vector.svg new file mode 100644 index 0000000..dc2e249 --- /dev/null +++ b/public/assets/images/Vector.svg @@ -0,0 +1,3 @@ + + + diff --git a/public/assets/images/send-01.svg b/public/assets/images/send-01.svg new file mode 100644 index 0000000..77184cf --- /dev/null +++ b/public/assets/images/send-01.svg @@ -0,0 +1,3 @@ + + + diff --git a/public/fonts/KFGQPC Uthman Taha Naskh Regular.ttf b/public/fonts/KFGQPC Uthman Taha Naskh Regular.ttf new file mode 100644 index 0000000..bb650a2 Binary files /dev/null and b/public/fonts/KFGQPC Uthman Taha Naskh Regular.ttf differ diff --git a/src/api/http.tsx b/src/api/http.tsx new file mode 100644 index 0000000..8264f44 --- /dev/null +++ b/src/api/http.tsx @@ -0,0 +1,13 @@ +import axios from 'axios'; + +const http = axios.create({ + baseURL: 'http://88.99.212.243:7051', + // headers: { + // 'Authorization': 'Token 36d8be53bed5cab8027b66952b3f2c334cdca664', + // }, + params :{ + language_code:"en" + } +}); + +export default http; diff --git a/src/components/language-switcher.tsx b/src/components/language-switcher.tsx new file mode 100644 index 0000000..2f3262d --- /dev/null +++ b/src/components/language-switcher.tsx @@ -0,0 +1,76 @@ +"use client" + +import React, { useState, useRef, useEffect } from 'react'; +import { IoGlobeSharp } from "react-icons/io5"; +import { IoIosArrowDown } from "react-icons/io"; + +const LanguageSwitcher = () => { + const [isOpen, setIsOpen] = useState(false); + const [selectedLanguage, setSelectedLanguage] = useState('English'); + + // Explicitly define the type of wrapperRef + const wrapperRef = useRef(null); // <-- Specify the type here + + const languages = [ + 'English', + 'Spanish', + 'French', + 'German', + 'Chinese', + ]; + + const toggleDropdown = () => { + setIsOpen(prevState => !prevState); + }; + + const selectLanguage = (lang: React.SetStateAction) => { + setSelectedLanguage(lang); + setIsOpen(false); + }; + + // Close dropdown when clicking outside + useEffect(() => { + const handleClickOutside = (event: MouseEvent) => { // Changed the type here for event + if (wrapperRef.current && !wrapperRef.current.contains(event.target as Node)) { // Cast target to Node + setIsOpen(false); + } + }; + document.addEventListener('mousedown', handleClickOutside); + return () => { + document.removeEventListener('mousedown', handleClickOutside); + }; + }, []); + + return ( +
+ + + {isOpen && ( +
    + {languages.map(lang => ( +
  • selectLanguage(lang)} + > + {lang} +
  • + ))} +
+ )} +
+ ); +}; + +export default LanguageSwitcher; diff --git a/src/components/layout/header.tsx b/src/components/layout/header.tsx new file mode 100644 index 0000000..65215f9 --- /dev/null +++ b/src/components/layout/header.tsx @@ -0,0 +1,47 @@ +import Logo from "../../../public/assets/images/Hosseiniye.svg"; +import Image from "next/image"; +import Link from "next/link"; +import LanguageSwitcher from "../language-switcher"; +import { HiMiniMagnifyingGlass } from "react-icons/hi2"; +const Header = () => { + return ( +
+
+
+
+ Logo +
+
+
    +
  • + Home +
  • +
  • + About us +
  • +
  • + Last Read +
  • +
+
+
+
+
+ + +
+
+ +
+
+
+
+ ); +}; +export default Header; diff --git a/src/components/layout/sidebar.tsx b/src/components/layout/sidebar.tsx new file mode 100644 index 0000000..3ac52b9 --- /dev/null +++ b/src/components/layout/sidebar.tsx @@ -0,0 +1,16 @@ +import Tabs from "../sidebar/tabs"; + +function SideBar() { + return ( + + ); +} + +export default SideBar; + +//