-
Notifications
You must be signed in to change notification settings - Fork 1
Lesson 5 #6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Lesson 5 #6
Changes from 44 commits
Commits
Show all changes
45 commits
Select commit
Hold shift + click to select a range
a825552
[UPDATE] global.css + setting light mode
alireza97d 3cdb496
[UPDATE] footer color style
alireza97d 73017fd
[UPDATE] search component color style
alireza97d bbc1d96
[UPDATE] header color style
alireza97d 93b6036
[UPDATE] last search item - color style
alireza97d cdc5ae6
[UPDATE] doctor item card changed color style
alireza97d 64f77ba
[UPDATE] filter component color style
alireza97d e7164e6
[UPDATE] next config for support remote images
alireza97d 9469795
[UPDATE] mock data reduce doctor id
alireza97d 3ba925f
[UPDATE] doctor mock data
alireza97d a427fba
[UPDATE] doctor mock data
alireza97d 995e5ab
[ADD] doctor page and find correct doctor
alireza97d cfb5bb2
[UPDATE] created doctor image component
alireza97d 695c5a9
[UPDATE] fixed url
alireza97d cbf8683
[ADD] doctor page + add doctor image inside page
alireza97d 4a708e4
[ADD] doctor info card
alireza97d e9bb336
[UPDATE] create basic version component of doctor page
alireza97d 1caac5e
[UPDATE] card component now get custom class in props
alireza97d fd60744
[ADD] online counsulation component
alireza97d 59e9c34
[ADD] reserve component
alireza97d 39e761f
[ADD] contact component
alireza97d fcc8971
[UPDATE] contact tel link
alireza97d 0a96da4
[UPDATE] convert en price to persian number
alireza97d 6f99691
[UPDATE] change cursor to pointer for report button
alireza97d c1195df
[UPDATE] add icons to doctor single page
alireza97d 1af36ed
[ADD] doctor activities card
alireza97d 1879f52
[ADD] doctor about card in single doctor page
alireza97d 5480521
[UPDATE] info avrage rate padding
alireza97d c9b95c4
[ADD] reating progress bar
alireza97d 330ca8a
[ADD] review items
alireza97d a2157ec
[UPDATE] fixed name component
alireza97d cb63824
[ADD] load more btn
alireza97d 12df6b6
[ADD] helpre func timeAgo
alireza97d 9362f4e
[UPDATE] use mock data to doctor page
alireza97d bb9299b
[ADD] reviews filters
alireza97d 95d78e5
[PRETTIER] fixed prettier format
alireza97d 1ab085c
[FIX] build bug
alireza97d 191d2ce
[UPDATE] fixed Hydration errors
alireza97d 46bb3f2
[PRETTIER] update code formating
alireza97d fd42be9
[UPDATE] fixed code based on codective doc
alireza97d 5de72f4
[UPDATE] set persian number
alireza97d ff72b85
[PRETTIER] fixed format
alireza97d 0704568
[UPDATE] replace google font with locale font
alireza97d 0389dcc
[PRETTIER] fixed code format
alireza97d d967813
[FIXED] fixed and improved doctor page
alireza97d File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,17 @@ | ||
/** @type {import('next').NextConfig} */ | ||
const nextConfig = {}; | ||
const nextConfig = { | ||
images: { | ||
remotePatterns: [ | ||
{ | ||
protocol: "https", | ||
hostname: "cdn.paziresh24.com", | ||
}, | ||
], | ||
}, | ||
|
||
// images: { | ||
// domains: ['assets.acme.com'], | ||
// }, | ||
}; | ||
|
||
export default nextConfig; |
27 changes: 27 additions & 0 deletions
27
src/app/doctor/[[...slug]]/components/about/about.component.tsx
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
import { ReactNode } from "react"; | ||
|
||
import CardComponent from "@/components/card/card.component"; | ||
|
||
import styles from "./about.module.css"; | ||
|
||
type Props = { | ||
aboutText: string; | ||
}; | ||
|
||
const AboutComponent: React.FC<Props> = ({ aboutText }): ReactNode => { | ||
return ( | ||
<div className={styles.container}> | ||
<div className={styles.title}> | ||
<h2>درباره دکتر</h2> | ||
</div> | ||
<CardComponent> | ||
<div | ||
dangerouslySetInnerHTML={{ __html: aboutText ?? "" }} | ||
alireza97d marked this conversation as resolved.
Show resolved
Hide resolved
|
||
className={styles.about} | ||
/> | ||
</CardComponent> | ||
</div> | ||
); | ||
}; | ||
|
||
export default AboutComponent; |
26 changes: 26 additions & 0 deletions
26
src/app/doctor/[[...slug]]/components/about/about.module.css
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
.container { | ||
display: grid; | ||
gap: 1rem; | ||
|
||
.title { | ||
h2 { | ||
font-size: var(--fz-300); | ||
} | ||
} | ||
|
||
.about div { | ||
font-size: var(--fz-200); | ||
|
||
h2 { | ||
font-size: var(--fz-300); | ||
} | ||
|
||
> *:not(:first-child) { | ||
margin-block-start: 1rem; | ||
} | ||
|
||
ol { | ||
margin-inline-start: 1.8rem; | ||
alireza97d marked this conversation as resolved.
Show resolved
Hide resolved
|
||
} | ||
} | ||
} |
52 changes: 52 additions & 0 deletions
52
src/app/doctor/[[...slug]]/components/activities/activities.component.tsx
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
import { ReactElement } from "react"; | ||
|
||
import CardComponent from "@/components/card/card.component"; | ||
|
||
import MingcuteCommentLine from "@/icons/MingcuteCommentLine"; | ||
import MingcuteAwardLine from "@/icons/MingcuteAwardLine"; | ||
|
||
import styles from "./activities.module.css"; | ||
|
||
type Props = { | ||
doctorName: string; | ||
activeCounsulate: number; | ||
}; | ||
|
||
const ActivitiesComponent: React.FC<Props> = ({ | ||
doctorName, | ||
activeCounsulate, | ||
}): ReactElement => { | ||
return ( | ||
<div className={styles.container}> | ||
<div className={styles.title}> | ||
<h2>فعالیتها</h2> | ||
</div> | ||
<CardComponent> | ||
<div className={styles.activity}> | ||
<ul> | ||
<li> | ||
<MingcuteCommentLine /> | ||
<span> | ||
<span className={styles.consulation_count}> | ||
{activeCounsulate.toLocaleString()} | ||
</span> | ||
| ||
<span>مشاوره فعال</span> | ||
</span> | ||
</li> | ||
|
||
<li> | ||
<MingcuteAwardLine /> | ||
<span> | ||
پذیرش24 بیش از 2 سال و 11 ماه افتخار میزبانی از صفحه اختصاصی | ||
دکتر {doctorName} را داشته است. | ||
</span> | ||
</li> | ||
</ul> | ||
</div> | ||
</CardComponent> | ||
</div> | ||
); | ||
}; | ||
|
||
export default ActivitiesComponent; |
39 changes: 39 additions & 0 deletions
39
src/app/doctor/[[...slug]]/components/activities/activities.module.css
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
.container { | ||
display: grid; | ||
gap: 1rem; | ||
|
||
.title { | ||
h2 { | ||
font-size: var(--fz-300); | ||
} | ||
} | ||
|
||
.activity { | ||
ul li { | ||
display: flex; | ||
align-items: center; | ||
gap: 0.5rem; | ||
|
||
background-color: var(--color-surface-400); | ||
|
||
font-size: var(--fz-200); | ||
|
||
border-radius: var(--border-radius); | ||
|
||
padding-inline: 1rem; | ||
padding-block: 0.8rem; | ||
|
||
svg { | ||
inline-size: 1.4rem; | ||
block-size: 1.4rem; | ||
} | ||
.consulation_count { | ||
font-weight: 600; | ||
} | ||
} | ||
|
||
ul li:not(:first-child) { | ||
margin-block-start: 0.8rem; | ||
} | ||
} | ||
} |
81 changes: 81 additions & 0 deletions
81
src/app/doctor/[[...slug]]/components/contact/contact.component.tsx
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,81 @@ | ||
import { ReactNode } from "react"; | ||
|
||
import CardComponent from "@/components/card/card.component"; | ||
|
||
import MingcutePencilLine from "@/icons/MingcutePencilLine"; | ||
import MingcuteCalendar2Line from "@/icons/MingcuteCalendar2Line"; | ||
import MingcutePhoneLine from "@/icons/MingcutePhoneLine"; | ||
import MingcuteLocationLine from "@/icons/MingcuteLocationLine"; | ||
|
||
import styles from "./contact.module.css"; | ||
|
||
type Props = { | ||
address: string; | ||
doctorName: string; | ||
}; | ||
|
||
const extractCityAndAddress = (fullAddress: string) => { | ||
const parts = fullAddress.split(/[,.،]/); | ||
const city = parts[0]?.trim() || ""; | ||
const remainingAddress = parts.slice(1).join(", ").trim(); | ||
return { city, remainingAddress }; | ||
}; | ||
|
||
const ContactComponent: React.FC<Props> = ({ | ||
address, | ||
doctorName, | ||
}): ReactNode => { | ||
const { city, remainingAddress } = extractCityAndAddress(address); | ||
|
||
return ( | ||
<div className={styles.container}> | ||
<div className={styles.title}> | ||
<h2>آدرس و تلفن تماس</h2> | ||
|
||
<div className={styles.report}> | ||
<MingcutePencilLine /> | ||
<span>گزارش تلفن و آدرس صحیح</span> | ||
</div> | ||
</div> | ||
|
||
<CardComponent> | ||
<div className={styles.contact}> | ||
<strong>مطب دکتر {doctorName}</strong> | ||
<address> | ||
<span>{city} - </span> | ||
<span>{remainingAddress}</span> | ||
</address> | ||
|
||
<div className={styles.action_btn}> | ||
<ul> | ||
<li> | ||
<button> | ||
<MingcuteCalendar2Line /> | ||
<span>برنامه کاری پزشک</span> | ||
</button> | ||
</li> | ||
|
||
<li> | ||
<a href="tel:02155635553"> | ||
<button> | ||
<MingcutePhoneLine /> | ||
<span>021-55635553</span> | ||
</button> | ||
</a> | ||
</li> | ||
|
||
<li> | ||
<button> | ||
<MingcuteLocationLine /> | ||
<span>مشاهده در نقشه و مسیریابی</span> | ||
</button> | ||
</li> | ||
</ul> | ||
</div> | ||
</div> | ||
</CardComponent> | ||
</div> | ||
); | ||
}; | ||
|
||
export default ContactComponent; |
96 changes: 96 additions & 0 deletions
96
src/app/doctor/[[...slug]]/components/contact/contact.module.css
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,96 @@ | ||
.container { | ||
display: grid; | ||
gap: 1rem; | ||
|
||
.title { | ||
display: flex; | ||
justify-content: space-between; | ||
align-items: center; | ||
gap: 0.5rem; | ||
|
||
h2 { | ||
font-size: var(--fz-300); | ||
} | ||
|
||
.report { | ||
display: flex; | ||
justify-content: space-end; | ||
align-items: center; | ||
gap: 0.3rem; | ||
|
||
font-size: var(--fz-100); | ||
|
||
color: var(--color-primary-darker); | ||
|
||
cursor: pointer; | ||
|
||
svg { | ||
inline-size: 1rem; | ||
block-size: 1rem; | ||
} | ||
} | ||
} | ||
|
||
.contact { | ||
background-color: var(--color-surface-400); | ||
border-radius: var(--border-radius); | ||
|
||
padding: 1rem; | ||
|
||
strong { | ||
display: inline-block; | ||
font-size: var(--fz-300); | ||
margin-block-end: 0.3rem; | ||
} | ||
|
||
address { | ||
font-style: normal; | ||
font-size: var(--fz-200); | ||
|
||
span:first-of-type { | ||
font-weight: bold; | ||
} | ||
} | ||
|
||
.action_btn { | ||
ul li { | ||
margin-block-start: 1rem; | ||
|
||
font-size: var(--fz-200); | ||
font-weight: 600; | ||
} | ||
|
||
button { | ||
inline-size: 100%; | ||
|
||
display: flex; | ||
justify-content: center; | ||
align-items: center; | ||
gap: 0.5rem; | ||
|
||
background-color: inherit; | ||
color: var(--color-primary-darker); | ||
|
||
border-radius: 0.4rem; | ||
border: 1px solid var(--color-primary); | ||
|
||
padding-block: 0.8rem; | ||
padding-inline: 1rem; | ||
|
||
cursor: pointer; | ||
|
||
transition: 0.2s ease-in-out; | ||
transition-property: background-color, color; | ||
|
||
&:hover { | ||
background-color: var(--color-primary-fade); | ||
} | ||
|
||
svg { | ||
inline-size: 1.4rem; | ||
block-size: 1.4rem; | ||
} | ||
} | ||
} | ||
} | ||
} |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.