forge
Explore
Log in

Don't you dare go Hollow

Show real product screenshots instead of drawings

Browse files at this commit

b07fd424f5fb5446e97b8e72724e9d441dabd361Burak BoduroğluParent: f85993c
  • feat
    • show real product screenshots instead of drawings
Show full message
feat(home): show real product screenshots instead of drawings

The hero now shows the manager dashboard, and the Platform and Celebi rows
show the exam question view and the Celebi panel, taken from the real
hezarfen_frontend app. Hezarfen Zeka and Ses Atolyesi have no screen worth
showing yet, so they keep their pixel drawings.

scripts/product-shots/ drives the frontend with Playwright and answers its
/api calls from a fictional school inside the browser, so the shots are
repeatable and nothing is written to a backend. Output is 2x WebP.
README.mdmodified+30 -4
@@ -34,7 +34,10 @@ bun run start # .output/server/index.mjs
34 | `src/components/home/` | `Hero` ve bölümler (`Sections.tsx`). |34 | `src/components/home/` | `Hero` ve bölümler (`Sections.tsx`). |
35 | `src/components/how/Pipeline.tsx` | Dört aşamalı animasyonlu şema. |35 | `src/components/how/Pipeline.tsx` | Dört aşamalı animasyonlu şema. |
36 | `src/components/ContactForm.tsx` | Form; sunucu eylemi `src/lib/contact.ts`. |36 | `src/components/ContactForm.tsx` | Form; sunucu eylemi `src/lib/contact.ts`. |
37-| `src/components/illustrations/edu.tsx` | Eğitim temalı pixel illüstrasyonlar. |37+| `src/components/ProductShot.tsx` | Gerçek ürün ekran görüntüsü, ince tarayıcı çerçevesiyle. |
38+| `src/lib/product-shots.ts` | Ekran görüntülerinin listesi: dosya, boyut, adres satırı, alt metni. |
39+| `public/product/` | Ekran görüntüleri (WebP, 2×). Elle düzenlenmez, script üretir. |
40+| `src/components/illustrations/edu.tsx` | Ürünün henüz ekranı olmayan yerler için pixel illüstrasyonlar. |
38 | `src/components/icons/pixel.tsx` | Pixelarticons'tan seçilmiş ikonlar (MIT). |41 | `src/components/icons/pixel.tsx` | Pixelarticons'tan seçilmiş ikonlar (MIT). |
39 | `src/app.css` | Tasarım sistemi: tek palet, `hz-` önekli sınıflar. |42 | `src/app.css` | Tasarım sistemi: tek palet, `hz-` önekli sınıflar. |
40 | `src/lib/schema.ts` | schema.org çıktısı (Organization, WebSite, ürün listesi, SSS). |43 | `src/lib/schema.ts` | schema.org çıktısı (Organization, WebSite, ürün listesi, SSS). |
@@ -81,10 +84,33 @@ rsvg-convert -w 512 -h 512 public/favicon.svg -o public/brand/hezarfen-mark-512.
81 rsvg-convert -w 180 -h 180 public/favicon.svg -o public/apple-touch-icon.png84 rsvg-convert -w 180 -h 180 public/favicon.svg -o public/apple-touch-icon.png
82 ```85 ```
83 86
84-## Ekran görüntüsü87+## Ekran görüntüleri
85 88
86-`scripts/shoot.mjs` çalışan bir sunucuyu bölüm bölüm fotoğraflar. Playwright89+İki ayrı script var.
87-projenin bağımlılığı değildir; kurulu olduğu yer `PLAYWRIGHT` ile verilir:90+
91+**Ürün görüntüleri** (`scripts/product-shots/`) — hero'daki pano ve ürün
92+satırlarındaki ekranlar, gerçek `hezarfen_frontend` uygulamasından alınır.
93+Staging okulu boş olduğu için script frontend'in `/api` isteklerini tarayıcı
94+içinde `fixtures.mjs`'teki kurgusal okulun verisiyle yanıtlar; hiçbir backend'e
95+yazılmaz ve her çekim aynı sonucu verir. Hangi ekranın, hangi rolle ve hangi
96+kadrajla çekileceği `shots.mjs`'tedir. Çıktı WebP'dir (`brew install webp`).
97+
98+```sh
99+# frontend reposunda
100+bun run dev -- --host 127.0.0.1 --port 4173
101+
102+# bu repoda
103+PLAYWRIGHT=../hezarfen_frontend/node_modules/playwright/index.mjs \
104+ bun scripts/product-shots/shoot.mjs http://127.0.0.1:4173 public/product
105+```
106+
107+Bir görüntünün kadrajı değişirse `src/lib/product-shots.ts` içindeki `width` ve
108+`height` değerlerini dosyanın yeni piksel boyutuyla güncelleyin. Ses Atölyesi ve
109+Hezarfen Zekâ'nın gösterilecek bir ekranı henüz olmadığı için bu satırlar
110+illüstrasyonla kalır.
111+
112+**Sayfa kontrolü** (`scripts/shoot.mjs`) — landing'in kendisini bölüm bölüm
113+fotoğraflar; düzen bozulmalarını gözle yakalamak için:
88 114
89 ```sh115 ```sh
90 bun run preview &116 bun run preview &
public/product/celebi.webpadded+0 -0

Binary file changed

public/product/dashboard.webpadded+0 -0

Binary file changed

public/product/exam-question.webpadded+0 -0

Binary file changed

scripts/product-shots/api.mjsadded+102 -0
@@ -0,0 +1,102 @@
1+/**
2+ * Answers the frontend's `/api` requests from the fixture school.
3+ *
4+ * Only reads are served. Anything unmatched returns an empty page and is
5+ * logged, so a new screen that needs data shows up as a line in the output
6+ * instead of a silently blank panel.
7+ */
8+const page = (items, url) => {
9+ const limit = Number(url.searchParams.get("limit")) || null;
10+ const offset = Number(url.searchParams.get("offset")) || 0;
11+ const slice = limit ? items.slice(offset, offset + limit) : items.slice(offset);
12+ return { items: slice, total: items.length, limit, offset };
13+};
14+
15+export function createApi(school, { as }) {
16+ const s = school;
17+ const me = as;
18+ const strip = ({ key, ...rest }) => rest;
19+ const find = (list, id) => list.find(x => x.id === id);
20+
21+ const marksFor = user => {
22+ const courses = s.courses.map(c => {
23+ const res = s.exams
24+ .filter(e => e.course === c.id)
25+ .map(e => ({ e, r: s.results.find(r => r.exam === e.id && r.user.id === user) }))
26+ .filter(x => x.r)
27+ .map(({ e, r }) => ({ exam: e.id, title: e.title, kind: e.kind, weight: e.kind === "midterm" ? 2 : 1, mark: r.mark, grade: null, graded_by: s.teachers[c.key].id }));
28+ const avg = res.length ? Math.round((res.reduce((a, b) => a + b.mark * b.weight, 0) / res.reduce((a, b) => a + b.weight, 0)) * 10) / 10 : null;
29+ return { course: strip(c), results: res, average: avg, average_grade: null };
30+ });
31+ const avgs = courses.map(c => c.average).filter(a => a != null);
32+ return { user, courses, overall_average: avgs.length ? Math.round((avgs.reduce((a, b) => a + b, 0) / avgs.length) * 10) / 10 : null, overall_grade: null };
33+ };
34+
35+ const counts = (present, absent, late, excused) => ({ present, absent, late, excused, custom: {}, total: present + absent + late + excused, rate: present / (present + absent + late + excused) });
36+
37+ const routes = [
38+ [/^\/auth\/me$/, () => me],
39+ [/^\/time$/, () => ({ now: s.now })],
40+ [/^\/users\/me\/profile$/, () => ({ id: me.id, username: me.username, display_name: me.display_name, role: me.role, bio: null, avatar: null, classes: [], courses: [], badges: [], stats: {} })],
41+ [/^\/users\/search$/, u => page(s.users, u)],
42+ [/^\/users$/, u => page(s.users, u)],
43+ [/^\/users\/([^/]+)$/, (u, [id]) => find(s.users, id)],
44+ [/^\/courses(\/me)?$/, u => page(s.courses.map(strip), u)],
45+ [/^\/courses\/([^/]+)$/, (u, [id]) => strip(find(s.courses, id))],
46+ [/^\/courses\/([^/]+)\/subjects$/, (u, [id]) => page(s.subjectRows.filter(x => x.course === id).map(strip), u)],
47+ [/^\/courses\/([^/]+)\/exams$/, (u, [id]) => page(s.exams.filter(x => x.course === id), u)],
48+ [/^\/courses\/([^/]+)\/enrollments$/, (u, [id]) => page(s.students.map(st => ({ id: `en-${id}-${st.id}`, course: id, user: s.ref(st), enrolled_by: s.ref(s.manager), source: s.classOf(st).id })), u)],
49+ [/^\/classes(\/me)?$/, u => page(s.classes, u)],
50+ [/^\/classes\/([^/]+)$/, (u, [id]) => find(s.classes, id)],
51+ [/^\/classes\/([^/]+)\/members$/, (u, [id]) => page(s.students.filter(st => s.classOf(st).id === id).map(st => ({ id: `cm-${st.id}`, class: id, user: s.ref(st), added_by: s.ref(s.manager) })), u)],
52+ [/^\/classes\/user\/([^/]+)$/, (u, [id]) => page([s.classOf(find(s.students, id) ?? s.students[0])], u)],
53+ [/^\/terms$/, u => page([s.term], u)],
54+ [/^\/exams$/, u => {
55+ const after = Number(u.searchParams.get("ends_after"));
56+ const list = after ? s.exams.filter(e => e.ends_at > after).sort((a, b) => a.starts_at - b.starts_at) : [...s.exams].reverse();
57+ return page(list, u);
58+ }],
59+ [/^\/exams\/([^/]+)$/, (u, [id]) => find(s.exams, id)],
60+ [/^\/exams\/([^/]+)\/statistics$/, (u, [id]) => s.examStats.get(id) ?? { exam: id, graded: 0, average: null, min: null, max: null }],
61+ [/^\/exams\/([^/]+)\/results$/, (u, [id]) => page(s.results.filter(r => r.exam === id), u)],
62+ [/^\/exams\/([^/]+)\/questions$/, (u, [id]) => page(s.questions.map(q => ({ ...q, exam: id })), u)],
63+ [/^\/bank-questions$/, u => page(s.bank, u)],
64+ [/^\/homework$/, u => page(s.homework, u)],
65+ [/^\/events$/, u => {
66+ const after = Number(u.searchParams.get("ends_after"));
67+ const list = after ? s.events.filter(e => e.ends_at > after).sort((a, b) => a.starts_at - b.starts_at) : s.events;
68+ return page(list, u);
69+ }],
70+ [/^\/appointments$/, u => page(s.appointments, u)],
71+ [/^\/messages$/, u => page(u.searchParams.get("read") === "false" ? s.messages.filter(m => !m.read) : s.messages, u)],
72+ [/^\/meals\/menus$/, u => page([s.menu], u)],
73+ [/^\/marks\/me$/, () => marksFor(me.id)],
74+ [/^\/marks\/([^/]+)$/, (u, [id]) => marksFor(decodeURIComponent(id))],
75+ [/^\/attendance\/(me|[^/]+)$/, (u, [id]) => ({ user: id, events: counts(11, 1, 0, 0), sessions: counts(142, 4, 3, 2), courses: s.courses.map(c => ({ course: strip(c), counts: counts(24, 1, 1, 0) })) })],
76+ [/^\/modules$/, () => ({ enabled: ["appointments", "attendance", "bank_questions", "boards", "chatbot", "classes", "course_notes", "courses", "events", "exams", "homework", "marks", "meals", "messages", "notes", "payments", "pomodoro", "questions", "sessions", "subjects", "work"] })],
77+ [/^\/notes$/, u => page([], u)],
78+ [/^\/chatbot\/threads$/, u => page(s.chat?.threads ?? [], u)],
79+ [/^\/chatbot\/threads\/([^/]+)\/messages$/, (u, [id]) => page(s.chat?.messages.filter(m => m.thread_id === id) ?? [], u)],
80+ ];
81+
82+ /** Metadata identical for every school: safe to read from the real backend. */
83+ const passthrough = [/^\/limits$/, /^\/modules\/catalog$/, /^\/settings$/];
84+
85+ return async function handle(route) {
86+ const req = route.request();
87+ const url = new URL(req.url());
88+ const path = url.pathname.replace(/^\/api/, "");
89+ if (req.method() !== "GET") return route.fulfill({ status: 204, body: "" });
90+ if (passthrough.some(re => re.test(path))) return route.continue();
91+ for (const [re, fn] of routes) {
92+ const m = path.match(re);
93+ if (m) {
94+ const body = fn(url, m.slice(1));
95+ if (body === undefined) break;
96+ return route.fulfill({ status: 200, contentType: "application/json", body: JSON.stringify(body) });
97+ }
98+ }
99+ console.log(" [api] unmocked", path + url.search);
100+ return route.fulfill({ status: 200, contentType: "application/json", body: JSON.stringify({ items: [], total: 0, limit: null, offset: 0 }) });
101+ };
102+}
scripts/product-shots/fixtures.mjsadded+253 -0
@@ -0,0 +1,253 @@
1+/**
2+ * A fictional school for product screenshots.
3+ *
4+ * The staging school is empty, and an empty table sells nothing. Rather than
5+ * seeding a shared backend, the shoot script answers the frontend's `/api`
6+ * calls from this file inside the browser, so every screenshot is repeatable
7+ * and nothing is written anywhere. Names are invented; timestamps are built
8+ * around `now` so "upcoming" always means upcoming.
9+ */
10+const HOUR = 3_600_000;
11+const DAY = 24 * HOUR;
12+
13+export function buildSchool(now = Date.now()) {
14+ let seq = 0;
15+ const id = prefix => `${prefix}-${String(++seq).padStart(4, "0")}`;
16+ const ref = u => ({ id: u.id, username: u.username, display_name: `${u.name} ${u.surname}` });
17+
18+ const person = (role, name, surname) => ({
19+ id: id("u"),
20+ username: `${name}.${surname}`.toLocaleLowerCase("tr").replace(/ı/g, "i").replace(/ş/g, "s").replace(/ğ/g, "g").replace(/ü/g, "u").replace(/ö/g, "o").replace(/ç/g, "c").replace(/ı/g, "i"),
21+ role,
22+ name,
23+ surname,
24+ email: null,
25+ phone: null,
26+ birth_date: null,
27+ display_name: `${name} ${surname}`,
28+ bio: null,
29+ theme: "light",
30+ language: "tr",
31+ palette_color: null,
32+ });
33+
34+ const manager = person("manager", "Burak", "Boduroğlu");
35+ const teachers = {
36+ mat: person("teacher", "Elif", "Demir"),
37+ fiz: person("teacher", "Kerem", "Arslan"),
38+ kim: person("teacher", "Zeynep", "Koç"),
39+ tur: person("teacher", "Ahmet", "Yıldız"),
40+ bio: person("teacher", "Deniz", "Şahin"),
41+ tar: person("teacher", "Seda", "Öztürk"),
42+ };
43+ const studentNames = [
44+ ["Ayşe", "Yılmaz"], ["Mehmet", "Çelik"], ["Ecem", "Aydın"], ["Emir", "Kaplan"],
45+ ["Defne", "Erdoğan"], ["Can", "Kurt"], ["İrem", "Aksoy"], ["Yusuf", "Polat"],
46+ ["Elif Naz", "Güneş"], ["Berk", "Tekin"], ["Nehir", "Bulut"], ["Arda", "Keskin"],
47+ ["Zehra", "Uçar"], ["Kaan", "Özkan"], ["Selin", "Aslan"], ["Mert", "Doğan"],
48+ ["Ada", "Işık"], ["Eren", "Coşkun"], ["Duru", "Karaca"], ["Onur", "Toprak"],
49+ ["Sude", "Kılıç"], ["Barış", "Aksu"], ["Melis", "Er"], ["Efe", "Baysal"],
50+ ];
51+ const students = studentNames.map(([n, s]) => person("student", n, s));
52+ const users = [manager, ...Object.values(teachers), ...students];
53+
54+ const term = { id: id("term"), name: "2026–2027 Güz", starts_at: now - 10 * DAY, ends_at: now + 120 * DAY, archived_at: null };
55+
56+ const course = (key, title, description) => ({
57+ id: id("course"),
58+ creator: ref(manager),
59+ teachers: [ref(teachers[key])],
60+ title,
61+ description,
62+ kind: "course",
63+ term: term.id,
64+ capacity: null,
65+ key,
66+ });
67+ const courses = [
68+ course("mat", "Matematik 11", "Fonksiyonlar, trigonometri ve analitik geometri."),
69+ course("fiz", "Fizik 11", "Kuvvet ve hareket, elektrik ve manyetizma."),
70+ course("kim", "Kimya 11", "Modern atom teorisi, gazlar ve çözeltiler."),
71+ course("tur", "Türk Dili ve Edebiyatı 11", "Paragraf, anlatım biçimleri ve edebi akımlar."),
72+ course("bio", "Biyoloji 11", "İnsan fizyolojisi ve komünite ekolojisi."),
73+ course("tar", "Tarih 11", "Değişen dünya dengeleri ve Osmanlı'da modernleşme."),
74+ ];
75+ const courseBy = key => courses.find(c => c.key === key);
76+
77+ const classes = [
78+ { id: id("class"), creator: ref(manager), name: "11-A", grade: "11", term: term.id, teacher: ref(teachers.mat) },
79+ { id: id("class"), creator: ref(manager), name: "11-B", grade: "11", term: term.id, teacher: ref(teachers.fiz) },
80+ { id: id("class"), creator: ref(manager), name: "12-A", grade: "12", term: term.id, teacher: ref(teachers.tur) },
81+ ];
82+ const classOf = s => classes[students.indexOf(s) % 2];
83+
84+ const subjects = {
85+ mat: ["Fonksiyonlar", "Trigonometri", "Analitik geometri", "Denklem ve eşitsizlikler"],
86+ fiz: ["Vektörler", "Newton'un hareket yasaları", "İş, güç ve enerji", "Elektrik alan"],
87+ kim: ["Atom modelleri", "Gazlar", "Sıvı çözeltiler", "Kimyasal tepkimelerde enerji"],
88+ tur: ["Paragraf", "Anlatım biçimleri", "Servet-i Fünun", "Cümle türleri"],
89+ bio: ["Sinir sistemi", "Endokrin sistem", "Duyu organları", "Destek ve hareket"],
90+ tar: ["Avrupa'da değişim", "Osmanlı'da ıslahatlar", "Sanayi devrimi", "Diplomasi"],
91+ };
92+ const subjectRows = [];
93+ for (const c of courses) for (const name of subjects[c.key]) subjectRows.push({ id: id("sub"), course: c.id, name, description: "", key: c.key });
94+
95+ /** A deterministic "random" so every shoot draws the same school. */
96+ let seed = 7;
97+ const rand = () => ((seed = (seed * 16807) % 2147483647) - 1) / 2147483646;
98+
99+ const exam = (key, title, kind, daysFromNow, extra = {}) => ({
100+ id: id("exam"),
101+ creator: teachers[key].id,
102+ course: courseBy(key).id,
103+ title,
104+ description: "",
105+ kind,
106+ mode: "sync",
107+ starts_at: now + daysFromNow * DAY,
108+ ends_at: now + daysFromNow * DAY + 80 * 60_000,
109+ duration_ms: 80 * 60_000,
110+ max_attempts: 1,
111+ allow_rejoin: false,
112+ allow_review: true,
113+ draft: false,
114+ ...extra,
115+ });
116+ const exams = [
117+ exam("mat", "Fonksiyonlar tarama sınavı", "quiz", -34),
118+ exam("fiz", "Hareket ve kuvvet kısa sınav", "quiz", -30),
119+ exam("mat", "1. Dönem 1. Yazılı", "midterm", -26),
120+ exam("kim", "Atom modelleri kısa sınav", "quiz", -22),
121+ exam("tur", "Paragraf deneme 3", "quiz", -19),
122+ exam("fiz", "1. Dönem 1. Yazılı", "midterm", -15),
123+ exam("bio", "Sinir sistemi kısa sınav", "quiz", -12),
124+ exam("mat", "Trigonometri kazanım testi", "quiz", -8),
125+ exam("kim", "Gazlar kısa sınav", "quiz", -4),
126+ exam("mat", "TYT Matematik deneme 4", "quiz", -1),
127+ exam("fiz", "Elektrik alan kısa sınav", "quiz", 2),
128+ exam("mat", "1. Dönem 2. Yazılı", "midterm", 5),
129+ exam("tar", "Islahat hareketleri kısa sınav", "quiz", 6),
130+ exam("kim", "Çözeltiler kazanım testi", "quiz", 9, { draft: true }),
131+ ];
132+ const trend = [58, 61, 63, 60, 66, 68, 67, 71, 73, 76];
133+ const examStats = new Map();
134+ exams.forEach((e, i) => {
135+ if (e.starts_at > now) return;
136+ const avg = trend[i] ?? 70;
137+ examStats.set(e.id, { exam: e.id, graded: 24, average: avg, min: avg - 31, max: Math.min(100, avg + 24) });
138+ });
139+
140+ /** The exam the Platform shot opens: each question with its topic, points and options. */
141+ const questionRows = [
142+ ["f(x) = 2x − 3 ve g(x) = x² + 1 olduğuna göre (f∘g)(2) kaçtır?", ["5", "7", "9", "11", "13"], 1],
143+ ["sin 30° + cos 60° ifadesinin değeri kaçtır?", ["1/2", "1", "√3/2", "√3", "2"], 1],
144+ ["A(1, 2) ve B(5, 8) noktaları arasındaki uzaklık kaç birimdir?", ["√13", "2√13", "6", "√52", "8"], 1],
145+ ["x² − 5x + 6 = 0 denkleminin kökler toplamı kaçtır?", ["−6", "−5", "5", "6", "11"], 2],
146+ ];
147+ const questions = questionRows.map(([text, options, correct], i) => {
148+ const subj = subjectRows.filter(s => s.key === "mat")[i % 4];
149+ const choices = options.map(t => ({ id: id("ch"), text: t }));
150+ return { id: id("q"), exam: exams[9].id, subject: subj.id, text, kind: "choice", points: 25, choices, correct: choices[correct].id, from_bank: null, banked_as: null };
151+ });
152+
153+ const bank = [];
154+ const bankTexts = [
155+ ["mat", "f(x) = 2x − 3 ve g(x) = x² + 1 olduğuna göre (f∘g)(2) kaçtır?", 14],
156+ ["mat", "sin 30° + cos 60° ifadesinin değeri kaçtır?", 9],
157+ ["fiz", "Sürtünmesiz yatay düzlemde 2 kg kütleli cisme 10 N kuvvet uygulanıyor. Cismin ivmesi kaç m/s² olur?", 11],
158+ ["kim", "Aynı sıcaklıkta eşit hacimli kaplardaki gazlardan hangisinin ortalama kinetik enerjisi daha büyüktür?", 6],
159+ ["mat", "A(1, 2) ve B(5, 8) noktaları arasındaki uzaklık kaç birimdir?", 8],
160+ ["tur", "Aşağıdaki cümlelerin hangisinde öznel bir yargı vardır?", 12],
161+ ["bio", "Refleks yayında impulsun izlediği yol aşağıdakilerden hangisidir?", 5],
162+ ["fiz", "Yüklü iki küre arasındaki mesafe iki katına çıkarsa elektriksel kuvvet nasıl değişir?", 7],
163+ ["tar", "Tanzimat Fermanı'nın ilanında etkili olan dış gelişme hangisidir?", 4],
164+ ["kim", "Molar derişimi 0,2 M olan 500 mL çözeltide kaç mol çözünen vardır?", 10],
165+ ];
166+ bankTexts.forEach(([key, text, used], i) => {
167+ const subj = subjectRows.filter(s => s.key === key)[i % 4];
168+ const choices = ["A", "B", "C", "D", "E"].map(l => ({ id: id("ch"), text: l }));
169+ bank.push({
170+ id: id("bq"), owner: teachers[key].id, owner_name: `${teachers[key].name} ${teachers[key].surname}`,
171+ subject: subj.id, subject_name: subj.name, text, kind: "choice", points: 10, choices, correct: choices[i % 5].id,
172+ source_exam: null, visibility: i % 3 === 0 ? "private" : "school", created_at: now - (20 - i) * DAY, used_count: used,
173+ });
174+ });
175+
176+ const results = [];
177+ for (const e of exams) {
178+ if (e.starts_at > now) continue;
179+ const avg = examStats.get(e.id).average;
180+ students.forEach(s => {
181+ results.push({ id: id("res"), exam: e.id, user: ref(s), seq: 1, mark: Math.max(35, Math.min(100, Math.round(avg + (rand() - 0.5) * 30 + (students.indexOf(s) % 5) * 2))), graded_by: ref(teachers.mat) });
182+ });
183+ }
184+
185+ const homework = [
186+ ["mat", "Trigonometri çalışma kâğıdı 2", 1],
187+ ["fiz", "Newton yasaları soru seti", 2],
188+ ["tur", "Servet-i Fünun okuma notu", 3],
189+ ["kim", "Gazlar konu özeti", 4],
190+ ["bio", "Sinir sistemi kavram haritası", -3],
191+ ["mat", "Fonksiyonlar tekrar testi", -6],
192+ ["tar", "Islahatlar zaman çizelgesi", -9],
193+ ["fiz", "Vektörler alıştırma", -13],
194+ ].map(([key, title, d], i) => ({
195+ id: id("hw"), course: courseBy(key).id, subject: subjectRows.find(s => s.key === key).id, title,
196+ description: null, due_at: now + d * DAY + 17 * HOUR - (now % DAY), assigned: null, created_by: teachers[key].id, created_at: now - (d < 0 ? 20 : 5) * DAY - i * HOUR,
197+ }));
198+
199+ const events = [
200+ ["Veli toplantısı — 11. sınıflar", 3, { kind: "school" }],
201+ ["TYT deneme sınavı 5", 7, { kind: "school" }],
202+ ["Bilim şenliği hazırlık", 10, { kind: "registration", capacity: 30 }],
203+ ["Rehberlik semineri: çalışma planı", 12, { kind: "role", role: "student" }],
204+ ["Sınıf öğretmenleri kurulu", -5, { kind: "role", role: "teacher" }],
205+ ["Okul gezisi: Anıtkabir", -16, { kind: "school" }],
206+ ].map(([title, d, audience]) => ({ id: id("ev"), creator: manager.id, title, description: "", audience, starts_at: now + d * DAY, ends_at: now + d * DAY + 2 * HOUR }));
207+
208+ const appointments = [
209+ [students[0], "Matematik yazılı sonucu hakkında görüşmek istiyoruz.", 1],
210+ [students[4], "Trigonometri konusunda ek çalışma önerisi.", 2],
211+ [students[9], "Haftalık çalışma planını birlikte gözden geçirelim.", 4],
212+ ].map(([s, reason, d]) => ({
213+ id: id("ap"), slot: id("slot"), teacher: ref(teachers.mat), requester: ref(s), status: "pending", reason,
214+ starts_at: now + d * DAY, ends_at: now + d * DAY + 20 * 60_000, proposed_starts_at: null, proposed_ends_at: null,
215+ proposed_by: null, decided_by: null, cancelled_by: null, cancel_reason: null, reject_reason: null, created_at: now - DAY,
216+ }));
217+
218+ const today = new Date(now).toISOString().slice(0, 10);
219+ const menu = {
220+ id: id("menu"), date: today, slot: "Öğle", capacity: 320, created_by: ref(manager), created_at: now - 2 * DAY,
221+ dishes: [
222+ ["Mercimek çorbası", 4500, ["vejetaryen"]], ["Fırında tavuk", 12000, []], ["Bulgur pilavı", 5000, ["vejetaryen"]], ["Cacık", 3500, ["vejetaryen"]],
223+ ].map(([name, price_minor, tags]) => ({ id: id("dish"), name, description: null, price_minor, tags, conflicts: [], created_at: now - 3 * DAY })),
224+ };
225+
226+ const messages = [
227+ [manager, "Yazılı takvimi güncellendi", "2. yazılı tarihleri takvime işlendi, kontrol edebilir misiniz?"],
228+ [students[2], "Ödev teslimi", "Hocam trigonometri kâğıdını sisteme yükledim."],
229+ [teachers.fiz, "Ortak deneme analizi", "11-B'nin fizik kazanım raporunu paylaştım."],
230+ ].map(([from, subject, body], i) => ({
231+ id: id("msg"), sender: ref(from), sender_role: from.role, recipient: ref(teachers.mat), recipient_role: "teacher",
232+ subject, body, sent_at: now - (i + 1) * 3 * HOUR, read: i > 0, folder: "inbox", label: null,
233+ }));
234+
235+ const thread = { id: id("th"), title: "Yoklama nereden alınır?", created_at: now - HOUR, updated_at: now - 50 * 60_000 };
236+ const thread2 = { id: id("th"), title: "11-A kazanım raporu", created_at: now - 2 * DAY, updated_at: now - 2 * DAY };
237+ const msg = (role, content, extra = {}) => ({ id: id("cm"), thread_id: thread.id, role, status: "complete", content, truncated: false, error_code: null, created_at: now - HOUR, completed_at: now - HOUR, ...extra });
238+ const chat = {
239+ threads: [thread, thread2],
240+ messages: [
241+ msg("user", "Bugünkü 3. ders için yoklamayı nereden alıyorum?"),
242+ msg("assistant", "Yoklama, dersin oturumu üzerinden alınır:\n\n1. **Dersler** sayfasından Matematik 11'i açın.\n2. **Ders oturumları** sekmesinde bugünkü oturumu seçin.\n3. Öğrencileri Var, Yok veya Geç olarak işaretleyip kaydedin.\n\nKaydettiğiniz yoklama velinin ekranına ve öğrencinin devam raporuna aynı anda düşer.", {
243+ navigation: { route: "/attendance", label: "Yoklama sayfasına git" },
244+ }),
245+ msg("user", "Devamsızlığı 5 günü geçen öğrenciler var mı?"),
246+ msg("assistant", "Yetkiniz olan şubelerde bu dönem **5 günü geçen devamsızlık yok**. En yakın iki öğrenci 11-A'da 4 gün ile Emir Kaplan ve 3 gün ile Can Kurt.", {
247+ suggestions: ["Emir Kaplan'ın devam raporunu göster", "Veliye mesaj taslağı hazırla"],
248+ }),
249+ ],
250+ };
251+
252+ return { chat, now, users, manager, teachers, students, term, courses, classes, classOf, subjectRows, exams, examStats, questions, bank, results, homework, events, appointments, menu, messages, ref, rand, DAY, HOUR };
253+}
scripts/product-shots/shoot.mjsadded+52 -0
@@ -0,0 +1,52 @@
1+/**
2+ * Photographs the real Hezarfen frontend, filled with the fixture school, for
3+ * the landing page's product shots.
4+ *
5+ * Usage (frontend dev server running, see README):
6+ * bun scripts/product-shots/shoot.mjs [frontendUrl] [outDir] [only...]
7+ *
8+ * Playwright is resolved from `PLAYWRIGHT` (the frontend repo already carries
9+ * it) and drives the system Chrome, so no browser download is needed. Each
10+ * shot is written as WebP, which needs `cwebp` (`brew install webp`).
11+ */
12+import { buildSchool } from "./fixtures.mjs";
13+import { createApi } from "./api.mjs";
14+import { shots } from "./shots.mjs";
15+
16+const { chromium } = await import(process.env.PLAYWRIGHT ?? "playwright");
17+const base = process.argv[2] ?? "http://127.0.0.1:4173";
18+const out = process.argv[3] ?? "public/product";
19+const only = process.argv.slice(4);
20+
21+const school = buildSchool();
22+const browser = await chromium.launch({ channel: "chrome" });
23+
24+for (const shot of shots(school)) {
25+ if (only.length && !only.includes(shot.name)) continue;
26+ const ctx = await browser.newContext({
27+ viewport: shot.viewport ?? { width: 1440, height: 900 },
28+ deviceScaleFactor: 2,
29+ locale: "tr-TR",
30+ colorScheme: "light",
31+ });
32+ // The router devtools badge is dev-only chrome that would end up in every shot.
33+ await ctx.addInitScript(() => {
34+ const css = "[class*='TanStackRouterDevtools'],.TanStackRouterDevtools,button[aria-label*='TanStack']{display:none!important}";
35+ addEventListener("DOMContentLoaded", () => { const s = document.createElement("style"); s.textContent = css; document.head.append(s); });
36+ });
37+ const page = await ctx.newPage();
38+ await page.route(url => url.pathname.startsWith("/api/"), createApi(school, { as: shot.as }));
39+ await page.goto(base + shot.path, { waitUntil: "networkidle" }).catch(() => {});
40+ await page.waitForTimeout(1500);
41+ if (shot.prepare) await shot.prepare(page);
42+ const png = `${out}/${shot.name}.png`;
43+ if (shot.locator) await shot.locator(page).screenshot({ path: png });
44+ else await page.screenshot({ path: png, clip: shot.clip });
45+ // WebP at q86 keeps UI text crisp at a fifth of the PNG's weight.
46+ const webp = Bun.spawnSync(["cwebp", "-quiet", "-q", "86", png, "-o", `${out}/${shot.name}.webp`]);
47+ if (webp.exitCode !== 0) throw new Error(`cwebp failed for ${shot.name} (brew install webp)`);
48+ await Bun.file(png).delete();
49+ console.log(`shot ${shot.name}`);
50+ await ctx.close();
51+}
52+await browser.close();
scripts/product-shots/shots.mjsadded+44 -0
@@ -0,0 +1,44 @@
1+/**
2+ * Which screens to photograph, as whom, and how to set each one up.
3+ *
4+ * Feature shots crop the sidebar away: at the size a landing card renders
5+ * them, the content is what has to stay legible, and the hero shot already
6+ * shows the whole shell.
7+ */
8+const SIDEBAR = 260;
9+
10+export function shots(s) {
11+ return [
12+ {
13+ name: "dashboard",
14+ path: "/",
15+ as: s.manager,
16+ clip: { x: 0, y: 0, width: 1440, height: 790 },
17+ },
18+ {
19+ name: "exam-question",
20+ path: `/exams/${s.exams[9].id}`,
21+ as: s.teachers.mat,
22+ viewport: { width: 1080, height: 1000 },
23+ // Only the question card: at half a column's width, the tag, the points
24+ // and the options are what has to stay readable.
25+ prepare: async page => {
26+ await page.getByRole("tab", { name: /Sorular/ }).click();
27+ await page.waitForTimeout(1200);
28+ },
29+ locator: page => page.locator("main .data-shell:visible").first(),
30+ },
31+ {
32+ name: "celebi",
33+ path: "/",
34+ as: s.teachers.mat,
35+ clip: { x: 896, y: 0, width: 544, height: 900 },
36+ prepare: async page => {
37+ await page.getByRole("button", { name: /Çelebi.ye sor/ }).first().click();
38+ await page.waitForTimeout(800);
39+ await page.getByRole("button", { name: s.chat.threads[0].title }).click();
40+ await page.waitForTimeout(1200);
41+ },
42+ },
43+ ];
44+}
src/app.cssmodified+69 -0
@@ -570,6 +570,75 @@
570 max-width: 340px;570 max-width: 340px;
571 color: #c9c7c1;571 color: #c9c7c1;
572 }572 }
573+/* Feature rows that show a screenshot drop the drawing's padded well: the
574+ shot brings its own frame, and a frame inside a frame reads as a mat. */
575+.hz-feature-shot {
576+ padding: 0;
577+ border: 0;
578+ background: transparent;
579+}
580+.hz-feature-shot .hz-shot {
581+ box-shadow: var(--shadow);
582+}
583+
584+/* ---- Product screenshot -------------------------------------------------- */
585+.hz-shot {
586+ width: 100%;
587+ margin: 0;
588+ overflow: hidden;
589+ border: 1px solid var(--line);
590+ border-radius: var(--radius-lg);
591+ background: var(--band);
592+}
593+/* A portrait shot (a side panel) is capped so its row stays about as tall as
594+ its copy. */
595+.hz-shot-tall {
596+ max-width: 380px;
597+}
598+.hz-shot img {
599+ display: block;
600+ width: 100%;
601+ height: auto;
602+}
603+.hz-shot-bar {
604+ display: flex;
605+ align-items: center;
606+ gap: 12px;
607+ height: 34px;
608+ padding-inline: 12px;
609+ border-bottom: 1px solid var(--line);
610+ background: var(--paper);
611+}
612+.hz-shot-dots {
613+ display: flex;
614+ gap: 6px;
615+}
616+.hz-shot-dots i {
617+ width: 9px;
618+ height: 9px;
619+ border-radius: 999px;
620+ background: var(--line-strong);
621+}
622+.hz-shot-url {
623+ min-width: 0;
624+ margin-inline: auto;
625+ padding: 3px 14px;
626+ overflow: hidden;
627+ border-radius: var(--radius);
628+ background: var(--sunken);
629+ font-family: var(--font-mono);
630+ font-size: 0.6875rem;
631+ color: var(--muted);
632+ white-space: nowrap;
633+ text-overflow: ellipsis;
634+}
635+/* The dots are balanced by an empty box of the same width, so the address
636+ sits in the true centre of the bar. */
637+.hz-shot-bar::after {
638+ content: "";
639+ width: 39px;
640+}
641+
573 .hz-pills {642 .hz-pills {
574 display: flex;643 display: flex;
575 flex-wrap: wrap;644 flex-wrap: wrap;
src/components/ProductShot.tsxadded+42 -0
@@ -0,0 +1,42 @@
1+import { products, type ProductShotName } from "~/lib/product-shots";
2+
3+type Props = {
4+ name: ProductShotName;
5+ /** The hero shot is the largest paint on the page: load it first. */
6+ priority?: boolean;
7+ class?: string;
8+};
9+
10+/**
11+ * A screenshot of the real frontend inside a thin browser frame.
12+ *
13+ * The frame is what tells a visitor this is the product and not a mock: an
14+ * address bar with the page's path, nothing else. Width and height come from
15+ * the image itself, so the card reserves its space before the file arrives
16+ * and the page does not shift under the reader.
17+ */
18+export default function ProductShot(props: Props) {
19+ const shot = () => products[props.name];
20+
21+ return (
22+ <figure class={`hz-shot ${props.class ?? ""}`}>
23+ <div class="hz-shot-bar" aria-hidden="true">
24+ <span class="hz-shot-dots">
25+ <i />
26+ <i />
27+ <i />
28+ </span>
29+ <span class="hz-shot-url">{shot().url}</span>
30+ </div>
31+ <img
32+ src={shot().src}
33+ alt={shot().alt}
34+ width={shot().width}
35+ height={shot().height}
36+ loading={props.priority ? "eager" : "lazy"}
37+ fetchpriority={props.priority ? "high" : "auto"}
38+ decoding="async"
39+ />
40+ </figure>
41+ );
42+}
src/components/home/Hero.tsxmodified+5 -6
@@ -1,13 +1,13 @@
1 import { A } from "@solidjs/router";1 import { A } from "@solidjs/router";
2 import { For } from "solid-js";2 import { For } from "solid-js";
3 import { PixelArrowRight } from "../icons/pixel";3 import { PixelArrowRight } from "../icons/pixel";
4-import { AppScreenIllustration } from "../illustrations/edu";4+import ProductShot from "../ProductShot";
5 import { routes } from "~/config";5 import { routes } from "~/config";
6 import { t } from "~/i18n";6 import { t } from "~/i18n";
7 7
8 /**8 /**
9- * The first screen: a sentence, what it means, two actions, and a drawing of9+ * The first screen: a sentence, what it means, two actions, and the product
10- * the thing itself on a framed card. The roles the platform serves close the10+ * itself — the manager's dashboard — on a framed card. The roles the platform serves close the
11 * hero on a ruled row, so the page visibly continues below without anything11 * hero on a ruled row, so the page visibly continues below without anything
12 * having to move.12 * having to move.
13 */13 */
@@ -35,10 +35,9 @@ export default function Hero() {
35 <p class="hz-hero-note">{t.hero.note}</p>35 <p class="hz-hero-note">{t.hero.note}</p>
36 </div>36 </div>
37 37
38- {/* The product as one screen, on a card that reads as a frame without38+ {/* The product as one screen: the first thing a müdür opens. */}
39- pretending to be a screenshot. */}
40 <div class="hz-art-card">39 <div class="hz-art-card">
41- <AppScreenIllustration class="hz-illustration" />40+ <ProductShot name="dashboard" priority />
42 </div>41 </div>
43 42
44 <div class="hz-roles">43 <div class="hz-roles">
src/components/home/Sections.tsxmodified+35 -18
@@ -1,4 +1,4 @@
1-import { For } from "solid-js";1+import { For, Show } from "solid-js";
2 import {2 import {
3 PixelArrowRight,3 PixelArrowRight,
4 PixelBookOpen,4 PixelBookOpen,
@@ -22,17 +22,14 @@ import {
22 PixelUserPlus,22 PixelUserPlus,
23 PixelUsers,23 PixelUsers,
24 } from "../icons/pixel";24 } from "../icons/pixel";
25-import {25+import { AudioLessonIllustration, StudyPlanIllustration } from "../illustrations/edu";
26- AnswerSheetIllustration,26+import ProductShot from "../ProductShot";
27- AudioLessonIllustration,
28- GuidedScreenIllustration,
29- StudyPlanIllustration,
30-} from "../illustrations/edu";
31 import { A } from "@solidjs/router";27 import { A } from "@solidjs/router";
32 import Reveal from "../Reveal";28 import Reveal from "../Reveal";
33 import SectionHeader from "../SectionHeader";29 import SectionHeader from "../SectionHeader";
34 import { mailto, routes, site } from "~/config";30 import { mailto, routes, site } from "~/config";
35 import { t } from "~/i18n";31 import { t } from "~/i18n";
32+import type { ProductShotName } from "~/lib/product-shots";
36 33
37 /** The four things that go wrong today, as four cards. */34 /** The four things that go wrong today, as four cards. */
38 export function Problem() {35 export function Problem() {
@@ -69,14 +66,20 @@ export function Problem() {
69 );66 );
70 }67 }
71 68
72-/** One feature row per product: copy beside a drawing of what it does. */69+/**
70+ * One feature row per product: copy beside the screen that does it. A product
71+ * without a screen worth showing yet keeps its drawing rather than borrowing
72+ * one that would show something else.
73+ */
73 export function Products() {74 export function Products() {
74- const art = [75+ const shots: Partial<Record<string, ProductShotName>> = {
75- AnswerSheetIllustration,76+ "hezarfen-platform": "exam-question",
76- StudyPlanIllustration,77+ celebi: "celebi",
77- GuidedScreenIllustration,78+ };
78- AudioLessonIllustration,79+ const drawings: Record<string, typeof StudyPlanIllustration> = {
79- ];80+ "hezarfen-zeka": StudyPlanIllustration,
81+ "ses-atolyesi": AudioLessonIllustration,
82+ };
80 83
81 return (84 return (
82 <section class="hz-band hz-band-alt hz-anchor" id="urunler">85 <section class="hz-band hz-band-alt hz-anchor" id="urunler">
@@ -91,7 +94,7 @@ export function Products() {
91 <div class="mt-10">94 <div class="mt-10">
92 <For each={t.products.items}>95 <For each={t.products.items}>
93 {(item, i) => {96 {(item, i) => {
94- const Art = art[i() % art.length]!;97+ const shot = shots[item.id];
95 return (98 return (
96 <Reveal>99 <Reveal>
97 <div class="hz-feature" classList={{ "hz-feature-flip": i() % 2 === 1 }}>100 <div class="hz-feature" classList={{ "hz-feature-flip": i() % 2 === 1 }}>
@@ -113,9 +116,23 @@ export function Products() {
113 <For each={item.pills}>{pill => <span>{pill}</span>}</For>116 <For each={item.pills}>{pill => <span>{pill}</span>}</For>
114 </div>117 </div>
115 </div>118 </div>
116- <div class="hz-feature-art">119+ <Show
117- <Art class="hz-illustration" />120+ when={shot}
118- </div>121+ fallback={
122+ <div class="hz-feature-art">
123+ {(() => {
124+ const Drawing = drawings[item.id] ?? AudioLessonIllustration;
125+ return <Drawing class="hz-illustration" />;
126+ })()}
127+ </div>
128+ }
129+ >
130+ {name => (
131+ <div class="hz-feature-art hz-feature-shot">
132+ <ProductShot name={name()} class={name() === "celebi" ? "hz-shot-tall" : ""} />
133+ </div>
134+ )}
135+ </Show>
119 </div>136 </div>
120 </Reveal>137 </Reveal>
121 );138 );
src/components/illustrations/edu.tsxmodified+7 -236
@@ -9,9 +9,10 @@ import { For } from "solid-js";
9 * `currentColor`; only what the drawing is *about* takes the brand, so a9 * `currentColor`; only what the drawing is *about* takes the brand, so a
10 * panel never turns into a block of colour.10 * panel never turns into a block of colour.
11 *11 *
12- * They are illustrations, not screenshots: a classroom, a marked answer12+ * They stand in where the product has no screen to show: a classroom, a
13- * sheet, a weekly plan, a screen being pointed at, a recorded lesson. None of13+ * weekly plan, a recorded lesson, a missing page. Where a real screen exists the page uses a
14- * them pretends to be the product's interface.14+ * screenshot instead (`ProductShot`), so none of these pretends to be the
15+ * product's interface.
15 */16 */
16 type Props = { class?: string };17 type Props = { class?: string };
17 18
@@ -31,137 +32,6 @@ function Frame(props: { x: number; y: number; w: number; h: number; t?: number;
31 );32 );
32 }33 }
33 34
34-/**
35- * The hero's centrepiece: the platform as one screen — the class on the left
36- * with its answers stored option by option, the topic chart and the week's
37- * plan on the right. It is a drawing, not a screenshot: no real interface has
38- * this few pixels, and a mock that pretends otherwise ages the moment the
39- * product moves.
40- */
41-export function AppScreenIllustration(props: Props) {
42- const students = [0, 1, 2, 3, 4, 5];
43- /** Which option each student marked: the data the rest of the page is about. */
44- const marked = [2, 0, 3, 1, 2, 0];
45- const chart = [28, 44, 36, 60, 52, 76];
46- const plan = [
47- [1, 0, 2, 0, 1],
48- [0, 2, 0, 1, 0],
49- [2, 0, 1, 2, 0],
50- ];
51-
52- return (
53- <svg
54- viewBox="0 0 960 520"
55- fill="none"
56- role="img"
57- aria-label="Hezarfen ekranı: sınıf listesi, konu grafiği ve haftalık plan"
58- shape-rendering="crispEdges"
59- class={props.class}
60- >
61- {/* Window */}
62- <Frame x={0} y={0} w={960} h={520} />
63- <rect x={4} y={44} width={952} height={4} fill="currentColor" />
64- {/* Title bar: three dots and a search field */}
65- <g fill="currentColor" opacity="0.55">
66- <rect x={20} y={18} width={10} height={10} />
67- <rect x={38} y={18} width={10} height={10} />
68- <rect x={56} y={18} width={10} height={10} />
69- </g>
70- <rect x={96} y={14} width={220} height={18} fill="currentColor" opacity="0.14" />
71- <rect x={880} y={14} width={56} height={18} fill={brand} opacity="0.9" />
72-
73- {/* Sidebar: the modules, one of them open */}
74- <rect x={196} y={48} width={4} height={468} fill="currentColor" />
75- <g>
76- <rect x={24} y={72} width={104} height={10} fill="currentColor" opacity="0.3" />
77- <rect x={20} y={104} width={4} height={14} fill={brand} />
78- <rect x={32} y={104} width={128} height={14} fill={brand} opacity="0.22" />
79- <For each={[0, 1, 2, 3, 4]}>
80- {row => (
81- <rect
82- x={32}
83- y={140 + row * 32}
84- width={row % 2 === 0 ? 132 : 108}
85- height={12}
86- fill="currentColor"
87- opacity="0.2"
88- />
89- )}
90- </For>
91- <rect x={32} y={452} width={96} height={12} fill="currentColor" opacity="0.14" />
92- </g>
93-
94- {/* Page heading */}
95- <rect x={228} y={72} width={188} height={16} fill="currentColor" opacity="0.45" />
96- <rect x={228} y={98} width={120} height={10} fill="currentColor" opacity="0.2" />
97-
98- {/* Left panel: the class, answered option by option */}
99- <Frame x={228} y={128} w={352} h={356} t={2} />
100- <rect x={244} y={148} width={96} height={10} fill="currentColor" opacity="0.35" />
101- <For each={students}>
102- {(_, i) => {
103- const y = 180 + i() * 48;
104- return (
105- <g>
106- <rect x={244} y={y} width={72} height={10} fill="currentColor" opacity="0.26" />
107- <For each={[0, 1, 2, 3]}>
108- {option => (
109- <rect
110- x={336 + option * 26}
111- y={y - 2}
112- width={16}
113- height={14}
114- fill={marked[i()] === option ? brand : "currentColor"}
115- opacity={marked[i()] === option ? 1 : 0.16}
116- />
117- )}
118- </For>
119- <rect x={520} y={y - 2} width={40} height={14} fill={brandDeep} opacity="0.5" />
120- </g>
121- );
122- }}
123- </For>
124-
125- {/* Right, top: topic mastery */}
126- <Frame x={604} y={128} w={332} h={168} t={2} />
127- <rect x={620} y={148} width={112} height={10} fill="currentColor" opacity="0.35" />
128- <rect x={620} y={272} width={300} height={2} fill="currentColor" opacity="0.4" />
129- <For each={chart}>
130- {(height, i) => (
131- <rect
132- x={628 + i() * 48}
133- y={272 - height}
134- width={30}
135- height={height}
136- fill={i() >= 4 ? brand : brandDeep}
137- opacity={i() >= 4 ? 1 : 0.6}
138- />
139- )}
140- </For>
141-
142- {/* Right, bottom: the week the data turns into */}
143- <Frame x={604} y={316} w={332} h={168} t={2} />
144- <rect x={620} y={336} width={92} height={10} fill="currentColor" opacity="0.35" />
145- <For each={plan}>
146- {(row, r) => (
147- <For each={row}>
148- {(cell, c) => (
149- <rect
150- x={620 + c() * 62}
151- y={360 + r() * 38}
152- width={50}
153- height={28}
154- fill={cell === 2 ? brand : cell === 1 ? brandDeep : "currentColor"}
155- opacity={cell === 0 ? 0.12 : cell === 1 ? 0.55 : 1}
156- />
157- )}
158- </For>
159- )}
160- </For>
161- </svg>
162- );
163-}
164-
165 /**35 /**
166 * A board with the class's progress on it, a desk, a book stack and a piece of36 * A board with the class's progress on it, a desk, a book stack and a piece of
167 * chalk. The bars are the one thing in brand — the data is the subject of the37 * chalk. The bars are the one thing in brand — the data is the subject of the
@@ -180,7 +50,7 @@ export function ClassroomIllustration(props: Props) {
180 viewBox="0 0 260 200"50 viewBox="0 0 260 200"
181 fill="none"51 fill="none"
182 role="img"52 role="img"
183- aria-label="Sınıf panosunda yükselen kazanım grafiği"53+ aria-label="Tahtada yükselen kazanım grafiği"
184 shape-rendering="crispEdges"54 shape-rendering="crispEdges"
185 class={props.class}55 class={props.class}
186 >56 >
@@ -213,58 +83,6 @@ export function ClassroomIllustration(props: Props) {
213 );83 );
214 }84 }
215 85
216-/**
217- * Hezarfen Platform: an answer sheet where every question carries its topic
218- * tag and every answer is stored per option — the marks are the point, so
219- * they are the brand.
220- */
221-export function AnswerSheetIllustration(props: Props) {
222- const rows = [0, 1, 2, 3, 4];
223- const marked = [1, 3, 0, 2, 3];
224-
225- return (
226- <svg
227- viewBox="0 0 260 200"
228- fill="none"
229- role="img"
230- aria-label="Madde düzeyinde işaretlenmiş cevap kâğıdı"
231- shape-rendering="crispEdges"
232- class={props.class}
233- >
234- <Frame x={40} y={12} w={180} h={176} />
235- {/* Header band: the exam's own line */}
236- <rect x={56} y={28} width={72} height={6} fill={brandDeep} />
237- <rect x={56} y={40} width={44} height={4} fill="currentColor" opacity="0.45" />
238-
239- <For each={rows}>
240- {row => {
241- const y = 64 + row * 24;
242- return (
243- <g>
244- {/* Topic tag */}
245- <rect x={56} y={y + 2} width={24} height={6} fill="currentColor" opacity="0.4" />
246- {/* Four options, one of them marked */}
247- <For each={[0, 1, 2, 3]}>
248- {option => (
249- <rect
250- x={96 + option * 26}
251- y={y}
252- width={14}
253- height={10}
254- fill={marked[row] === option ? brand : "currentColor"}
255- opacity={marked[row] === option ? 1 : 0.28}
256- />
257- )}
258- </For>
259- <rect x={204} y={y + 2} width={6} height={6} fill={brandDeep} />
260- </g>
261- );
262- }}
263- </For>
264- </svg>
265- );
266-}
267-
268 /**86 /**
269 * Hezarfen Zekâ: a week of study, laid out as a grid and filled in by what87 * Hezarfen Zekâ: a week of study, laid out as a grid and filled in by what
270 * the data says. The arrow is the plan updating itself when new data lands.88 * the data says. The arrow is the plan updating itself when new data lands.
@@ -321,53 +139,6 @@ export function StudyPlanIllustration(props: Props) {
321 );139 );
322 }140 }
323 141
324-/**
325- * Çelebi: a screen with the right row lit and a cursor arriving at it. The
326- * assistant's whole job is “the thing you are looking for is here”.
327- */
328-export function GuidedScreenIllustration(props: Props) {
329- return (
330- <svg
331- viewBox="0 0 260 200"
332- fill="none"
333- role="img"
334- aria-label="Kullanıcıyı doğru ekrana yönlendiren asistan"
335- shape-rendering="crispEdges"
336- class={props.class}
337- >
338- <Frame x={24} y={24} w={212} h={132} />
339- {/* Window bar */}
340- <rect x={28} y={40} width={204} height={4} fill="currentColor" opacity="0.5" />
341- {/* Side menu, one row highlighted */}
342- <g>
343- <rect x={40} y={56} width={56} height={10} fill="currentColor" opacity="0.25" />
344- <rect x={40} y={74} width={56} height={10} fill={brand} />
345- <rect x={40} y={92} width={56} height={10} fill="currentColor" opacity="0.25" />
346- <rect x={40} y={110} width={56} height={10} fill="currentColor" opacity="0.25" />
347- </g>
348- {/* Content area: the screen the row opens */}
349- <g fill="currentColor" opacity="0.3">
350- <rect x={112} y={56} width={104} height={8} />
351- <rect x={112} y={72} width={80} height={8} />
352- <rect x={112} y={88} width={92} height={8} />
353- </g>
354- <rect x={112} y={106} width={48} height={14} fill={brandDeep} />
355- {/* Pixel cursor, landing on the highlighted row */}
356- <g fill="currentColor">
357- <rect x={96} y={78} width={6} height={6} />
358- <rect x={102} y={84} width={6} height={6} />
359- <rect x={108} y={90} width={6} height={6} />
360- <rect x={102} y={90} width={6} height={6} />
361- </g>
362- {/* Stand */}
363- <g fill="currentColor">
364- <rect x={116} y={156} width={28} height={16} />
365- <rect x={92} y={172} width={76} height={6} />
366- </g>
367- </svg>
368- );
369-}
370-
371 /**142 /**
372 * Ses Atölyesi: a lesson page turning into sound, with the pause the content143 * Ses Atölyesi: a lesson page turning into sound, with the pause the content
373 * stops at to ask a question.144 * stops at to ask a question.
@@ -380,7 +151,7 @@ export function AudioLessonIllustration(props: Props) {
380 viewBox="0 0 260 200"151 viewBox="0 0 260 200"
381 fill="none"152 fill="none"
382 role="img"153 role="img"
383- aria-label="Ders PDF'inden üretilen sesli ders"154+ aria-label="Ders PDF'inden hazırlanan sesli ders"
384 shape-rendering="crispEdges"155 shape-rendering="crispEdges"
385 class={props.class}156 class={props.class}
386 >157 >
@@ -432,7 +203,7 @@ export function MissingPageIllustration(props: Props) {
432 viewBox="0 0 160 160"203 viewBox="0 0 160 160"
433 fill="none"204 fill="none"
434 role="img"205 role="img"
435- aria-label="Bulunamayan sayfa"206+ aria-label="Bulunamayan sayfa çizimi"
436 shape-rendering="crispEdges"207 shape-rendering="crispEdges"
437 class={props.class}208 class={props.class}
438 >209 >
src/lib/product-shots.tsadded+33 -0
@@ -0,0 +1,33 @@
1+/**
2+ * The product screenshots under `public/product/`, and what each one shows.
3+ *
4+ * They are photographs of the real frontend filled with a fictional school
5+ * (`scripts/product-shots/`), so the files are regenerated rather than edited.
6+ * The pixel sizes below are the files' own, at 2× — keep them in step when a
7+ * shot's crop changes, or the reserved box and the image will disagree.
8+ */
9+export const products = {
10+ dashboard: {
11+ src: "/product/dashboard.webp",
12+ width: 2880,
13+ height: 1580,
14+ url: "hezarfen.app",
15+ alt: "Hezarfen yönetici panosu: ders, sınav ve etkinlik sayıları, son sınavların başarı eğilimi ve ders bazında ortalamalar",
16+ },
17+ "exam-question": {
18+ src: "/product/exam-question.webp",
19+ width: 1480,
20+ height: 946,
21+ url: "hezarfen.app/exams",
22+ alt: "Sınav sorusu: konu etiketi, puanı ve seçenekleriyle; doğru seçenek işaretli",
23+ },
24+ celebi: {
25+ src: "/product/celebi.webp",
26+ width: 1088,
27+ height: 1800,
28+ url: "hezarfen.app · Çelebi",
29+ alt: "Çelebi paneli: yoklamanın nereden alınacağını adım adım anlatan ve ilgili sayfaya götüren yanıt",
30+ },
31+} as const;
32+
33+export type ProductShotName = keyof typeof products;