fix(projects): «قبلی» = قدیمیتر و «بعدی» = تازهتر (فهرست نزولی سال)؛ فلشها فقط آینهٔ سادهٔ هم
This commit is contained in:
@@ -86,8 +86,8 @@ export function ProjectDetail() {
|
|||||||
*/
|
*/
|
||||||
const currentIndex = projects.findIndex((p) => p.slug === project.slug)
|
const currentIndex = projects.findIndex((p) => p.slug === project.slug)
|
||||||
const total = projects.length
|
const total = projects.length
|
||||||
const prevProject = total > 1 ? projects[(currentIndex - 1 + total) % total] : undefined
|
const prevProject = total > 1 ? projects[(currentIndex + 1) % total] : undefined // قدیمیتر
|
||||||
const nextProject = total > 1 ? projects[(currentIndex + 1) % total] : undefined
|
const nextProject = total > 1 ? projects[(currentIndex - 1 + total) % total] : undefined // تازهتر
|
||||||
|
|
||||||
// مشخصات هر پروژه — همان فهرستی که تیم داده دارد:
|
// مشخصات هر پروژه — همان فهرستی که تیم داده دارد:
|
||||||
// وضعیت / سال / تعداد طبقات / واحدها / نوع پروژه / زیربنا / کاربری
|
// وضعیت / سال / تعداد طبقات / واحدها / نوع پروژه / زیربنا / کاربری
|
||||||
@@ -240,7 +240,7 @@ export function ProjectDetail() {
|
|||||||
to={href(`/projects/${prevProject.slug}`)}
|
to={href(`/projects/${prevProject.slug}`)}
|
||||||
className="group flex min-w-0 flex-1 items-center gap-3 rounded-2xl border border-ivory/12 bg-ink/40 px-4 py-3.5 transition-all duration-300 ease-lux hover:-translate-y-0.5 hover:border-copper/50 hover:bg-ink/70 md:max-w-[46%] md:px-6 md:py-5"
|
className="group flex min-w-0 flex-1 items-center gap-3 rounded-2xl border border-ivory/12 bg-ink/40 px-4 py-3.5 transition-all duration-300 ease-lux hover:-translate-y-0.5 hover:border-copper/50 hover:bg-ink/70 md:max-w-[46%] md:px-6 md:py-5"
|
||||||
>
|
>
|
||||||
<ArrowLeftIcon className="h-4 w-4 shrink-0 text-copper transition-transform duration-300 group-hover:-translate-x-1" aria-hidden="true" />
|
<ArrowLeftIcon className="h-4 w-4 shrink-0 text-copper" aria-hidden="true" />
|
||||||
<span className="flex min-w-0 flex-col text-start">
|
<span className="flex min-w-0 flex-col text-start">
|
||||||
<span className="text-[11px] font-light text-ivory/50">{t('prevProject')}</span>
|
<span className="text-[11px] font-light text-ivory/50">{t('prevProject')}</span>
|
||||||
<span className="mt-1 truncate text-sm font-bold text-ivory transition-colors duration-300 group-hover:text-copper md:text-base">
|
<span className="mt-1 truncate text-sm font-bold text-ivory transition-colors duration-300 group-hover:text-copper md:text-base">
|
||||||
@@ -263,7 +263,7 @@ export function ProjectDetail() {
|
|||||||
{nextProject.title}
|
{nextProject.title}
|
||||||
</span>
|
</span>
|
||||||
</span>
|
</span>
|
||||||
<ArrowLeftIcon className="h-4 w-4 shrink-0 rotate-180 text-copper transition-transform duration-300 group-hover:translate-x-1" aria-hidden="true" />
|
<ArrowLeftIcon className="h-4 w-4 shrink-0 -scale-x-100 text-copper" aria-hidden="true" />
|
||||||
</Link>
|
</Link>
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user