Skip to content

Commit 880aec2

Browse files
Fix/styling fix (#50)
* fix: update navbar data fetch * feat: add individual subcategory page + empty article card component * feat/all articles page card creating * fix/style fixing * fix: homepage styling * fix/making changes in padding and font sizes --------- Co-authored-by: pawan-live <pawan.senpura@gmail.com>
1 parent 9438b14 commit 880aec2

File tree

9 files changed

+40
-43
lines changed

9 files changed

+40
-43
lines changed

src/app/components/AZCards.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ const AZCards = ({ azCards }: AZCardsProps) => {
1111

1212
return (
1313
<div
14-
className="w-full max-w-[1512px] h-auto px-[67px] py-[82px] flex flex-col md:flex-row md:justify-between gap-6 mx-auto"
14+
className="container w-full max-w-[1512px] h-auto px-[67px] py-32 flex flex-col md:flex-row md:justify-between gap-6 mx-auto"
1515
style={{ background: "#FFFFFF" }}
1616
>
1717
{/* Health A to Z */}

src/app/components/ContactCard.tsx

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,14 @@ import React from "react";
22

33
function ContactCard() {
44
return (
5-
<section className="relative max-w-[1512px] mx-auto py-[58px] px-[32px] lg:px-0 gap-[10px] md:gap-0 bg-white">
6-
<div className="container md:pl-[67px] md:pr-[67px] mx-auto flex flex-col md:flex-row items-center gap-[67px] md:mt-[130px] md:mb-[130px] ">
5+
<section className="relative mx-auto py-1 px-[32px] lg:px-0 lg:py-4 gap-[10px] md:gap-0 bg-white">
6+
<div className="container md:pl-[67px] md:pr-[67px] mx-auto flex flex-col md:flex-row items-center gap-[67px] justify-between md:mt-[130px] md:mb-[130px] ">
77
{/* Text container */}
8-
<div className="text flex flex-col gap-6 max-w-[633px] min-h-[240px] order-1 md:order-2">
9-
<h2 className="font-extrabold text-[32px] leading-[41.66px] text-[#484848] font-[DM Sans] text-center md:text-[42px] md:leading-[54.68px] md:text-[#484848] md:text-left md:w-auto md:h-auto">
8+
<div className="text flex flex-col gap-6 w-full md:w-3/5 min-h-[240px] order-1 md:order-2">
9+
<h2 className="font-bold text-[32px] leading-[41.66px] text-[#484848] font-[DM Sans] text-center md:text-[32px] md:leading-[48px] md:text-[#484848] md:text-left md:w-auto md:h-auto">
1010
Seek Medical Help
1111
</h2>
12-
<p className="text-center font-[DM Sans] font-normal text-[18px] leading-[24px] text-[#484848] md:text-left md:text-[24px] md:leading-[32px] md:text-[#9E9E9E]">
12+
<p className="text-center font-[DM Sans] font-normal text-[24px] leading-[32dpx] text-[#484848] md:text-left md:text-[24px] md:leading-[32px] md:text-[#9E9E9E]">
1313
Have any questions or need assistance? Reach out to the hospital for
1414
appointments, consultations, or general inquiries. Were here to help
1515
you with your rheumatic care needs. Our team is committed to
@@ -31,10 +31,10 @@ function ContactCard() {
3131
className="w-[42.15px] h-[42.15px] translate-y-[6px] md:w-16 md:h-16 md:object-contain md:mr-5 md:translate-y-[0]"
3232
/>
3333
<div className="flex flex-col">
34-
<div className="w-[176px] h-[56px] text-[#484848] font-[DM Sans] text-[20px] font-semibold leading-[28px] text-left md:w-auto md:h-auto md:text-[#484848] md:font-semibold md:text-[32px] md:leading-[28px]">
34+
<div className="w-[176px] h-[56px] text-[#484848] font-[DM Sans] text-xl font-medium leading-[20px] text-left md:w-auto md:h-auto md:text-[#484848] md:font-semibold md:text-xl md:leading-[20px]">
3535
Call Kurunegala Hospital
3636
</div>
37-
<div className="mt-1.5 text-[#9E9E9E] font-semibold text-[28px] leading-[28px] hidden md:block">
37+
<div className="mt-1.5 text-[#9E9E9E] font-normal text-xl leading-[20px] hidden md:block">
3838
0112 112 889
3939
</div>
4040
</div>
@@ -52,10 +52,10 @@ function ContactCard() {
5252
className="w-[42.15px] h-[42.15px] translate-y-[6px] md:w-16 md:h-16 md:object-contain md:mr-5 md:translate-y-[0]"
5353
/>
5454
<div className="flex flex-col">
55-
<div className="w-[176px] h-[56px] text-[#484848] font-[DM Sans] text-[20px] font-semibold leading-[28px] text-left md:w-auto md:h-auto md:text-[#484848] md:font-semibold md:text-[32px] md:leading-[28px]">
55+
<div className="w-[176px] h-[56px] text-[#484848] font-[DM Sans] text-xl font-medium leading-[20px] text-left md:w-auto md:h-auto md:text-[#484848] md:font-semibold md:text-xl md:leading-[20px]">
5656
Call Emergency Medical Hotline
5757
</div>
58-
<div className="mt-1.5 text-[#9E9E9E] font-semibold text-[28px] leading-[28px] hidden md:block">
58+
<div className="mt-1.5 text-[#9E9E9E] font-normal text-xl leading-[20px] hidden md:block">
5959
1990
6060
</div>
6161
</div>

src/app/components/Footer.tsx

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ const Footer = () => {
1919
return (
2020
<section className="bg-gradient-to-b to-blue-100 from-white py-16 text-black border-t-[1px] border-[#DBEBFB]">
2121
{/* Mobile View */}
22-
<div className="md:hidden flex flex-col mx-auto px-5">
22+
<div className="container md:hidden flex flex-col mx-auto px-5">
2323
{/* RheumaConnect Brand Name */}
2424
<h3 className="font-bold text-2xl text-black mb-5 text-center">
2525
RheumaConnect
@@ -28,7 +28,8 @@ const Footer = () => {
2828
{/* Link 1 Dropdown */}
2929
<button
3030
onClick={() => toggleDropdown("link1")}
31-
className="bg-white rounded-lg shadow-md px-5 py-3 text-left text-black mb-3 flex justify-between items-center">
31+
className="bg-white rounded-lg shadow-md px-5 py-3 text-left text-black mb-3 flex justify-between items-center"
32+
>
3233
Link 1
3334
{isOpen.link1 ? (
3435
<ChevronUpIcon className="h-6 w-6 text-gray-500" />
@@ -59,7 +60,8 @@ const Footer = () => {
5960
{/* Link 2 Dropdown */}
6061
<button
6162
onClick={() => toggleDropdown("link2")}
62-
className="bg-white rounded-lg shadow-md px-5 py-3 text-left text-black mb-3 flex justify-between items-center">
63+
className="bg-white rounded-lg shadow-md px-5 py-3 text-left text-black mb-3 flex justify-between items-center"
64+
>
6365
Link 2
6466
{isOpen.link2 ? (
6567
<ChevronUpIcon className="h-6 w-6 text-gray-500" />
@@ -90,7 +92,8 @@ const Footer = () => {
9092
{/* Contact Dropdown */}
9193
<button
9294
onClick={() => toggleDropdown("contact")}
93-
className="bg-white rounded-lg shadow-md px-5 py-3 text-left text-black mb-3 flex justify-between items-center">
95+
className="bg-white rounded-lg shadow-md px-5 py-3 text-left text-black mb-3 flex justify-between items-center"
96+
>
9497
Contact
9598
{isOpen.contact ? (
9699
<ChevronUpIcon className="h-6 w-6 text-gray-500" />

src/app/components/HeroSection.tsx renamed to src/app/components/HeroSection/HeroSection.tsx

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import Image from "next/image";
2-
import translations from "../data/translations.json";
2+
import translations from "../../../data/translations.json";
33

44
type TranslationKeys = keyof typeof translations;
55

@@ -14,17 +14,13 @@ const HeroSection = ({ selectedLang }: HeroSectionProps) => {
1414
<div className="text-center lg:text-left flex-1 lg:pr-8">
1515
<h1
1616
className="text-3xl lg:text-5xl font-bold mb-6 leading-snug"
17-
style={{ color: "#484848" }}
18-
>
17+
style={{ color: "#484848" }}>
1918
{translations[selectedLang].title}
2019
</h1>
2120
<p className="text-lg mb-6" style={{ color: "#555555" }}>
2221
{translations[selectedLang].description}
2322
</p>
24-
<button
25-
className="text-white px-8 py-3 text-lg rounded-md shadow hover:brightness-110 transition"
26-
style={{ backgroundColor: "#2F7CC4" }}
27-
>
23+
<button className="text-white px-8 py-3 text-lg rounded-md shadow hover:brightness-110 transition bg-[#2F7CC4]">
2824
{translations[selectedLang].button}
2925
</button>
3026
</div>
@@ -34,7 +30,7 @@ const HeroSection = ({ selectedLang }: HeroSectionProps) => {
3430
alt="Doctor providing medical advice"
3531
width={550}
3632
height={550}
37-
className="w-full lg:w-[550px] rounded-lg shadow-md"
33+
className="w-full lg:w-full lg:h-[445px] rounded-lg shadow-md object-cover"
3834
/>
3935
</div>
4036
</div>

src/app/components/MainCategorySection.tsx

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,18 +4,19 @@ import categoriesData from "../data/MainCategorySection/categoriesData.json";
44

55
const MainCategorySection = () => {
66
return (
7-
<section className="bg-white py-16">
8-
<h2 className="text-black font-bold text-4xl text-center">
7+
<section className=" container bg-white py-12 mx-auto">
8+
<h2 className="text-[#484848] font-bold text-4xl text-center">
99
Main Categories
1010
</h2>
11-
<p className="text-[#9E9E9E] text-center px-8 py-12 text-2xl">
11+
<p className="text-[#9E9E9E] text-center px-8 py-8 text-2xl">
1212
Some of the most common types Rheumatic diseases
1313
</p>
14-
<div className="categories flex flex-wrap justify-center gap-4 px-8">
14+
<div className="categories flex flex-wrap justify-center gap-4 px-4">
1515
{categoriesData.map((category) => (
1616
<div
1717
key={category.id}
18-
className="p-8 cursor-pointer border-2 border-transparent hover:border-[#DBEBFB] rounded-xl transition duration-500">
18+
className="p-8 cursor-pointer border-2 border-transparent hover:border-[#DBEBFB] rounded-xl transition duration-500"
19+
>
1920
<div className="relative max-w-[274px] max-h-[103px] mx-auto aspect-[274/103]">
2021
<Image
2122
src={category.image}

src/app/components/Navbar/Navbar.tsx

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -61,11 +61,11 @@ export default function Navbar({ data }: { data: NavbarDataType }) {
6161
<div className="container mx-auto px-4 flex items-center justify-between py-4">
6262
<Link
6363
href="/"
64-
className="text-2xl font-bold text-blue-600 flex-shrink-0">
64+
className="text-2xl font-bold text-[#2F7CC4] flex-shrink-0">
6565
Rheuma<span className="text-gray-800">Connect</span>
6666
</Link>
6767

68-
<nav className="hidden md:flex items-center space-x-6 ml-6">
68+
<nav className="hidden md:flex items-center gap-x-6">
6969
{link.map(({ linkText, linkUrl }) => (
7070
<Link
7171
key={linkText}
@@ -85,8 +85,8 @@ export default function Navbar({ data }: { data: NavbarDataType }) {
8585
</button>
8686
</Link>
8787

88-
<div className="relative" ref={dropdownRef}>
89-
{/* <button
88+
{/* <div className="relative" ref={dropdownRef}>
89+
<button
9090
onClick={toggleDropdown}
9191
className="bg-white border border-gray-400 text-gray-800 rounded-[10px] text-[14px] font-medium flex items-center justify-center hover:bg-gray-100 transition"
9292
style={{ width: "98px", height: "38px", lineHeight: "18px" }}>
@@ -106,9 +106,9 @@ export default function Navbar({ data }: { data: NavbarDataType }) {
106106
d="M19 9l-7 7-7-7"
107107
/>
108108
</svg>
109-
</button> */}
109+
</button>
110110
111-
{/* {isDropdownOpen && (
111+
{isDropdownOpen && (
112112
<div className="absolute mt-2 w-40 bg-white border border-gray-200 rounded shadow-lg">
113113
{languages.map(({ label, value }) => (
114114
<button
@@ -119,8 +119,8 @@ export default function Navbar({ data }: { data: NavbarDataType }) {
119119
</button>
120120
))}
121121
</div>
122-
)} */}
123-
</div>
122+
)}
123+
</div> */}
124124
</nav>
125125

126126
<button

src/app/contact/page.tsx

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
11
import React from "react";
2-
3-
type Props = {};
4-
5-
function page({}: Props) {
2+
function page() {
63
return <div>page</div>;
74
}
85

src/app/page.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
import HeroSection from "./components/HeroSection";
21
import AZCards from "@/app/components/AZCards";
3-
import translations from "@/app/data/translations.json";
2+
import translations from "@/data/translations.json";
43
import { Translations } from "@/app/types";
5-
// import ContactCard from "./components/ContactCard";
4+
import ContactCard from "./components/ContactCard";
65
import MainCategorySection from "./components/MainCategorySection";
6+
import HeroSection from "./components/HeroSection/HeroSection";
77
const translationsData: Translations = translations;
88

99
// fetch data from API
@@ -14,7 +14,7 @@ export default async function Home() {
1414
<HeroSection selectedLang="en" />
1515
{/* <ContactCard /> */}
1616
<MainCategorySection />
17-
{/* <ContactCard /> */}
17+
<ContactCard />
1818
<AZCards azCards={translationsData["en"]["az-cards"]} />
1919
</div>
2020
);

0 commit comments

Comments
 (0)