diff --git a/package.json b/package.json index a52f352..6da55df 100644 --- a/package.json +++ b/package.json @@ -18,6 +18,7 @@ "framer-motion": "^10.17.9", "next": "14.0.4", "react": "^18", + "react-device-detect": "^2.2.3", "react-dom": "^18", "swiper": "^11.0.5", "video-react": "^0.16.0" diff --git a/public/fonts/fonts.css b/public/fonts/fonts.css index 57c0c5f..97cc27a 100644 --- a/public/fonts/fonts.css +++ b/public/fonts/fonts.css @@ -1,7 +1,5 @@ /* add font locally later */ -@import url('https://fonts.cdnfonts.com/css/iranyekan'); - @font-face { - font-family: GEO703; - src: url(./GeoSlab703\ Md\ BT\ Medium.ttf); -} \ No newline at end of file + font-family: GEO703; + src: url(./GeoSlab703\ Md\ BT\ Medium.ttf); +} diff --git a/public/icons/frontchapter.svg b/public/icons/frontchapter.svg new file mode 100644 index 0000000..06089c9 --- /dev/null +++ b/public/icons/frontchapter.svg @@ -0,0 +1,13 @@ + + + + + + + + + + + + + diff --git a/public/images/HeadingSecondary.svg b/public/images/HeadingSecondary.svg deleted file mode 100644 index d07bb0d..0000000 --- a/public/images/HeadingSecondary.svg +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - - - - diff --git a/public/images/HeadingSecondary.webp b/public/images/HeadingSecondary.webp new file mode 100644 index 0000000..f222414 Binary files /dev/null and b/public/images/HeadingSecondary.webp differ diff --git a/public/images/buttonBg.svg b/public/images/buttonBg.svg deleted file mode 100644 index 390f86d..0000000 --- a/public/images/buttonBg.svg +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - - - - - - diff --git a/public/images/buttonBg.webp b/public/images/buttonBg.webp new file mode 100644 index 0000000..77b3862 Binary files /dev/null and b/public/images/buttonBg.webp differ diff --git a/public/images/buttonSec.svg b/public/images/buttonSec.svg deleted file mode 100644 index 73b4944..0000000 --- a/public/images/buttonSec.svg +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/public/images/buttonSec.webp b/public/images/buttonSec.webp new file mode 100644 index 0000000..4fb850c Binary files /dev/null and b/public/images/buttonSec.webp differ diff --git a/public/images/certificate.png b/public/images/certificate.png deleted file mode 100644 index 2e4a40b..0000000 Binary files a/public/images/certificate.png and /dev/null differ diff --git a/public/images/certificate.webp b/public/images/certificate.webp new file mode 100644 index 0000000..0729815 Binary files /dev/null and b/public/images/certificate.webp differ diff --git a/public/images/cs50ShirazU.svg b/public/images/cs50ShirazU.svg deleted file mode 100644 index dc7e056..0000000 --- a/public/images/cs50ShirazU.svg +++ /dev/null @@ -1,17 +0,0 @@ - - - - - - - - - - - - - - - - - diff --git a/public/images/cs50ShirazU.webp b/public/images/cs50ShirazU.webp new file mode 100644 index 0000000..75c9fee Binary files /dev/null and b/public/images/cs50ShirazU.webp differ diff --git a/public/images/cs50book.png b/public/images/cs50book.png deleted file mode 100644 index f07153b..0000000 Binary files a/public/images/cs50book.png and /dev/null differ diff --git a/public/images/cs50book.webp b/public/images/cs50book.webp new file mode 100644 index 0000000..12b2e79 Binary files /dev/null and b/public/images/cs50book.webp differ diff --git a/public/images/headerBg.svg b/public/images/headerBg.svg deleted file mode 100644 index aeb7c9c..0000000 --- a/public/images/headerBg.svg +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - - - - - - diff --git a/public/images/headerBg.webp b/public/images/headerBg.webp new file mode 100644 index 0000000..1deb9aa Binary files /dev/null and b/public/images/headerBg.webp differ diff --git a/public/images/headingLine.svg b/public/images/headingLine.svg deleted file mode 100644 index b49741e..0000000 --- a/public/images/headingLine.svg +++ /dev/null @@ -1,21 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - diff --git a/public/images/headingLine.webp b/public/images/headingLine.webp new file mode 100644 index 0000000..c276aa0 Binary files /dev/null and b/public/images/headingLine.webp differ diff --git a/public/images/imageFrame.svg b/public/images/imageFrame.svg deleted file mode 100644 index 5a6bc9e..0000000 --- a/public/images/imageFrame.svg +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - - - - diff --git a/public/images/imageFrame.webp b/public/images/imageFrame.webp new file mode 100644 index 0000000..e72b95c Binary files /dev/null and b/public/images/imageFrame.webp differ diff --git a/public/images/image_50.png b/public/images/image_50.png deleted file mode 100644 index 1759852..0000000 Binary files a/public/images/image_50.png and /dev/null differ diff --git a/public/images/image_50.webp b/public/images/image_50.webp new file mode 100644 index 0000000..57738fb Binary files /dev/null and b/public/images/image_50.webp differ diff --git a/public/images/intro.png b/public/images/intro.png deleted file mode 100644 index c30223f..0000000 Binary files a/public/images/intro.png and /dev/null differ diff --git a/public/images/intro.webp b/public/images/intro.webp new file mode 100644 index 0000000..361bde2 Binary files /dev/null and b/public/images/intro.webp differ diff --git a/public/images/logo.png b/public/images/logo.png deleted file mode 100644 index 0d08443..0000000 Binary files a/public/images/logo.png and /dev/null differ diff --git a/public/images/logo.svg b/public/images/logo.svg deleted file mode 100644 index ee4f588..0000000 --- a/public/images/logo.svg +++ /dev/null @@ -1,180 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/public/images/logo.webp b/public/images/logo.webp new file mode 100644 index 0000000..fbc6d99 Binary files /dev/null and b/public/images/logo.webp differ diff --git a/public/images/sepehrCertidicate.png b/public/images/sepehrCertidicate.png deleted file mode 100644 index c4bdd95..0000000 Binary files a/public/images/sepehrCertidicate.png and /dev/null differ diff --git a/public/images/sepehrCertidicate.webp b/public/images/sepehrCertidicate.webp new file mode 100644 index 0000000..593ceda Binary files /dev/null and b/public/images/sepehrCertidicate.webp differ diff --git a/src/app/globals.css b/src/app/globals.css index c608373..0b96bd4 100644 --- a/src/app/globals.css +++ b/src/app/globals.css @@ -128,7 +128,7 @@ } } .section-title::before { - content: ""; + content: ''; display: flex; align-items: center; margin-top: 1rem; @@ -141,7 +141,7 @@ height: 0.5rem; } .section-title::after { - content: ""; + content: ''; display: flex; align-items: center; margin-top: 1rem; @@ -155,7 +155,7 @@ } .section-line::before { - content: ""; + content: ''; display: flex; align-items: center; margin-top: 1rem; diff --git a/src/app/layout.tsx b/src/app/layout.tsx index 8a898eb..cd3f9b3 100644 --- a/src/app/layout.tsx +++ b/src/app/layout.tsx @@ -1,23 +1,31 @@ -import type { Metadata } from "next"; -import "./globals.css"; +import type { Metadata } from 'next' +import './globals.css' export const metadata: Metadata = { - title: "سی اس فیفتی شیراز", - description: "CS50xShiraz", -}; + title: 'سی اس فیفتی شیراز', + description: 'CS50xShiraz', +} + +import { Vazirmatn } from 'next/font/google' + +const inter = Vazirmatn({ + subsets: ['arabic', 'latin', 'latin-ext'], + variable: '--font-vazirmatn', +}) export default function RootLayout({ children, }: { - children: React.ReactNode; + children: React.ReactNode }) { return ( - + - {children} + dir='rtl' + className='bg-BodyImage bg-cover bg-center relative bg-img' + > +
{children}
- ); + ) } diff --git a/src/app/page.tsx b/src/app/page.tsx index da414e0..4251f0d 100644 --- a/src/app/page.tsx +++ b/src/app/page.tsx @@ -1,88 +1,33 @@ -"use client"; +'use client' + import { AboutCS50x, AboutTeacher, - Courses, Faq, Footer, - HamMenu, Header, - ImageSection, Ios, NavBar, SuitableFor, - TeamAndSponsers, -} from "@/features"; -import { useEffect, useState } from "react"; -import Loading from "./loading"; +} from '@/features' +import { CustomView, isIOS } from 'react-device-detect' export default function Home() { - const [isLoading, setIsLoading] = useState(true); - useEffect(() => { - setTimeout(() => { - setIsLoading(false); - }, 2000); - }, []); - const [Os, setOs] = useState(""); - useEffect(() => { - function getOS() { - const userAgent = navigator.userAgent, - platform = navigator?.platform || navigator.platform, - macosPlatforms = ["macOS", "Macintosh", "MacIntel", "MacPPC", "Mac68K"], - windowsPlatforms = ["Win32", "Win64", "Windows", "WinCE"], - iosPlatforms = ["iPhone", "iPad", "iPod"]; - let os = ""; - - if (macosPlatforms.indexOf(platform) !== -1) { - os = "Mac OS"; - } else if (iosPlatforms.indexOf(platform) !== -1) { - os = "iOS"; - } else if (windowsPlatforms.indexOf(platform) !== -1) { - os = "Windows"; - } else if (/Android/.test(userAgent)) { - os = "Android"; - } else if (/Linux/.test(platform)) { - os = "Linux"; - } - - return os; - } - setOs(getOS()); - }, []); - function isIos() { - if (Os == "iOS") { - return true; - } else { - return false; - } - } return ( <> - {isLoading ? ( - - ) : ( - <> - {isIos() ? ( - <> - -
- -