forge
Explore
Log in

Don't you dare go Hollow

Document structure, design tokens and bun workflow

Browse files at this commit

9274e88cd08e6e20d2f9be68a21f3fec10787236Burak BoduroğluParent: 3027044
  • docs
    • document structure, design tokens and bun workflow
Show full message
docs: document structure, design tokens and bun workflow

Ekran görüntüsü betiği Playwright'ı bağımlılık yapmaz; kurulu olduğu yer PLAYWRIGHT ile verilir.
README.mdadded+79 -0
@@ -0,0 +1,79 @@
1+# hezarfen_landing
2+
3+Hezarfen'in ürün tanıtım sayfası: okul, kurs ve etüt merkezleri için eğitim
4+yönetim platformunu anlatan tek sayfalık site.
5+
6+Sayfa bir satış sayfasıdır, iş planı değil. Fiyat tabloları, pazar büyüklüğü,
7+yatırım ve ekip özgeçmişleri bilinçli olarak burada yer almaz: kurum müdürü
8+ürünün ne yaptığını ve demonun nasıl başladığını öğrenmek için gelir, sayı
9+görüşmede konuşulur.
10+
11+## Çalıştırma
12+
13+Paket yöneticisi olarak yalnızca **bun** kullanılır.
14+
15+```sh
16+bun install
17+bun run dev # geliştirme sunucusu
18+bun run typecheck # tsc --noEmit
19+bun run build # .output/ altına sunucu derlemesi
20+bun run preview # derlenmiş sürümü yerelde çalıştır
21+bun run start # .output/server/index.mjs
22+```
23+
24+## Yapı
25+
26+| Yol | İçerik |
27+| --- | --- |
28+| `src/i18n/tr.ts` | Sayfadaki **bütün** metin. İçerik değişikliği burada başlar. |
29+| `src/config.ts` | Alan adı, e-posta, şehir, bölüm çıpaları (`anchors`). |
30+| `src/routes/index.tsx` | Bölümlerin sırası. |
31+| `src/components/home/` | `Hero` ve bölümler (`Sections.tsx`). |
32+| `src/components/illustrations/edu.tsx` | Eğitim temalı pixel illüstrasyonlar. |
33+| `src/components/icons/pixel.tsx` | Pixelarticons'tan seçilmiş ikonlar (MIT). |
34+| `src/app.css` | Tasarım sistemi: tek palet, `hz-` önekli sınıflar. |
35+| `src/lib/schema.ts` | schema.org çıktısı (Organization, WebSite, ürün listesi, SSS). |
36+| `public/brand/` | Marka SVG'leri ve `og.png` kaynağı. |
37+
38+Bölüm eklemek: `src/i18n/tr.ts`'e metni yaz, `src/config.ts`'e çıpasını ekle,
39+`Sections.tsx`'te bileşenini yaz ve `routes/index.tsx`'te sıraya koy. Header,
40+footer ve site haritası çıpaları `config.ts`'ten okuduğu için kendiliğinden
41+güncellenir.
42+
43+## Tasarım
44+
45+Tek renk: **#00ADD8** (Go'nun mavisi). Zemin beyaz, her ikinci bölüm kırık
46+beyaz; ayırıcılar gölge değil saç teli çizgi. Renk yalnızca eylem ve veri için
47+kullanılır — böylece hiçbir yerde arayüzün tamamına yayılmış bir ton olmaz.
48+
49+Tüm renk, yazı ve boşluk değerleri `src/app.css` içindeki `:root` bloğundadır;
50+palet değişikliği tek yerden yapılır.
51+
52+## Marka varlıkları
53+
54+SVG kaynaktan PNG üretimi (macOS'ta `brew install librsvg`):
55+
56+```sh
57+rsvg-convert -w 1200 -h 630 public/brand/og.svg -o public/og.png
58+rsvg-convert -w 512 -h 512 public/favicon.svg -o public/brand/hezarfen-mark-512.png
59+rsvg-convert -w 180 -h 180 public/favicon.svg -o public/apple-touch-icon.png
60+```
61+
62+## Ekran görüntüsü
63+
64+`scripts/shoot.mjs` çalışan bir sunucuyu bölüm bölüm fotoğraflar. Playwright
65+projenin bağımlılığı değildir; kurulu olduğu yer `PLAYWRIGHT` ile verilir:
66+
67+```sh
68+bun run preview &
69+PLAYWRIGHT=/yol/playwright/index.mjs bun scripts/shoot.mjs http://localhost:4173 /tmp/shots
70+```
71+
72+## Yayına alma
73+
74+`bun run build` → `.output/`. Sunucu `bun .output/server/index.mjs` ile
75+çalışır; `/healthz` derlemenin commit'ini döner, `/sitemap.xml` ve
76+`/robots.txt` sayfayla birlikte üretilir.
77+
78+Alan adı ve e-posta `src/config.ts` içindedir; alan adı bağlandığında
79+`domain`, `url` ve `public/robots.txt` içindeki sitemap satırı güncellenir.
scripts/shoot.mjsadded+69 -0
@@ -0,0 +1,69 @@
1+/**
2+ * Screenshots the running site, band by band, so a layout regression is
3+ * something you can look at rather than something you have to notice.
4+ *
5+ * Usage: start a server (`bun .output/server/index.mjs`), then
6+ * bun scripts/shoot.mjs [baseUrl] [outDir]
7+ *
8+ * Playwright is not a dependency of this project: the script resolves it from
9+ * wherever it is installed via `PLAYWRIGHT` so CI does not have to carry a
10+ * browser download for a tool only used by hand.
11+ */
12+const { chromium } = await import(process.env.PLAYWRIGHT ?? "playwright");
13+
14+const base = process.argv[2] ?? "http://localhost:3000";
15+const out = process.argv[3] ?? "/tmp/hezarfen-shots";
16+
17+const shots = [
18+ { name: "hero", width: 1440, height: 900, y: 0 },
19+ { name: "mobile", width: 390, height: 844, y: 0 },
20+];
21+
22+const browser = await chromium.launch();
23+
24+for (const shot of shots) {
25+ const page = await browser.newPage({
26+ viewport: { width: shot.width, height: shot.height },
27+ deviceScaleFactor: 1,
28+ });
29+ await page.goto(base, { waitUntil: "networkidle" });
30+ await page.waitForTimeout(1200);
31+ await page.screenshot({ path: `${out}/${shot.name}.png` });
32+ await page.close();
33+}
34+
35+// Every band, at desktop width, in one tall pass.
36+const page = await browser.newPage({ viewport: { width: 1440, height: 900 } });
37+await page.goto(base, { waitUntil: "networkidle" });
38+
39+// Walk the whole page first: the reveal observer only fires for blocks that
40+// have been in the viewport, and a section taller than the window would
41+// otherwise be photographed with its lower half still at opacity 0.
42+const height = await page.evaluate(() => document.body.scrollHeight);
43+for (let y = 0; y < height; y += 600) {
44+ await page.evaluate(offset => window.scrollTo(0, offset), y);
45+ await page.waitForTimeout(120);
46+}
47+await page.waitForTimeout(900);
48+await page.evaluate(() => window.scrollTo(0, 0));
49+for (const id of [
50+ "neden",
51+ "urunler",
52+ "moduller",
53+ "nasil-calisir",
54+ "roller",
55+ "guven",
56+ "kimler-icin",
57+ "hakkimizda",
58+ "sss",
59+ "iletisim",
60+]) {
61+ const band = page.locator(`#${id}`);
62+ await band.scrollIntoViewIfNeeded();
63+ // The reveal transitions run for 700ms plus an 80ms per-card stagger.
64+ await page.waitForTimeout(1400);
65+ await band.screenshot({ path: `${out}/${id}.png` });
66+}
67+await browser.close();
68+
69+console.log(`wrote ${out}`);