From 3e0714dcffaed1c1b4630f4932239982745950ee Mon Sep 17 00:00:00 2001 From: Ehsan Date: Mon, 8 Jul 2024 21:04:47 +0330 Subject: [PATCH] finish design doctor item & change basic responsive style --- app/component/Logo.js | 21 ++++++++ app/globals.css | 21 ++++++++ .../doctor/appointmentList/AppointmentList.js | 7 --- .../doctor/appointmentList/ItemAppointment.js | 42 +++++++++++++++ components/doctor/appointmentList/index.js | 17 ++++++ .../commentUser/{Item.js => ItemUser.js} | 0 .../cards/comments/commentUser/index.js | 2 +- components/doctor/index.js | 2 +- components/home/index.js | 22 ++++---- components/icons/ClockTurn.js | 10 ++++ components/icons/GreenCalendarTurn.js | 18 +++++++ components/icons/LocationTurn.js | 10 ++++ components/layout/Footer.js | 11 +--- components/layout/Header.js | 12 +---- components/layout/index.js | 2 +- data/turns.json | 53 +++++++++++++++++++ 16 files changed, 211 insertions(+), 39 deletions(-) create mode 100644 app/component/Logo.js delete mode 100644 components/doctor/appointmentList/AppointmentList.js create mode 100644 components/doctor/appointmentList/ItemAppointment.js create mode 100644 components/doctor/appointmentList/index.js rename components/doctor/detailDoctor/cards/comments/commentUser/{Item.js => ItemUser.js} (100%) create mode 100644 components/icons/ClockTurn.js create mode 100644 components/icons/GreenCalendarTurn.js create mode 100644 components/icons/LocationTurn.js create mode 100644 data/turns.json diff --git a/app/component/Logo.js b/app/component/Logo.js new file mode 100644 index 0000000..9d4eacd --- /dev/null +++ b/app/component/Logo.js @@ -0,0 +1,21 @@ +import Image from 'next/image' +import Link from 'next/link' +import React from 'react' + +function Logo() { + return ( + +
+ logo +

نوبت ۷۲۴

+
+ + ) +} + +export default Logo \ No newline at end of file diff --git a/app/globals.css b/app/globals.css index 80d94fd..7c6c36c 100644 --- a/app/globals.css +++ b/app/globals.css @@ -121,6 +121,24 @@ body { background: #FAFAFA; } +/* Scroll */ + +::-webkit-scrollbar { + width: 7px; +} + +::-webkit-scrollbar-track { + background: #F1F1F1; + height: 50px; + border-radius: 10px; +} + +::-webkit-scrollbar-thumb { + background: #C1C1C1; + height: 50px; + border-radius: 20px; +} + .font-kalame { font-family: kalame; } @@ -174,6 +192,9 @@ body { } .padding-responsive { + max-width: 1440px; + margin-left: auto; + margin-right: auto; padding-left: 24px; padding-right: 24px; } diff --git a/components/doctor/appointmentList/AppointmentList.js b/components/doctor/appointmentList/AppointmentList.js deleted file mode 100644 index e98c1bd..0000000 --- a/components/doctor/appointmentList/AppointmentList.js +++ /dev/null @@ -1,7 +0,0 @@ -function AppointmentList() { - return ( -
AppointmentList
- ) -} - -export default AppointmentList \ No newline at end of file diff --git a/components/doctor/appointmentList/ItemAppointment.js b/components/doctor/appointmentList/ItemAppointment.js new file mode 100644 index 0000000..a4217b5 --- /dev/null +++ b/components/doctor/appointmentList/ItemAppointment.js @@ -0,0 +1,42 @@ +import ArrowLeftD from '@/components/icons/ArrowLeftD' +import ClockTurn from '@/components/icons/ClockTurn' +import GreenCalendarTurn from '@/components/icons/GreenCalendarTurn' +import LocationTurn from '@/components/icons/LocationTurn' +import { Button } from '@mui/material' +import React from 'react' + +function ItemAppointment({ turn }) { + return ( +
  • +

    نوبت دهی

    +
    +
    + +

    آدرس: {turn.location}

    +
    +
    + +

    ساعت کاری: {turn.hours_of_work}

    +
    +
    +
    +
    + +

    اولین نوبت آزاد: {turn.first_free_turn}

    +
    + +
    +
  • + ) +} + +export default ItemAppointment \ No newline at end of file diff --git a/components/doctor/appointmentList/index.js b/components/doctor/appointmentList/index.js new file mode 100644 index 0000000..6ce841c --- /dev/null +++ b/components/doctor/appointmentList/index.js @@ -0,0 +1,17 @@ +import turns from '@/data/turns.json'; +import ItemAppointment from './ItemAppointment'; + +function AppointmentList() { + return ( + + ) +} + +export default AppointmentList \ No newline at end of file diff --git a/components/doctor/detailDoctor/cards/comments/commentUser/Item.js b/components/doctor/detailDoctor/cards/comments/commentUser/ItemUser.js similarity index 100% rename from components/doctor/detailDoctor/cards/comments/commentUser/Item.js rename to components/doctor/detailDoctor/cards/comments/commentUser/ItemUser.js diff --git a/components/doctor/detailDoctor/cards/comments/commentUser/index.js b/components/doctor/detailDoctor/cards/comments/commentUser/index.js index 630b7c9..7c835a4 100644 --- a/components/doctor/detailDoctor/cards/comments/commentUser/index.js +++ b/components/doctor/detailDoctor/cards/comments/commentUser/index.js @@ -1,6 +1,6 @@ 'use client'; import { useState } from 'react'; -import ItemUser from './Item' +import ItemUser from './ItemUser' function CommentUser({ doctor }) { diff --git a/components/doctor/index.js b/components/doctor/index.js index 9b8b03d..e3b1620 100644 --- a/components/doctor/index.js +++ b/components/doctor/index.js @@ -1,4 +1,4 @@ -import AppointmentList from "./appointmentList/AppointmentList" +import AppointmentList from "./appointmentList" import DetailDoctor from "./detailDoctor" function DoctorPage({ doctor }) { diff --git a/components/home/index.js b/components/home/index.js index 7a409eb..d0afeda 100644 --- a/components/home/index.js +++ b/components/home/index.js @@ -7,17 +7,19 @@ import FrequentSearches from "./FrequentSearches"; function HomePage() { return ( -
    -
    -

    نوبت ۷۲۴

    -

    - - میتونی آنلاین نوبت بگیری! - -

    +
    +
    +
    +

    نوبت ۷۲۴

    +

    + + میتونی آنلاین نوبت بگیری! + +

    +
    + +
    - -
    ) } diff --git a/components/icons/ClockTurn.js b/components/icons/ClockTurn.js new file mode 100644 index 0000000..6f8ad47 --- /dev/null +++ b/components/icons/ClockTurn.js @@ -0,0 +1,10 @@ +function ClockTurn() { + return ( + + + + + ) +} + +export default ClockTurn \ No newline at end of file diff --git a/components/icons/GreenCalendarTurn.js b/components/icons/GreenCalendarTurn.js new file mode 100644 index 0000000..2244404 --- /dev/null +++ b/components/icons/GreenCalendarTurn.js @@ -0,0 +1,18 @@ +function GreenCalendarTurn() { + return ( + + + + + + + + + + + + + ) +} + +export default GreenCalendarTurn \ No newline at end of file diff --git a/components/icons/LocationTurn.js b/components/icons/LocationTurn.js new file mode 100644 index 0000000..3250f41 --- /dev/null +++ b/components/icons/LocationTurn.js @@ -0,0 +1,10 @@ +function LocationTurn() { + return ( + + + + + ) +} + +export default LocationTurn \ No newline at end of file diff --git a/components/layout/Footer.js b/components/layout/Footer.js index 511b195..5f7973c 100644 --- a/components/layout/Footer.js +++ b/components/layout/Footer.js @@ -8,6 +8,7 @@ import Link from "next/link"; import LocationF from "../icons/LocationF"; import CalendarAddF from "../icons/CalendarAddF"; import StethoscopeF from "../icons/StethoscopeF"; +import Logo from "@/app/component/Logo"; const socialMedias = [ , @@ -44,15 +45,7 @@ function Footer() { {/* Right */}
    {/* Icon */} -
    - logo -

    نوبت ۷۲۴

    -
    +

    724 یک وبسایت نوبت دهی آنلاین می باشد که
    بستری آسان برای پزشکان و بیماران فراهم کرده
    است.

    diff --git a/components/layout/Header.js b/components/layout/Header.js index 26b11d3..c631815 100644 --- a/components/layout/Header.js +++ b/components/layout/Header.js @@ -1,6 +1,6 @@ +import Logo from "@/app/component/Logo"; import { listNav } from "@/constans"; import { Button } from "@mui/material"; -import Image from "next/image"; import Link from "next/link"; function Header() { @@ -9,15 +9,7 @@ function Header() { className="bg-[#FAFAFA] rounded-lg shadow-[0px_1px_24.8px_0px_rgba(204,_204,_204,_0.18)] w-full mx-auto" >
    -
    - logo -

    نوبت ۷۲۴

    -
    +
      {listNav.map(nav => (
    • {`${title} | نوبت ۷۲۴`} */}
      -
      +
      diff --git a/data/turns.json b/data/turns.json new file mode 100644 index 0000000..8f18d85 --- /dev/null +++ b/data/turns.json @@ -0,0 +1,53 @@ +[ + { + "id": 1, + "location": "اهواز، کیانپارس، پهلوان شرقی، مجتمع پزشکی آویسا، واحد ۱۲", + "hours_of_work": "شنبه تا سه شنبه ساعت 16 تا 22", + "first_free_turn": "یکشنبه 24 اردیبهشت" + },{ + "id": 2, + "location": "اهواز، کیانپارس، پهلوان شرقی، مجتمع پزشکی آویسا، واحد ۱۲", + "hours_of_work": "شنبه تا سه شنبه ساعت 16 تا 22", + "first_free_turn": "یکشنبه 24 اردیبهشت" + },{ + "id": 3, + "location": "اهواز، کیانپارس، پهلوان شرقی، مجتمع پزشکی آویسا، واحد ۱۲", + "hours_of_work": "شنبه تا سه شنبه ساعت 16 تا 22", + "first_free_turn": "یکشنبه 24 اردیبهشت" + },{ + "id": 4, + "location": "اهواز، کیانپارس، پهلوان شرقی، مجتمع پزشکی آویسا، واحد ۱۲", + "hours_of_work": "شنبه تا سه شنبه ساعت 16 تا 22", + "first_free_turn": "یکشنبه 24 اردیبهشت" + },{ + "id": 5, + "location": "اهواز، کیانپارس، پهلوان شرقی، مجتمع پزشکی آویسا، واحد ۱۲", + "hours_of_work": "شنبه تا سه شنبه ساعت 16 تا 22", + "first_free_turn": "یکشنبه 24 اردیبهشت" + },{ + "id": 6, + "location": "اهواز، کیانپارس، پهلوان شرقی، مجتمع پزشکی آویسا، واحد ۱۲", + "hours_of_work": "شنبه تا سه شنبه ساعت 16 تا 22", + "first_free_turn": "یکشنبه 24 اردیبهشت" + },{ + "id": 7, + "location": "اهواز، کیانپارس، پهلوان شرقی، مجتمع پزشکی آویسا، واحد ۱۲", + "hours_of_work": "شنبه تا سه شنبه ساعت 16 تا 22", + "first_free_turn": "یکشنبه 24 اردیبهشت" + },{ + "id": 8, + "location": "اهواز، کیانپارس، پهلوان شرقی، مجتمع پزشکی آویسا، واحد ۱۲", + "hours_of_work": "شنبه تا سه شنبه ساعت 16 تا 22", + "first_free_turn": "یکشنبه 24 اردیبهشت" + },{ + "id": 9, + "location": "اهواز، کیانپارس، پهلوان شرقی، مجتمع پزشکی آویسا، واحد ۱۲", + "hours_of_work": "شنبه تا سه شنبه ساعت 16 تا 22", + "first_free_turn": "یکشنبه 24 اردیبهشت" + },{ + "id": 10, + "location": "اهواز، کیانپارس، پهلوان شرقی، مجتمع پزشکی آویسا، واحد ۱۲", + "hours_of_work": "شنبه تا سه شنبه ساعت 16 تا 22", + "first_free_turn": "یکشنبه 24 اردیبهشت" + } +] \ No newline at end of file