Ship site UI checklist, move admin to /mstcontroller, and add safe taxonomy label migration.
Deploy edu.mstaut.ir / deploy (push) Has been cancelled
Deploy edu.mstaut.ir / deploy (push) Has been cancelled
Production already has migrations through 008; 009 only updates four seed labels by id. Faculty sync remains upsert-by-email/name and does not wipe curated data. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
1 parent
3eea1c35a6
commit
2b0db26a93
171 files changed
+1477
-807
No files matched your search
@@ -18,7 +18,7 @@ export function BadgeLabel({
|
||||
variant={map[variant]}
|
||||
className={cn(
|
||||
variant === "inverse" &&
|
||||
"border-background/30 bg-background/15 text-background",
|
||||
"border-primary-foreground/30 bg-primary-foreground/15 text-primary-foreground",
|
||||
className,
|
||||
)}
|
||||
{...props}
|
||||
|
||||
@@ -3,7 +3,9 @@ import Link from "next/link";
|
||||
import { cn } from "@/lib/utils";
|
||||
|
||||
/** Faculty seal mark (transparent). Source: MST icon with side text removed. */
|
||||
const LOGO_SRC = "/brand/mst-faculty.png";
|
||||
const MARK_SRC = "/brand/mst-faculty.png";
|
||||
/** Horizontal wordmark with faculty + university name baked in. */
|
||||
const HORIZONTAL_SRC = "/MstAutIcon_horizontal.png";
|
||||
|
||||
type BrandLogoProps = {
|
||||
href?: string;
|
||||
@@ -12,9 +14,14 @@ type BrandLogoProps = {
|
||||
onDark?: boolean;
|
||||
className?: string;
|
||||
compact?: boolean;
|
||||
/**
|
||||
* Header wordmark: uses the horizontal logo (text is in the image).
|
||||
* Title/subtitle are not rendered — only used for aria-label.
|
||||
*/
|
||||
horizontal?: boolean;
|
||||
};
|
||||
|
||||
/** AUT seal — raw mark only (transparent), no disc/ring/background. */
|
||||
/** AUT brand mark / horizontal wordmark. */
|
||||
export function BrandLogo({
|
||||
href = "/",
|
||||
title,
|
||||
@@ -22,7 +29,40 @@ export function BrandLogo({
|
||||
onDark = false,
|
||||
className,
|
||||
compact = false,
|
||||
horizontal = false,
|
||||
}: BrandLogoProps) {
|
||||
const ariaLabel = [title, subtitle].filter(Boolean).join(" — ");
|
||||
|
||||
if (horizontal) {
|
||||
return (
|
||||
<Link
|
||||
href={href}
|
||||
className={cn(
|
||||
// Clip 2× logo inside the header slot so it never bleeds into page content.
|
||||
"group inline-flex min-w-0 items-center overflow-hidden",
|
||||
compact ? "h-16" : "h-full",
|
||||
className,
|
||||
)}
|
||||
aria-label={ariaLabel}
|
||||
>
|
||||
<Image
|
||||
src={HORIZONTAL_SRC}
|
||||
alt={ariaLabel}
|
||||
width={1888}
|
||||
height={607}
|
||||
priority
|
||||
sizes="(max-width:640px) 28rem, 36rem"
|
||||
className={cn(
|
||||
// ~2.35× slot height; overflow clipped by the link (and header).
|
||||
"h-[235%] w-auto max-w-none object-contain object-right",
|
||||
// Asset is white-on-black; blend so the plate disappears into the header.
|
||||
onDark ? "mix-blend-screen" : "invert mix-blend-multiply",
|
||||
)}
|
||||
/>
|
||||
</Link>
|
||||
);
|
||||
}
|
||||
|
||||
return (
|
||||
<Link
|
||||
href={href}
|
||||
@@ -30,7 +70,7 @@ export function BrandLogo({
|
||||
"group flex min-w-0 items-center gap-2.5 sm:gap-3",
|
||||
className,
|
||||
)}
|
||||
aria-label={[title, subtitle].filter(Boolean).join(" — ")}
|
||||
aria-label={ariaLabel}
|
||||
>
|
||||
<span
|
||||
className={cn(
|
||||
@@ -39,7 +79,7 @@ export function BrandLogo({
|
||||
)}
|
||||
>
|
||||
<Image
|
||||
src={LOGO_SRC}
|
||||
src={MARK_SRC}
|
||||
alt=""
|
||||
fill
|
||||
priority
|
||||
@@ -54,9 +94,11 @@ export function BrandLogo({
|
||||
<span className="min-w-0 text-start leading-tight">
|
||||
<span
|
||||
className={cn(
|
||||
"block truncate font-black tracking-tight transition-colors",
|
||||
"block truncate font-bold transition-colors",
|
||||
compact ? "text-base" : "text-base sm:text-lg",
|
||||
onDark ? "group-hover:text-background/70" : "group-hover:text-primary",
|
||||
onDark
|
||||
? "text-primary-foreground group-hover:text-secondary"
|
||||
: "group-hover:text-accent",
|
||||
)}
|
||||
>
|
||||
{title}
|
||||
@@ -65,7 +107,7 @@ export function BrandLogo({
|
||||
<span
|
||||
className={cn(
|
||||
"mt-0.5 hidden truncate text-[0.7rem] font-medium min-[380px]:block sm:text-xs",
|
||||
onDark ? "text-background/70" : "text-muted-foreground",
|
||||
onDark ? "text-primary-foreground/70" : "text-muted-foreground",
|
||||
)}
|
||||
>
|
||||
{subtitle}
|
||||
|
||||
@@ -23,7 +23,7 @@ export function DotCta({
|
||||
buttonVariants({ variant: "outline" }),
|
||||
"group h-auto gap-2.5 px-5 py-3 text-sm font-bold",
|
||||
onDark &&
|
||||
"border-background/40 bg-background text-foreground hover:bg-background/90",
|
||||
"border-primary-foreground/40 bg-card text-card-foreground hover:bg-secondary",
|
||||
className,
|
||||
);
|
||||
|
||||
|
||||
@@ -1,10 +1,15 @@
|
||||
import { cn } from "@/lib/utils";
|
||||
|
||||
/**
|
||||
* Persian / Vazirmatn type scale.
|
||||
* Avoid tracking-tight (hurts Arabic script). Keep clear step between levels.
|
||||
* H1 hero → H2 sections → H3 cards/subheads → H4 small titles.
|
||||
*/
|
||||
const levels = {
|
||||
1: "text-[1.65rem] font-bold leading-[1.45] tracking-tight text-pretty sm:text-4xl lg:text-[2.75rem] lg:leading-[1.4]",
|
||||
2: "text-2xl font-bold leading-snug tracking-tight text-pretty sm:text-3xl lg:text-4xl",
|
||||
3: "text-lg font-semibold leading-snug sm:text-xl",
|
||||
4: "text-base font-semibold leading-snug sm:text-lg",
|
||||
1: "text-3xl font-bold leading-[1.35] text-pretty sm:text-4xl sm:leading-[1.3] lg:text-5xl lg:leading-[1.25]",
|
||||
2: "text-2xl font-bold leading-[1.4] text-pretty sm:text-3xl sm:leading-[1.35]",
|
||||
3: "text-xl font-semibold leading-[1.45]",
|
||||
4: "text-lg font-semibold leading-[1.5]",
|
||||
} as const;
|
||||
|
||||
type HeadingProps = React.ComponentProps<"h1"> & {
|
||||
|
||||
@@ -5,7 +5,7 @@ import { cn } from "@/lib/utils";
|
||||
|
||||
type MetamorphFieldProps = {
|
||||
className?: string;
|
||||
/** `dark` = light strokes on navy/hero; `light` = ink strokes on sand/muted */
|
||||
/** `dark` = light strokes on navy/hero; `light` = ink strokes on soft surfaces */
|
||||
tone?: "dark" | "light";
|
||||
/** Visual density of the neural field */
|
||||
density?: "sparse" | "normal";
|
||||
@@ -19,22 +19,20 @@ type Node = {
|
||||
y: number;
|
||||
r: number;
|
||||
layer: number;
|
||||
active: boolean;
|
||||
hub: boolean;
|
||||
};
|
||||
|
||||
type Synapse = {
|
||||
d: string;
|
||||
from: number;
|
||||
to: number;
|
||||
active: boolean;
|
||||
weight: number;
|
||||
hub: boolean;
|
||||
};
|
||||
|
||||
const VIEW_W = 1200;
|
||||
const VIEW_H = 480;
|
||||
|
||||
const ENABLE_MQ =
|
||||
"(min-width: 768px) and (prefers-reduced-motion: no-preference)";
|
||||
/** Desktop only — SVG density is heavy on phones */
|
||||
const ENABLE_MQ = "(min-width: 768px)";
|
||||
|
||||
/** Deterministic pseudo-random in [0, 1) from a seed */
|
||||
function rand(seed: number) {
|
||||
@@ -49,27 +47,27 @@ function synapsePath(a: Point, b: Point, seed: number): string {
|
||||
const dist = Math.hypot(dx, dy) || 1;
|
||||
const nx = -dy / dist;
|
||||
const ny = dx / dist;
|
||||
const bulge = (rand(seed) - 0.5) * Math.min(90, dist * 0.45);
|
||||
const c1x = a.x + dx * 0.35 + nx * bulge;
|
||||
const c1y = a.y + dy * 0.35 + ny * bulge;
|
||||
const c2x = a.x + dx * 0.7 - nx * bulge * 0.55;
|
||||
const c2y = a.y + dy * 0.7 - ny * bulge * 0.55;
|
||||
const bulge = (rand(seed) - 0.5) * Math.min(72, dist * 0.38);
|
||||
const c1x = a.x + dx * 0.32 + nx * bulge;
|
||||
const c1y = a.y + dy * 0.32 + ny * bulge;
|
||||
const c2x = a.x + dx * 0.68 - nx * bulge * 0.5;
|
||||
const c2y = a.y + dy * 0.68 - ny * bulge * 0.5;
|
||||
return `M ${a.x.toFixed(1)} ${a.y.toFixed(1)} C ${c1x.toFixed(1)} ${c1y.toFixed(1)}, ${c2x.toFixed(1)} ${c2y.toFixed(1)}, ${b.x.toFixed(1)} ${b.y.toFixed(1)}`;
|
||||
}
|
||||
|
||||
/**
|
||||
* Soft layered neural net: nodes in columns, curved synapses between
|
||||
* adjacent layers — reads as an AI network while staying organic.
|
||||
* Layered neural net: denser columns, more fan-out + skip links.
|
||||
* Static geometry only — no motion along synapses.
|
||||
*/
|
||||
function buildNetwork(density: "sparse" | "normal"): {
|
||||
nodes: Node[];
|
||||
synapses: Synapse[];
|
||||
} {
|
||||
const layerCounts =
|
||||
density === "sparse" ? [3, 4, 4, 3] : [4, 5, 6, 5, 3];
|
||||
density === "sparse" ? [4, 5, 6, 5, 4] : [5, 7, 8, 8, 6, 4];
|
||||
const layers = layerCounts.length;
|
||||
const padX = density === "sparse" ? 110 : 80;
|
||||
const padY = 48;
|
||||
const padX = density === "sparse" ? 90 : 64;
|
||||
const padY = 36;
|
||||
const nodes: Node[] = [];
|
||||
let id = 0;
|
||||
|
||||
@@ -80,16 +78,17 @@ function buildNetwork(density: "sparse" | "normal"): {
|
||||
for (let i = 0; i < count; i++) {
|
||||
const t = count === 1 ? 0.5 : i / (count - 1);
|
||||
const y = padY + t * (VIEW_H - padY * 2);
|
||||
const jitterX = (rand(id * 11 + 1) - 0.5) * 36;
|
||||
const jitterY = (rand(id * 11 + 2) - 0.5) * 28;
|
||||
const active = rand(id * 17) > 0.72;
|
||||
const jitterX = (rand(id * 11 + 1) - 0.5) * 28;
|
||||
const jitterY = (rand(id * 11 + 2) - 0.5) * 22;
|
||||
const hub = rand(id * 17) > 0.72;
|
||||
nodes.push({
|
||||
id,
|
||||
x: x + jitterX,
|
||||
y: y + jitterY,
|
||||
r: active ? 7.5 : 5.2 + rand(id * 3) * 2,
|
||||
// Keep nodes hairline — field should read as texture, not dots
|
||||
r: hub ? 2.4 : 1.35 + rand(id * 3) * 0.7,
|
||||
layer: L,
|
||||
active,
|
||||
hub,
|
||||
});
|
||||
id += 1;
|
||||
}
|
||||
@@ -105,44 +104,39 @@ function buildNetwork(density: "sparse" | "normal"): {
|
||||
const left = byLayer[L];
|
||||
const right = byLayer[L + 1];
|
||||
for (const a of left) {
|
||||
// Each neuron fans out to 2–3 targets in the next layer
|
||||
const fan = 2 + Math.floor(rand(a.id * 31) * 2);
|
||||
const fan = 3 + Math.floor(rand(a.id * 31) * 3);
|
||||
const ranked = [...right].sort(
|
||||
(p, q) =>
|
||||
Math.abs(p.y - a.y) + rand(a.id + p.id) * 20 -
|
||||
(Math.abs(q.y - a.y) + rand(a.id + q.id) * 20),
|
||||
Math.abs(p.y - a.y) + rand(a.id + p.id) * 18 -
|
||||
(Math.abs(q.y - a.y) + rand(a.id + q.id) * 18),
|
||||
);
|
||||
for (let k = 0; k < Math.min(fan, ranked.length); k++) {
|
||||
const b = ranked[k];
|
||||
const weight = 0.55 + rand(synSeed + 3) * 0.45;
|
||||
const active =
|
||||
(a.active || b.active) && rand(synSeed + 7) > 0.45;
|
||||
const weight = 0.5 + rand(synSeed + 3) * 0.55;
|
||||
synapses.push({
|
||||
d: synapsePath(a, b, synSeed),
|
||||
from: a.id,
|
||||
to: b.id,
|
||||
active,
|
||||
weight,
|
||||
hub: a.hub || b.hub,
|
||||
});
|
||||
synSeed += 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// A few skip connections (deeper net feel)
|
||||
if (layers >= 4) {
|
||||
const from = byLayer[0];
|
||||
const to = byLayer[layers - 1];
|
||||
for (let i = 0; i < Math.min(2, from.length, to.length); i++) {
|
||||
const a = from[i];
|
||||
const b = to[Math.min(to.length - 1, i + 1)];
|
||||
synapses.push({
|
||||
d: synapsePath(a, b, 900 + i),
|
||||
from: a.id,
|
||||
to: b.id,
|
||||
active: true,
|
||||
weight: 0.4,
|
||||
});
|
||||
for (let L = 0; L < layers - 2; L++) {
|
||||
const from = byLayer[L];
|
||||
const to = byLayer[L + 2];
|
||||
const skips = Math.min(3, from.length, to.length);
|
||||
for (let i = 0; i < skips; i++) {
|
||||
const a = from[Math.floor(rand(700 + L * 10 + i) * from.length)];
|
||||
const b = to[Math.floor(rand(800 + L * 10 + i) * to.length)];
|
||||
synapses.push({
|
||||
d: synapsePath(a, b, 900 + L * 20 + i),
|
||||
weight: 0.35 + rand(910 + i) * 0.25,
|
||||
hub: true,
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -150,9 +144,8 @@ function buildNetwork(density: "sparse" | "normal"): {
|
||||
}
|
||||
|
||||
/**
|
||||
* Decorative neural-network field — layered nodes + curved synapses.
|
||||
* Evokes AI / learning systems without looking like a flowchart.
|
||||
* Desktop + motion only (SVG density is heavy on phones).
|
||||
* Decorative neural-network field — palette-aware hubs + synapses.
|
||||
* Dark tone: light nodes on navy. Light tone: primary/accent ink on soft gray.
|
||||
*/
|
||||
export function MetamorphField({
|
||||
className,
|
||||
@@ -175,27 +168,24 @@ export function MetamorphField({
|
||||
|
||||
if (!enabled) return null;
|
||||
|
||||
const edge =
|
||||
tone === "dark"
|
||||
? "color-mix(in oklab, white 42%, transparent)"
|
||||
: "color-mix(in oklab, var(--foreground) 36%, transparent)";
|
||||
const edgeActive =
|
||||
tone === "dark"
|
||||
? "color-mix(in oklab, var(--accent) 70%, white)"
|
||||
: "var(--primary)";
|
||||
const soma =
|
||||
tone === "dark"
|
||||
? "color-mix(in oklab, white 82%, transparent)"
|
||||
: "var(--foreground)";
|
||||
const accent = tone === "dark" ? "var(--accent)" : "var(--primary)";
|
||||
const core =
|
||||
tone === "dark" ? "var(--chart-3)" : "var(--background)";
|
||||
const isDark = tone === "dark";
|
||||
|
||||
// Dark navy: faint light ink. Soft surfaces: faint primary ink.
|
||||
const edgeQuiet = isDark
|
||||
? "color-mix(in oklab, var(--primary-foreground) 18%, transparent)"
|
||||
: "color-mix(in oklab, var(--primary) 14%, transparent)";
|
||||
const edgeHub = isDark
|
||||
? "color-mix(in oklab, var(--primary-foreground) 32%, transparent)"
|
||||
: "color-mix(in oklab, var(--accent) 28%, transparent)";
|
||||
const node = isDark
|
||||
? "color-mix(in oklab, var(--primary-foreground) 70%, transparent)"
|
||||
: "color-mix(in oklab, var(--primary) 65%, transparent)";
|
||||
|
||||
return (
|
||||
<div
|
||||
className={cn(
|
||||
"pointer-events-none absolute inset-0 z-[1] overflow-hidden metamorph-field",
|
||||
tone === "light" ? "opacity-[0.18]" : "opacity-[0.52]",
|
||||
isDark ? "opacity-[0.32]" : "opacity-[0.18]",
|
||||
className,
|
||||
)}
|
||||
aria-hidden
|
||||
@@ -208,53 +198,25 @@ export function MetamorphField({
|
||||
focusable="false"
|
||||
>
|
||||
{synapses.map((s, i) => (
|
||||
<g key={`syn-${i}`}>
|
||||
<path
|
||||
d={s.d}
|
||||
stroke={s.active ? edgeActive : edge}
|
||||
strokeWidth={s.active ? 1.35 * s.weight : 1.05 * s.weight}
|
||||
strokeLinecap="round"
|
||||
opacity={s.active ? 0.55 : 0.28}
|
||||
/>
|
||||
{s.active ? (
|
||||
<path
|
||||
className="metamorph-pulse"
|
||||
d={s.d}
|
||||
stroke={accent}
|
||||
strokeWidth={2}
|
||||
strokeLinecap="round"
|
||||
strokeDasharray="6 120"
|
||||
opacity="0.85"
|
||||
style={{ animationDelay: `${(i % 7) * 0.35}s` }}
|
||||
/>
|
||||
) : null}
|
||||
</g>
|
||||
<path
|
||||
key={`syn-${i}`}
|
||||
d={s.d}
|
||||
stroke={s.hub ? edgeHub : edgeQuiet}
|
||||
strokeWidth={s.hub ? 0.85 * s.weight : 0.55 * s.weight}
|
||||
strokeLinecap="round"
|
||||
opacity={s.hub ? 0.35 : 0.2}
|
||||
/>
|
||||
))}
|
||||
|
||||
{nodes.map((n) => (
|
||||
<g key={`n-${n.id}`}>
|
||||
<circle
|
||||
cx={n.x}
|
||||
cy={n.y}
|
||||
r={n.r + 10}
|
||||
fill={n.active ? accent : soma}
|
||||
opacity={n.active ? 0.16 : 0.08}
|
||||
/>
|
||||
<circle
|
||||
cx={n.x}
|
||||
cy={n.y}
|
||||
r={n.r}
|
||||
fill={n.active ? accent : soma}
|
||||
opacity={n.active ? 0.95 : 0.75}
|
||||
/>
|
||||
<circle
|
||||
cx={n.x}
|
||||
cy={n.y}
|
||||
r={n.r * 0.38}
|
||||
fill={core}
|
||||
opacity="0.5"
|
||||
/>
|
||||
</g>
|
||||
<circle
|
||||
key={`n-${n.id}`}
|
||||
cx={n.x}
|
||||
cy={n.y}
|
||||
r={n.r}
|
||||
fill={node}
|
||||
opacity={n.hub ? 0.55 : 0.35}
|
||||
/>
|
||||
))}
|
||||
</svg>
|
||||
</div>
|
||||
|
||||
@@ -9,8 +9,8 @@ const tones = {
|
||||
default: "bg-background text-foreground",
|
||||
subtle: "bg-gradient-to-b from-background to-muted/40 text-foreground",
|
||||
muted: "bg-muted text-foreground",
|
||||
dark: "bg-chart-3 text-background",
|
||||
accent: "bg-primary text-primary-foreground",
|
||||
dark: "bg-primary text-primary-foreground",
|
||||
accent: "bg-accent text-accent-foreground",
|
||||
};
|
||||
|
||||
export function Section({
|
||||
|
||||
@@ -14,9 +14,9 @@ export function TextLink({
|
||||
<Link
|
||||
className={cn(
|
||||
"font-medium underline-offset-4 transition-colors hover:underline",
|
||||
tone === "default" && "text-chart-2 hover:text-primary",
|
||||
tone === "inverse" && "text-background/90 hover:text-background",
|
||||
tone === "accent" && "text-primary hover:text-foreground",
|
||||
tone === "default" && "text-primary hover:text-accent",
|
||||
tone === "inverse" && "text-primary-foreground/90 hover:text-primary-foreground",
|
||||
tone === "accent" && "text-accent hover:text-primary",
|
||||
className,
|
||||
)}
|
||||
{...props}
|
||||
|
||||
@@ -23,10 +23,10 @@ export function ProgramCard({
|
||||
<Card className={cn("group h-full gap-2 py-6 hover:shadow-md hover:ring-primary/25", className)}>
|
||||
<CardHeader className="gap-1">
|
||||
{program.tagline ? (
|
||||
<p className="text-xs font-bold text-primary">{program.tagline}</p>
|
||||
<p className="text-xs font-bold text-accent">{program.tagline}</p>
|
||||
) : null}
|
||||
<CardTitle className="text-lg">
|
||||
<Link href={program.href} className="hover:text-primary">
|
||||
<Link href={program.href} className="hover:text-accent">
|
||||
{program.title}
|
||||
</Link>
|
||||
</CardTitle>
|
||||
@@ -35,7 +35,7 @@ export function ProgramCard({
|
||||
<CardDescription className="leading-relaxed">
|
||||
{program.blurb}
|
||||
</CardDescription>
|
||||
<span className="mt-5 inline-flex items-center gap-1 text-xs font-bold text-primary">
|
||||
<span className="mt-5 inline-flex items-center gap-1 text-xs font-bold text-accent">
|
||||
جزئیات برنامه
|
||||
<ArrowUpLeft className="size-3.5 transition-transform group-hover:-translate-x-0.5 group-hover:-translate-y-0.5" />
|
||||
</span>
|
||||
@@ -68,12 +68,12 @@ export function ArticleCard({
|
||||
<Image src={imageUrl} alt={title} fill placeholder="blur" blurDataURL={blurDataURL} className="object-cover transition-transform duration-500 group-hover:scale-[1.025]" sizes="(max-width:640px) 100vw, 304px" />
|
||||
</Link>
|
||||
<div className="flex min-w-0 flex-col justify-center pt-5 sm:pt-0">
|
||||
<p className="text-xs font-bold text-primary">{category}</p>
|
||||
<h2 className="mt-2 text-xl font-bold leading-relaxed tracking-tight sm:text-2xl">
|
||||
<Link href={href} className="transition-colors hover:text-primary">{title}</Link>
|
||||
<p className="text-xs font-bold text-accent">{category}</p>
|
||||
<h2 className="mt-2 text-xl font-bold leading-[1.45] sm:text-2xl">
|
||||
<Link href={href} className="transition-colors hover:text-accent">{title}</Link>
|
||||
</h2>
|
||||
<p className="mt-3 max-w-2xl text-sm leading-7 text-muted-foreground sm:text-base">{excerpt}</p>
|
||||
<Link href={href} className="mt-4 inline-flex w-fit items-center gap-2 text-sm font-semibold text-foreground/70 transition-colors hover:text-primary">
|
||||
<p className="mt-3 max-w-2xl text-sm leading-7 text-muted-foreground sm:text-base sm:leading-7">{excerpt}</p>
|
||||
<Link href={href} className="mt-4 inline-flex w-fit items-center gap-2 text-sm font-semibold text-foreground/70 transition-colors hover:text-accent">
|
||||
مطالعه مقاله <ArrowUpLeft className="size-4 transition-transform group-hover:-translate-x-0.5 group-hover:-translate-y-0.5" />
|
||||
</Link>
|
||||
</div>
|
||||
@@ -126,11 +126,11 @@ export function ArticleCard({
|
||||
<h3
|
||||
className={cn(
|
||||
featured
|
||||
? "mt-2 text-2xl font-bold tracking-tight sm:text-3xl"
|
||||
: "mt-1.5 text-lg font-semibold",
|
||||
? "mt-2 text-2xl font-bold leading-[1.4] sm:text-3xl"
|
||||
: "mt-1.5 text-lg font-semibold leading-[1.5]",
|
||||
)}
|
||||
>
|
||||
<Link href={href} className="hover:text-primary">
|
||||
<Link href={href} className="hover:text-accent">
|
||||
{title}
|
||||
</Link>
|
||||
</h3>
|
||||
@@ -176,7 +176,7 @@ export function EventCard({
|
||||
</div>
|
||||
{end ? (
|
||||
<>
|
||||
<span className="mt-7 text-xs font-medium text-primary">تا</span>
|
||||
<span className="mt-7 text-xs font-medium text-accent">تا</span>
|
||||
<div>
|
||||
<p className="text-xs font-semibold text-muted-foreground">
|
||||
{endMonth}
|
||||
@@ -188,7 +188,7 @@ export function EventCard({
|
||||
</div>
|
||||
<div>
|
||||
<h3 className="text-lg font-semibold">
|
||||
<Link href={href} className="hover:text-primary">
|
||||
<Link href={href} className="hover:text-accent">
|
||||
{title}
|
||||
</Link>
|
||||
</h3>
|
||||
@@ -233,7 +233,7 @@ export function IntersectionCard({
|
||||
return (
|
||||
<Link
|
||||
href={href}
|
||||
className="group relative block min-h-[16rem] overflow-hidden rounded-2xl bg-chart-3 shadow-sm sm:min-h-[18rem]"
|
||||
className="group relative block min-h-[16rem] overflow-hidden rounded-2xl bg-primary shadow-sm sm:min-h-[18rem]"
|
||||
>
|
||||
<div className="absolute inset-0 overflow-hidden">
|
||||
<Image
|
||||
@@ -246,10 +246,11 @@ export function IntersectionCard({
|
||||
sizes="(max-width:768px) 100vw, 25vw"
|
||||
/>
|
||||
</div>
|
||||
<div className="absolute inset-0 bg-gradient-to-t from-chart-3 via-chart-3/50 to-transparent" />
|
||||
<div className="absolute inset-x-0 bottom-0 p-6 text-background">
|
||||
<div className="flex items-center justify-between gap-3"><p className="text-sm font-bold text-accent">{title}</p><ArrowUpLeft className="size-4 transition-transform group-hover:-translate-x-1 group-hover:-translate-y-1" /></div>
|
||||
<p className="mt-2 text-sm font-semibold leading-relaxed text-background/80">{description}</p>
|
||||
<div className="absolute inset-0 bg-gradient-to-t from-primary via-primary/50 to-transparent" />
|
||||
<div className="absolute inset-0 border-s-4 border-accent" aria-hidden />
|
||||
<div className="absolute inset-x-0 bottom-0 p-6 text-primary-foreground">
|
||||
<div className="flex items-center justify-between gap-3"><p className="text-sm font-bold text-secondary">{title}</p><ArrowUpLeft className="size-4 transition-transform group-hover:-translate-x-1 group-hover:-translate-y-1" /></div>
|
||||
<p className="mt-2 text-sm font-semibold leading-relaxed text-primary-foreground/80">{description}</p>
|
||||
</div>
|
||||
</Link>
|
||||
);
|
||||
|
||||
@@ -19,13 +19,19 @@ export function ContactDetails() {
|
||||
<MapPin className="size-4" aria-hidden />
|
||||
</span>
|
||||
<div className="min-w-0">
|
||||
<p className="font-semibold text-foreground">آدرس</p>
|
||||
<p className="font-semibold text-foreground">نشانی</p>
|
||||
<p className="text-muted-foreground">{siteAddress.line}</p>
|
||||
<p className="mt-1 text-muted-foreground">
|
||||
کد پستی{" "}
|
||||
<span dir="ltr" className="font-medium text-foreground">
|
||||
{siteAddress.postalCode}
|
||||
</span>
|
||||
</p>
|
||||
<a
|
||||
href={siteAddress.mapUrl}
|
||||
target="_blank"
|
||||
rel="noreferrer"
|
||||
className="mt-1 inline-block font-medium text-primary underline-offset-4 hover:underline"
|
||||
className="mt-1 inline-block font-medium text-accent underline-offset-4 hover:underline"
|
||||
>
|
||||
مشاهده روی نقشه
|
||||
</a>
|
||||
@@ -38,7 +44,13 @@ export function ContactDetails() {
|
||||
<div className="min-w-0">
|
||||
<p className="font-semibold text-foreground">تلفن</p>
|
||||
<p className="text-muted-foreground">
|
||||
<span dir="ltr">{siteAddress.phone}</span>
|
||||
<a
|
||||
href={`tel:${siteAddress.phoneTel}`}
|
||||
dir="ltr"
|
||||
className="transition-colors hover:text-foreground"
|
||||
>
|
||||
{siteAddress.phone}
|
||||
</a>
|
||||
</p>
|
||||
</div>
|
||||
</li>
|
||||
@@ -47,7 +59,7 @@ export function ContactDetails() {
|
||||
<Mail className="size-4" aria-hidden />
|
||||
</span>
|
||||
<div className="min-w-0">
|
||||
<p className="font-semibold text-foreground">ایمیل</p>
|
||||
<p className="font-semibold text-foreground">پست الکترونیک</p>
|
||||
<TextLink href={`mailto:${siteAddress.email}`} tone="accent">
|
||||
{siteAddress.email}
|
||||
</TextLink>
|
||||
|
||||
@@ -11,13 +11,13 @@ export function CourseCardBanner({
|
||||
const hasBanner = Boolean(bannerUrl?.trim());
|
||||
|
||||
return (
|
||||
<div className="pointer-events-none relative aspect-[16/10] overflow-hidden bg-primary-foreground/10">
|
||||
<div className="pointer-events-none relative aspect-video overflow-hidden bg-primary-foreground/10">
|
||||
{hasBanner ? (
|
||||
<Image
|
||||
src={bannerUrl!}
|
||||
alt=""
|
||||
fill
|
||||
className="object-cover transition-transform duration-300 group-hover:scale-[1.03]"
|
||||
className="object-contain transition-transform duration-300 group-hover:scale-[1.03]"
|
||||
sizes="(max-width:768px) 100vw, 33vw"
|
||||
/>
|
||||
) : (
|
||||
|
||||
@@ -0,0 +1,42 @@
|
||||
import Image from "next/image";
|
||||
import { cn } from "@/lib/utils";
|
||||
|
||||
/**
|
||||
* Full course media (banner/poster or brochure) without text overlay.
|
||||
* Uses intrinsic layout so the whole image stays visible (object-contain / natural height).
|
||||
*/
|
||||
export function CourseMediaFigure({
|
||||
src,
|
||||
alt,
|
||||
/** Approximate intrinsic ratio hint for CLS; display stays fluid via h-auto. */
|
||||
width,
|
||||
height,
|
||||
priority = false,
|
||||
className,
|
||||
}: {
|
||||
src: string;
|
||||
alt: string;
|
||||
width: number;
|
||||
height: number;
|
||||
priority?: boolean;
|
||||
className?: string;
|
||||
}) {
|
||||
return (
|
||||
<figure
|
||||
className={cn(
|
||||
"overflow-hidden rounded-2xl bg-muted ring-1 ring-foreground/10",
|
||||
className,
|
||||
)}
|
||||
>
|
||||
<Image
|
||||
src={src}
|
||||
alt={alt}
|
||||
width={width}
|
||||
height={height}
|
||||
className="h-auto w-full"
|
||||
sizes="(max-width:1024px) 100vw, 60vw"
|
||||
priority={priority}
|
||||
/>
|
||||
</figure>
|
||||
);
|
||||
}
|
||||
@@ -32,7 +32,7 @@ export function DetailList({
|
||||
<dd
|
||||
className={cn(
|
||||
"text-end font-semibold",
|
||||
item.emphasis ? "text-primary" : "text-foreground",
|
||||
item.emphasis ? "text-accent" : "text-foreground",
|
||||
)}
|
||||
>
|
||||
{item.value}
|
||||
|
||||
@@ -34,7 +34,7 @@ export function FacultyMemberCard({ member }: { member: FacultyMember }) {
|
||||
/>
|
||||
) : (
|
||||
<div
|
||||
className="flex h-full w-full items-center justify-center bg-gradient-to-br from-chart-3 to-primary/80 text-4xl font-semibold text-primary-foreground"
|
||||
className="flex h-full w-full items-center justify-center bg-gradient-to-br from-primary to-accent text-4xl font-semibold text-primary-foreground"
|
||||
aria-hidden
|
||||
>
|
||||
{facultyInitials(member.name)}
|
||||
|
||||
@@ -1,11 +1,12 @@
|
||||
import Link from "next/link";
|
||||
import Image from "next/image";
|
||||
import { ArrowLeft, GraduationCap } from "lucide-react";
|
||||
import { ArrowLeft } from "lucide-react";
|
||||
import { Container } from "@/components/atoms/Container";
|
||||
import { Heading } from "@/components/atoms/Heading";
|
||||
import { MetamorphField } from "@/components/atoms/MetamorphField";
|
||||
import { buttonVariants } from "@/components/ui/button";
|
||||
import { cn } from "@/lib/utils";
|
||||
import { homeContent } from "@/lib/site-config";
|
||||
|
||||
export function HeroFeatured({
|
||||
title,
|
||||
@@ -17,8 +18,10 @@ export function HeroFeatured({
|
||||
imageUrl?: string;
|
||||
eyebrow?: string;
|
||||
}) {
|
||||
const { hero } = homeContent;
|
||||
|
||||
return (
|
||||
<header className="home-hero relative isolate overflow-hidden bg-chart-3 text-background">
|
||||
<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"
|
||||
@@ -29,9 +32,9 @@ export function HeroFeatured({
|
||||
sizes="100vw"
|
||||
/>
|
||||
{/* Unified navy wash — keeps text clear and softens the art */}
|
||||
<div className="absolute inset-0 bg-chart-3/45" />
|
||||
<div className="absolute inset-0 bg-gradient-to-l from-chart-3/90 via-chart-3/40 to-chart-3/25" />
|
||||
<div className="absolute inset-x-0 bottom-0 h-24 bg-gradient-to-t from-chart-3 to-transparent" />
|
||||
<div className="absolute inset-0 bg-primary/45" />
|
||||
<div className="absolute inset-0 bg-gradient-to-l from-primary/90 via-primary/40 to-accent/25" />
|
||||
<div className="absolute inset-x-0 bottom-0 h-24 bg-gradient-to-t from-primary to-transparent" />
|
||||
<MetamorphField
|
||||
tone="dark"
|
||||
density="sparse"
|
||||
@@ -41,25 +44,27 @@ export function HeroFeatured({
|
||||
|
||||
<Container className="relative z-[2] flex min-h-[34rem] min-w-0 items-center py-16 sm:min-h-[36rem] sm:py-20">
|
||||
<div className="home-hero__copy w-full min-w-0 max-w-2xl text-start lg:max-w-3xl">
|
||||
<div className="inline-flex max-w-full items-start gap-2 text-sm font-medium text-background/60">
|
||||
<GraduationCap className="mt-0.5 size-4 shrink-0" />
|
||||
<span className="min-w-0 leading-7 text-pretty">
|
||||
مرکز آموزشهای آزاد دانشکده مدیریت، علم و فناوری دانشگاه{"\u00A0"}صنعتی{"\u00A0"}امیرکبیر
|
||||
</span>
|
||||
<div className="max-w-full space-y-1 text-sm font-medium text-primary-foreground/60">
|
||||
<p className="leading-7 text-pretty">{hero.university}</p>
|
||||
<p className="leading-7 text-pretty text-primary-foreground/75">
|
||||
{hero.center}
|
||||
</p>
|
||||
</div>
|
||||
<Heading as="h1" level={1} className="mt-6 max-w-4xl">
|
||||
برای تصمیمهایی که{" "}
|
||||
<span className="whitespace-nowrap">صنعت را پیش میبرند</span>
|
||||
{hero.title}
|
||||
</Heading>
|
||||
<p className="mt-6 max-w-2xl border-t border-accent/60 pt-5 text-base leading-8 text-pretty text-background/65 sm:text-lg sm:leading-8">
|
||||
دانش دانشگاه صنعتی امیرکبیر، پشتوانه رهبری نوآور در عصر داده و هوش{"\u00A0"}مصنوعی.
|
||||
<p className="mt-6 max-w-2xl border-t border-secondary/50 pt-5 text-base leading-7 text-pretty text-primary-foreground/65 sm:text-lg sm:leading-8">
|
||||
{hero.description}
|
||||
</p>
|
||||
<div className="mt-9 flex flex-wrap gap-3">
|
||||
<Link
|
||||
href="/professional"
|
||||
className={cn(buttonVariants({ size: "lg" }), "font-bold")}
|
||||
className={cn(
|
||||
buttonVariants({ size: "lg" }),
|
||||
"border-transparent bg-secondary font-bold text-secondary-foreground hover:bg-secondary/90",
|
||||
)}
|
||||
>
|
||||
مشاهده دورهها <ArrowLeft className="size-4" />
|
||||
{hero.primaryCta} <ArrowLeft className="size-4" />
|
||||
</Link>
|
||||
<Link
|
||||
href="/about"
|
||||
@@ -68,16 +73,16 @@ export function HeroFeatured({
|
||||
"font-bold",
|
||||
)}
|
||||
>
|
||||
درباره مرکز
|
||||
{hero.secondaryCta}
|
||||
</Link>
|
||||
</div>
|
||||
{title && href && eyebrow ? (
|
||||
<div className="mt-12 border-t border-background/10 pt-6">
|
||||
<div className="mt-12 border-t border-primary-foreground/10 pt-6">
|
||||
<Link
|
||||
href={href}
|
||||
className="group inline-flex max-w-full items-center gap-3 text-sm text-background/55 transition-colors hover:text-background"
|
||||
className="group inline-flex max-w-full items-center gap-3 text-sm text-primary-foreground/55 transition-colors hover:text-primary-foreground"
|
||||
>
|
||||
<span className="shrink-0 font-semibold text-background/80">
|
||||
<span className="shrink-0 font-semibold text-primary-foreground/80">
|
||||
{eyebrow}
|
||||
</span>
|
||||
<span className="min-w-0 truncate">{title}</span>
|
||||
|
||||
@@ -27,14 +27,14 @@ export function PageHero({
|
||||
return (
|
||||
<header
|
||||
className={cn(
|
||||
"page-hero relative isolate flex items-center overflow-hidden bg-chart-3 text-background",
|
||||
"page-hero relative isolate flex items-center overflow-hidden bg-primary text-primary-foreground",
|
||||
size === "lg"
|
||||
? "min-h-[34rem] py-16 sm:min-h-[38rem] sm:py-20"
|
||||
: "py-16 sm:py-24",
|
||||
)}
|
||||
>
|
||||
<Image
|
||||
src={imageUrl ?? "/brand/campus-collaboration-v1.png"}
|
||||
src={imageUrl ?? "/brand/neural-learning-wave.png"}
|
||||
alt=""
|
||||
fill
|
||||
priority
|
||||
@@ -48,8 +48,8 @@ export function PageHero({
|
||||
className={cn(
|
||||
"absolute inset-0",
|
||||
hasPhoto
|
||||
? "bg-gradient-to-l from-chart-3 via-chart-3/85 to-chart-3/55"
|
||||
: "bg-gradient-to-l from-chart-3 via-chart-3/90 to-chart-3/65",
|
||||
? "bg-gradient-to-l from-primary via-primary/85 to-accent/55"
|
||||
: "bg-gradient-to-l from-primary via-primary/90 to-primary/65",
|
||||
)}
|
||||
/>
|
||||
{showField ? (
|
||||
@@ -59,19 +59,19 @@ export function PageHero({
|
||||
className="end-0 start-auto w-[min(75vw,42rem)] opacity-40"
|
||||
/>
|
||||
) : null}
|
||||
<div className="absolute end-0 top-0 h-px w-1/3 bg-gradient-to-l from-accent to-transparent" />
|
||||
<div className="absolute end-0 top-0 h-px w-1/3 bg-gradient-to-l from-secondary to-transparent" />
|
||||
<Container className="relative z-[2] min-w-0">
|
||||
<div className="page-hero__content w-full min-w-0 max-w-4xl text-start">
|
||||
{eyebrow ? (
|
||||
<p className="mb-4 inline-flex rounded-full border border-background/15 bg-background/5 px-3 py-1.5 text-xs font-semibold text-accent backdrop-blur-sm">
|
||||
<p className="mb-4 inline-flex rounded-full border border-primary-foreground/15 bg-primary-foreground/5 px-3 py-1.5 text-xs font-semibold text-secondary backdrop-blur-sm">
|
||||
{eyebrow}
|
||||
</p>
|
||||
) : null}
|
||||
<Heading as="h1" level={1} className="max-w-4xl text-background">
|
||||
<Heading as="h1" level={1} className="max-w-4xl text-primary-foreground">
|
||||
{title}
|
||||
</Heading>
|
||||
{intro ? (
|
||||
<p className="mt-5 max-w-2xl border-t border-accent/60 pt-5 text-base leading-8 text-pretty text-background/70 sm:text-lg sm:leading-8">
|
||||
<p className="mt-5 max-w-2xl border-t border-secondary/50 pt-5 text-base leading-7 text-pretty text-primary-foreground/70 sm:text-lg sm:leading-8">
|
||||
{intro}
|
||||
</p>
|
||||
) : null}
|
||||
|
||||
@@ -33,8 +33,8 @@ export function SectionHeader({
|
||||
{eyebrow ? (
|
||||
<p
|
||||
className={cn(
|
||||
"text-sm font-bold sm:text-base",
|
||||
inverse ? "text-accent" : "text-primary",
|
||||
"text-xs font-semibold sm:text-sm",
|
||||
inverse ? "text-secondary" : "text-accent",
|
||||
)}
|
||||
>
|
||||
{eyebrow}
|
||||
@@ -45,7 +45,7 @@ export function SectionHeader({
|
||||
level={2}
|
||||
className={cn(
|
||||
"break-words",
|
||||
eyebrow && "mt-3",
|
||||
eyebrow && "mt-2.5 sm:mt-3",
|
||||
inverse && "text-current",
|
||||
)}
|
||||
>
|
||||
@@ -54,7 +54,7 @@ export function SectionHeader({
|
||||
{description ? (
|
||||
<p
|
||||
className={cn(
|
||||
"mt-4 text-base leading-8 sm:text-lg sm:leading-8",
|
||||
"mt-3 max-w-2xl text-base leading-7 sm:mt-4 sm:text-lg sm:leading-8",
|
||||
inverse ? "opacity-75" : "text-muted-foreground",
|
||||
)}
|
||||
>
|
||||
|
||||
@@ -17,8 +17,8 @@ export function StatGrid({
|
||||
<div key={stat.id} className="min-w-0 text-center">
|
||||
<p
|
||||
className={cn(
|
||||
"text-4xl font-extrabold tabular-nums sm:text-5xl",
|
||||
inverse ? "text-accent" : "text-primary",
|
||||
"text-4xl font-bold tabular-nums sm:text-5xl",
|
||||
inverse ? "text-secondary" : "text-accent",
|
||||
)}
|
||||
>
|
||||
<AnimatedMetric value={stat.value} />
|
||||
@@ -26,7 +26,7 @@ export function StatGrid({
|
||||
<p
|
||||
className={cn(
|
||||
"mt-2 text-sm",
|
||||
inverse ? "text-background/70" : "text-muted-foreground",
|
||||
inverse ? "text-primary-foreground/70" : "text-muted-foreground",
|
||||
)}
|
||||
>
|
||||
{stat.label}
|
||||
|
||||
@@ -28,18 +28,19 @@ export function AcademicsOverlay({
|
||||
|
||||
return (
|
||||
<div
|
||||
className="fixed inset-0 z-[70] overflow-y-auto bg-card text-foreground"
|
||||
className="fixed inset-0 z-[70] overflow-y-auto bg-background text-foreground"
|
||||
role="dialog"
|
||||
aria-modal="true"
|
||||
aria-label={title}
|
||||
>
|
||||
<div className="h-1 bg-gradient-to-l from-primary via-accent to-primary" aria-hidden />
|
||||
<Container className="py-8">
|
||||
<div className="mb-8 flex items-center justify-between gap-4">
|
||||
<Button
|
||||
type="button"
|
||||
variant="ghost"
|
||||
onClick={onClose}
|
||||
className="px-0 font-semibold hover:bg-transparent hover:text-primary"
|
||||
className="px-0 font-semibold hover:bg-transparent hover:text-accent"
|
||||
>
|
||||
بازگشت به منو
|
||||
</Button>
|
||||
@@ -54,7 +55,7 @@ export function AcademicsOverlay({
|
||||
</Button>
|
||||
</div>
|
||||
|
||||
<h2 className="mb-10 max-w-3xl text-start text-3xl font-bold tracking-tight break-words sm:text-4xl">
|
||||
<h2 className="mb-10 max-w-3xl text-start text-3xl font-bold leading-[1.35] break-words sm:text-4xl">
|
||||
{title}
|
||||
</h2>
|
||||
|
||||
@@ -66,7 +67,7 @@ export function AcademicsOverlay({
|
||||
onClick={onClose}
|
||||
className="group block"
|
||||
>
|
||||
<span className="text-base font-extrabold leading-snug group-hover:text-primary">
|
||||
<span className="text-base font-bold leading-snug group-hover:text-accent">
|
||||
{program.title}
|
||||
</span>
|
||||
<p className="mt-2 text-sm leading-relaxed text-muted-foreground">
|
||||
@@ -77,7 +78,7 @@ export function AcademicsOverlay({
|
||||
))}
|
||||
</ul>
|
||||
|
||||
<h3 className="mt-14 mb-6 text-lg font-extrabold text-primary">
|
||||
<h3 className="mt-14 mb-6 text-lg font-bold text-accent">
|
||||
{executiveLabel}
|
||||
</h3>
|
||||
<ul className="grid gap-x-10 gap-y-8 sm:grid-cols-2 lg:grid-cols-3">
|
||||
@@ -88,7 +89,7 @@ export function AcademicsOverlay({
|
||||
onClick={onClose}
|
||||
className="group block"
|
||||
>
|
||||
<span className="text-base font-extrabold leading-snug group-hover:text-primary">
|
||||
<span className="text-base font-bold leading-snug group-hover:text-accent">
|
||||
{program.title}
|
||||
</span>
|
||||
<p className="mt-2 text-sm leading-relaxed text-muted-foreground">
|
||||
|
||||
@@ -47,13 +47,13 @@ export function CampaignBanners({ banners }: { banners: CampaignBanner[] }) {
|
||||
const banner = visible[0];
|
||||
|
||||
return (
|
||||
<div className="bg-chart-3 text-background">
|
||||
<div className="bg-primary text-primary-foreground">
|
||||
<Container className="flex min-w-0 items-center justify-between gap-3 py-3 sm:gap-4">
|
||||
<p className="min-w-0 flex-1 text-sm leading-relaxed break-words">
|
||||
<span className="text-background/90">{banner.text}</span>{" "}
|
||||
<span className="text-primary-foreground/90">{banner.text}</span>{" "}
|
||||
<Link
|
||||
href={banner.href}
|
||||
className="font-bold text-background underline-offset-4 hover:underline"
|
||||
className="font-bold text-secondary underline-offset-4 hover:underline"
|
||||
>
|
||||
{banner.cta}
|
||||
</Link>
|
||||
@@ -63,7 +63,7 @@ export function CampaignBanners({ banners }: { banners: CampaignBanner[] }) {
|
||||
variant="ghost"
|
||||
size="icon"
|
||||
aria-label="بستن بنر"
|
||||
className="shrink-0 text-background/70 hover:bg-background/10 hover:text-background"
|
||||
className="shrink-0 text-primary-foreground/70 hover:bg-primary-foreground/10 hover:text-primary-foreground"
|
||||
onClick={() => dismiss(banner)}
|
||||
>
|
||||
<X className="size-4" />
|
||||
|
||||
@@ -22,12 +22,12 @@ export function ErrorState({
|
||||
return (
|
||||
<main id="main-content" className="bg-background">
|
||||
<Container className="flex min-h-[60vh] flex-col items-start justify-center py-20">
|
||||
<p className="text-sm font-bold text-primary sm:text-base">خطا</p>
|
||||
<p className="text-sm font-bold text-accent sm:text-base">خطا</p>
|
||||
<Heading as="h1" level={2} className="mt-3">
|
||||
بارگذاری صفحه ناموفق بود
|
||||
</Heading>
|
||||
<p className="mt-4 max-w-md text-base leading-8 text-muted-foreground">
|
||||
لطفاً دوباره تلاش کنید. اگر مشکل ادامه داشت، چند لحظه بعد بازگردید.
|
||||
لطفا دوباره تلاش کنید. اگر مشکل ادامه داشت، چند لحظه بعد بازگردید.
|
||||
</p>
|
||||
<div className="mt-8 flex flex-wrap gap-3">
|
||||
<Button type="button" size="lg" className="font-bold" onClick={reset}>
|
||||
|
||||
@@ -33,7 +33,7 @@ export function ProgramCarousel({
|
||||
<div className="min-w-0">
|
||||
<div className="mb-5 flex min-w-0 items-end justify-between gap-4">
|
||||
{!hideTitle && title ? (
|
||||
<h2 className="min-w-0 text-2xl font-bold tracking-tight break-words sm:text-3xl">
|
||||
<h2 className="min-w-0 text-2xl font-bold leading-[1.4] break-words sm:text-3xl">
|
||||
{title}
|
||||
</h2>
|
||||
) : (
|
||||
|
||||
@@ -79,8 +79,9 @@ export function SearchOverlay({
|
||||
aria-label={label}
|
||||
>
|
||||
<div className="border-b border-border bg-card">
|
||||
<div className="h-1 bg-gradient-to-l from-primary via-accent to-primary" aria-hidden />
|
||||
<div className="mx-auto flex max-w-4xl items-center justify-between px-4 py-5 sm:px-6">
|
||||
<p className="text-sm font-semibold text-muted-foreground">{label}</p>
|
||||
<p className="text-sm font-semibold text-primary">{label}</p>
|
||||
<Button
|
||||
variant="ghost"
|
||||
size="icon"
|
||||
@@ -107,7 +108,7 @@ export function SearchOverlay({
|
||||
)}
|
||||
>
|
||||
<ResultGroup
|
||||
title="برنامهها"
|
||||
title="برنامه ها"
|
||||
items={results.programs.map((p) => ({
|
||||
href: p.href,
|
||||
title: p.title,
|
||||
@@ -116,7 +117,7 @@ export function SearchOverlay({
|
||||
onNavigate={() => setOpen(false)}
|
||||
/>
|
||||
<ResultGroup
|
||||
title="دورهها"
|
||||
title="دوره ها"
|
||||
items={results.courses.map((c) => ({
|
||||
href: c.registrationUrl,
|
||||
title: c.title,
|
||||
|
||||
@@ -4,7 +4,7 @@ import { Container } from "@/components/atoms/Container";
|
||||
import { Separator } from "@/components/ui/separator";
|
||||
import {
|
||||
siteAddress,
|
||||
siteUniversity,
|
||||
siteFaculty,
|
||||
siteShortName,
|
||||
} from "@/lib/site-config";
|
||||
|
||||
@@ -19,22 +19,26 @@ export function SiteFooter({
|
||||
variant?: "home" | "professional";
|
||||
}) {
|
||||
return (
|
||||
<footer className="border-t border-border bg-chart-3 pb-[env(safe-area-inset-bottom)] text-background">
|
||||
<footer className="border-t border-border bg-primary pb-[env(safe-area-inset-bottom)] text-primary-foreground">
|
||||
<Container className="py-12 sm:py-14">
|
||||
<div className="grid gap-10 sm:grid-cols-2 lg:grid-cols-3 lg:gap-12">
|
||||
<div className="max-w-sm space-y-4">
|
||||
<BrandLogo
|
||||
title={siteShortName}
|
||||
subtitle={siteUniversity}
|
||||
subtitle={siteFaculty}
|
||||
onDark
|
||||
/>
|
||||
<p className="text-sm leading-7 text-background/65">
|
||||
<p className="text-sm leading-7 text-primary-foreground/65">
|
||||
{siteAddress.line}
|
||||
</p>
|
||||
<p className="text-sm text-primary-foreground/55">
|
||||
کد پستی{" "}
|
||||
<span dir="ltr">{siteAddress.postalCode}</span>
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<nav aria-label="لینکهای پاورقی" className="space-y-4">
|
||||
<p className="text-xs font-semibold tracking-wide text-background/55">
|
||||
<nav aria-label="لینک های پاورقی" className="space-y-4">
|
||||
<p className="text-xs font-semibold tracking-wide text-primary-foreground/55">
|
||||
{linksTitle}
|
||||
</p>
|
||||
<ul className="flex flex-col gap-2.5 text-sm font-medium">
|
||||
@@ -42,7 +46,7 @@ export function SiteFooter({
|
||||
<li key={link.href}>
|
||||
<Link
|
||||
href={link.href}
|
||||
className="text-background/80 transition-colors hover:text-background"
|
||||
className="text-primary-foreground/80 transition-colors hover:text-primary-foreground"
|
||||
>
|
||||
{link.label}
|
||||
</Link>
|
||||
@@ -52,15 +56,15 @@ export function SiteFooter({
|
||||
</nav>
|
||||
|
||||
<div className="space-y-4 sm:max-w-xs lg:justify-self-end lg:text-end">
|
||||
<p className="text-xs font-semibold tracking-wide text-background/55">
|
||||
<p className="text-xs font-semibold tracking-wide text-primary-foreground/55">
|
||||
تماس
|
||||
</p>
|
||||
<div className="space-y-1.5 text-sm text-background/75">
|
||||
<div className="space-y-1.5 text-sm text-primary-foreground/75">
|
||||
<p>
|
||||
<a
|
||||
href={`tel:${siteAddress.phone}`}
|
||||
href={`tel:${siteAddress.phoneTel}`}
|
||||
dir="ltr"
|
||||
className="transition-colors hover:text-background"
|
||||
className="transition-colors hover:text-primary-foreground"
|
||||
>
|
||||
{siteAddress.phone}
|
||||
</a>
|
||||
@@ -69,7 +73,7 @@ export function SiteFooter({
|
||||
<a
|
||||
href={`mailto:${siteAddress.email}`}
|
||||
dir="ltr"
|
||||
className="transition-colors hover:text-background"
|
||||
className="transition-colors hover:text-primary-foreground"
|
||||
>
|
||||
{siteAddress.email}
|
||||
</a>
|
||||
@@ -79,7 +83,7 @@ export function SiteFooter({
|
||||
href={siteAddress.mapUrl}
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
className="font-medium text-background/90 transition-colors hover:text-background"
|
||||
className="font-medium text-primary-foreground/90 transition-colors hover:text-primary-foreground"
|
||||
>
|
||||
موقعیت روی نقشه
|
||||
</a>
|
||||
@@ -88,9 +92,9 @@ export function SiteFooter({
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<Separator className="my-8 bg-background/10" />
|
||||
<Separator className="my-8 bg-primary-foreground/10" />
|
||||
|
||||
<p className="text-xs text-background/45">{copyright}</p>
|
||||
<p className="text-xs text-primary-foreground/45">{copyright}</p>
|
||||
</Container>
|
||||
</footer>
|
||||
);
|
||||
|
||||
@@ -55,8 +55,8 @@ function NavDropdown({
|
||||
className={cn(
|
||||
"inline-flex cursor-pointer items-center gap-1 rounded-lg px-3 py-2 text-sm font-semibold transition-colors outline-none",
|
||||
isDark
|
||||
? "text-background/80 hover:text-background"
|
||||
: "text-foreground/75 hover:bg-muted hover:text-primary",
|
||||
? "text-primary-foreground/80 hover:text-primary-foreground"
|
||||
: "text-foreground/75 hover:bg-muted hover:text-accent",
|
||||
)}
|
||||
>
|
||||
{item.label}
|
||||
@@ -114,19 +114,20 @@ export function SiteHeader({
|
||||
<>
|
||||
<header
|
||||
className={cn(
|
||||
"site-header sticky top-0 z-50 pt-[env(safe-area-inset-top)] shadow-sm backdrop-blur-sm md:backdrop-blur-xl",
|
||||
"site-header sticky top-0 z-50 overflow-hidden pt-[env(safe-area-inset-top)] shadow-sm backdrop-blur-sm md:backdrop-blur-xl",
|
||||
isDark
|
||||
? "border-b border-background/10 bg-chart-3/95 text-background"
|
||||
? "border-b border-primary-foreground/10 bg-primary/95 text-primary-foreground"
|
||||
: "border-b border-border bg-card/95 text-foreground",
|
||||
)}
|
||||
>
|
||||
<Container className="flex h-[4.5rem] min-w-0 items-center justify-start gap-3 sm:h-20 sm:gap-6" dir="rtl">
|
||||
<Container className="flex h-[4.5rem] min-w-0 items-center justify-start gap-3 overflow-hidden sm:h-20 sm:gap-6" dir="rtl">
|
||||
<BrandLogo
|
||||
href={brandHref}
|
||||
title={brandTitle}
|
||||
subtitle={brandSubtitle}
|
||||
onDark={isDark}
|
||||
className="max-w-[min(100%,14rem)] sm:max-w-[min(100%,20rem)]"
|
||||
horizontal
|
||||
className="h-full shrink-0"
|
||||
/>
|
||||
|
||||
<nav
|
||||
@@ -152,8 +153,8 @@ export function SiteHeader({
|
||||
className={cn(
|
||||
"rounded-lg px-3 py-2 text-sm font-semibold transition-colors",
|
||||
isDark
|
||||
? "text-background/80 hover:text-background"
|
||||
: "text-foreground/75 hover:bg-muted hover:text-primary",
|
||||
? "text-primary-foreground/80 hover:text-primary-foreground"
|
||||
: "text-foreground/75 hover:bg-muted hover:text-accent",
|
||||
)}
|
||||
/>
|
||||
);
|
||||
@@ -163,7 +164,7 @@ export function SiteHeader({
|
||||
<div
|
||||
className={cn(
|
||||
"ms-auto flex shrink-0 items-center gap-2 xl:ms-0",
|
||||
isDark && "text-background",
|
||||
isDark && "text-primary-foreground",
|
||||
)}
|
||||
>
|
||||
<Link
|
||||
@@ -171,8 +172,8 @@ export function SiteHeader({
|
||||
className={cn(
|
||||
"hidden rounded-lg px-3 py-2 text-sm font-semibold transition-colors sm:inline-flex",
|
||||
isDark
|
||||
? "text-background/80 hover:text-background"
|
||||
: "text-foreground/75 hover:bg-muted hover:text-primary",
|
||||
? "text-primary-foreground/80 hover:text-primary-foreground"
|
||||
: "bg-secondary text-foreground hover:bg-secondary/80 hover:text-accent",
|
||||
)}
|
||||
>
|
||||
{contactLabel}
|
||||
@@ -202,7 +203,7 @@ export function SiteHeader({
|
||||
|
||||
{mobileOpen ? (
|
||||
<div
|
||||
className="fixed inset-0 z-[60] flex flex-col bg-chart-3 text-background pt-[env(safe-area-inset-top)] pb-[env(safe-area-inset-bottom)] xl:hidden"
|
||||
className="fixed inset-0 z-[60] flex flex-col bg-primary text-primary-foreground pt-[env(safe-area-inset-top)] pb-[env(safe-area-inset-bottom)] xl:hidden"
|
||||
role="dialog"
|
||||
aria-modal="true"
|
||||
aria-label="منوی اصلی"
|
||||
@@ -213,35 +214,37 @@ export function SiteHeader({
|
||||
title={brandTitle}
|
||||
subtitle={brandSubtitle}
|
||||
onDark
|
||||
horizontal
|
||||
compact
|
||||
className="shrink-0"
|
||||
/>
|
||||
<Button
|
||||
variant="ghost"
|
||||
size="icon"
|
||||
className="text-background hover:bg-background/10"
|
||||
className="text-primary-foreground hover:bg-primary-foreground/10"
|
||||
aria-label="بستن منو"
|
||||
onClick={() => setMobileOpen(false)}
|
||||
>
|
||||
<X className="size-5" />
|
||||
</Button>
|
||||
</Container>
|
||||
<Separator className="bg-background/10" />
|
||||
<Separator className="bg-primary-foreground/10" />
|
||||
<Container className="flex-1 overflow-y-auto py-6">
|
||||
<ul className="space-y-1 text-start">
|
||||
{items.map((item) => (
|
||||
<li key={`nav:${item.href}:${item.label}`}>
|
||||
{item.children && item.children.length > 0 ? (
|
||||
<div className="py-2">
|
||||
<p className="text-sm font-semibold text-background/55">
|
||||
<p className="text-sm font-semibold text-primary-foreground/55">
|
||||
{item.label}
|
||||
</p>
|
||||
<ul className="mt-1 space-y-0.5 border-s border-background/20 ps-3">
|
||||
<ul className="mt-1 space-y-0.5 border-s border-primary-foreground/20 ps-3">
|
||||
{item.children.map((child) => (
|
||||
<li key={`nav:${child.href}:${child.label}`}>
|
||||
<NavLink
|
||||
item={child}
|
||||
isDark
|
||||
className="block py-2.5 text-base font-bold transition-colors hover:text-background/70"
|
||||
className="block py-2.5 text-base font-bold transition-colors hover:text-primary-foreground/70"
|
||||
onClick={() => setMobileOpen(false)}
|
||||
/>
|
||||
</li>
|
||||
@@ -252,7 +255,7 @@ export function SiteHeader({
|
||||
<NavLink
|
||||
item={item}
|
||||
isDark
|
||||
className="block py-3.5 text-lg font-bold transition-colors hover:text-background/70"
|
||||
className="block py-3.5 text-lg font-bold transition-colors hover:text-primary-foreground/70"
|
||||
onClick={() => setMobileOpen(false)}
|
||||
/>
|
||||
)}
|
||||
@@ -261,7 +264,7 @@ export function SiteHeader({
|
||||
<li>
|
||||
<Link
|
||||
href="/contact"
|
||||
className="block py-3.5 text-lg font-bold transition-colors hover:text-background/70"
|
||||
className="block py-3.5 text-lg font-bold transition-colors hover:text-primary-foreground/70"
|
||||
onClick={() => setMobileOpen(false)}
|
||||
>
|
||||
{contactLabel}
|
||||
|
||||
@@ -38,49 +38,49 @@ import { isAdminEntityEnabled } from "@/lib/admin/disabled-entities";
|
||||
const NAV_GROUPS = [
|
||||
{
|
||||
label: "نمای کلی",
|
||||
items: [{ href: "/admin", label: "داشبورد", icon: LayoutDashboard, exact: true }],
|
||||
items: [{ href: "/mstcontroller", label: "داشبورد", icon: LayoutDashboard, exact: true }],
|
||||
},
|
||||
{
|
||||
label: "محتوا",
|
||||
items: [
|
||||
{ href: "/admin/courses", label: "دورهها", icon: BookOpen, entity: "courses" },
|
||||
{ href: "/mstcontroller/courses", label: "دوره ها", icon: BookOpen, entity: "courses" },
|
||||
{
|
||||
href: "/admin/course-categories",
|
||||
label: "دستهبندی دورهها",
|
||||
href: "/mstcontroller/course-categories",
|
||||
label: "دسته بندی دوره ها",
|
||||
icon: Tags,
|
||||
entity: "course-categories",
|
||||
},
|
||||
{
|
||||
href: "/admin/course-tags",
|
||||
label: "تگهای دوره",
|
||||
href: "/mstcontroller/course-tags",
|
||||
label: "تگ های دوره",
|
||||
icon: Tags,
|
||||
entity: "course-tags",
|
||||
},
|
||||
{ href: "/admin/programs", label: "برنامهها", icon: GraduationCap, entity: "programs" },
|
||||
{ href: "/admin/events", label: "رویدادها", icon: Calendar, entity: "events" },
|
||||
{ href: "/admin/articles", label: "مقالات", icon: Newspaper, entity: "articles" },
|
||||
{ href: "/admin/topics", label: "موضوعات", icon: Tags, entity: "topics" },
|
||||
{ href: "/mstcontroller/programs", label: "برنامه ها", icon: GraduationCap, entity: "programs" },
|
||||
{ href: "/mstcontroller/events", label: "رویدادها", icon: Calendar, entity: "events" },
|
||||
{ href: "/mstcontroller/articles", label: "مقالات", icon: Newspaper, entity: "articles" },
|
||||
{ href: "/mstcontroller/topics", label: "موضوعات", icon: Tags, entity: "topics" },
|
||||
],
|
||||
},
|
||||
{
|
||||
label: "جامعه",
|
||||
items: [
|
||||
{ href: "/admin/faculty", label: "اساتید", icon: Users, entity: "faculty" },
|
||||
{ href: "/admin/alumni", label: "دانشآموختگان", icon: MessageSquareQuote, entity: "alumni" },
|
||||
{ href: "/mstcontroller/faculty", label: "اساتید", icon: Users, entity: "faculty" },
|
||||
{ href: "/mstcontroller/alumni", label: "دانش آموختگان", icon: MessageSquareQuote, entity: "alumni" },
|
||||
],
|
||||
},
|
||||
{
|
||||
label: "سایت",
|
||||
items: [
|
||||
{ href: "/admin/banners", label: "بنرهای کمپین", icon: Megaphone, entity: "banners" },
|
||||
{ href: "/admin/stats", label: "آمار", icon: BarChart3, entity: "stats" },
|
||||
{ href: "/admin/testimonials", label: "نظرات", icon: FileText, entity: "testimonials" },
|
||||
{ href: "/admin/legal", label: "صفحات قانونی", icon: Scale, entity: "legal" },
|
||||
{ href: "/mstcontroller/banners", label: "بنرهای کمپین", icon: Megaphone, entity: "banners" },
|
||||
{ href: "/mstcontroller/stats", label: "آمار", icon: BarChart3, entity: "stats" },
|
||||
{ href: "/mstcontroller/testimonials", label: "نظرات", icon: FileText, entity: "testimonials" },
|
||||
{ href: "/mstcontroller/legal", label: "صفحات قانونی", icon: Scale, entity: "legal" },
|
||||
],
|
||||
},
|
||||
{
|
||||
label: "درخواستها",
|
||||
items: [{ href: "/admin/registrations", label: "برگ ثبتنام", icon: ClipboardList }],
|
||||
label: "درخواست ها",
|
||||
items: [{ href: "/mstcontroller/registrations", label: "برگ ثبت نام", icon: ClipboardList }],
|
||||
},
|
||||
] as const;
|
||||
|
||||
@@ -105,7 +105,7 @@ export function AdminSidebar({ userName }: { userName: string }) {
|
||||
<SidebarMenuItem>
|
||||
<SidebarMenuButton
|
||||
size="lg"
|
||||
render={<Link href="/admin" />}
|
||||
render={<Link href="/mstcontroller" />}
|
||||
className="data-active:bg-sidebar-accent"
|
||||
>
|
||||
<span className="relative size-8 shrink-0">
|
||||
|
||||
@@ -31,12 +31,12 @@ export function FacultySyncButton() {
|
||||
const res = await fetch("/api/admin/faculty/sync", { method: "POST" });
|
||||
const body = (await res.json()) as SyncPayload;
|
||||
if (!res.ok || !body.ok || !body.data) {
|
||||
setError(body.error ?? "همگامسازی ناموفق بود");
|
||||
setError(body.error ?? "همگام سازی ناموفق بود");
|
||||
return;
|
||||
}
|
||||
const { total, inserted, updated, imagesSaved } = body.data;
|
||||
setMessage(
|
||||
`${total} استاد خوانده شد — ${inserted} جدید، ${updated} بهروز` +
|
||||
`${total} استاد خوانده شد — ${inserted} جدید، ${updated} به روز` +
|
||||
(imagesSaved > 0 ? `، ${imagesSaved} تصویر` : ""),
|
||||
);
|
||||
startTransition(() => {
|
||||
|
||||
@@ -77,7 +77,7 @@ export function ImageUploadField({
|
||||
<div className="relative aspect-[16/9] w-full max-w-md bg-muted">
|
||||
<Image
|
||||
src={value}
|
||||
alt="پیشنمایش تصویر"
|
||||
alt="پیش نمایش تصویر"
|
||||
fill
|
||||
unoptimized
|
||||
className="object-cover"
|
||||
|
||||
@@ -8,7 +8,7 @@ import { Badge } from "@/components/ui/badge";
|
||||
export const LEAD_STATUS_LABELS: Record<string, string> = {
|
||||
new: "جدید",
|
||||
contacted: "تماس گرفته شد",
|
||||
enrolled: "ثبتنام شد",
|
||||
enrolled: "ثبت نام شد",
|
||||
rejected: "رد شد",
|
||||
};
|
||||
|
||||
@@ -93,7 +93,7 @@ export function LeadsList({ leads }: { leads: LeadForDashboard[] }) {
|
||||
<SelectContent>
|
||||
<SelectItem value="new">جدید</SelectItem>
|
||||
<SelectItem value="contacted">تماس گرفته شد</SelectItem>
|
||||
<SelectItem value="enrolled">ثبتنام شد</SelectItem>
|
||||
<SelectItem value="enrolled">ثبت نام شد</SelectItem>
|
||||
<SelectItem value="rejected">رد شد</SelectItem>
|
||||
</SelectContent>
|
||||
</Select>
|
||||
|
||||
@@ -15,7 +15,7 @@ export function LogoutButton() {
|
||||
} catch {
|
||||
// ignore network errors — still navigate to login
|
||||
} finally {
|
||||
router.push("/admin/login");
|
||||
router.push("/mstcontroller/login");
|
||||
router.refresh();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -24,7 +24,7 @@ function buildUrl(
|
||||
if (tag && tag.trim()) params.set("tag", tag.trim());
|
||||
if (category && category.trim()) params.set("category", category.trim());
|
||||
const qs = params.toString();
|
||||
return qs ? `/admin/courses?${qs}` : "/admin/courses";
|
||||
return qs ? `/mstcontroller/courses?${qs}` : "/mstcontroller/courses";
|
||||
}
|
||||
|
||||
export function CourseFilters({
|
||||
@@ -63,7 +63,7 @@ export function CourseFilters({
|
||||
setPublished("all");
|
||||
setTag("");
|
||||
setCategory("");
|
||||
router.push("/admin/courses");
|
||||
router.push("/mstcontroller/courses");
|
||||
}
|
||||
|
||||
return (
|
||||
@@ -93,8 +93,8 @@ export function CourseFilters({
|
||||
</SelectTrigger>
|
||||
<SelectContent>
|
||||
<SelectItem value="all">همه</SelectItem>
|
||||
<SelectItem value="true">منتشرشده</SelectItem>
|
||||
<SelectItem value="false">پیشنویس</SelectItem>
|
||||
<SelectItem value="true">منتشر شده</SelectItem>
|
||||
<SelectItem value="false">پیش نویس</SelectItem>
|
||||
</SelectContent>
|
||||
</Select>
|
||||
</div>
|
||||
@@ -140,7 +140,7 @@ export function CourseFilters({
|
||||
<Button type="submit">اعمال فیلتر</Button>
|
||||
{hasFilters ? (
|
||||
<Button type="button" variant="ghost" onClick={clear}>
|
||||
پاککردن فیلترها
|
||||
پاک کردن فیلترها
|
||||
</Button>
|
||||
) : null}
|
||||
</form>
|
||||
|
||||
@@ -17,7 +17,7 @@ export function CourseTable({ courses }: { courses: AdminCourse[] }) {
|
||||
if (courses.length === 0) {
|
||||
return (
|
||||
<div className="flex flex-col items-center justify-center px-6 py-14 text-center">
|
||||
<p className="text-sm font-medium text-foreground">دورهای یافت نشد</p>
|
||||
<p className="text-sm font-medium text-foreground">دوره ای یافت نشد</p>
|
||||
<p className="mt-1 text-sm text-muted-foreground">
|
||||
فیلتر را تغییر دهید یا دوره جدیدی بسازید.
|
||||
</p>
|
||||
@@ -86,8 +86,8 @@ export function CourseTable({ courses }: { courses: AdminCourse[] }) {
|
||||
<TableCell>
|
||||
<div className="flex items-center gap-2">
|
||||
<Link
|
||||
href={`/admin/courses/${course.id}/edit`}
|
||||
className="text-sm text-primary hover:underline"
|
||||
href={`/mstcontroller/courses/${course.id}/edit`}
|
||||
className="text-sm text-accent hover:underline"
|
||||
>
|
||||
ویرایش
|
||||
</Link>
|
||||
@@ -96,7 +96,7 @@ export function CourseTable({ courses }: { courses: AdminCourse[] }) {
|
||||
href={`/register/${course.slug}`}
|
||||
className="text-sm text-muted-foreground hover:underline"
|
||||
>
|
||||
پیشنمایش
|
||||
پیش نمایش
|
||||
</Link>
|
||||
)}
|
||||
<DeleteCourseDialog id={course.id} title={course.title} />
|
||||
|
||||
@@ -45,7 +45,7 @@ export function DeleteCourseDialog({ id, title }: { id: string; title: string })
|
||||
<DialogHeader>
|
||||
<DialogTitle>حذف دوره</DialogTitle>
|
||||
<DialogDescription>
|
||||
دوره «{title}» برای همیشه حذف میشود. این عمل قابل بازگشت نیست.
|
||||
دوره «{title}» برای همیشه حذف می شود. این عمل قابل بازگشت نیست.
|
||||
</DialogDescription>
|
||||
</DialogHeader>
|
||||
{error && <p className="text-sm text-destructive">{error}</p>}
|
||||
|
||||
@@ -38,7 +38,7 @@ export function PublishToggle({ id, published }: { id: string; published: boolea
|
||||
onClick={toggle}
|
||||
disabled={loading}
|
||||
>
|
||||
{loading ? "..." : published ? "منتشرشده" : "پیشنویس"}
|
||||
{loading ? "..." : published ? "منتشر شده" : "پیش نویس"}
|
||||
</Button>
|
||||
{error && <p className="mt-1 max-w-40 text-xs text-destructive">{error}</p>}
|
||||
</div>
|
||||
|
||||
@@ -55,7 +55,7 @@ export function GenericDeleteDialog({
|
||||
<DialogHeader>
|
||||
<DialogTitle>حذف {noun}</DialogTitle>
|
||||
<DialogDescription>
|
||||
«{subject}» برای همیشه حذف میشود. این عمل قابل بازگشت نیست.
|
||||
«{subject}» برای همیشه حذف می شود. این عمل قابل بازگشت نیست.
|
||||
</DialogDescription>
|
||||
</DialogHeader>
|
||||
{error && <p className="text-sm text-destructive">{error}</p>}
|
||||
|
||||
@@ -17,7 +17,7 @@ function buildUrl(entity: string, search: string, published: string) {
|
||||
if (search.trim()) params.set("search", search.trim());
|
||||
if (published && published !== "all") params.set("published", published);
|
||||
const qs = params.toString();
|
||||
return qs ? `/admin/${entity}?${qs}` : `/admin/${entity}`;
|
||||
return qs ? `/mstcontroller/${entity}?${qs}` : `/mstcontroller/${entity}`;
|
||||
}
|
||||
|
||||
export function GenericFilters({
|
||||
@@ -46,7 +46,7 @@ export function GenericFilters({
|
||||
function clear() {
|
||||
setSearch("");
|
||||
setPublished("all");
|
||||
router.push(`/admin/${entity}`);
|
||||
router.push(`/mstcontroller/${entity}`);
|
||||
}
|
||||
|
||||
return (
|
||||
@@ -73,8 +73,8 @@ export function GenericFilters({
|
||||
</SelectTrigger>
|
||||
<SelectContent>
|
||||
<SelectItem value="all">همه</SelectItem>
|
||||
<SelectItem value="true">منتشرشده</SelectItem>
|
||||
<SelectItem value="false">پیشنویس</SelectItem>
|
||||
<SelectItem value="true">منتشر شده</SelectItem>
|
||||
<SelectItem value="false">پیش نویس</SelectItem>
|
||||
</SelectContent>
|
||||
</Select>
|
||||
</div>
|
||||
@@ -82,7 +82,7 @@ export function GenericFilters({
|
||||
<Button type="submit">اعمال فیلتر</Button>
|
||||
{hasFilters && (
|
||||
<Button type="button" variant="ghost" onClick={clear}>
|
||||
پاککردن فیلترها
|
||||
پاک کردن فیلترها
|
||||
</Button>
|
||||
)}
|
||||
</form>
|
||||
|
||||
@@ -107,7 +107,7 @@ export function GenericForm({
|
||||
setError(data.error || "خطا در ذخیره");
|
||||
return;
|
||||
}
|
||||
router.push(`/admin/${spec.key}`);
|
||||
router.push(`/mstcontroller/${spec.key}`);
|
||||
router.refresh();
|
||||
} finally {
|
||||
setLoading(false);
|
||||
@@ -237,7 +237,7 @@ export function GenericForm({
|
||||
<form onSubmit={handleSubmit}>
|
||||
<AdminFormCard
|
||||
title={isEdit ? `ویرایش ${spec.noun}` : `ثبت ${spec.noun} جدید`}
|
||||
description="پس از ذخیره، فهرست بهروز میشود."
|
||||
description="پس از ذخیره، فهرست به روز می شود."
|
||||
footer={
|
||||
<>
|
||||
<Button type="submit" disabled={loading}>
|
||||
@@ -248,7 +248,7 @@ export function GenericForm({
|
||||
: `ایجاد ${spec.noun}`}
|
||||
</Button>
|
||||
<Link
|
||||
href={`/admin/${spec.key}`}
|
||||
href={`/mstcontroller/${spec.key}`}
|
||||
className={cn(buttonVariants({ variant: "outline" }))}
|
||||
>
|
||||
انصراف
|
||||
|
||||
@@ -54,7 +54,7 @@ export function GenericTable({ spec, rows }: { spec: AdminEntitySpec; rows: unkn
|
||||
const isPublish = col.name === "published";
|
||||
return (
|
||||
<TableCell key={col.name}>
|
||||
<Badge variant={isPublish || label === "پیشنویس" ? "outline" : "secondary"}>
|
||||
<Badge variant={isPublish || label === "پیش نویس" ? "outline" : "secondary"}>
|
||||
{value === null || value === undefined || value === "" ? "—" : label}
|
||||
</Badge>
|
||||
</TableCell>
|
||||
@@ -75,8 +75,8 @@ export function GenericTable({ spec, rows }: { spec: AdminEntitySpec; rows: unkn
|
||||
<PublishToggle apiPath={spec.apiPath} id={id} published={Boolean(r.published)} />
|
||||
)}
|
||||
<Link
|
||||
href={`/admin/${spec.key}/${id}/edit`}
|
||||
className="text-sm text-primary hover:underline"
|
||||
href={`/mstcontroller/${spec.key}/${id}/edit`}
|
||||
className="text-sm text-accent hover:underline"
|
||||
>
|
||||
ویرایش
|
||||
</Link>
|
||||
@@ -85,7 +85,7 @@ export function GenericTable({ spec, rows }: { spec: AdminEntitySpec; rows: unkn
|
||||
href={preview}
|
||||
className="text-sm text-muted-foreground hover:underline"
|
||||
>
|
||||
پیشنمایش
|
||||
پیش نمایش
|
||||
</Link>
|
||||
)}
|
||||
<GenericDeleteDialog apiPath={spec.apiPath} id={id} noun={spec.noun} subject={String(r[spec.columns[0].name] ?? "")} />
|
||||
|
||||
@@ -46,7 +46,7 @@ export function PublishToggle({
|
||||
onClick={toggle}
|
||||
disabled={loading}
|
||||
>
|
||||
{loading ? "..." : published ? "منتشرشده" : "پیشنویس"}
|
||||
{loading ? "..." : published ? "منتشر شده" : "پیش نویس"}
|
||||
</Button>
|
||||
{error && <p className="mt-1 max-w-40 text-xs text-destructive">{error}</p>}
|
||||
</div>
|
||||
|
||||
@@ -17,7 +17,7 @@ function buildUrl(search: string, status: string) {
|
||||
if (search.trim()) params.set("search", search.trim());
|
||||
if (status && status !== "all") params.set("status", status);
|
||||
const qs = params.toString();
|
||||
return qs ? `/admin/registrations?${qs}` : "/admin/registrations";
|
||||
return qs ? `/mstcontroller/registrations?${qs}` : "/mstcontroller/registrations";
|
||||
}
|
||||
|
||||
export function RegistrationFilters({
|
||||
@@ -40,7 +40,7 @@ export function RegistrationFilters({
|
||||
function clear() {
|
||||
setSearch("");
|
||||
setStatus("all");
|
||||
router.push("/admin/registrations");
|
||||
router.push("/mstcontroller/registrations");
|
||||
}
|
||||
|
||||
return (
|
||||
@@ -68,7 +68,7 @@ export function RegistrationFilters({
|
||||
<SelectItem value="all">همه</SelectItem>
|
||||
<SelectItem value="new">جدید</SelectItem>
|
||||
<SelectItem value="contacted">تماس گرفته شد</SelectItem>
|
||||
<SelectItem value="enrolled">ثبتنام شد</SelectItem>
|
||||
<SelectItem value="enrolled">ثبت نام شد</SelectItem>
|
||||
<SelectItem value="rejected">رد شد</SelectItem>
|
||||
</SelectContent>
|
||||
</Select>
|
||||
@@ -76,7 +76,7 @@ export function RegistrationFilters({
|
||||
<Button type="submit">اعمال فیلتر</Button>
|
||||
{hasFilters && (
|
||||
<Button type="button" variant="ghost" onClick={clear}>
|
||||
پاککردن فیلترها
|
||||
پاک کردن فیلترها
|
||||
</Button>
|
||||
)}
|
||||
</form>
|
||||
|
||||
@@ -140,7 +140,7 @@ export function RegistrationsTable({ rows }: { rows: AdminRegistration[] }) {
|
||||
<SelectContent>
|
||||
<SelectItem value="new">جدید</SelectItem>
|
||||
<SelectItem value="contacted">تماس گرفته شد</SelectItem>
|
||||
<SelectItem value="enrolled">ثبتنام شد</SelectItem>
|
||||
<SelectItem value="enrolled">ثبت نام شد</SelectItem>
|
||||
<SelectItem value="rejected">رد شد</SelectItem>
|
||||
</SelectContent>
|
||||
</Select>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import Link from "next/link";
|
||||
import Image from "next/image";
|
||||
import { ArrowUpLeft } from "lucide-react";
|
||||
import { DotCta } from "@/components/atoms/DotCta";
|
||||
import { Container } from "@/components/atoms/Container";
|
||||
import { Heading } from "@/components/atoms/Heading";
|
||||
import { Section } from "@/components/atoms/Section";
|
||||
@@ -8,7 +8,7 @@ import { PageHero } from "@/components/molecules/PageHero";
|
||||
import { SectionHeader } from "@/components/molecules/SectionHeader";
|
||||
import { SurfaceCard } from "@/components/molecules/SurfaceCard";
|
||||
import { buttonVariants } from "@/components/ui/button";
|
||||
import { aboutContent, facultyNetworkUrl } from "@/lib/site-config";
|
||||
import { aboutContent } from "@/lib/site-config";
|
||||
import type { IntersectionTopic } from "@/lib/types";
|
||||
import { cn } from "@/lib/utils";
|
||||
|
||||
@@ -18,7 +18,7 @@ function ProseBlock({ paragraphs }: { paragraphs: string[] }) {
|
||||
{paragraphs.map((paragraph, index) => (
|
||||
<p
|
||||
key={index}
|
||||
className="text-base leading-8 text-muted-foreground sm:text-lg sm:leading-8"
|
||||
className="text-base leading-7 text-muted-foreground sm:text-lg sm:leading-8"
|
||||
>
|
||||
{paragraph}
|
||||
</p>
|
||||
@@ -28,8 +28,7 @@ function ProseBlock({ paragraphs }: { paragraphs: string[] }) {
|
||||
}
|
||||
|
||||
export function AboutTemplate({ topics }: { topics: IntersectionTopic[] }) {
|
||||
const { amirkabir, faculty, learning, topics: topicsCopy, audience } =
|
||||
aboutContent;
|
||||
const { amirkabir, learning, topics: topicsCopy, audience } = aboutContent;
|
||||
|
||||
return (
|
||||
<>
|
||||
@@ -37,11 +36,12 @@ export function AboutTemplate({ topics }: { topics: IntersectionTopic[] }) {
|
||||
eyebrow={aboutContent.eyebrow}
|
||||
title={aboutContent.title}
|
||||
intro={aboutContent.intro}
|
||||
imageUrl="/brand/university-emblem-neural.png"
|
||||
/>
|
||||
|
||||
<Section tone="subtle">
|
||||
<Container>
|
||||
<p className="max-w-3xl text-base leading-8 text-foreground sm:text-lg sm:leading-8">
|
||||
<p className="max-w-3xl text-base leading-7 text-foreground sm:text-lg sm:leading-8">
|
||||
{aboutContent.introFollowUp}
|
||||
</p>
|
||||
</Container>
|
||||
@@ -56,23 +56,24 @@ export function AboutTemplate({ topics }: { topics: IntersectionTopic[] }) {
|
||||
|
||||
<Section tone="muted">
|
||||
<Container>
|
||||
<SectionHeader title={faculty.title} />
|
||||
<ProseBlock paragraphs={faculty.paragraphs} />
|
||||
<div className="mt-8">
|
||||
<DotCta href={facultyNetworkUrl} external>
|
||||
{faculty.ctaLabel}
|
||||
</DotCta>
|
||||
<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"
|
||||
alt="یادگیری مبتنی بر هوش مصنوعی و چارچوب های دانشگاهی"
|
||||
fill
|
||||
className="object-cover object-center"
|
||||
sizes="(max-width:1024px) 100vw, 40vw"
|
||||
/>
|
||||
</div>
|
||||
<div className="min-w-0">
|
||||
<SectionHeader title={learning.title} />
|
||||
<ProseBlock paragraphs={learning.paragraphs} />
|
||||
</div>
|
||||
</div>
|
||||
</Container>
|
||||
</Section>
|
||||
|
||||
<Section>
|
||||
<Container>
|
||||
<SectionHeader title={learning.title} />
|
||||
<ProseBlock paragraphs={learning.paragraphs} />
|
||||
</Container>
|
||||
</Section>
|
||||
|
||||
<Section tone="subtle">
|
||||
<Container>
|
||||
<SectionHeader
|
||||
@@ -111,7 +112,7 @@ export function AboutTemplate({ topics }: { topics: IntersectionTopic[] }) {
|
||||
href="/professional"
|
||||
className={cn(buttonVariants({ size: "lg" }), "mt-8 font-bold")}
|
||||
>
|
||||
مشاهده دورهها
|
||||
مشاهده دوره ها
|
||||
</Link>
|
||||
</Container>
|
||||
</Section>
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
import Image from "next/image";
|
||||
import Link from "next/link";
|
||||
import { Clock, Layers, Wallet } from "lucide-react";
|
||||
import { Container } from "@/components/atoms/Container";
|
||||
import { Heading } from "@/components/atoms/Heading";
|
||||
import { Section } from "@/components/atoms/Section";
|
||||
import { TextLink } from "@/components/atoms/TextLink";
|
||||
import { CourseMediaFigure } from "@/components/molecules/CourseMediaFigure";
|
||||
import { DetailList, type DetailItem } from "@/components/molecules/DetailList";
|
||||
import { PageHero } from "@/components/molecules/PageHero";
|
||||
import { SurfaceCard } from "@/components/molecules/SurfaceCard";
|
||||
@@ -15,6 +15,9 @@ import { courseCategoryHref, courseTagHref } from "@/lib/course-nav";
|
||||
import { formatCoursePrice, formatLabel } from "@/lib/labels";
|
||||
import { JsonLd, courseJsonLd } from "@/lib/seo/json-ld";
|
||||
|
||||
/** Portrait brochure delivery assets (~A4). */
|
||||
const BROCHURE_HINT = { width: 1200, height: 1697 } as const;
|
||||
|
||||
export type CourseDetailLabels = {
|
||||
submit: string;
|
||||
success: string;
|
||||
@@ -60,7 +63,6 @@ export function CourseDetailTemplate({
|
||||
},
|
||||
];
|
||||
const hasTaxonomy = course.categories.length > 0 || course.tags.length > 0;
|
||||
const bannerUrl = course.posterImageUrl?.trim() || undefined;
|
||||
const brochureUrl = course.brochureImageUrl?.trim() || undefined;
|
||||
|
||||
return (
|
||||
@@ -70,23 +72,19 @@ export function CourseDetailTemplate({
|
||||
title={course.title}
|
||||
intro={course.summary}
|
||||
eyebrow={course.categories[0]?.label ?? course.tags[0]?.label}
|
||||
imageUrl={bannerUrl}
|
||||
/>
|
||||
|
||||
<Section tone="subtle">
|
||||
<Container className="grid min-w-0 gap-10 lg:grid-cols-[minmax(0,1fr)_minmax(0,22rem)] lg:items-start lg:gap-12">
|
||||
<div className="min-w-0 space-y-10">
|
||||
{brochureUrl ? (
|
||||
<div className="relative aspect-[16/9] overflow-hidden rounded-2xl bg-muted ring-1 ring-foreground/10">
|
||||
<Image
|
||||
src={brochureUrl}
|
||||
alt={course.title}
|
||||
fill
|
||||
className="object-cover"
|
||||
sizes="(max-width:1024px) 100vw, 60vw"
|
||||
priority
|
||||
/>
|
||||
</div>
|
||||
<CourseMediaFigure
|
||||
src={brochureUrl}
|
||||
alt={`بروشور ${course.title}`}
|
||||
width={BROCHURE_HINT.width}
|
||||
height={BROCHURE_HINT.height}
|
||||
priority
|
||||
/>
|
||||
) : null}
|
||||
|
||||
<section className="space-y-4">
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import { Suspense } from "react";
|
||||
import Image from "next/image";
|
||||
import { Container } from "@/components/atoms/Container";
|
||||
import { DotCta } from "@/components/atoms/DotCta";
|
||||
import { Heading } from "@/components/atoms/Heading";
|
||||
@@ -14,7 +15,7 @@ import type { Course, SiteStat, TaxonomyRef } from "@/lib/types";
|
||||
const highlights = [
|
||||
{
|
||||
value: "#۱",
|
||||
title: "از برترین دانشگاههای فنی کشور",
|
||||
title: "برترین دانشگاه فنی کشور",
|
||||
text: "دانشگاه صنعتی امیرکبیر",
|
||||
},
|
||||
{
|
||||
@@ -60,7 +61,7 @@ export function ProfessionalLandingTemplate({
|
||||
eyebrow={labels.offeredBy}
|
||||
title={labels.heroTitle}
|
||||
intro={labels.heroBody}
|
||||
imageUrl="/brand/seminar-room.jpg"
|
||||
imageUrl="/brand/executive-seminar-neural.png"
|
||||
actions={
|
||||
<DotCta href="#programs" onDark>
|
||||
{labels.exploreCourses}
|
||||
@@ -71,7 +72,7 @@ export function ProfessionalLandingTemplate({
|
||||
<Section
|
||||
id="programs"
|
||||
tone="dark"
|
||||
className="scroll-mt-24 overflow-hidden border-t border-background/10"
|
||||
className="scroll-mt-24 overflow-hidden border-t border-primary-foreground/10"
|
||||
>
|
||||
<MetamorphField tone="dark" density="sparse" className="opacity-30" />
|
||||
<Container className="relative z-[1]">
|
||||
@@ -80,7 +81,7 @@ export function ProfessionalLandingTemplate({
|
||||
<div id="corporate" className="scroll-mt-24" />
|
||||
<SectionHeader
|
||||
inverse
|
||||
eyebrow="جستجوی دورهها"
|
||||
eyebrow="جستجوی دوره ها"
|
||||
title={labels.pathways}
|
||||
/>
|
||||
<Suspense fallback={null}>
|
||||
@@ -96,8 +97,23 @@ export function ProfessionalLandingTemplate({
|
||||
</Container>
|
||||
</Section>
|
||||
|
||||
<Section id="digital" tone="accent" tight className="scroll-mt-24">
|
||||
<Container>
|
||||
<Section
|
||||
id="digital"
|
||||
tone="accent"
|
||||
tight
|
||||
className="relative scroll-mt-24 overflow-hidden"
|
||||
>
|
||||
<div className="pointer-events-none absolute inset-0" aria-hidden>
|
||||
<Image
|
||||
src="/brand/ai-learning-frames.png"
|
||||
alt=""
|
||||
fill
|
||||
className="object-cover object-[60%_45%] opacity-25 mix-blend-screen"
|
||||
sizes="100vw"
|
||||
/>
|
||||
<div className="absolute inset-0 bg-accent/70" />
|
||||
</div>
|
||||
<Container className="relative z-[1]">
|
||||
<SectionHeader
|
||||
inverse
|
||||
className="mb-0 sm:mb-0"
|
||||
@@ -120,7 +136,7 @@ export function ProfessionalLandingTemplate({
|
||||
<div className="mx-auto grid max-w-4xl gap-4 sm:grid-cols-2">
|
||||
{highlights.map((item) => (
|
||||
<SurfaceCard key={item.title} padded>
|
||||
<p className="text-3xl font-extrabold text-primary">
|
||||
<p className="text-3xl font-bold text-accent">
|
||||
{item.value}
|
||||
</p>
|
||||
<Heading as="h3" level={4} className="mt-3">
|
||||
|
||||
@@ -17,7 +17,7 @@ const badgeVariants = cva(
|
||||
"border-border text-foreground [a]:hover:bg-muted [a]:hover:text-muted-foreground",
|
||||
ghost:
|
||||
"hover:bg-muted hover:text-muted-foreground dark:hover:bg-muted/50",
|
||||
link: "text-primary underline-offset-4 hover:underline",
|
||||
link: "text-accent underline-offset-4 hover:underline",
|
||||
},
|
||||
},
|
||||
defaultVariants: {
|
||||
|
||||
@@ -16,9 +16,9 @@ const buttonVariants = cva(
|
||||
"hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:hover:bg-muted/50",
|
||||
destructive:
|
||||
"bg-destructive/10 text-destructive hover:bg-destructive/20 focus-visible:border-destructive/40 focus-visible:ring-destructive/20 dark:bg-destructive/20 dark:hover:bg-destructive/30 dark:focus-visible:ring-destructive/40",
|
||||
link: "text-primary underline-offset-4 hover:underline",
|
||||
link: "text-accent underline-offset-4 hover:underline",
|
||||
inverse:
|
||||
"border-background/30 bg-transparent text-background hover:border-background hover:bg-background hover:text-foreground",
|
||||
"border-primary-foreground/30 bg-transparent text-primary-foreground hover:border-primary-foreground hover:bg-card hover:text-card-foreground",
|
||||
},
|
||||
size: {
|
||||
default:
|
||||
|
||||
@@ -31,7 +31,7 @@ function DialogOverlay({
|
||||
<DialogPrimitive.Backdrop
|
||||
data-slot="dialog-overlay"
|
||||
className={cn(
|
||||
"fixed inset-0 isolate z-50 bg-black/10 duration-100 supports-backdrop-filter:backdrop-blur-xs data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0",
|
||||
"fixed inset-0 isolate z-50 bg-primary/45 duration-100 supports-backdrop-filter:backdrop-blur-xs data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0",
|
||||
className
|
||||
)}
|
||||
{...props}
|
||||
|
||||
@@ -28,7 +28,7 @@ function SheetOverlay({ className, ...props }: SheetPrimitive.Backdrop.Props) {
|
||||
<SheetPrimitive.Backdrop
|
||||
data-slot="sheet-overlay"
|
||||
className={cn(
|
||||
"fixed inset-0 z-50 bg-black/10 transition-opacity duration-150 data-ending-style:opacity-0 data-starting-style:opacity-0 supports-backdrop-filter:backdrop-blur-xs",
|
||||
"fixed inset-0 z-50 bg-primary/45 transition-opacity duration-150 data-ending-style:opacity-0 data-starting-style:opacity-0 supports-backdrop-filter:backdrop-blur-xs",
|
||||
className
|
||||
)}
|
||||
{...props}
|
||||
|
||||
@@ -49,7 +49,7 @@ function TooltipContent({
|
||||
<TooltipPrimitive.Popup
|
||||
data-slot="tooltip-content"
|
||||
className={cn(
|
||||
"z-50 inline-flex w-fit max-w-xs origin-(--transform-origin) items-center gap-1.5 rounded-md bg-foreground px-3 py-1.5 text-xs text-background has-data-[slot=kbd]:pe-1.5 data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-start-2 data-[side=inline-start]:slide-in-from-end-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 **:data-[slot=kbd]:relative **:data-[slot=kbd]:isolate **:data-[slot=kbd]:z-50 **:data-[slot=kbd]:rounded-sm data-[state=delayed-open]:animate-in data-[state=delayed-open]:fade-in-0 data-[state=delayed-open]:zoom-in-95 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",
|
||||
"z-50 inline-flex w-fit max-w-xs origin-(--transform-origin) items-center gap-1.5 rounded-md bg-primary px-3 py-1.5 text-xs text-primary-foreground has-data-[slot=kbd]:pe-1.5 data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-start-2 data-[side=inline-start]:slide-in-from-end-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 **:data-[slot=kbd]:relative **:data-[slot=kbd]:isolate **:data-[slot=kbd]:z-50 **:data-[slot=kbd]:rounded-sm data-[state=delayed-open]:animate-in data-[state=delayed-open]:fade-in-0 data-[state=delayed-open]:zoom-in-95 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",
|
||||
className
|
||||
)}
|
||||
{...props}
|
||||
|
||||
Reference in new issue
Block a user