fix bug design

This commit is contained in:
hamid zarghami
2025-04-23 09:57:53 +03:30
parent 452a709273
commit 01cb9b2781
11 changed files with 119 additions and 77 deletions
Binary file not shown.
+2 -1
View File
@@ -54,7 +54,8 @@ const About: NextPage = () => {
<div className='mt-[300px] bg-white rounded-4xl p-10 xl:h-[500px]'> <div className='mt-[300px] bg-white rounded-4xl p-10 xl:h-[500px]'>
<div className='max-w-maxWidth mx-auto'> <div className='max-w-maxWidth mx-auto'>
<video controls className='w-full xl:-mt-[300px] -mt-[100px] rounded-4xl max-h-[500px]'> <video controls className='w-full object-cover xl:-mt-[300px] -mt-[100px] rounded-4xl max-h-[500px]'>
<source src='/hp-s3-360p.mp4' type='video/mp4' />
</video> </video>
<div className='flex xl:flex-row flex-col gap-24 mt-20'> <div className='flex xl:flex-row flex-col gap-24 mt-20'>
+6 -6
View File
@@ -9,7 +9,7 @@ const ContactUs: FC = () => {
</h4> </h4>
<div className='flex gap-4 mt-6'> <div className='flex gap-4 mt-6'>
<div className='flex-1 bg-[#0A66C2] text-white rounded-xl p-4'> <a href='https://www.linkedin.com/company/danakcorporation/' target='_blank' className='flex-1 bg-[#0A66C2] text-white rounded-xl p-4'>
<Image <Image
src='/images/linkedin3.svg' src='/images/linkedin3.svg'
alt='contact us' alt='contact us'
@@ -26,8 +26,8 @@ const ContactUs: FC = () => {
به ما بپیوندید به ما بپیوندید
</div> </div>
</div> </div>
</div> </a>
<div className='flex-1 bg-[#FF0302] text-white rounded-xl p-4'> <a href='https://www.youtube.com/@danakcorp' target='_blank' className='flex-1 bg-[#FF0302] text-white rounded-xl p-4'>
<Image <Image
src='/images/youtube.svg' src='/images/youtube.svg'
alt='contact us' alt='contact us'
@@ -44,10 +44,10 @@ const ContactUs: FC = () => {
به ما بپیوندید به ما بپیوندید
</div> </div>
</div> </div>
</div> </a>
</div> </div>
<div className='flex-1 instagram-gradient text-white rounded-xl p-4 mt-4'> <a href='https://www.instagram.com/danak.corporation' target='_blank' className='flex-1 block instagram-gradient text-white rounded-xl p-4 mt-4'>
<Image <Image
src='/images/instagram2.svg' src='/images/instagram2.svg'
alt='contact us' alt='contact us'
@@ -64,7 +64,7 @@ const ContactUs: FC = () => {
به ما بپیوندید به ما بپیوندید
</div> </div>
</div> </div>
</div> </a>
</div> </div>
) )
} }
+3 -3
View File
@@ -50,15 +50,15 @@ const CreateReview: FC<Props> = ({ refetch, id }) => {
}) })
return ( return (
<div className='bg-white p-6 rounded-3xl xl:w-[360px] w-full'> <div className='bg-white p-6 rounded-3xl w-full'>
<div> <div className='text-sm'>
ارسال نظر ارسال نظر
</div> </div>
{ {
!isLogin ? ( !isLogin ? (
<div className='mt-6 text-description text-sm'> <div className='mt-6 text-description text-sm text-center'>
<div> <div>
برای ارسال نظر لطفا وارد حساب کاربری خود شوید برای ارسال نظر لطفا وارد حساب کاربری خود شوید
</div> </div>
+61 -41
View File
@@ -1,5 +1,5 @@
'use client' 'use client'
import { Profile, Calendar, Tag } from 'iconsax-react' import { Profile, Calendar, Tag, ExportCurve } from 'iconsax-react'
import { FC } from 'react' import { FC } from 'react'
import Image from 'next/image' import Image from 'next/image'
// import MostVisited from '../components/MostVisited' // import MostVisited from '../components/MostVisited'
@@ -61,7 +61,7 @@ const SingleBlogPage: FC<Props> = ({ id }) => {
/> />
</div> </div>
<p dangerouslySetInnerHTML={{ __html: data?.data?.blog?.content }} className='mt-8 text-sm leading-6'> <p id='blog-content' dangerouslySetInnerHTML={{ __html: data?.data?.blog?.content }} className='mt-8 text-sm leading-6'>
</p> </p>
@@ -98,6 +98,21 @@ const SingleBlogPage: FC<Props> = ({ id }) => {
height={20} height={20}
/> />
</TelegramShareButton> </TelegramShareButton>
{navigator.share && (
<button
onClick={() =>
navigator.share({
title: data?.data?.blog?.title,
text: 'Check out this blog!',
url: `${window.location.origin}/blogs/${id}`,
})
}
className='cursor-pointer'
>
<ExportCurve size={20} color='black' />
</button>
)}
</div> </div>
@@ -114,48 +129,53 @@ const SingleBlogPage: FC<Props> = ({ id }) => {
</div> </div>
</div> </div>
<div className='mt-8 flex xl:flex-row flex-col gap-8 items-start'> <div className='flex gap-8'>
<CreateReview id={data?.data?.blog?.id} refetch={refetch} /> <div className='mt-8 flex flex-1 flex-col gap-8 items-start'>
<div className='flex-1 w-full max-w-full bg-white p-6 rounded-3xl'> <div className='flex-1 flex flex-col w-full max-w-full bg-white p-6 rounded-3xl'>
<div className='text-sm'> <div className='text-sm'>
نظرات کاربران نظرات کاربران
</div>
{
data?.data?.comments?.length === 0 ?
<div className='flex justify-center items-center h-full mt-7'>
<div className='text-description text-sm'>
هیچ نظری ثبت نشده است
</div>
</div>
:
data?.data?.comments?.map((comment) => {
return (
<div key={comment.id} className='mt-5 border border-[#EAEDF5] rounded-3xl p-6'>
<div className='flex gap-2 items-center'>
<Image alt='avatar' width={24} height={24} src={comment.user?.profilePic || '/images/default-avatar.png'} className='size-6 rounded-full object-cover' />
<div className='text-description text-xs'>
{comment.user?.firstName + ' ' + comment.user?.lastName}
</div>
</div>
<div className='mt-4 flex justify-between'>
<div className='text-sm max-w-[70%] truncate'>
{comment.title}
</div>
<div className='text-xs text-description'>
{timeAgo(comment.createdAt)}
</div>
</div>
<div className='mt-4 text-[11px] leading-6'>
{comment.content}
</div>
</div>
)
})
}
</div> </div>
{ <CreateReview id={data?.data?.blog?.id} refetch={refetch} />
data?.data?.comments?.length === 0 ?
<div className='flex justify-center items-center h-full mt-7'>
<div className='text-description text-sm'>
هیچ نظری ثبت نشده است
</div>
</div>
:
data?.data?.comments?.map((comment) => {
return (
<div key={comment.id} className='mt-5 border border-[#EAEDF5] rounded-3xl p-6'>
<div className='flex gap-2 items-center'>
<Image alt='avatar' width={24} height={24} src={comment.user?.profilePic || '/images/default-avatar.png'} className='size-6 rounded-full object-cover' />
<div className='text-description text-xs'>
{comment.user?.firstName + ' ' + comment.user?.lastName}
</div>
</div>
<div className='mt-4 flex justify-between'>
<div className='text-sm max-w-[70%] truncate'>
{comment.title}
</div>
<div className='text-xs text-description'>
{timeAgo(comment.createdAt)}
</div>
</div>
<div className='mt-4 text-[11px] leading-6'>
{comment.content}
</div>
</div>
)
})
}
</div> </div>
<div className='xl:w-[261px] hidden xl:block'></div>
</div> </div>
</div> </div>
) )
+4
View File
@@ -115,3 +115,7 @@ tbody tr {
#blog-preview-content * { #blog-preview-content * {
color: white !important; color: white !important;
} }
#blog-content a {
color: #ea063e !important;
}
+1
View File
@@ -10,6 +10,7 @@ const Blog: FC = () => {
<div className='xl:mt-24 mt-14 max-w-maxWidth mx-auto'> <div className='xl:mt-24 mt-14 max-w-maxWidth mx-auto'>
<SectionHeader <SectionHeader
title='مجله داناک' title='مجله داناک'
link='/blogs'
/> />
<div className='flex xl:flex-row flex-col gap-8 xl:mt-16 mt-10 items-center'> <div className='flex xl:flex-row flex-col gap-8 xl:mt-16 mt-10 items-center'>
+13 -8
View File
@@ -1,6 +1,7 @@
import Button from '@/components/Button' import Button from '@/components/Button'
import InfoBox from '@/components/InfoBox' import InfoBox from '@/components/InfoBox'
import { DocumentCode, FavoriteChart } from 'iconsax-react' import { DocumentCode, FavoriteChart } from 'iconsax-react'
import Link from 'next/link'
import { FC } from 'react' import { FC } from 'react'
const Collaboration: FC = () => { const Collaboration: FC = () => {
@@ -17,14 +18,18 @@ const Collaboration: FC = () => {
</p> </p>
<div className='flex justify-center xl:justify-start gap-2 mt-10'> <div className='flex justify-center xl:justify-start gap-2 mt-10'>
<Button <Link href={'/developers'}>
label='توسعه دهندگان' <Button
className='w-fit px-5 whitespace-nowrap' label='توسعه دهندگان'
/> className='w-fit px-5 whitespace-nowrap'
<Button />
label='نمایندگان' </Link>
className='w-fit px-5 bg-transparent border border-black text-black whitespace-nowrap' <Link href={'/representatives'}>
/> <Button
label='نمایندگان'
className='w-fit px-5 bg-transparent border border-black text-black whitespace-nowrap'
/>
</Link>
</div> </div>
</div> </div>
+7 -4
View File
@@ -1,6 +1,7 @@
import Button from '@/components/Button' import Button from '@/components/Button'
import InfoBox from '@/components/InfoBox' import InfoBox from '@/components/InfoBox'
import { Activity, Headphone, Profile2User, ShieldTick } from 'iconsax-react' import { Activity, Headphone, Profile2User, ShieldTick } from 'iconsax-react'
import Link from 'next/link'
import { FC } from 'react' import { FC } from 'react'
const WhyDanak: FC = () => { const WhyDanak: FC = () => {
@@ -16,10 +17,12 @@ const WhyDanak: FC = () => {
ما در داناک با ترکیب خلاقیت، تخصص و تکنولوژیهای روز، راهکارهای نرمافزاری منحصربهفردی ارائه میدهیم که کسبوکار شما را به سطحی بالاتر میبرد. ما در داناک با ترکیب خلاقیت، تخصص و تکنولوژیهای روز، راهکارهای نرمافزاری منحصربهفردی ارائه میدهیم که کسبوکار شما را به سطحی بالاتر میبرد.
</p> </p>
<Button <Link href={'/danak-services'}>
label='خدمات' <Button
className='mt-10 w-fit px-12 hidden xl:block' label='خدمات'
/> className='mt-10 w-fit px-12 hidden xl:block'
/>
</Link>
</div> </div>
<div className='flex-1 flex xl:flex-row flex-col gap-8 flex-wrap'> <div className='flex-1 flex xl:flex-row flex-col gap-8 flex-wrap'>
+12 -8
View File
@@ -1,8 +1,10 @@
import { ArrowLeft } from 'iconsax-react' import { ArrowLeft } from 'iconsax-react'
import Link from 'next/link'
import { FC } from 'react' import { FC } from 'react'
type Props = { type Props = {
title: string title: string,
link?: string
} }
const SectionHeader: FC<Props> = (props) => { const SectionHeader: FC<Props> = (props) => {
@@ -12,13 +14,15 @@ const SectionHeader: FC<Props> = (props) => {
{props.title} {props.title}
</h2> </h2>
<div className='flex gap-1'> <Link href={props.link || '#'}>
<div className='text-sm'>مشاهده همه</div> <div className='flex gap-1'>
<ArrowLeft <div className='text-sm'>مشاهده همه</div>
size={20} <ArrowLeft
color='black' size={20}
/> color='black'
</div> />
</div>
</Link>
</div> </div>
) )
} }
+10 -6
View File
@@ -155,18 +155,22 @@ const Footer: FC = () => {
</div> </div>
<div className='xl:h-14 border-t border-[#DADDE6] flex xl:flex-row flex-col gap-5 pt-5 xl:pt-0 justify-between items-center'> <div className='xl:h-14 border-t border-[#DADDE6] flex xl:flex-row flex-col gap-5 pt-5 xl:pt-0 justify-between items-center'>
<ul className='flex gap-4 xl:text-sm text-[10px]'> <ul className='flex gap-4 xl:text-sm text-[10px]'>
<li className='xl:pl-4 xl:border-l border-[#DADDE6]'> <Link href={'/about'}>
درباره ی ما <li className='xl:pl-4 xl:border-l border-[#DADDE6]'>
</li> درباره ی ما
</li>
</Link>
<li className='xl:pl-4 xl:border-l border-[#DADDE6]'> <li className='xl:pl-4 xl:border-l border-[#DADDE6]'>
حریم خصوصی حریم خصوصی
</li> </li>
<li className='xl:pl-4 xl:border-l border-[#DADDE6]'> <li className='xl:pl-4 xl:border-l border-[#DADDE6]'>
قوانین و مقررات قوانین و مقررات
</li> </li>
<li> <Link href={'/contact'}>
تماس با ما <li>
</li> تماس با ما
</li>
</Link>
</ul> </ul>
<div className='xl:text-sm text-xs dltr pb-4 xl:pb-0'> <div className='xl:text-sm text-xs dltr pb-4 xl:pb-0'>