diff --git a/app/components/footer/index.js b/app/components/footer/index.js index bd4ddc8..bb198b6 100644 --- a/app/components/footer/index.js +++ b/app/components/footer/index.js @@ -1,3 +1,4 @@ + import Link from "next/link"; import style from "./footer.module.css"; import styles from "../../../pages/index.module.css"; @@ -9,41 +10,19 @@ import panelAxios from "../../services/panelAxios"; import dotenv from "dotenv"; dotenv.config(); -function footer({ token, data }) { + +function Footer({ data }) { const [email, setEmail] = useState(""); const [comment, setComment] = useState(""); const submitComment = async () => { if (email != "") { const raw = JSON.stringify({ - // ProcessName: "ConnectToUs", - // FieldValues: [ - // { - // Name: "Email", - // Value: email, - // }, - // { - // Name: "Comment", - // Value: comment, - // }, - // { - // Name: "submitDate", - // Value: "", - // }, - // { - // Name: "submitTime", - // Value: "", - // }, - // ], ConnectToUs: { Email: email, Comment: comment, }, }); - await panelAxios.post("api/save", raw, { - headers: { - Authorization: `Bearer ${token}`, - }, - }); + await panelAxios.post("api/save", raw,{ }); setEmail(""); setComment(""); @@ -71,20 +50,20 @@ function footer({ token, data }) { {data?.mobile1 && (
- همراه:{data.mobile1} + همراه: {data?.mobile1}
)} {data?.mobile2 && (
- همراه:{data.mobile2} + همراه: {data?.mobile2}
)}
- - - + + +
رایانامه: {data?.email1} @@ -137,11 +116,11 @@ function footer({ token, data }) {

اینجاست

- +
- تمام حقوق مادی و معنوی این وبسایت متعلق به این{" "} + تمام حقوق مادی و معنوی این وبسایت متعلق به شرکت{" "} {data?.company_name} می باشد. @@ -149,4 +128,4 @@ function footer({ token, data }) { ); } -export default footer; +export default Footer; diff --git a/app/components/navbar/header.module.css b/app/components/navbar/header.module.css index 319e20e..70b0827 100644 --- a/app/components/navbar/header.module.css +++ b/app/components/navbar/header.module.css @@ -39,12 +39,12 @@ .logo { width: 50px; - height: 50px; + /* height: 50px; */ } .logo img { - width: 100%; - height: 100%; + width: 120%; + height: 120%; object-fit: contain; } @@ -62,7 +62,7 @@ } .logoContent h1:last-child { - font-size: 10pt; + font-size: 17pt; } diff --git a/app/components/navbar/index.js b/app/components/navbar/index.js index ca571d2..5a32bdc 100644 --- a/app/components/navbar/index.js +++ b/app/components/navbar/index.js @@ -1,3 +1,4 @@ + import Link from "next/link"; import Image from "next/image"; import logo from "../../../public/assets/photos/logo.svg"; @@ -35,13 +36,13 @@ const header = ({ backwardStatus, setbackwardStatus, data }) => { pageScroll(0); break; case "services": - pageScroll(550); + pageScroll(610); break; case "customers": - pageScroll(1450); + pageScroll(1750); break; case "aboutUs": - pageScroll(1830); + pageScroll(2170); break; } }; diff --git a/app/composables/index.js b/app/composables/index.js index 400300f..ed854fd 100644 --- a/app/composables/index.js +++ b/app/composables/index.js @@ -1,5 +1,25 @@ -export async function fetchPageContent() { +import panelAxios from "../services/panelAxios"; + +export async function fetchPageContent(ip) { try { + + try { + const raw = JSON.stringify({ + ViewStatisticsFromTheSite: { + IP: ip, + ViewTime: "", + ViewDate: "", + }, + }); + + await panelAxios.post("http://bpms-back.sepehrdata.com/api/save", raw); + } catch (err) { + console.log("Submit failed:", err); + } + + + + const response = await fetch("http://bpms-back.sepehrdata.com/api/select", { method: "POST", headers: { @@ -17,6 +37,8 @@ export async function fetchPageContent() { "email1", "logo", "product_introduction", + "title_product_introduction1", + "title_product_introduction2", "product_introduction_image", "location_company", "link_social_title1", @@ -57,3 +79,5 @@ export async function fetchPageContent() { }; } } + + diff --git a/app/index.js b/app/index.js index 0bff3f5..b39bb7c 100644 --- a/app/index.js +++ b/app/index.js @@ -1,3 +1,5 @@ +"use client"; + import "../public/assets/styles/main.css"; export const metadata = { title: "Create Next App", diff --git a/pages/components/mainClient.js b/pages/components/mainClient.js index a9cfd0b..270542e 100644 --- a/pages/components/mainClient.js +++ b/pages/components/mainClient.js @@ -1,23 +1,14 @@ "use client"; import Header from "../../app/components/navbar"; import Image from "next/image"; -import dataMining from "../../public/assets/icons/mining.svg"; -import bmpImage from "../../public/assets/icons/bpms.svg"; -import alImage from "../../public/assets/icons/al.svg"; import style from "../index.module.css"; import interduceImg from "../../public/assets/photos/secondInterDuce.png"; import Slider from "react-slick"; -import boton from "../../public/assets/photos/boton.png"; -import denik from "../../public/assets/photos/denik.jpg"; -import firstCustomer from "../../public/assets/photos/customer.jpg"; -import Customer2 from "../../public/assets/photos/customer2.jpg"; import "slick-carousel/slick/slick.css"; import "slick-carousel/slick/slick-theme.css"; import Footer from "../../app/components/footer"; import { useEffect, useState } from "react"; import Head from "next/head"; -import panelAxios from "../../app/services/panelAxios"; -import dotenv from "dotenv"; import Link from "next/link"; const MainClient = ({ data }) => { @@ -60,101 +51,15 @@ const MainClient = ({ data }) => { }, ], }; - const [authtoken, setAuthToken] = useState(""); - dotenv.config(); - // const getUser = async () => { - // debugger; - // const res = await panelAxios - // .post("person/login", { - // userName: "mehrdad", - // password: "13811381", - // }) - // .catch((err) => { - // console.log(err); - // }); - // const data = await JSON.parse(res.data.data)?.Token?.AccessToken; - // return data; - // }; + - const submitView = async (tokenFromEnv, ip) => { - const raw = JSON.stringify({ - // ViewStatisticsFromTheSite: [ - // { - // Name: "IP", - // Value: ip - // }, - // { - // Name: "ViewTime", - // Value: "" - // }, - // { - // Name: "ViewDate", - // Value: "" - // } - // ] - ViewStatisticsFromTheSite: { - IP: ip, - ViewTime: "", - ViewDate: "", - }, - }); - await panelAxios - .post("api/save", raw, { - headers: { - Authorization: `Bearer ${tokenFromEnv}`, - }, - }) - .catch(async (err) => { - console.log("error is Active!", err); - const userToken = await getUser(); - const ipAddress = await getIP(); - const raw = JSON.stringify({ - ViewStatisticsFromTheSite: { - IP: ipAddress, - ViewTime: "", - ViewDate: "", - }, - }); - - await panelAxios.post("api/save", raw, { - headers: { - Authorization: `Bearer ${userToken}`, - }, - }); - }); - }; - - // const getIP = async () => { - // try { - // const res = await fetch("https://api64.ipify.org?format=json"); - // const data = await res.json(); - // return data.ip; - // } catch (e) { - // console.log(e); - // } - // }; useEffect(() => { setCustomerSlider(JSON.parse(data.customer)); setCompanyServices(JSON.parse(data.service)); }, []); - // useEffect(async () => { - // let tokenFromEnv = process.env.TOKEN; - // if (tokenFromEnv != "" && tokenFromEnv != undefined) { - // console.log("have token"); - // const ipAddress = await getIP(); - // await submitView(tokenFromEnv, ipAddress); - // } else { - // console.log("Do Not Have Token"); - // const userToken = await getUser(); - // // process.env.TOKEN = userToken; - // setAuthToken(userToken); - // const ipAddress = await getIP(); - // await submitView(userToken, ipAddress); - // } - // }, []); return ( <> @@ -172,30 +77,71 @@ const MainClient = ({ data }) => {
-
+ {/*

معرفی

{data?.company_name}

{data?.company_introduction} - {/* با گسترش فناوری اطلاعات در سراسر دنیا و پیشرفت های شگرف در - ساخت تجهیزات الکترونیکی، مفهوم جدیدی در دنیای اقتصاد مطرح شد - که اکنون ارزشمندترین عنصر کمپانی های کوچک و بزرگ در تمام دنیا - به حساب می آید و آن چیزی نیست جز مفهوم "داده". با وجود کلان - داده هایی که در اختیار کمپانی های مختلف قرار دارد، علم "داده - کاوی" و مزیت های فوق العاده ارزشمند این علم که به صورت پیدا و - پنهان برای کمپانی ها به ارمغان می آورد، از درجه اهمیت روزافزون - برخوردار می شود. این مهم، جمعی از متخصصین علم کامپیوتر در مشهد - را بر آن داشت تا با کوله باری بیش از ده ساله در زمینه های - مختلف کامپیوتری اقدام به راه اندازی شرکت "داده کاوی سپهر توس" - نمایند. متخصصینی تحصیل کرده در رشته های نرم افزار، فناوری - اطلاعات، هوش مصنوعی و ... در دانشگاه های خواجه نصیرالدین طوسی، - فردوسی، آزاد و ...، با توانمندی در زمینه های برنامه نویسی های - پیشرفته و متخصص در علوم داده و ...، در این شرکت گرد هم آمده - اند. */}

+
*/} + + +
+ + {(() => { + let slides = []; + + try { + slides = data?.slider ? JSON.parse(data.slider) : []; + } catch { + slides = []; + } + + if (!Array.isArray(slides) || slides.length === 0) return null; + + return slides.map((el, index) => ( +
+
+
+ {el.title +
+
+

{el.title}

+

{el.description}

+ {el.link && ( + + )} +
+
+
+ )); +})()} + +
+ + + + +
interduce
@@ -217,12 +163,15 @@ const MainClient = ({ data }) => {
DataMining
-

{data?.title}

+

{el?.title}

{el?.description}

@@ -231,144 +180,65 @@ const MainClient = ({ data }) => { ); })} - {/*
-
-
- DataMining -
-

BPMS

-
-
-

- مدیریت فرایند کسب و کار (BPM) بر استقرار فرایندی خودکار و - یک‌پارچه برای معاملات معمول و تعاملات انسانی متمرکز است. این - حوزه از مدیریت از طریق کاهش دوباره‌کاری و اتلاف‌، به کاهش - هزینه در سازمان و کارایی تیم‌ها کمک می‌کند. -

-
-
-
-
-
- DataMining -
-

Artificial Intelligence

-
-
-

- هوش مصنوعی شامل شاخه های متنوعی است که مباحث داده کاوی، - پردازش متن، پردازش تصویر و در کل هوشمند سازی سامانه های - مختلف با استفاده از پیشرفته ترین الگوریتم ها از توانمندی های - متخصصین سپهر می باشد. -

-
-
*/}
-

هایپر

-

اتوماسیون

+

{data?.title_product_introduction1}

+

{data?.title_product_introduction2}

{data?.product_introduction} - {/* هایپر اتوماسیون ابزاری است که از فناوری های هوشمند برای - خودکارسازی فعالیت هایی که توسط انسان انجام می شوند، استفاده - می کند. فناوری های مورد استفاده در هایپر اتوماسیون شامل هوش - مصنوعی (Artificial intelligence)، یادگیری ماشین (Machine - Learning)، سیستم مدیریت فرآیندهای تجاری (Business Process - Management System) و اتوماسیون فرآیند رباتیک (Robotic - Process Automation) می باشند. هایپر اتوماسیون بر وظایف و - فرآیندهای قابل خودکارسازی تمرکز دارد و اغلب از آن به عنوان - مرحله اصلی بعدی تحول دیجیتال یاد می‌شود. */} +

-
-
-

BPMS

-

- Business Process Management System -

-
-
-

AL

-

Artificial Intelligence

-
-
-

Others

-

- Other AdvancedAutomation Tools And Analytics -

-
-
-

ML

-

Machine Learning

-
-
-
-
-
-
- Robotic Process Automation -
-
-
+
+ {data?.title_product_introduction1
+ +
-

مشتریان

{data?.company_name}

- {customerSlider?.map((el) => { - return ( - - brand - - ); - })} - {/* - brand - - - brand - - - brand - - - brand - */} - + {customerSlider?.map((el) => { + return ( +
+ + brand + + {/* عنوان */} +
+

{el?.title}

+
+
+ ); + })} +
@@ -380,14 +250,11 @@ const MainClient = ({ data }) => {

- هم اکنون شرکت داده کاوی سپهر توس بعد از پذیرش در{" "} - پارک علم و فناوری خراسان حول - محصولات مبتنی بر هوش مصنوعی{" "} - مشغول به فعالیت می باشد. + {data?.company_introduction}

-
+
diff --git a/pages/index.js b/pages/index.js index b4832e2..9446894 100644 --- a/pages/index.js +++ b/pages/index.js @@ -1,12 +1,22 @@ // pages/index.js import { fetchPageContent } from "../app/composables"; +import { submitView } from "../app/composables"; + import MainClient from "./components/mainClient"; -export async function getServerSideProps() { - const data = await fetchPageContent(); +export async function getServerSideProps({ req }) { + const ip = + req.headers["x-forwarded-for"]?.split(",")[0] || + req.socket.remoteAddress || + ""; + + const data = await fetchPageContent(ip); return data; } + export default function Home({ data }) { return ; } + + diff --git a/pages/index.module.css b/pages/index.module.css index 69b0f1e..89493dd 100644 --- a/pages/index.module.css +++ b/pages/index.module.css @@ -8,6 +8,190 @@ } + + + + + + +.introduceSlider { + width: 100%; + height: 600px; + margin-top: 40px; + direction: rtl; + position: relative; + } + + .slideItem { + display: flex !important; + align-items: center; + justify-content: center; + height: 440px; + } + + .slideContent { + display: flex; + align-items: center; + justify-content: space-between; + gap: 40px; + width: 100%; + } + + .slideImage { + flex: 1; + display: flex; + justify-content: center; + align-items: center; + cursor: pointer; + } + + .slideText { + flex: 1; + text-align: right; + display: flex; + flex-direction: column; + justify-content: center; + } + + .slideText h1 { + font-size: 2rem; + margin-bottom: 1rem; + } + + .slideText p { + font-size: 1.1rem; + line-height: 1.8rem; + /* color: #333; */ + color: var(--secondTextColor); + text-align: justify; + direction: rtl; + text-align: justify; + } + + .slideLink { + margin-top: 15px; + display: inline-block; + color: #0070f3; + text-decoration: underline; + font-weight: bold; + } + + /* --- نقطه‌های پایین اسلایدر --- */ + .customDots { + position: absolute; + bottom: 10px; /* نزدیک‌تر به داخل کادر */ + left: 0; + right: 0; + + display: flex !important; + justify-content: center; + pointer-events: none; /* روی نقاط کلیک هنوز کار می‌کنه */ + + } + + .customDots ul { + display: flex !important; + gap: 8px; + padding: 0; + margin: 0; + } + + .dot { + width: 24px; + height: 24px; + background-color: rgba(255, 255, 255, 0.6); + border-radius: 50%; + transition: all 0.3s ease; + pointer-events: auto; /* برای کلیک روی نقاط */ + } + + .customDots li.slick-active .dot { + background-color: #0070f3; + transform: scale(1.2); + box-shadow: 0 0 4px rgba(0, 112, 243, 0.8); + } + + /* --- واکنش‌گرا --- */ + @media (max-width: 768px) { + .slideContent { + flex-direction: column; + text-align: center; + } + + .slideImage, + .slideText { + flex: none; + width: 100%; + } + + .introduceSlider { + height: auto; + } + + .slideItem { + height: auto; + padding: 20px 0; + } + } + + + + + .hyperAutomation { + width: 100%; + display: flex; + align-items: center; + justify-content: center; + background: inherit; /* رنگ زمینه همونی که هست */ + height: 100%; /* ارتفاع همون اندازه قبلی بمونه */ + padding: 2rem 0; + font-family: inherit; /* فونت جاری سامانه حفظ شود */ + } + + .contentWrapper { + display: flex; + flex-direction: row; /* عکس چپ، متن راست */ + align-items: center; + justify-content: space-between; + width: 90%; + max-width: 1200px; + height: 100%; /* برای حفظ ارتفاع */ + } + + .imageSection { + flex: 1; + display: flex; + justify-content: center; + align-items: center; + } + + .robotImage { + max-width: 100%; + height: auto; + object-fit: contain; + } + + .textSection { + flex: 1; + padding-right: 2rem; + } + + .title { + display: flex; + align-items: baseline; + gap: 0.5rem; + } + + + + + + + + + + + .parent::before { content: ""; display: flow-root; @@ -93,6 +277,7 @@ margin-top: 60px; } + /* services */ .services { margin: 50px 0; diff --git a/public/assets/styles/main.css b/public/assets/styles/main.css index c507898..64f157d 100644 --- a/public/assets/styles/main.css +++ b/public/assets/styles/main.css @@ -550,4 +550,38 @@ button { .card { width: 280px; } -} \ No newline at end of file +} + +.customerItem { + display: flex; + flex-direction: column; + align-items: center; + justify-content: center; + text-align: center; + padding: 10px; + } + + .customerBrand { + display: block; + text-align: center; + text-decoration: none; + width: 100%; + } + + .titleContainer { + width: 100%; + display: flex; + justify-content: center; + align-items: center; + margin-top: 8px; + } + + .customerTitle { + font-size: 18px; + color:var(--textColor); + text-align: center; + line-height: 1.4; + font-weight: normal; + margin-top: 10px; + padding: 0 10px; + } \ No newline at end of file