change data clinics & page clinics tab about & contact & doctors
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
import ClinicPage from '@/components/clinic';
|
||||
import Layout from '@/components/layout';
|
||||
import clinics from '@/data/clinics.json';
|
||||
import doctors from '@/data/doctors.json';
|
||||
|
||||
function Blog({ params: { slug } }) {
|
||||
|
||||
@@ -10,6 +11,7 @@ function Blog({ params: { slug } }) {
|
||||
<Layout title='کلینیک' name='clinic'>
|
||||
<ClinicPage
|
||||
data={clinic}
|
||||
doctors={doctors}
|
||||
/>
|
||||
</Layout>
|
||||
)
|
||||
|
||||
@@ -0,0 +1,72 @@
|
||||
import Image from "next/image";
|
||||
import { Button } from "@mui/material";
|
||||
|
||||
// Icons
|
||||
import ArrowLeftD from "@/components/icons/ArrowLeftD";
|
||||
import ClockD from "@/components/icons/ClockD";
|
||||
import LikeD from "@/components/icons/LikeD";
|
||||
import PointD from "@/components/icons/PointD";
|
||||
import Link from "next/link";
|
||||
|
||||
function ItemDoctor({ doctor }) {
|
||||
return (
|
||||
<li className="p-4 relative rounded-lg bg-[#FFF] border border-[#EFEFEF]">
|
||||
{/* Detail Doctor */}
|
||||
<div className="flex items-center justify-start gap-2.5">
|
||||
<Image
|
||||
width={72}
|
||||
height={72}
|
||||
src={doctor.img}
|
||||
alt="image-doctor"
|
||||
className="py-1.5"
|
||||
/>
|
||||
<div className="flex flex-col items-start justify-center gap-2">
|
||||
<p className="text-[#3B3B3B] text-[14px] font-bold">{doctor.name}</p>
|
||||
<p className="text-[#616161] text-[14px] font-normal">تخصص: {doctor.expertise}</p>
|
||||
<div className="flex rounded items-center justify-start gap-2">
|
||||
<div className="p-1 bg-[#F8F8FF] flex items-center rounded-[4px] gap-0.5">
|
||||
<LikeD />
|
||||
<p className="text-[#616161] text-[12px] font-normal">{doctor.satisfaction}%</p>
|
||||
</div>
|
||||
<div className="p-1 bg-[#F8F8FF] flex items-center rounded-[4px] gap-0.5">
|
||||
<PointD />
|
||||
<p className="text-[#616161] text-[12px] font-normal">{doctor.point}</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{/* Hours of work */}
|
||||
<div className="flex my-4 items-center justify-start gap-0.5">
|
||||
<ClockD />
|
||||
<p className="text-[#7E7E7E] text-[12px] font-normal">ساعت کاری: {doctor.hours_of_work}</p>
|
||||
</div>
|
||||
<p
|
||||
className={`text-[12px] font-medium rounded w-fit p-1.5
|
||||
${doctor.free_turn ?
|
||||
'bg-[rgba(5,_186,_88,_0.04)] text-[#05BA58]' :
|
||||
'bg-[rgba(211,_47,_47,_0.04)] text-[#D32F2F]'
|
||||
}`}
|
||||
>{doctor.free_turn ?
|
||||
`اولین نوبت آزاد: ${doctor.free_turn}` :
|
||||
'نوبت ندارد'
|
||||
}</p>
|
||||
|
||||
{/* Arrow */}
|
||||
<Link href={`/doctor/${doctor.id}`}>
|
||||
<Button
|
||||
className={`!p-[14px] !absolute !left-4 !bottom-4 !rounded-full !w-fit
|
||||
${doctor.free_turn ?
|
||||
'!bg-[#5559CE]' :
|
||||
'!bg-[#D7D7D7]'
|
||||
}`}
|
||||
disabled={!doctor.free_turn}
|
||||
>
|
||||
<ArrowLeftD />
|
||||
</Button>
|
||||
</Link>
|
||||
</li>
|
||||
)
|
||||
}
|
||||
|
||||
export default ItemDoctor
|
||||
@@ -241,6 +241,21 @@ body {
|
||||
height: 0;
|
||||
}
|
||||
|
||||
.opacity-page {
|
||||
animation: loadPageOpacity;
|
||||
animation-duration: 1s;
|
||||
}
|
||||
|
||||
@keyframes loadPageOpacity {
|
||||
0% {
|
||||
opacity: 0;
|
||||
}
|
||||
|
||||
100% {
|
||||
opacity: 1;
|
||||
}
|
||||
}
|
||||
|
||||
@media (min-width: 640px) {
|
||||
.padding-responsive {
|
||||
padding-left: 52px;
|
||||
|
||||
+1
-1
@@ -13,7 +13,7 @@ export default function Home() {
|
||||
}, [])
|
||||
|
||||
return (
|
||||
<Layout title='خانه'>
|
||||
<Layout title='خانه' name=''>
|
||||
<HomePage />
|
||||
</Layout>
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user