Enhance layout and functionality by integrating TercihProfiliKapisiLazy component into layout.tsx, improving user experience with a new section in the RootLayout. Update BolumlerPage and ListemPage for better structure and readability, including adjustments to headings and content organization. Refactor UniversiteIcerik to utilize UniversiteProgramTablosu for displaying program data, and streamline UniversiteKonumHaritasi for improved rendering. Update ManuelListe components for clearer user instructions and enhanced interaction. Overall, these changes aim to improve visual clarity and user engagement across the application.
All checks were successful
Deploy / deploy (push) Successful in 7m25s
All checks were successful
Deploy / deploy (push) Successful in 7m25s
This commit is contained in:
@@ -10,26 +10,11 @@ import { SiteFooter } from "@/components/site-footer";
|
||||
import { Sayfalama, SAYFA_BOYU } from "@/components/sayfalama";
|
||||
import { PagePixelDivider } from "@/components/pixel-decor";
|
||||
import { UniversiteKonumHaritasi } from "@/components/universite-konum-haritasi";
|
||||
import {
|
||||
Table,
|
||||
TableBody,
|
||||
TableCell,
|
||||
TableHead,
|
||||
TableHeader,
|
||||
TableRow,
|
||||
} from "@/components/ui/table";
|
||||
import { UniversiteProgramTablosu } from "@/components/universite-program-tablosu";
|
||||
import type { Program } from "@/lib/db";
|
||||
|
||||
const sayi = (n: number) => n.toLocaleString("tr-TR");
|
||||
|
||||
const TUR_ETIKET: Record<string, string> = {
|
||||
SAYISAL: "SAY",
|
||||
"EŞİT AĞIRLIK": "EA",
|
||||
SÖZEL: "SÖZ",
|
||||
DİL: "DİL",
|
||||
TYT: "TYT",
|
||||
};
|
||||
|
||||
export function uniToplamSayfa(programSayisi: number): number {
|
||||
return Math.max(1, Math.ceil(programSayisi / SAYFA_BOYU));
|
||||
}
|
||||
@@ -69,12 +54,16 @@ export function UniversiteIcerik({
|
||||
(sayfa - 1) * SAYFA_BOYU,
|
||||
sayfa * SAYFA_BOYU,
|
||||
);
|
||||
const gruplar: { fakulte: string; programlar: Program[] }[] = [];
|
||||
const gruplar: {
|
||||
fakulte: string;
|
||||
programlar: (Program & { bolumSlug: string | null })[];
|
||||
}[] = [];
|
||||
for (const p of dilim) {
|
||||
const anahtar = p.fakulte ?? "Diğer";
|
||||
const satir = { ...p, bolumSlug: bolumSlugFromIsim(p.isim) };
|
||||
const son = gruplar[gruplar.length - 1];
|
||||
if (son && son.fakulte === anahtar) son.programlar.push(p);
|
||||
else gruplar.push({ fakulte: anahtar, programlar: [p] });
|
||||
if (son && son.fakulte === anahtar) son.programlar.push(satir);
|
||||
else gruplar.push({ fakulte: anahtar, programlar: [satir] });
|
||||
}
|
||||
|
||||
const ilkSayfa = sayfa === 1;
|
||||
@@ -178,6 +167,7 @@ export function UniversiteIcerik({
|
||||
</p>
|
||||
|
||||
<div className="mt-6 grid grid-cols-2 gap-3 lg:grid-cols-[1fr_1fr_1.35fr] lg:grid-rows-2">
|
||||
<UniversiteKonumHaritasi universite={uni.ad} il={uni.il} />
|
||||
<dl className="contents">
|
||||
<div className="rounded-xl border border-slate-200 bg-white p-4">
|
||||
<dt className="text-xs font-medium uppercase tracking-wide text-slate-500">
|
||||
@@ -216,7 +206,6 @@ export function UniversiteIcerik({
|
||||
</dd>
|
||||
</div>
|
||||
</dl>
|
||||
<UniversiteKonumHaritasi universite={uni.ad} il={uni.il} />
|
||||
</div>
|
||||
</>
|
||||
) : (
|
||||
@@ -238,10 +227,7 @@ export function UniversiteIcerik({
|
||||
|
||||
<PagePixelDivider seed={57} className="mt-8" />
|
||||
|
||||
<div
|
||||
id="programlar"
|
||||
className="mt-8"
|
||||
>
|
||||
<div id="programlar" className="mt-8">
|
||||
<h2 className="font-heading text-xl font-bold text-slate-900">
|
||||
Üniversite programları
|
||||
</h2>
|
||||
@@ -250,67 +236,7 @@ export function UniversiteIcerik({
|
||||
</p>
|
||||
</div>
|
||||
|
||||
{gruplar.map(({ fakulte, programlar }, i) => (
|
||||
<section key={`${fakulte}-${i}`} className="mt-6">
|
||||
<h2 className="mb-3 font-heading text-xl font-bold text-slate-900">
|
||||
{fakulte}
|
||||
</h2>
|
||||
<div className="overflow-x-auto rounded-xl border border-slate-200 bg-white">
|
||||
<Table>
|
||||
<TableHeader>
|
||||
<TableRow>
|
||||
<TableHead>Program</TableHead>
|
||||
<TableHead>Puan Türü</TableHead>
|
||||
<TableHead className="text-right">2025 Puan</TableHead>
|
||||
<TableHead className="text-right">2025 Sıralama</TableHead>
|
||||
<TableHead className="text-right">2024 Sıralama</TableHead>
|
||||
<TableHead className="text-right">Kontenjan</TableHead>
|
||||
</TableRow>
|
||||
</TableHeader>
|
||||
<TableBody>
|
||||
{programlar.map((p) => {
|
||||
const bolumSlug = bolumSlugFromIsim(p.isim);
|
||||
return (
|
||||
<TableRow key={p.id}>
|
||||
<TableCell className="max-w-72">
|
||||
{bolumSlug ? (
|
||||
<Link
|
||||
href={`/bolum/${bolumSlug}`}
|
||||
className="font-medium text-slate-900 hover:text-primary hover:underline"
|
||||
>
|
||||
{p.isim.trim()}
|
||||
</Link>
|
||||
) : (
|
||||
<span className="font-medium">
|
||||
{p.isim.trim()}
|
||||
</span>
|
||||
)}
|
||||
</TableCell>
|
||||
<TableCell>{TUR_ETIKET[p.tur] ?? p.tur}</TableCell>
|
||||
<TableCell className="text-right tabular-nums">
|
||||
{p.puan2025 != null
|
||||
? p.puan2025.toFixed(2).replace(".", ",")
|
||||
: "—"}
|
||||
</TableCell>
|
||||
<TableCell className="text-right tabular-nums">
|
||||
{p.sira2025 != null ? sayi(p.sira2025) : "—"}
|
||||
</TableCell>
|
||||
<TableCell className="text-right tabular-nums">
|
||||
{p.sira2024 != null ? sayi(p.sira2024) : "—"}
|
||||
</TableCell>
|
||||
<TableCell className="text-right tabular-nums">
|
||||
{p.kontenjan2025 != null
|
||||
? sayi(p.kontenjan2025)
|
||||
: "—"}
|
||||
</TableCell>
|
||||
</TableRow>
|
||||
);
|
||||
})}
|
||||
</TableBody>
|
||||
</Table>
|
||||
</div>
|
||||
</section>
|
||||
))}
|
||||
<UniversiteProgramTablosu gruplar={gruplar} />
|
||||
|
||||
<p className="mt-3 text-xs leading-5 text-slate-500">
|
||||
"—": o yıl için yerleştirme verisi bulunmuyor (yeni açılan
|
||||
|
||||
Reference in New Issue
Block a user