Commit Graph
170 Commits
Author SHA1 Message Date
root a3cce41d1e Normalise about-me data before rendering
NULL title/description and an empty skills list reached the components as-is.
Normalising once in aboutMeData.ts keeps the presentational components free of
undefined checks, and wraps the fetch so a failing API degrades to a skeleton
instead of an unhandled error.
2026-10-01 16:33:12 -04:00
root 546ee8cc22 Render the real post body instead of a hardcoded article
The blog post page ignored the API entirely and rendered a hardcoded
placeholder article, so every published post showed the same invented content
regardless of what was stored in the database. Metadata (author, category,
date, tags, counts) came from placeholders too.

post.body is plain text written from the admin panel, so parse it into
paragraphs, h1/h2 headings and lists and render the pieces as text nodes.
dangerouslySetInnerHTML is deliberately not used: there is no sanitiser in
this app, so injecting author-supplied HTML would be an XSS hole.

The body falls back to the excerpt, then to an empty-state message. The cover
image now renders only when featured_image holds a real URL; the seeded rows
point at via.placeholder.com, so they render nothing rather than a broken or
third-party image.

Also guard the about-me section: title and description are NULL in the live
database, so it now falls back to Persian text, omits the skills grid when
there are none, and degrades to a skeleton if the API fails instead of
crashing.
2026-10-01 16:33:12 -04:00
root 2b7eda656a Add the admin panel for managing site content
Server-rendered CMS at /admin, reachable only with an authenticated admin.
There was no way to change anything on the site without a database session,
while every mutating endpoint used to be anonymous, so the site was either
unmanageable or, before the API lock-down, wide open.

Everything runs through Server Actions, so the httpOnly
parsaaghayi_admin_session cookie set by the backend is read server-side and
forwarded as a bearer token. No token ever reaches client JavaScript and the
browser never talks to the backend cross-origin, so CORS and CSRF do not
apply. Unauthenticated visits to any panel route redirect to /admin/login.

Resources are declared once in a registry (src/app/lib/admin/resources.ts)
and the list, create and edit screens are generated from it, so adding a
content type is a data change rather than three new pages. Covered: posts,
categories, tags, projects, about-me.

Records are read from GET /api/admin/resources/{resource}, which returns
stored rows including every locale; the public endpoints only expose
translated display payloads and cannot populate an editing form.

Verified: tsc --noEmit clean, eslint clean, next build compiles and registers
all five admin routes as dynamic, and /admin, /admin/posts redirect 307 to
/admin/login while /admin/login renders.

Post bodies are rendered as text nodes, never as HTML.
2026-10-01 16:01:40 -04:00
parsa aghaei dc529ffa4e fix: testimonials layout - fix card width/gap alignment, remove overflow-visible, adjust quote icon size 2026-06-29 14:47:48 +03:30
parsa aghaei 4ed83bbecf fix: project images not loading - use getCleanImgSrc for grid cards + fix URL path extraction 2026-06-29 14:00:22 +03:30
parsa aghaei 056f838172 fix: testimonial arrow layout/direction logic, language switcher fonts, getCleanImgSrc sanitizer 2026-06-29 13:45:40 +03:30
parsa aghaei 4f5cfc9f1e fix: locale sync in header/testimonials, dark mode icon CSS filters, invariant arrow logic 2026-06-29 11:19:21 +03:30
parsa aghaei a91adaff28 fix: testimonials card width + text wrapping, modal scroll structure, local image paths 2026-06-29 11:14:43 +03:30
parsa aghaei 8666d8067a fix: precise fixes - name spelling, nav i18n, header scroll logic, testimonials padding, Persian digits 2026-06-29 10:53:26 +03:30
parsa aghaei 79c229a93c fix: UI/UX regressions - header glassmorphic, dark mode icons, testimonials i18n, image remotePatterns 2026-06-29 09:57:51 +03:30
parsa aghaei 7dc79b3151 fix: sticky header blur on scroll, testimonials carousel 6 items + RTL arrows, project modal dual-column, smooth scroll, hero btn no-wrap 2026-06-29 09:32:40 +03:30
parsa aghaei dfedd18f66 images updated 2026-06-29 09:21:46 +03:30
parsa aghaei 470036d6b9 fix: hero button localization/hover, lang switcher dark mode, services grid, testimonials carousel, project modal, footer gap, back-to-top 2026-06-29 08:58:26 +03:30
parsa aghaei 4a973547c1 fix: replace pink accent with orange, fix RTL overlap, improve contrast and typography 2026-06-28 22:07:02 +03:30
DevOps 19c557a154 fix: add id field to Project interface to resolve TS error 2026-06-28 17:25:03 +00:00
DevOps 34243ff641 fix: resolve TS error in AboutMeContent - add CategoryKey type assertion for dynamic category access 2026-06-28 17:22:18 +00:00
DevOps 88be19c5a5 fix: restore template literal backticks in layout.tsx className 2026-06-28 17:17:42 +00:00
DevOps be6e37b11f fix: self-host Google Fonts (Inter, JetBrains Mono) via localFont; fix tailwind border-border color 2026-06-28 17:15:13 +00:00
parsa aghaei adda6ae880 content: update hero and about me copy to professional senior engineer tone 2026-06-28 20:20:29 +03:30
parsa aghaei 83b5a2f22a style: implement dark theme, glassmorphism, and framer-motion architecture; chore: update seeders with professional copywriting for EN and FA languages 2026-06-28 20:20:29 +03:30
parsa aghaei 7533f8c97c upgrade: Next.js 16 + React 19, codemod transforms (async APIs, middleware→proxy, ESLint flat config) 2026-06-28 11:41:00 +03:30
parsa aghaei a60c403d24 5.1-5.10: remove dead code/commented types; strict already on, no barrel files 2026-06-23 19:20:26 +03:30
parsa aghaei 3a0c5746b7 1.4-1.6: add rewrites, remove BFF handlers, update client to use relative URLs 2026-06-23 18:20:01 +03:30
parsa aghaei 99d56e3bfe about me image updated 2024-11-20 17:23:22 +03:30
parsa aghaei 4a0a8d08d5 build error fixed 2024-11-20 16:51:47 +03:30
parsa aghaei 809cb7378f download resume loading bug fixed 2024-11-20 16:43:46 +03:30
parsa aghaei 0dccf4b734 projects images updated 2024-11-20 16:38:40 +03:30
parsa aghaei 2d1533589c filtered-post page mobile view debugged 2024-11-18 16:20:21 +03:30
parsa aghaei 6e32d9b8fd home page mobile biew debugged 2024-11-18 16:16:13 +03:30
parsa aghaei 40b8b6539a blog mobile header button style debugged 2024-11-18 16:03:31 +03:30
parsa aghaei 0ce625022a loading progressbar added to mobile menu 2024-11-18 15:39:35 +03:30
parsa aghaei efb8dcd60c loading progressbar added 2024-11-18 15:33:20 +03:30
parsa aghaei eef5690a4a home page for mobile view updated 2024-11-16 17:54:38 +03:30
parsa aghaei 47aa4ee34e resume pdf file added 2024-11-11 13:05:57 +03:30
parsa aghaei beff602ffa cache control added to .env 2024-11-11 12:44:23 +03:30
parsa aghaei 5123f4e2d1 cache disabled for blog homePage 2024-11-11 12:27:12 +03:30
parsa aghaei 3af28d9eec some bugs fixed 2024-11-03 16:02:05 +03:30
parsa aghaei 80016bc39a en replaced with defalutLocale cookie 2024-10-23 19:05:31 +03:30
parsa aghaei fb89647a32 services backend internationalization added 2024-10-23 18:44:01 +03:30
parsa aghaei 28370e30aa aboutme backend internationalization added 2024-10-23 18:07:23 +03:30
parsa aghaei e89b8f8b44 postSingle page internationalization added 2024-10-21 12:44:18 +03:30
parsa aghaei 12df663ef2 categoriySingle page internationalization added 2024-10-21 12:29:58 +03:30
parsa aghaei 693664017c categories page internationalization added 2024-10-21 12:18:18 +03:30
parsa aghaei c11764a4c0 filteredPosts page internationalization added 2024-10-21 11:37:38 +03:30
parsa aghaei c3f7fc5d2b blog homePage intenationalization added 2024-10-21 11:13:18 +03:30
parsa aghaei fc9fcf6a9a dictionory Updated 2024-10-21 10:44:38 +03:30
parsa aghaei 6ad3a48adb blog mobileMenu updated and internationalization added 2024-10-21 10:31:03 +03:30
parsa aghaei dd80343485 mobileMenu change language bug fixed 2024-10-20 19:49:50 +03:30
parsa aghaei 651f427502 lint error fixed 2024-10-20 19:39:21 +03:30
parsa aghaei b92b9fef1c back to top button style updated 2024-10-20 19:34:15 +03:30