Commit Graph
246 Commits
Author SHA1 Message Date
Parsa Aghayi 1c7bb4ecee fix(blog): restore original rectangular logo-no-background.png in header and drawer
Deploy Frontend / deploy (push) Successful in 1m11s
2026-11-02 16:32:18 +00:00
Parsa Aghayi 64c58eae30 fix(blog): enlarge header and drawer logo container to 175x38px for balanced visual hierarchy
Deploy Frontend / deploy (push) Successful in 1m16s
2026-11-02 16:24:26 +00:00
Parsa Aghayi 1f2cee0769 fix(blog): remove query parameter from next/image src to restore image optimizer
Deploy Frontend / deploy (push) Successful in 1m13s
2026-11-02 16:17:32 +00:00
Parsa Aghayi a18bba31d4 fix(blog): cache-bust next/image for newly cropped logo assets
Deploy Frontend / deploy (push) Successful in 1m16s
2026-11-02 14:36:12 +00:00
Parsa Aghayi b00866e726 fix(blog): crop transparent padding from logo PNGs so logo displays at full crisp size
Deploy Frontend / deploy (push) Successful in 1m15s
2026-11-02 14:31:49 +00:00
Parsa Aghayi f29d5f4bc3 fix(mobile): pass exact button ref coordinates to drawer to strictly synchronize slide direction
Deploy Frontend / deploy (push) Successful in 1m13s
2026-11-02 14:11:02 +00:00
Parsa Aghayi bc8100b517 fix(mobile): dynamically bind drawer slide origin to actual burger button viewport position
Deploy Frontend / deploy (push) Successful in 1m26s
2026-11-02 14:03:16 +00:00
Parsa Aghayi 5400fd360a fix(mobile): strictly align drawer slide direction with button side and make header RTL aware
Deploy Frontend / deploy (push) Successful in 1m20s
2026-11-02 13:57:23 +00:00
Parsa Aghayi 24bd9c3c4a fix(mobile): match portfolio menu design with blog drawer, fix dark mode logo, sync drawer slide direction with button
Deploy Frontend / deploy (push) Successful in 1m22s
2026-11-02 13:49:28 +00:00
Parsa Aghayi de6597a6fd fix(blog): portal mobile menu to document.body with solid backdrop and full height drawer
Deploy Frontend / deploy (push) Successful in 1m25s
2026-11-02 13:32:05 +00:00
Parsa Aghayi 7ba29d290f feat(perf,seo): enable react strict mode, prefetch projects & services on server, and expand vitest coverage
Deploy Frontend / deploy (push) Successful in 1m22s
2026-11-02 13:05:16 +00:00
Parsa Aghayi ed65617433 feat(ui,ux): enhance blog mobile dark theme, add mobile theme toggle, and polish site copy
Deploy Frontend / deploy (push) Successful in 1m20s
2026-11-02 12:25:17 +00:00
Parsa Aghayi ecad3849a2 feat(projects): render dynamic bilingual project description and role details in modal
Deploy Frontend / deploy (push) Successful in 1m19s
2026-11-02 11:43:58 +00:00
Parsa Aghayi 3f47fc5e0e fix(404): read lang from searchParams for dynamic localization on 404 pages
Deploy Frontend / deploy (push) Successful in 1m7s
2026-11-02 08:30:18 +00:00
Parsa Aghayi efe9a29adb fix(site): resolve 404 route bugs, localize 404 pages, fix hreflang alternates, add language links for crawlers, enable blog dark mode, optimize testimonial avatar sizing, and update burger icon stroke
Deploy Frontend / deploy (push) Successful in 1m7s
2026-11-02 08:26:31 +00:00
Parsa Aghayi 3a105cdc6a style(header): use exact text-foreground class for clean contrast across light and dark modes
Deploy Frontend / deploy (push) Successful in 1m14s
2026-11-02 07:59:01 +00:00
Parsa Aghayi dc3be0aa7b fix(header): use design system css variable text-foreground for dynamic contrast in light and dark mode
Deploy Frontend / deploy (push) Successful in 1m11s
2026-11-02 07:55:43 +00:00
Parsa Aghayi aae13b259c fix(ui): enable tailwind class darkMode, fix navbar contrast, sync language switcher with URL, and add 7 blog category images
Deploy Frontend / deploy (push) Successful in 1m14s
2026-11-02 07:47:39 +00:00
Parsa Aghayi 8d91da7677 fix(website): fix audit bugs, SVG inline headers, contact localization, and clean scripts
Deploy Frontend / deploy (push) Successful in 6m33s
2026-11-02 06:53:45 +00:00
Parsa Aghayi 98c43c4b30 Fix Persian OG image letter joining and reading order
Deploy Frontend / deploy (push) Successful in 1m13s
The OG renderer resolves glyphs through the font cmap alone: satori emits an
SVG <font> and plain <text>, so no shaping engine and no bidi implementation
run. Persian titles were painted in logical order with every letter in its
isolated shape, which made them look scattered and mirrored.

Shaping is now derived from the shipped Vazirmatn font rather than guessed
from the Unicode block, and the presentation forms are joined per position.
Lines are broken here as well, in logical order, and each line is reordered
through the bidi algorithm before it is handed over, so a wrapped title keeps
its reading order instead of being filled from the wrong end.
2026-10-04 06:47:22 +00:00
Parsa Aghayi cb134b1cf1 Fix Persian OG image shaping, add category/tag social images, fix project category tabs
Deploy Frontend / deploy (push) Successful in 1m2s
2026-10-04 05:32:23 +00:00
Parsa Aghayi abfcd87668 Improve newsletter validation messages (show backend errors, clearer email validation)
Deploy Frontend / deploy (push) Successful in 1m5s
2026-10-03 12:35:50 -04:00
Parsa Aghayi 7606237c5c Newsletter subscribe modal, Persian OG image shaping, Jalali dates, all-posts page, fresh view/like counts and responsive pagination
Deploy Frontend / deploy (push) Successful in 1m13s
2026-10-03 08:31:17 -04:00
Parsa Aghayi ea0401b1ff Functional like/view counters and comment section on blog posts
Deploy Frontend / deploy (push) Successful in 1m7s
- PostStats: optimistic like toggle (localStorage per post) and one view per
  browser session (sessionStorage) against the new public endpoints
- CommentSection: lists approved reader comments, submits new ones into
  moderation with a pending-confirmation state
- Both wired into the single-post page sidebar and after the prev/next cards;
  new en/fa dictionary labels
2026-10-02 11:13:31 -04:00
Parsa Aghayi 2d2371da9d Richer blog reading experience: TOC, reading time, share, prev/next, newsletter CTA
Deploy Frontend / deploy (push) Successful in 1m8s
- Single post: sticky table of contents from h2 headings (anchored ids),
  estimated reading time badge, working share buttons (X/LinkedIn/Telegram/
  copy link), and same-language previous/next navigation cards
- Home: featured hero gains tag chips, reading time and a read CTA; new
  newsletter subscribe band linking to the site's contact address
- Both en/fa dictionaries updated for the new UI labels
2026-10-02 09:49:36 -04:00
Parsa Aghayi 2ef4d41588 Blog is language-locked: locale-aware API queries and twin redirects
Deploy Frontend / deploy (push) Successful in 1m10s
- Every blog list fetch (homepage, new/popular/search, categories, posts, tags) sends the active locale as lang to the API, so only that language's content renders
- Post, category and tag detail pages redirect to the mirrored twin slug when the URL language does not match the selected locale, so shared links always open in the viewer's language
- Fix home card links that used category.name as the URL slug instead of category.slug
- Add slugForLocale/isFaSlug helpers in lib/functions/utils
2026-10-02 08:31:05 -04:00
Parsa Aghayi 32a7481ef6 Complete SEO metadata, JSON-LD, real tag/projects pages, OG fallback fixes
Deploy Frontend / deploy (push) Successful in 1m11s
2026-10-02 06:48:55 -04:00
Parsa Aghayi 88703ae4ea Harden mobile menu backgrounds with inline styles, wire real social links, drop contact helper text
Deploy Frontend / deploy (push) Successful in 1m6s
2026-10-02 06:26:01 -04:00
Parsa Aghayi 06c776a604 Fix mobile menu backdrop, send contact form to backend, add messages inbox
Deploy Frontend / deploy (push) Successful in 1m9s
The mobile menu overlays were only 20% opaque and sat below the fixed
header, so after scrolling, page text bled through and made menu items
unreadable. Make the backdrop a dark blurred veil and raise the drawer
above the header on both the website and blog menus.

Replace the mailto-only contact form (which contained a placeholder
caveat) with a form that POSTs to the new /api/contact endpoint, keeps
client-side validation, and shows success/error states.

Add an admin messages inbox at /admin/contact-messages with read/unread
toggling and delete, plus a nav link and a dashboard card.

Swap the lorem ipsum testimonials for real client feedback in both
dictionaries.
2026-10-02 05:41:17 -04:00
Parsa Aghayi 696e36bcc8 Let the admin panel upload its own images
Deploy Frontend / deploy (push) Successful in 13s
Typing a URL into the featured-image box meant the panel could only ever
reference images uploaded by hand, so every content change needed an SFTP
round trip. Image fields now get a uploader that posts straight to the
media endpoint, while the plain URL box stays: plenty of images still live
on another host, and pasting a URL should keep working.

The upload is a Server Action rather than a client fetch because the admin
token lives in an httpOnly cookie. adminUpload cannot reuse adminFetch —
that helper always JSON-stringifies the body and pins a JSON Content-Type,
and a hand-written Content-Type on multipart drops the boundary, which
leaves $_FILES empty and turns every upload into a 422.

The value reaches the existing saveResourceAction through the named text
input, which the uploader writes to; the file input itself is left unnamed
so a 4 MB image is never re-sent inside the save request. Removing an
image only clears the field, because the old URL may already be in use by
another row — deleteMediaAction is the separate, deliberate path.

Server Actions default to a 1 MB body, so next.config.mjs now allows 8 MB.
That is the Next-side half only: PHP's upload_max_filesize and post_max_size
have to be at least as large on the API host or it discards the file before
validation ever runs.

Also adds /feed.xml. The blog had a sitemap but no feed, so it was not
readable in any reader.
2026-10-01 19:00:51 -04:00
Parsa Aghayi cb9495c582 Keep local agent tooling and the generated knowledge graph out of git 2026-10-01 17:24:54 -04:00
root 68b0bf4b91 Fix the locale bug and the shared-metadata race behind the lint errors
services.tsx fetched /api/website/services/undefined, because the locale
cookie was read with a check that is false for the empty string and then fell
through unguarded. The endpoint is /api/website/services/{locale}. It also
ignored response.ok and assumed a payload shape, so a failing API threw. All
three are covered by a new regression test; the suite was 2 failures before
and passes 10/10 now.

The filtered-posts page rewrote fields of an exported module-level `metadata`
object during render. That object is a singleton shared by every request in the
process, so concurrent visits to different filters could serve each other's
title, description and OG image, and Next reads the export at build time so the
runtime writes were largely discarded anyway. Values now live in an immutable
record and generateMetadata returns a fresh object per request.

Also replaces set-state-in-effect locale reads with a useSyncExternalStore hook
over the cookie store, derives the active project category instead of storing
it in state (so it self-heals when the data or locale changes), makes the
"random" not-found picks stable per path instead of Math.random() during
render, and tightens a few `any` types.

eslint goes from 36 errors to 0, tsc stays clean.
2026-10-01 17:15:12 -04:00
root 80b3be48ea Stop next/image from 400-ing every SVG in the site
The logo, the burger button and the social icons are SVGs, and the image
optimizer refuses SVG by default, so each of those requests answered 400 and
the images silently never appeared.

Allow SVG on the optimiser together with the restrictive CSP the image
endpoint then requires (script-src 'none'; sandbox), so an SVG served from
_next/image cannot carry script. Verified: all three paths now return 200
with that CSP on the response.
2026-10-01 17:15:12 -04:00
root 6a56b27b01 Add security headers and make the contact form actually submit
The contact section collected input and discarded it on submit.

There is no backend contact endpoint and no mail provider, so the form opens
the visitor's mail client with a prefilled Persian subject and body. Validation
is client-side with inline Persian errors, an accessible alert summary, and
focus moved to the first invalid field; a persistent hint states up front that
nothing is stored on the server and shows the address to copy if no mail
client is registered.

Also add the response headers the site was missing: HSTS, nosniff, frame
denial, a strict referrer policy, a restrictive permissions policy, and a CSP.
The CSP still needs 'unsafe-inline' for scripts because nonces are not
implemented yet; that is the next hardening step. poweredByHeader is off so
the framework is not advertised.
2026-10-01 16:33:20 -04:00
root cc7a5f2b7c Make the site crawlable and describe itself properly
public/robots.txt was "Disallow: /", which told every crawler to ignore the
entire site. It now allows crawling, keeps /admin and the API paths out of the
index, and points at the sitemap.

Add a generated sitemap covering the static routes plus every post and
category. The API caps per_page at 50, so it follows meta.last_page instead of
asking for more, and every fetch is wrapped so an unreachable API degrades to
the static entries rather than taking the site down.

Replace the placeholder layout metadata with real Persian titles, description,
keywords, canonical URL, hreflang alternates, OpenGraph and Twitter cards, and
add Person/WebSite JSON-LD.
2026-10-01 16:33:19 -04:00
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 76cf4da118 chore: force repo size recalculation
Deploy Frontend / deploy (push) Failing after 5m3s
2026-07-12 14:14:49 +03:30
parsa aghaei 228e8e9740 chore: remove Iranian mirror from CI workflow - use official Alpine repos
Deploy Frontend / deploy (push) Failing after 1m7s
2026-07-12 13:35:39 +03:30
parsa aghaei 7bf8321392 chore: remove committed node_modules from git
- Remove node_modules/ from git tracking
- Uncomment /node_modules in .gitignore
- Dependencies will be installed via CI/CD with VPN + Nexus cache
2026-07-12 13:29:58 +03:30
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