-
Notifications
You must be signed in to change notification settings - Fork 76
Open
Description
<!doctype html>
<title>Has & Ziynet</title> <style> :root { --neon:#00ff66; } body{margin:0;background:#000;color:#fff;font-family:Arial,system-ui;padding:14px} .top{display:flex;align-items:center;gap:10px;justify-content:center;margin:6px 0 10px} .top img{width:54px;height:54px;border-radius:12px} h1{margin:0;color:gold;font-size:22px;letter-spacing:.5px} .card{border:1px solid #2a2a2a;border-radius:12px;padding:12px;margin:10px 0;background:#070707} label{display:block;font-size:14px;opacity:.9;margin-bottom:6px} input,select,button{width:100%;padding:12px;border-radius:10px;border:none;font-size:18px} input,select{background:#151515;color:#fff} button{background:var(--neon);font-weight:800} .row{display:flex;gap:10px} .row>div{flex:1} .seg{display:flex;gap:10px;margin-top:8px} .seg button{background:#2a2a2a;color:#fff;font-weight:800} .seg .on{background:gold;color:#000} .out{margin-top:10px;font-size:20px} .gold{color:gold;font-weight:800} .green{color:var(--neon);font-weight:900} .grid{display:grid;grid-template-columns:1fr 1fr;gap:10px} .small{font-size:13px;opacity:.75;margin-top:6px;line-height:1.35} </style>
Has Alış (₺) — sen gir
<div class="seg">
<button id="b995" class="on" type="button" onclick="setRef(995)">995</button>
<button id="b999" type="button" onclick="setRef(999.99)">999.99</button>
</div>
<div class="small">Referans değişince tüm hesaplar otomatik güncellenir.</div>
Gram / Ayar
Hesapla
14 Ayar (585)
18 Ayar (750)
22 Ayar (916)
24 Ayar (995)
Ziynet
Çeyrek
Ata
Gram
Yarım
Özel Ürünler
<script>
let ref = 995;
function setRef(v){
ref = v;
document.getElementById('b995').classList.toggle('on', v===995);
document.getElementById('b999').classList.toggle('on', v!==995);
}
function getFiyat(){
const f = Number(String(document.getElementById('hasFiyat').value).replace(',','.'));
return isFinite(f) ? f : 0;
}
function fmt(n, d){ return (Math.round(n * (10**d)) / (10**d)).toFixed(d); }
function calcGram(){
const g = Number(String(document.getElementById('gram').value).replace(',','.'));
const a = Number(document.getElementById('ayar').value);
const f = getFiyat();
if(!g || !a){ document.getElementById('outGram').innerHTML = ""; return; }
const has = (g * a) / ref;
const tl = has * f;
document.getElementById('outGram').innerHTML =
`
0.50 gr 24
0.50 gr 22
1 gr 22
2.5 gr 24
Has: ${fmt(has,3)} gr
TL: ${fmt(tl,2)} ₺
`;
}
function calcZiynet(ad, hasGr){
const f = getFiyat();
const tl = hasGr * f;
document.getElementById('outZiynet').innerHTML =
`${ad} Has: ${fmt(hasGr,3)} gr
TL: ${fmt(tl,2)} ₺
`;
}
function calcOzel(ad, gram, ayarM){
const f = getFiyat();
const has = (gram * ayarM) / ref;
const tl = has * f;
document.getElementById('outOzel').innerHTML =
`${ad} → Has: ${fmt(has,3)} gr
TL: ${fmt(tl,2)} ₺
`;
}
</script>
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels