HerdDeck Site Editor
Logo konumu, paket metinleri ve ana sayfa pazarlama dili için lokal editör.
Repo klasörünü seç
Yükle
Kaydet
Dil
Önce dili seç, sonra metinleri düzenle.
Logo boyutu
Logo yukarı/aşağı
Sayfayı aç
Varsayılan logo
Repo klasörünü seç: herddeck-shepherd-site
HerdDeck
Shepherd
Demo
Mini
Pro
Üst rozet
Hero başlığı
Hero alt metni
Üst Demo kartı
Üst Mini kartı
Üst Pro kartı
Fiyat bölümü Demo açıklaması
Fiyat bölümü Mini açıklaması
Fiyat bölümü Pro açıklaması
`); } async function loadAll(){ if (!rootHandle) throw new Error("Önce repo klasörünü seç."); loadedHtml = {}; for (const lang of LANGS) { loadedHtml[lang] = await readText(langPath(lang)); } try { loadedCss = await readText(["assets","herddeck-user-controls.css"]); const s = loadedCss.match(/--hd-logo-size:\s*([^;]+);/); const y = loadedCss.match(/--hd-logo-y:\s*([^;]+);/); if (s) $("logoSize").value = parseInt(s[1]); if (y) $("logoY").value = parseInt(y[1]); } catch(e) {} loadCurrentLangFromMemory(); status("Yüklendi. Düzenle ve Kaydet'e bas."); } async function saveAll(){ if (!rootHandle) throw new Error("Önce repo klasörünü seç."); const d = getFields(); let html = loadedHtml[currentLang] || await readText(langPath(currentLang)); for (const key of Object.keys(defaults[currentLang])) { html = replaceField(html, currentLang, key, d[key]); } html = await ensureCssLinked(html, 2); await writeText(langPath(currentLang), html); loadedHtml[currentLang] = html; loadedValues[currentLang] = d; const css = `:root { --hd-logo-size: ${$("logoSize").value}px; --hd-logo-y: ${$("logoY").value}px; } header a:first-child img:first-of-type, .site-header a:first-child img:first-of-type, nav a:first-child img:first-of-type, .navbar a:first-child img:first-of-type { height: var(--hd-logo-size) !important; max-height: var(--hd-logo-size) !important; width: auto !important; transform: translateY(var(--hd-logo-y)) !important; object-fit: contain !important; display: block !important; } header a:first-child, .site-header a:first-child, nav a:first-child, .navbar a:first-child { display: inline-flex !important; align-items: center !important; gap: 10px !important; } `; await writeText(["assets","herddeck-user-controls.css"], css); status(`${currentLang} kaydedildi.\nSonra terminalde: git add . && git commit -m "edit(site): update local editor changes" && git push`); } $("pickBtn").onclick = async () => { rootHandle = await window.showDirectoryPicker({mode:"readwrite"}); status("Repo seçildi: " + rootHandle.name + "\nŞimdi Yükle'ye bas."); }; $("loadBtn").onclick = () => loadAll().catch(e => status("Hata: " + e.message)); $("saveBtn").onclick = () => saveAll().catch(e => status("Hata: " + e.message)); $("openPreviewBtn").onclick = () => { window.open(`../shepherd/${currentLang}/index.html`, "_blank"); }; $("resetBtn").onclick = () => { $("logoSize").value = 42; $("logoY").value = -7; updatePreview(); }; for (const id of ["logoSize","logoY","eyebrow","heroTitle","heroText","demoTop","miniTop","proTop","demoPricing","miniPricing","proPricing"]) { $(id).addEventListener("input", updatePreview); } initTabs(); setFields(defaults.tr);