# Landing Page Redesign — Navy & Gold Premium

**Date:** 2026-08-09 (Revision 2)

> **Revision 2 — ki change holo**
>
> Revision 1 e CSS thik moto apply hocchilo na. Karon dutо:
> 1. **Browser cache** — purono `style.css` serve hocchilo.
> 2. **Invalid Tailwind class** — `duration-400`, `bg-navy-800/8`, `h-[calc(100vh-92px)]`,
>    `text-navy-800/[.045]` — egulo Tailwind CDN generate korte pare na, tai layout bhenge
>    jacchilo (marquee vertical hoye jacchilo, hero collapse korchilo, button unstyled).
>
> **Fix:** puro landing page ekhon **real CSS class** use kore (`assets/css/style.css`),
> Tailwind arbitrary value er upor kono nirbhorota nei. Sathe `style.css?v=<filemtime>`
> cache-buster add kora hoyeche — file change korlei browser notun version nebe, hard
> refresh er dorkar nei.
>
> Notun feature: **Dashboard** option navigation e (desktop nav + mobile drawer + footer),
> ar **login kora thakle `index.php` sorasori dashboard e redirect** kore.

---

## 1. Live server e ei files gulo upload korte hobe

Ei 7 ta file replace korlei hobe. Database e kono change nei — kono SQL run korar dorkar nei.

| # | File path (site root theke) | Ki change hoyeche |
|---|---|---|
| 1 | `index.php` | Puro landing page redesign |
| 2 | `header.php` | Navy+gold header, mobile drawer, language switcher fix |
| 3 | `footer.php` | Navy+gold footer, newsletter fix |
| 4 | `assets/css/style.css` | Notun premium design system (navy/gold, animation) |
| 5 | `assets/js/main.js` | Back-to-top gold, double-submit bug fix |
| 6 | `translations/bn.php` | Notun key added (mot 120) |
| 7 | `translations/en.php` | Notun key added (mot 120) |
| 8 | `translations/hi.php` | Notun key added (mot 120) |
| 9 | `includes/functions.php` | Notun `esc()` helper + `sanitize()` idempotent kora (`&amp;` fix) |
| 10 | `category.php` | Category/sub-category title-description e `esc()` |

### FTP / cPanel upload order

```
/public_html/index.php
/public_html/header.php
/public_html/footer.php
/public_html/assets/css/style.css
/public_html/assets/js/main.js
/public_html/translations/bn.php
/public_html/translations/en.php
/public_html/translations/hi.php
/public_html/includes/functions.php
/public_html/category.php
```

> Ekhon `style.css` ar `main.js` er sathe automatic `?v=<file-time>` stamp jai, tai cache
> problem ar hobe na. Tobuo prothom bar upload korar por ekbar **Ctrl + Shift + R** korle bhalo.

**Upload kora lagbe NA:** `db.php`, `config.php`, `includes/*`, `admin/*`, `dashboard.php`, ba onno kono file. Egulo touch kora hoyni.

---

## 2. Backup

Purono version gulo ekhane rakha ache (live server e upload korar dorkar nei):

```
_backup_predesign/index.php.bak
_backup_predesign/header.php.bak
_backup_predesign/footer.php.bak
_backup_predesign/style.css.bak
_backup_predesign/bn.php.bak
_backup_predesign/en.php.bak
_backup_predesign/hi.php.bak
```

Revert korte chaile `.bak` extension shudhu remove kore original name e rakhle hobe.

---

## 3. Language switching — ki bhul chilo, ki fix hoyeche

**Problem 1 — duplicate handler.**
`header.php` er moddhe `?lang=` handle korar jonno ekta second block chilo, jeta `Language` class er nijer handler er *pore* boshano chilo. Class er handler already redirect kore exit kore jeto, tai header er block ta dead code chilo — ar dui jayga theke handle korar karone behaviour inconsistent hoye jeto. Ekhon shudhu `Language::handleSwitchRequest()` handle kore.

**Problem 2 — query string hariye jeto.**
Purono link chilo `<a href="?lang=en">`. Ei link e page er baki query parameter (jemon `category.php?id=5`) muche jeto — user language change korle wrong page e chole jeto. Ekhon `langSwitchUrl()` function current path + shob existing parameter rekhe shudhu `lang` add kore.

**Problem 3 — dropdown click swallow.**
Document-level click listener menu ta bondho kore dito. Menu er bhitorer click e `stopPropagation()` add kora hoyeche.

**Problem 4 — English/Hindi mode e Bangla text.**
`go_to_dashboard`, `read_more`, `select_role`, `seller_register_desc` — er moto onek key translation file e chilo na, tai fallback hisebe hardcoded Bangla text dekhato. Ekhon tinta file e (bn/en/hi) **119 ta kore key** ache, sob milano.

**Test kore dekhun:**

1. Homepage → language dropdown → English → puro page English hobe
2. `category.php?id=3` e jan → language change korun → ekoi category page e thakben
3. Page refresh korle language session e save thakbe

---

## 4. Design e ki ki notun

- **Color:** deep navy (`#050D1F` → `#142C5E`) + metallic gold gradient (`#B8952B` → `#F6E7A8`)
- **Font:** Playfair Display (heading) + Plus Jakarta Sans (body) + Hind Siliguri (Bangla) + Noto Sans Devanagari (Hindi)
- **Hero:** fade transition + Ken Burns zoom, layered navy wash, gold badge, dual CTA, trust indicators
- **Marquee:** service names auto-scroll, hover korle pause
- **Cards:** hover korle gold border animate hoy + lift hoy, icon medallion ghure jai
- **Stats:** scroll korle number count-up hoy, gold shimmer text
- **Scroll reveal:** protita section scroll e fade-up hoye ase, card gulo stagger delay soho
- **Aurora blobs:** dark section e slow-drifting glow
- **Header:** scroll korle blur + shadow, top e gold progress bar
- **Mobile:** slide-in drawer with backdrop, language grid, full-width CTA
- **Accessibility:** `prefers-reduced-motion` respect kora hoyeche

---

## 5. Bug fix (design chara)

| Bug | Fix |
|---|---|
| Contact form submit korle button permanently disabled hoye jeto (`main.js` AJAX form ke o lock kore dito) | `data-no-lock` attribute add kora hoyeche + 12s safety timeout |
| Contact form e success/error `alert()` box | Inline status message (green/red) |
| `main.js` e stats count-up `.gradient-bg .text-4xl` target korto — index.php er nijer count-up er sathe conflict | Duplicate logic remove kora hoyeche |
| Back-to-top button blue chilo, design er sathe match korto na | Gold gradient + fade in/out |
| Newsletter form e `alert()` | Inline gold confirmation message |
| Hero title/subtitle e translation key missing thakle key name print hoto | Proper fallback chain (translation → DB value) |

---

## 6. Dashboard navigation + auto-redirect

**Navigation e Dashboard:** login kora thakle "Dashboard" link dekha jabe —
desktop nav e (Home er age), mobile drawer e (upore, sathe Logout), footer link list e,
ar header er gold button hisebe.

**Auto redirect:** `index.php` e dhukle jodi already login thake, sorasori nijer panel e chole jabe:

| User type | Redirect |
|---|---|
| `admin`  | `admin/index.php` |
| `seller` | `seller/index.php` |
| onno     | `dashboard.php` |

Login kora obosthatei landing page dekhte chaile: **`index.php?home=1`**.
Header/footer er "Home" ar section link gulo (Services, About, Contact) automatic
`?home=1` add kore dei, tai logged-in user click korleo loop hobe na.

---

## 7. `&amp;` bug — kano hocchilo, ki fix holo

Admin panel theke text save korar somoy `sanitize()` function `htmlspecialchars()` chalato,
tai `Office & Cyber` database e **`Office &amp; Cyber`** hisebe save hoto. Er por page e
dekhanor somoy abar `htmlspecialchars()` cholto → `&amp;amp;` → screen e **`&amp;`** dekhato.

**Duita fix:**

1. **Notun `esc()` helper** (`includes/functions.php`) — dekhanor age entity decode kore
   tarpor ekbar escape kore. Purono row (jate already `&amp;` ache) ar notun row — duitoi
   thik dekhabe. XSS protection age jemon chilo temoni ache.
2. **`sanitize()` ekhon idempotent** — edit form theke abar save korle `&amp;amp;` hobe na,
   `&amp;` teii thakbe. Age protibar edit korlei ekta kore `amp;` bere jeto.

`index.php`, `header.php`, `footer.php` ar `category.php` — sob jaygai DB theke asha text
ekhon `esc()` diye print hoy.

> **Note:** Database er purono row gulo change korar dorkar nei — `esc()` egulo automatic
> thik kore dekhabe. Chaile admin panel theke ekbar edit kore save korle DB o normalize hobe.

---

## 8. Onno page gulo

`header.php` ar `footer.php` egulo o use kore, tai egulo o notun navy/gold look pabe automatically:

- `login.php`
- `register.php`
- `seller-register.php`
- `forgot-password.php`
- `reset-password.php`

Egulor **bhitorer form design change kora hoyni** — shudhu top/bottom change hoyeche. Chaile porer step e egulo o match korano jabe.
