feat(danisman): soru formunda tek seçim sıradaki soruya geçirir, geçişteki kayma düzeldi; sürüm notları ağacı, bildirimde geri al oku, üst şerit ve mobil menü düzenlemeleri (→ 2.1.4)
All checks were successful
Deploy / deploy (push) Successful in 14m11s
All checks were successful
Deploy / deploy (push) Successful in 14m11s
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -24,6 +24,26 @@ export const TEMA_GECIS_OLAYI = "kt-tema-gecis";
|
||||
// en uzak köşeyi de örtecek kadar büyük seçilir.
|
||||
const CEKIRDEK = 0.55;
|
||||
|
||||
/**
|
||||
* Logodan açılan halkanın ölçüsü: merkez header'daki işaret (krom gizli
|
||||
* sayfalarda sol üst köşe), son yarıçap çekirdeğin en uzak köşeyi örttüğü
|
||||
* değer. Tema geçişi ve telefon menüsünün perdesi (mobil-menu.tsx) aynı
|
||||
* halkayı kullanır.
|
||||
*/
|
||||
export function logoHalkasi(): { x: number; y: number; son: number } {
|
||||
const logo = document
|
||||
.querySelector('header a[aria-label="KolayTercih"]')
|
||||
?.getBoundingClientRect();
|
||||
const gorunur = logo && logo.width > 0 && logo.bottom > 0;
|
||||
const x = gorunur ? logo.left + logo.height / 2 : 24;
|
||||
const y = gorunur ? logo.top + logo.height / 2 : 24;
|
||||
const enUzak = Math.hypot(
|
||||
Math.max(x, window.innerWidth - x),
|
||||
Math.max(y, window.innerHeight - y),
|
||||
);
|
||||
return { x, y, son: Math.ceil(enUzak / CEKIRDEK) };
|
||||
}
|
||||
|
||||
/** Sayfa geçişi ile logo dönüşümü arasındaki kısa nefes (ms). */
|
||||
const LOGO_NEFESI = 80;
|
||||
|
||||
@@ -57,21 +77,11 @@ export function temayiGecisle(uygula: () => void) {
|
||||
if (suruyor) return;
|
||||
|
||||
const kok = document.documentElement;
|
||||
// Halkanın merkezi header'daki logo; krom gizli sayfalarda sol üst köşe.
|
||||
const logo = document
|
||||
.querySelector('header a[aria-label="KolayTercih"]')
|
||||
?.getBoundingClientRect();
|
||||
const gorunur = logo && logo.width > 0 && logo.bottom > 0;
|
||||
const x = gorunur ? logo.left + logo.height / 2 : 24;
|
||||
const y = gorunur ? logo.top + logo.height / 2 : 24;
|
||||
const enUzak = Math.hypot(
|
||||
Math.max(x, window.innerWidth - x),
|
||||
Math.max(y, window.innerHeight - y),
|
||||
);
|
||||
const { x, y, son } = logoHalkasi();
|
||||
|
||||
kok.style.setProperty("--kt-tema-x", `${x}px`);
|
||||
kok.style.setProperty("--kt-tema-y", `${y}px`);
|
||||
kok.style.setProperty("--kt-tema-son", `${Math.ceil(enUzak / CEKIRDEK)}px`);
|
||||
kok.style.setProperty("--kt-tema-son", `${son}px`);
|
||||
kok.classList.add(GECIS_SINIFI);
|
||||
suruyor = true;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user