Update image references to use WebP format for improved performance and remove unused design candidates from the project. Adjusted placeholder image handling in the faculty import script and updated metadata for various pages to reflect the new image paths.

This commit is contained in:
smhk1376 committed 2026-10-16 17:45:55 +03:30
1 parent 5b0a394216
commit 05b0a1af72
94 files changed
+181 -36

No files matched your search

+1 -1
View File
@@ -28,7 +28,7 @@ export default async function AlumniPage() {
<PageHero
title={t("alumniTitle")}
intro={t("alumniIntro")}
imageUrl="/brand/graduation-cap-neural.png"
imageUrl="/brand/graduation-cap-neural.webp"
/>
<Section tone="subtle">
<Container>
+1 -1
View File
@@ -25,7 +25,7 @@ export default async function InsightsPage() {
<PageHero
title={t("insightsTitle")}
intro={t("insightsIntro")}
imageUrl="/brand/neural-open-book.png"
imageUrl="/brand/neural-open-book.webp"
/>
<Section tone="subtle">
<Container>
+1 -1
View File
@@ -34,7 +34,7 @@ export default async function ProgramsPage() {
<PageHero
title={t("programsTitle")}
intro={t("programsIntro")}
imageUrl="/brand/neural-tree-knowledge.png"
imageUrl="/brand/neural-tree-knowledge.webp"
/>
<Section tone="subtle">
<Container className="space-y-16">
+1 -1
View File
@@ -29,7 +29,7 @@ export default async function ValuesPage() {
eyebrow={valuesContent.eyebrow}
title={valuesContent.title}
intro={valuesContent.intro}
imageUrl="/brand/collective-intelligence.png"
imageUrl="/brand/collective-intelligence.webp"
/>
<Section tone="subtle">
+1 -1
View File
@@ -54,7 +54,7 @@ export async function generateMetadata(): Promise<Metadata> {
title: t("homeTitle"),
description: t("homeDescription"),
images: [
{ url: "/brand/mst-faculty.png", alt: "دانشکده مدیریت، علم و فناوری دانشگاه صنعتی امیرکبیر" },
{ url: "/brand/mst-faculty.webp", alt: "دانشکده مدیریت، علم و فناوری دانشگاه صنعتی امیرکبیر" },
],
},
twitter: {
+1 -1
View File
@@ -56,7 +56,7 @@ function LoginForm() {
<CardHeader className="space-y-3 text-center">
<div className="mx-auto relative size-14">
<Image
src="/brand/mst-faculty.png"
src="/brand/mst-faculty.webp"
alt="دانشگاه صنعتی امیرکبیر"
fill
sizes="56px"
+2 -2
View File
@@ -3,9 +3,9 @@ import Link from "next/link";
import { cn } from "@/lib/utils";
/** Faculty seal mark (transparent). Source: MST icon with side text removed. */
const MARK_SRC = "/brand/mst-faculty.png";
const MARK_SRC = "/brand/mst-faculty.webp";
/** Horizontal wordmark with faculty + university name baked in. */
const HORIZONTAL_SRC = "/MstAutIcon_horizontal.png";
const HORIZONTAL_SRC = "/MstAutIcon_horizontal.webp";
type BrandLogoProps = {
href?: string;
+1 -1
View File
@@ -24,7 +24,7 @@ export function HeroFeatured({
<header className="home-hero relative isolate overflow-hidden bg-primary text-primary-foreground">
<div className="pointer-events-none absolute inset-0 z-[1]" aria-hidden>
<Image
src="/brand/amirkabir-arches.png"
src="/brand/amirkabir-arches.webp"
alt=""
fill
priority
+1 -1
View File
@@ -34,7 +34,7 @@ export function PageHero({
)}
>
<Image
src={imageUrl ?? "/brand/neural-learning-wave.png"}
src={imageUrl ?? "/brand/neural-learning-wave.webp"}
alt=""
fill
priority
@@ -37,7 +37,7 @@ export function AdminShell({
<div className="flex min-w-0 items-center gap-2">
<span className="relative size-6 shrink-0 md:hidden">
<Image
src="/brand/mst-faculty.png"
src="/brand/mst-faculty.webp"
alt=""
fill
sizes="24px"
@@ -110,7 +110,7 @@ export function AdminSidebar({ userName }: { userName: string }) {
>
<span className="relative size-8 shrink-0">
<Image
src="/brand/mst-faculty.png"
src="/brand/mst-faculty.webp"
alt=""
fill
sizes="32px"
+2 -2
View File
@@ -36,7 +36,7 @@ export function AboutTemplate({ topics }: { topics: IntersectionTopic[] }) {
eyebrow={aboutContent.eyebrow}
title={aboutContent.title}
intro={aboutContent.intro}
imageUrl="/brand/university-emblem-neural.png"
imageUrl="/brand/university-emblem-neural.webp"
/>
<Section tone="subtle">
@@ -59,7 +59,7 @@ export function AboutTemplate({ topics }: { topics: IntersectionTopic[] }) {
<div className="grid min-w-0 items-center gap-10 lg:grid-cols-2 lg:gap-14">
<div className="relative order-1 aspect-[16/10] overflow-hidden rounded-2xl bg-primary lg:order-none">
<Image
src="/brand/ai-learning-frames.png"
src="/brand/ai-learning-frames.webp"
alt="یادگیری مبتنی بر هوش مصنوعی و چارچوب های دانشگاهی"
fill
className="object-cover object-center"
+1 -1
View File
@@ -215,7 +215,7 @@ export function HomeApproach() {
</div>
<div className="relative order-1 aspect-[16/10] min-h-0 lg:order-2 lg:aspect-auto lg:min-h-full lg:self-stretch">
<Image
src="/brand/campus-collaboration-v1.png"
src="/brand/campus-collaboration-v1.webp"
alt="رویکرد آموزشی مرکز آموزش های آزاد"
fill
className="object-cover"
@@ -61,7 +61,7 @@ export function ProfessionalLandingTemplate({
eyebrow={labels.offeredBy}
title={labels.heroTitle}
intro={labels.heroBody}
imageUrl="/brand/executive-seminar-neural.png"
imageUrl="/brand/executive-seminar-neural.webp"
actions={
<DotCta href="#programs" onDark>
{labels.exploreCourses}
@@ -105,7 +105,7 @@ export function ProfessionalLandingTemplate({
>
<div className="pointer-events-none absolute inset-0" aria-hidden>
<Image
src="/brand/ai-learning-frames.png"
src="/brand/ai-learning-frames.webp"
alt=""
fill
className="object-cover object-[60%_45%] opacity-25 mix-blend-screen"
+2 -2
View File
@@ -13,7 +13,7 @@ import {
type ParsedMstFaculty,
} from "@/lib/faculty/parse-mst-network";
const PLACEHOLDER_IMAGE = "/images/faculty/placeholder.png";
const PLACEHOLDER_IMAGE = "/images/faculty/placeholder.webp";
const FETCH_TIMEOUT_MS = 25_000;
export type FacultySyncResult = {
@@ -126,7 +126,7 @@ async function resolveImageUrl(
if (opts.localImageDir && isPlaceholderSrc(src)) {
const from = path.join(opts.localImageDir, "johndoe.png");
const dest = path.join(facultyDir, "placeholder.png");
const dest = path.join(facultyDir, "placeholder.webp");
if (!(await fileExists(dest)) && (await fileExists(from))) {
await copyFile(from, dest);
}
+1 -5
View File
@@ -27,11 +27,7 @@ export const siteAddress = {
phone: "۰۲۱-۶۴۵۴۵۸۵۸",
phoneTel: "+982164545858",
email: "mst@aut.ac.ir",
mapUrl:
"https://maps.google.com/?q=" +
encodeURIComponent(
"تهران، خیابان انقلاب غرب، کوچه سعید، بن‌بست نائینی، ساختمان زکریای رازی",
),
mapUrl: "https://maps.app.goo.gl/RKKhZvN6cLYsmrKa8",
};
/** Main nav labels for Persian users (seed/reference — runtime uses site-config + course-nav). */
+1 -1
View File
@@ -30,7 +30,7 @@ export function pageMetadata(opts: {
absoluteTitle?: boolean;
}): Metadata {
const path = opts.path.startsWith("/") ? opts.path : `/${opts.path}`;
const image = opts.image ?? "/brand/mst-faculty.png";
const image = opts.image ?? "/brand/mst-faculty.webp";
return {
title: opts.absoluteTitle ? { absolute: opts.title } : opts.title,
description: opts.description,
+1 -5
View File
@@ -93,11 +93,7 @@ export const siteAddress = {
/** ASCII for tel: / schema */
phoneTel: "+982164545858",
email: "mst@aut.ac.ir",
mapUrl:
"https://maps.google.com/?q=" +
encodeURIComponent(
"تهران، خیابان انقلاب غرب، کوچه سعید، بن‌بست نائینی، ساختمان زکریای رازی",
),
mapUrl: "https://maps.app.goo.gl/RKKhZvN6cLYsmrKa8",
};
/**